-
Notifications
You must be signed in to change notification settings - Fork 742
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
Transfer Polkadot-native assets to Ethereum #5546
Merged
franciscoaguirre
merged 115 commits into
paritytech:master
from
Snowfork:polkadot-native-assets
Sep 13, 2024
Merged
Transfer Polkadot-native assets to Ethereum #5546
franciscoaguirre
merged 115 commits into
paritytech:master
from
Snowfork:polkadot-native-assets
Sep 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Register token from polkadot * Extract AssetRegistrarMetadata * ReserveTransfer from AssetHub * Transfer DOT back to AssetHub * Fix breaking tests * Fix register token * Increase dispatch_gas to cover the actual cost for register token * Add ConvertAssetId to outbound router * Rename to SendForeignToken * Update cost * Move Command.RegisterToken to top level * Use VersionedLocation for storage * Use versioned location * TokenIdOf follow the same pattern as AgentIdOf * Rename MintToken to TransferNativeToken * Rename as SendNativeToken * More refactoring * Remove AgentExecuteCommand * Remove TokenExists check * Update cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs Co-authored-by: Clara van Staden <[email protected]> * Benchmark register_token * More checks for the events * More tests for send native token * More tests describe tokenID * More asset identifiers * Add LocationToToken & Always use VersionedLocation * Fix breaking tests * Update gas cost for registering polkadot token * Add AgentExecuteCommand back for compatibility * Split into 2 tests each covers one direction * Revert the change on AH * Switch to native token on penpal for the integration * Make fee asset as configuration parameter of the Channel * Revert fee_asset_id as channel property * Short epoch * Fix integration tests * Fix format * Cleanup * Register relay token * Use relay token as fee asset * Fix clippy * Fix missing dependency * Remove reanchored prefix from asset_id * Fix test * Fix the instruction * Fix test * Multi hop transfer * Fix tests * allow bridge hub assets * Register token from BH directly and remove force_register_token * Decrease gas estimation for PNA * Cleanup * Store Location rather than VersionedLocation * Fix test * Add more tests * Revamp reanchor logic * Improve reanchor & Fix tests * Use secondary governance channel to register PNA * Rename as asset location * Use BoundVec limit size of name&symbol * Describe location of PNA & more tests * Add test * Fix taplo * More tests * Cleanup * Format code * Batch rename token command * Remove agent_id * Rename as AssetMetadata * Add test for penpal native token --------- Co-authored-by: Clara van Staden <[email protected]> Co-authored-by: Alistair Singh <[email protected]>
…polkadot-sdk into polkadot-native-assets
yrong
force-pushed
the
polkadot-native-assets
branch
from
September 3, 2024 01:08
0e1fea1
to
26263ac
Compare
yrong
changed the title
Polkadot native assets
Transfer Polkadot-native assets to Ethereum
Sep 3, 2024
vgeddes
reviewed
Sep 3, 2024
vgeddes
reviewed
Sep 3, 2024
vgeddes
reviewed
Sep 3, 2024
…polkadot-sdk into polkadot-native-assets
acatangiu
approved these changes
Sep 11, 2024
Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
franciscoaguirre
approved these changes
Sep 12, 2024
...rachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge.rs
Outdated
Show resolved
Hide resolved
...rachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge.rs
Show resolved
Hide resolved
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs
Outdated
Show resolved
Hide resolved
…polkadot-sdk into polkadot-native-assets
Merged
via the queue into
paritytech:master
with commit Sep 13, 2024
fb7300c
201 of 204 checks passed
vgeddes
added a commit
to Snowfork/polkadot-sdk
that referenced
this pull request
Sep 13, 2024
# Description Adding support for send polkadot native assets(PNA) to Ethereum network through snowbridge. Asset with location in view of AH Including: - Relay token `(1,Here)` - Native asset `(0,[PalletInstance(instance),GenereIndex(index)])` managed by Assets Pallet - Native asset of Parachain `(1,[Parachain(paraId)])` managed by Foreign Assets Pallet The original PR in #128 which has been internally reviewed by Snowbridge team. # Notes - This feature depends on the companion solidity change in Snowfork/snowbridge#1155. Currently register PNA is only allowed from [sudo](https://github.com/Snowfork/polkadot-sdk/blob/46cb3528cd8cd1394af2335a6907d7ab8647717a/bridges/snowbridge/pallets/system/src/lib.rs#L621), so it's actually not enabled. Will require another runtime upgrade to make the call permissionless together with upgrading the Gateway contract. - To make things easy multi-hop transfer(i.e. sending PNA from Ethereum through AH to Destination chain) is not support ed in this PR. For this case user can switch to 2-phases transfer instead. --------- Co-authored-by: Clara van Staden <[email protected]> Co-authored-by: Alistair Singh <[email protected]> Co-authored-by: Vincent Geddes <[email protected]> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
acatangiu
added a commit
that referenced
this pull request
Sep 13, 2024
Co-authored-by: Ron <[email protected]> Co-authored-by: Clara van Staden <[email protected]> Co-authored-by: Alistair Singh <[email protected]> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adding support for send polkadot native assets(PNA) to Ethereum network through snowbridge. Asset with location in view of AH Including:
(1,Here)
(0,[PalletInstance(instance),GenereIndex(index)])
managed by Assets Pallet(1,[Parachain(paraId)])
managed by Foreign Assets PalletThe original PR in Snowfork#128 which has been internally reviewed by Snowbridge team.
Notes
This feature depends on the companion solidity change in Asset from polkadot Snowfork/snowbridge#1155. Currently register PNA is only allowed from sudo, so it's actually not enabled. Will require another runtime upgrade to make the call permissionless together with upgrading the Gateway contract.
To make things easy multi-hop transfer(i.e. sending PNA from Ethereum through AH to Destination chain) is not support ed in this PR. For this case user can switch to 2-phases transfer instead.