-
Notifications
You must be signed in to change notification settings - Fork 10
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
Apply XcmPaymentApi fees in transactions to Moonbeam / Moonriver / Moonbase-Alpha #351
Merged
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
🦋 Changeset detectedLatest commit: 2b96c57 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
mmaurello
changed the title
[WIP] Apply XcmPaymentApi fees in transactions to Moonbeam
[WIP] Apply XcmPaymentApi fees in transactions to Moonbeam / Moonriver / Moonbase-Alpha
Sep 20, 2024
mmaurello
changed the title
[WIP] Apply XcmPaymentApi fees in transactions to Moonbeam / Moonriver / Moonbase-Alpha
Apply XcmPaymentApi fees in transactions to Moonbeam / Moonriver / Moonbase-Alpha
Sep 23, 2024
ekenigs
requested changes
Sep 24, 2024
ekenigs
approved these changes
Sep 24, 2024
Merged
mmaurello
added a commit
that referenced
this pull request
Oct 2, 2024
* Apply XcmPaymentApi fees in transactions to Moonbeam / Moonriver / Moonbase-Alpha (#351) * -wip- initial commit and initial configs * -wip- extract common code * -wip- fix some types * -wip- TODOs and refactoring * -wip- group all in a single function * -wip- apply to all Acala and Hydration routes * -wip- apply to manta routes * apply xcmv4 and solution for registered asset id for ERC20s * sort assets, handle different palletInstances and apply to several configs * remove unused property * remove logs * remove deleted routes from snapshots * apply new configuration to Kusama chains * add changeset * remove assetTypeUnitsPerSecond function since it is not used now * remove assetTypeUnitsPerSecond function since it is not used now * apply PR reviews * Version Packages (#352) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * update snapshots * add asset ordering param to ibtc and kbtc * fix linting and spell checking * add changeset for xcm-utils (#353) * Version Packages (#355) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix linting and spell checking * fix linting error * move palletInstance validation * fix TEER configuration in Integritee (#356) * Version Packages (#357) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * change native asset checking and builder interface * fix error * Fix Asset Hub memecoings asset ordering in fee calculation (#359) * Version Packages (#360) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix lint * change property name * rename properties --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
xcmPaymentApi
ApplyqueryXcmWeight
to get weight andqueryWeightToAssetFee
to get the fee with that weight.assetTypeUnitsPerSecond
as it is being removed in Moonbeam's RT3200, and it is only used for Moonbeam ChainsConsiderations
xcmPaymentApi
, this is only applied with MoonChains in mind. It will be more generic in V3.palletInstance
exist in the Asset config. Technically, thepalletInstance
should be related to the chain and not the asset. This will be addressed properly in V3.getNativeAssetId
returns the Multilocation of the native asset in MoonChains. In V3, we will have to configure the multilocation of the assets whose reserve chain is the one in the configuration, since there is no way of querying it from the Polkadot service.FeeBuilder.utils.ts
file that it is programmed with a switch in mind for the V3 (or earlier) format of the instructions. This could be removed but I prefer to leave it like this for the moment in case we have to switch quickly to V3 for a specific route.SetTopic
instruction is only executed for specific chains / pallets. But we are always considering it in the calculations to be on the safe side, and it doesn't increase the fees too muchChecklist
mkdocs/docs
directory