Skip to content

Modified query_weight_to_asset_fee under XcmPaymentApi of xcm_runtime_apis fees#118

Merged
hgminerva merged 5 commits intoXode-DAO:v0.1.2from
oliverrigonan:117-modify-query_weight_to_asset_fee-under-xcmpaymentapi-of-xcm_runtime_apisfees
Nov 11, 2025
Merged

Modified query_weight_to_asset_fee under XcmPaymentApi of xcm_runtime_apis fees#118
hgminerva merged 5 commits intoXode-DAO:v0.1.2from
oliverrigonan:117-modify-query_weight_to_asset_fee-under-xcmpaymentapi-of-xcm_runtime_apisfees

Conversation

@oliverrigonan
Copy link
Copy Markdown
Collaborator

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:

  • Replaced the use of DynamicWeightTrader and asset trading logic with direct computation of fees for DOT and USDT assets, adding a fixed fee to the weight-based fee.
  • Introduced UsdtWeightToFee for USDT asset fee calculation, and used WeightToFee for DOT, with both adding a fixed 0.01 unit fee.
  • Updated imports to include WeightToFee as WeightToFeeT and remove unused types related to previous trading logic.
image

Codebase Simplification:

  • Removed legacy comments and code referencing the previous dynamic trading approach, clarifying that the new implementation is asset-specific and easier to maintain.

This PR solves #117

@oliverrigonan oliverrigonan self-assigned this Nov 10, 2025
@oliverrigonan oliverrigonan added the enhancement New feature or request label Nov 10, 2025
@oliverrigonan oliverrigonan added this to the v0.1.2 milestone Nov 10, 2025
@hgminerva hgminerva closed this Nov 11, 2025
@hgminerva hgminerva reopened this Nov 11, 2025
@hgminerva hgminerva merged commit 50bee38 into Xode-DAO:v0.1.2 Nov 11, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modify query_weight_to_asset_fee under XcmPaymentAPI of xcm_runtime_apis::fees

2 participants