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

Use MultiLocation for tx fee payment instead of u32 #1408

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

Chralt98
Copy link
Member

What does it do?

The asset id of pallet_asset_tx_payment is replaced by MultiLocation from u32. This is useful to adapt to the newest polkadot-api and polkadot-extension since their default implementation expects a MultiLocation.

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 the transaction_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.

Screenshot from 2025-01-30 09-52-59

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

@Chralt98 Chralt98 added the s:blocked The pull requests awaits resolution of dependencies (state what it depends on) label Feb 10, 2025
@Chralt98 Chralt98 self-assigned this Feb 10, 2025
@Chralt98 Chralt98 requested a review from sea212 as a code owner February 10, 2025 11:04
@Chralt98 Chralt98 added s:review-needed The pull request requires reviews and removed s:blocked The pull requests awaits resolution of dependencies (state what it depends on) labels Feb 24, 2025
@Chralt98 Chralt98 added s:accepted This pull request is ready for merge and removed s:review-needed The pull request requires reviews labels Feb 24, 2025
@Chralt98 Chralt98 merged commit d3a8cb6 into main Feb 24, 2025
63 checks passed
@Chralt98 Chralt98 deleted the chralt98-multilocation-fee-asset-id branch February 24, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:accepted This pull request is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants