-
Notifications
You must be signed in to change notification settings - Fork 366
Allow sibling chains to create foreign assets #3104
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
Conversation
WASM runtime size check:Compared to target branchMoonbase runtime: 2420 KB (no changes) 🚨 Moonbeam runtime: 2408 KB (+8 KB) 🚨 Moonriver runtime: 2412 KB (+12 KB) 🚨 Compared to latest release (runtime-3501)Moonbase runtime: 2420 KB (+468 KB compared to latest release) 🚨 Moonbeam runtime: 2408 KB (+468 KB compared to latest release) 🚨 Moonriver runtime: 2412 KB (+472 KB compared to latest release) 🚨 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few remarks, the overall changes look good.
We have redundant tests, which may add technical debt to maintain them. (Correct me if I am wrong, but I think what is being tested in file test/suites/dev/moonbase/test-assets/test-foreign-assets-xcm-freeze.ts
, was tested implicitly in other tests)
What does it do?
create_foreign_asset
now reserves a deposit from the caller (i.e. parachain sovereign accounts)ForeignAssetCreationDeposit
) and can be changed withpallet_parameters
Non-breaking Changes
create_foreign_asset
,change_xcm_location
,freeze_foreign_asset
,unfreeze_foreign_asset
can now be called by a Parachain Location origin (through XCM) or Governance.create_foreign_asset
from a Sibling Parachain, it requires a deposit of funds that is configurable in the pallet.create_foreign_asset
TODO
What important points reviewers should know?
Some assumptions were made considering the current state of the pallet:
AssetOwner
was meant initially to be a descriptive enum of the possible sources of creation of an asset, but since there were no assets yet created, we only need to distinguish between migrated assets, and the ones created from now on (any account). Naming in this enum might be improved.Is there something left for follow-up PRs?
What alternative implementations were considered?
Using Fungibles was investigated, but the implementation uses ReservableCurrency, following the same pattern as pallet assets.
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
We should run the migration added here #3020 after this PR is merged.
What value does it bring to the blockchain users?
It should be easier for Parachain teams to register their assets natively in Moonbeam