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

feat: asset registry #486

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

feat: asset registry #486

wants to merge 7 commits into from

Conversation

Daanvdplas
Copy link
Collaborator

@Daanvdplas Daanvdplas commented Mar 4, 2025

Spike asset registry + foreign fungibles integration test. The latter creates the foreign asset for usdc on pop, a contract receives usdc on Pop, the contract transfers usdc using the fungible api to a local pop account, and transfers the remaining usdc back to asset hub.

Showcase:

Notable changes made to the runtime to make this possible:

  • Devnet assets config changes required: runtime/devnet/src/config/assets.rs. See also the test proving that there is no way to change the metadata of foreign assets, mint or burn because the asset manager pallet is the owner of these assets and doesn't provide this functionality @evilrobot-01 (see test test_foreign_asset_creation).
  • Changes required in the xcm config: runtime/devnet/src/config/xcm.rs
  • Pallet assets might not have to be an instance anymore as we are now both storing trust backed assets as well as foreign assets in the pallet assets instance, at least we don't have to call the pallet TrustBackedAssets anymore because it would be incorrect.

@al3mart we want to add the following migration to mainnet and set the CallbackHandle (this for all runtimes). For testnet we can set the genesis like so.

Changes made to the asset manager pallet:

  • refactor: assset manager. Most noteworthy one is the next_asset_id addition. Moonbeams implementation derives the asset id based on the location. If this asset id is then taken because we don't use next_asset_id logic it could prevent to create a foreign asset on pop.

Next steps:

  1. Make sure the required changes are ported to the mainnet runtime, see above.
  2. implement the asset registry pallet. The xcm_primitives module in the pallet is in moonbeams implementation a separate crate. This has been spiked as fast as possible so the implementor will have to look how we should best implement the pallet.
  3. Asset registry + xcm config + integration tests for stables on Pop testnet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant