Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AHs] Support registering assets on Asset Hubs over bridge #5435

Merged
merged 10 commits into from
Oct 17, 2024

Conversation

acatangiu
Copy link
Contributor

Changes

Allows one Asset Hub on one side, to register assets on the other Asset Hub over the bridge.

Rococo <> Ethereum test bridge will be dropped in favor of Westend <> Ethereum test bridge. This PR also changes emulated tests to simulate double bridging from Ethereum<>Westend<>Rococo.

Tests

  • e2e test: Westend Asset Hub can register Westend and Ethereum assets on Asset Hub Rococo
  • e2e test: Rococo Asset Hub can register Rococo assets on Asset Hub Westend
  • e2e test (existing): Users on Ethereum can register Ethereum assets on Asset Hub Westend
  • e2e test: transfer Rococo assets from Rococo to Westend and back
  • e2e test: transfer Westend assets from Westend to Rococo and back
  • e2e test: transfer Ethereum assets (bridged in through Snowbridge) from Westend to Rococo and back

@acatangiu acatangiu added the T10-tests This PR/Issue is related to tests. label Aug 21, 2024
@acatangiu acatangiu self-assigned this Aug 21, 2024
@acatangiu acatangiu enabled auto-merge August 22, 2024 12:57
Copy link
Contributor

@franciscoaguirre franciscoaguirre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@acatangiu acatangiu added the T15-bridges This PR/Issue is related to bridges. label Oct 9, 2024
impl<AssetsAllowedNetworks: Contains<Location>, OriginLocation: Get<Location>>
ContainsPair<Asset, Location> for RemoteAssetFromLocation<AssetsAllowedNetworks, OriginLocation>
impl<
L: TryInto<Location> + Clone,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe xcm::TryAs would also work here:

Suggested change
L: TryInto<Location> + Clone,
L: TryAs<Location>,

so we don't need to clone anything here:

		let Ok(asset) = asset.try_as() else {
			return false;
		};
		let Ok(origin) = origin.try_as() else {
			return false;
		};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the trait TryAs<cumulus_primitives_core::Location> is not implemented for cumulus_primitives_core::Location, which is required by `RemoteAssetFromLocation<AssetsAllowedNetworks, OriginLocation>: ContainsPair<cumulus_primitives_core::Location, cumulus_primitives_core::Location>

although it should work...

@acatangiu acatangiu added this pull request to the merge queue Oct 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2024
@acatangiu acatangiu enabled auto-merge October 14, 2024 15:39
@acatangiu acatangiu added this pull request to the merge queue Oct 17, 2024
Merged via the queue into paritytech:master with commit 9714796 Oct 17, 2024
191 of 193 checks passed
@acatangiu acatangiu deleted the register-assets-over-bridge branch October 17, 2024 13:59
@bkontur bkontur added the A4-needs-backport Pull request must be backported to all maintained releases. label Nov 20, 2024
@paritytech-cmd-bot-polkadot-sdk

Created backport PR for stable2407:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-5435-to-stable2407
git worktree add --checkout .worktree/backport-5435-to-stable2407 backport-5435-to-stable2407
cd .worktree/backport-5435-to-stable2407
git reset --hard HEAD^
git cherry-pick -x 9714796ba9544f98c0361be466b9d993056aad50
git push --force-with-lease

github-actions bot pushed a commit that referenced this pull request Nov 20, 2024
## Changes

Allows one Asset Hub on one side, to register assets on the other Asset
Hub over the bridge.

Rococo <> Ethereum test bridge will be dropped in favor of Westend <>
Ethereum test bridge. This PR also changes emulated tests to simulate
double bridging from Ethereum<>Westend<>Rococo.

## Tests

- [x] e2e test: Westend Asset Hub can register Westend and Ethereum
assets on Asset Hub Rococo
- [x] e2e test: Rococo Asset Hub can register Rococo assets on Asset Hub
Westend
- [x] e2e test (existing): Users on Ethereum can register Ethereum
assets on Asset Hub Westend
- [x] e2e test: transfer Rococo assets from Rococo to Westend and back
- [x] e2e test: transfer Westend assets from Westend to Rococo and back
- [x] e2e test: transfer Ethereum assets (bridged in through Snowbridge)
from Westend to Rococo and back

(cherry picked from commit 9714796)
@paritytech-cmd-bot-polkadot-sdk

Successfully created backport PR for stable2409:

@bkontur bkontur had a problem deploying to subsystem-benchmarks November 20, 2024 10:35 — with GitHub Actions Failure
@acatangiu acatangiu removed the A4-needs-backport Pull request must be backported to all maintained releases. label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T10-tests This PR/Issue is related to tests. T15-bridges This PR/Issue is related to bridges.
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants