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
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 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
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