Swapping
Integrations
Advanced Scenarios
Cross-Chain Messaging
To Assethub

CCM Swaps to Polkadot Assethub

Overview

The Chainflip CCM functionality allows users to swap any asset into one of the supported Assets on Assethub and then submit an extrinsic on Assethub, including XCM extrinsics (opens in a new tab). This extrinsic will originate from an ephemeral account that controls the funds resulting from your swap. After the extrinsic is executed, any remaining funds will be forwarded to your chosen swap destination address.

Supported extrinsic

Currently, the following extrinsics are supported for submission on Assethub:

PalletExtrinsic
Balancestransfer_allow_death
Balancestransfer_all
Utilitybatch
Utilityas_derivative
Utilitybatch_all
Utilityforce_batch
Proxyproxy
Proxyadd_proxy
Proxyremove_proxy
Proxyremove_proxies
Proxycreate_pure
Proxykill_pure
Proxyannounce
Proxyremove_announcement
Proxyreject_announcement
Proxyannounced
Assetstransfer
Assetstransfer_all
PolkadotXCMteleport_assets
PolkadotXCMreserve_transfer_assets
PolkadotXCMlimited_reserve_transfer_assets
PolkadotXCMlimited_teleport_assets
PolkadotXCMtransfer_assets
PolkadotXCMtransfer_assets_using_type_and_then

Message

The extrinsic you want to submit on Assethub must be provided via the message parameter, containing the SCALE encoding of your extrinsic. One way of obtaining this is to construct an extrinsic for submission in the Assethub Polkadot.JS explorer (opens in a new tab). Once you have constructed your extrinsic, the Explorer displays the required hex data as "encoded call data". Note that you can only use the extrinsics in the above list. Make sure that you use the SCALE encoding for Assethub, as the same extrinsics might be available on other Substrate chains, but might result in different SCALE encoded data. If your provided message cannot be parsed as one of the supported Assethub extrinsics, your request for opening a swap channel will fail.

Gas budget

Transaction fees will automatically be deducted from the resulting swap amounts, so for CCM to Assethub, the gasBudget parameter will be ignored and can be set to zero.

CCM Additional Data

The ccmAdditionalData parameter is not used for CCM to Assethub and should be left empty.