Modified query_weight_to_asset_fee under XcmPaymentApi of xcm_runtime_apis fees#118
Merged
hgminerva merged 5 commits intoXode-DAO:v0.1.2from Nov 11, 2025
Conversation
…t-runtime-apis Merge pull request #1 from oliverrigonan/main
v0.1.2 initial merge to main
This file contains hidden or 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
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.
This pull request refactors the logic for calculating asset fees for XCM weight payments in the runtime. The main change is a replacement of the previous dynamic trading logic with a simplified, asset-specific fee calculation for DOT and USDT, including a fixed fee addition. The code now directly matches on asset type and computes the fee accordingly, improving clarity and maintainability.
XCM Fee Calculation Improvements:
DynamicWeightTraderand asset trading logic with direct computation of fees for DOT and USDT assets, adding a fixed fee to the weight-based fee.UsdtWeightToFeefor USDT asset fee calculation, and usedWeightToFeefor DOT, with both adding a fixed 0.01 unit fee.WeightToFee as WeightToFeeTand remove unused types related to previous trading logic.Codebase Simplification:
This PR solves #117