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

Assets xcm #360

Merged
merged 35 commits into from
Jan 17, 2024
Merged

Assets xcm #360

merged 35 commits into from
Jan 17, 2024

Conversation

girazoki
Copy link
Collaborator

@girazoki girazoki commented Dec 8, 2023

Adds pallet-assets, foreign-asset-creator and asset-rate as necessary pallets to mint derivative tokens coming from other chains, with these respective goals:

  • pallet-assets: handle representation and assets of derivative tokens
  • foreign-asset-creator: maintain a mapping between MultiLocation and assetId, which should make it easier to handle future ML versions.
  • asset-rate: maintains the rate at which we can charge weight execution fees for certain tokens

TODO:

  • update benchmakrs

For future PRs:

  • Incorporate these into templates

parameter_types! {
// we just reuse the same deposits
pub const ForeignAssetsAssetDeposit: Balance = 0;
pub const ForeignAssetsAssetAccountDeposit: Balance = 0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Modify

Copy link
Contributor

github-actions bot commented Jan 9, 2024

Coverage Report

(master)

@@                   Coverage Diff                   @@
##           master   girazoki-assets-xcm      +/-   ##
=======================================================
+ Coverage   75.97%                76.35%   +0.38%     
+ Files          98                   101       +3     
+ Lines       24568                 25092     +524     
=======================================================
+ Hits        18665                 19158     +493     
+ Misses       5903                  5934      +31     
Files Changed Coverage
/client/consensus/src/consensus_orchestrator.rs 77.90% (+0.44%) 🔼
/pallets/services-payment/src/lib.rs 84.56% (+0.67%) 🔼
/runtime/dancebox/src/lib.rs 81.07% (-0.16%) 🔽
/runtime/dancebox/src/weights/xcm/mod.rs 17.89% (+3.15%) 🔼
/runtime/dancebox/src/weights/xcm/pallet_xcm_benchmarks_generic.rs 11.36% (+1.59%) 🔼
/runtime/dancebox/tests/integration_test.rs 99.71% (+0.01%) 🔼
/runtime/flashbox/src/lib.rs 43.93% (+0.31%) 🔼

Coverage generated Wed Jan 17 14:52:47 UTC 2024

@girazoki girazoki added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes a0-pleasereview Pull request needs code review. labels Jan 10, 2024
@girazoki girazoki marked this pull request as ready for review January 10, 2024 12:51
@girazoki girazoki added not-breaking Does not need to be mentioned in breaking changes breaking Needs to be mentioned in breaking changes and removed not-breaking Does not need to be mentioned in breaking changes labels Jan 10, 2024
Copy link
Contributor

@Agusrodri Agusrodri left a comment

Choose a reason for hiding this comment

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

I didn't see anything that could block the PR. Although I think we should keep an eye on the runtime code that could be moved to polkadot-sdk, like the one related to NativeAssetReserve for instance. Also a follow up task would be to add some TS tests (the rust ones look great). Other than those comments LGTM!

@girazoki
Copy link
Collaborator Author

thank Agustin! Yeah I will add a few more tests in TS for sure before I merge this PR

@girazoki
Copy link
Collaborator Author

girazoki commented Jan 17, 2024

We need to update the benchmark for buy_execution but it is dependent on paritytech/polkadot-sdk#2962. So for now I think we can postpone this for a future PR

@girazoki girazoki merged commit 8e22b5b into master Jan 17, 2024
30 checks passed
@girazoki girazoki deleted the girazoki-assets-xcm branch January 17, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a0-pleasereview Pull request needs code review. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants