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

393 use fee per second from asset metadata in xcm config #432

Merged
merged 84 commits into from
Apr 8, 2024

Conversation

ebma
Copy link
Member

@ebma ebma commented Mar 14, 2024

This PR adds changes that were reverted before. The original PR is #410.

We only want to merge this after the dependency upgrade to v0.9.42 is merged and released.

TODO

  • We still need to change the conversion function for MultiLocation <> CurrencyId. Currently, we are still using the hard-coded logic that manually maps these two but we also want to use the asset registry for this so no further runtime upgrades are needed for adding assets. Thus, we should change the conversion function similar to what is done here.

Closes #393.

@gianfra-t gianfra-t marked this pull request as ready for review March 21, 2024 15:15
@gianfra-t gianfra-t requested a review from a team March 21, 2024 15:15
runtime/foucoco/src/xcm_config.rs Outdated Show resolved Hide resolved
runtime/foucoco/src/xcm_config.rs Outdated Show resolved Hide resolved
runtime/amplitude/src/xcm_config.rs Outdated Show resolved Hide resolved
runtime/foucoco/src/xcm_config.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@TorstenStueber TorstenStueber left a comment

Choose a reason for hiding this comment

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

Overall a good change but I think we should simplify some of the types – I made some proposals in my comments.

node/src/chain_spec.rs Outdated Show resolved Hide resolved
package-lock.json Outdated Show resolved Hide resolved
runtime/common/src/lib.rs Outdated Show resolved Hide resolved
runtime/common/src/lib.rs Outdated Show resolved Hide resolved
runtime/amplitude/src/xcm_config.rs Outdated Show resolved Hide resolved
runtime/foucoco/src/xcm_config.rs Show resolved Hide resolved
@gianfra-t
Copy link
Contributor

Last commit updated and simplified the implementation now. I will leave a brief description since the conversation is now too long.

We now don't modify at all the location before trying to convert nor we convert while getting the fee per second.
This is all possible because now we use the local PoV for our assets in the asset registry (example in the mock). xTokens::tansfer_multiasset now works with the local PoV (Thanks @TorstenStueber for figuring that out)

@TorstenStueber
Copy link
Contributor

The Foucoco SelfLocation is still (parents: 1, Parachain(...)), can you change that please?

Copy link
Contributor

@TorstenStueber TorstenStueber left a comment

Choose a reason for hiding this comment

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

This turned out really nice now. Great job!

@ebma ebma changed the title [On Hold] 393 use fee per second from asset metadata in xcm config 393 use fee per second from asset metadata in xcm config Apr 8, 2024
@ebma
Copy link
Member Author

ebma commented Apr 8, 2024

Let's merge and roll it out on Foucoco today?

@ebma ebma merged commit b39b8ef into main Apr 8, 2024
2 checks passed
@ebma ebma deleted the 393-use-fee_per_second-from-asset-metadata-in-xcm-config branch April 8, 2024 12:35
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.

Use fee_per_second from asset metadata in XCM config
4 participants