Skip to content

Fix XCM Native Token (XON) Transfer Failure - LocalExecutionIncomplete#120

Merged
hgminerva merged 7 commits intoXode-DAO:v0.1.2from
oliverrigonan:119-unable-to-send-xcm-using-local-native-asset-xon
Nov 11, 2025
Merged

Fix XCM Native Token (XON) Transfer Failure - LocalExecutionIncomplete#120
hgminerva merged 7 commits intoXode-DAO:v0.1.2from
oliverrigonan:119-unable-to-send-xcm-using-local-native-asset-xon

Conversation

@oliverrigonan
Copy link
Copy Markdown
Collaborator

This pull request refactors and extends the XCM asset matching and weight trading logic to support more flexible and robust asset handling, enabling successful cross-chain transactions using the native token (XON).

Key Improvements

1. Asset Matching and Transactor Refactoring

  • Introduced a dedicated NativeAssetMatcher for handling the native token (XON).
  • Added a MultiAssetMatcher for other fungible assets, replacing the older monolithic AssetMatcher.
  • Refactored asset transactors into:
    • LocalAssetTransactor – handles native assets (XON)
    • PalletAssetsTransactor – handles other registered fungible assets
  • Combined both transactors into a unified tuple-based AssetTransactor type for streamlined XCM execution.

2. Trusted Reserve Assets Extraction

  • Moved and refactored the trusted reserve assets logic into a new module:
    xcm_config::trusted_reserve_assets
  • This new module improves code clarity and maintainability.
  • Expanded support for trusted assets from:
    • The Relay Chain
    • AssetHub
    • Hydration Parachain
  • Introduced explicit matching rules for determining trusted reserve assets.

3. Weight-to-Fee Conversion Generalization

  • Replaced the USDT-specific weight-to-fee logic with a generic WeightToFeeConverter trait.
  • Enables flexible fee computation across multiple assets:
    • XON (native)
    • DOT (relay)
    • USDT (cross-chain stablecoin)
  • The dynamic weight trader now leverages this converter for accurate, configurable fee calculations across all supported assets.

4. Codebase Cleanup

  • Removed deprecated imports and outdated logic from:
    • The old asset matcher implementation
    • The former trusted reserve asset definitions
  • Resulted in a leaner and more maintainable XCM configuration.

5. Documentation and Logging Enhancements

  • Added comprehensive documentation for the new:
    • Asset matchers
    • Weight trader logic
  • Improved debug logging for:
    • Asset matching
    • Fee calculation processes
      → Makes debugging and traceability easier during XCM execution.

Result

✅ XCM transfers using the native token (XON) now execute successfully.
✅ Improved modularity, extensibility, and maintainability of the XCM configuration.
✅ Clearer separation of responsibilities between native, fungible, and trusted reserve assets.

This refactor establishes a solid foundation for handling future cross-chain integrations with additional assets or networks.

This PR solves: #119

@oliverrigonan oliverrigonan linked an issue Nov 11, 2025 that may be closed by this pull request
@hgminerva hgminerva merged commit 5485fb1 into Xode-DAO:v0.1.2 Nov 11, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to Send XCM Using Local Native Asset (XON)

2 participants