Use MultiLocation
for tx fee payment instead of u32
#1408
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.
What does it do?
The asset id of
pallet_asset_tx_payment
is replaced byMultiLocation
fromu32
. This is useful to adapt to the newest polkadot-api and polkadot-extension since their default implementation expects aMultiLocation
.What important points should reviewers know?
Needs to be merged after merge of #1398 !
pallet_asset_tx_payment
will fail for a transaction in the standalone mode. However, using thetransaction_payment
pallet,ZTG
can still be used in this case.The PR was tested against a local network forked using chopsticks. I could execute transactions using
USDC
from AssetHub as fee payment asset.It is important to know that in case the Polkadot API team doesn't incorporate the suggested PR from us, we could still fix the issue mentioned below by using an override as implemented here.
UPDATE: It is important to use a polkadot API types version that includes this PR, otherwise we would need the override described above. This is the case for a polkadot api version higher than or equal to
15.5.2
.Is there something left for follow-up PRs?
What alternative implementations were considered?
Are there relevant PRs or issues?
polkadot-js/api#5846 (comment)
polkadot-js/api#6074
polkadot-js/api#6081
polkadot-js/api#6083
References