Skip to main content

Cross Domain Messaging (XDM)

Міждоменний обмін повідомленнями в мережі Autonomys.

This guide explains what XDM is and walks you through how to transfer assets between consensus and domain chains.

Introducing Cross Domain Messaging (XDM)

Cross Domain Messaging (XDM) is a core feature of the Autonomys Network that enables secure and seamless communication between independent blockchain domains, such as the consensus chain and specialized domains like Auto EVM. XDM allows these separate blockchains to exchange assets, messages, and data reliably, enhancing interoperability and collaboration across the entire Autonomys ecosystem.

Якщо ви хочете дізнатися більше про технічні нюанси XDM, ви можете знайти більш детальну інформацію в наших специфікаціях протоколу.

XDM Підтвердження і таймінг

To maintain security, there is a challenge period that has to expire when transferring tokens between domains and the consensus chain. Tokens are not fully available for use until the confirmation time has passed. Study the table below to understand confirmation blocks and rough timings:

ДжерелоПризначенняБлоки підтвердженняЧас підтвердження
ConsensusDomain100 консенсус~10 хвилин
Домен AДомен B14,400 домен~1 день
DomainConsensus14,400 домен~1 день

Повернення коштів у разі невдачі під час виконання XDM-переказу займе загалом 28,800 блоків.

Поки XDM підтверджується на вихідному ланцюжку (100 консенсусних блоків або 14,400 блоків домену), XDM можна переказати та виконати на цільовому ланцюжку (переказ відбувається).

Цільовий ланцюжок генерує відповідь XDM, яку буде відправлено назад на вихідний ланцюжок після того, як відповідь XDM буде підтверджено на цільовому ланцюжку (100 консенсусних блоків або 14,400 блоків домену). Однак відповідь XDM здебільшого не чинить дії (no-op) і корисна тільки в разі невдачі XDM, коли необхідно повернути кошти відправникові на вихідному ланцюжку.

Комісії XDM

An XDM transaction is charged at 5x its standard weight since it is not possible to accurately predict the destination chain fee when submitting.

Виконання XDM-переказів

Consensus to Auto EVM domain with PolkadotJS

You will need to navigate to the consensus domain in PolkadotJS by either selecting it in the network switcher or following this link: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.mainnet.autonomys.xyz%2Fws#/extrinsics

PolkadotJS must be linked to a wallet that has some AI3 tokens on the consensus chain. You can use SubWallet, Polkadot, or Talisman Wallet for this.

Tailsman Wallet

Working from the top down:

  1. Select the account you want to XDM consensus tokens from.
  2. Select the transporter.transfer() extrinsic.
  3. Select Domain in the dstLocation chainId dropdown.
  4. Enter the domain you want to use in the Domain with 0 being the Auto EVM domain.
  5. Select AccountId20 in the AccountId dropdown.
  6. Enter the 0x EVM account address you want to send the tokens to on the Auto EVM domain.
  7. Enter the amount, which will be the number of tokens with 18 zeroes afterwards as the value is in Shannons.
  8. Submit Transaction.

PolkadotJS

Auto EVM domain to consensus with PolkadotJS

You will need to navigate to the Auto EVM domain in PolkadotJS by either selecting it in the network switcher or following this link: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fauto-evm.mainnet.autonomys.xyz%2Fws#/extrinsics

PolkadotJS must be linked to a wallet that has some AI3 tokens on the EVM domain chain. You can use either SubWallet or Talisman Wallet for this.

Working from the top down:

  1. Select the account you want to XDM from.
  2. Select the transporter.transfer() extrinsic.
  3. Select Consensus in the dstLocation chainId.
  4. Enter your Autonomys account address in the AccountId32 textbox.
  5. Enter the amount, which will be the number of tokens with 18 zeroes afterwards as the value is in Shannons.
  6. Submit Transaction.

PolkadotJS

Automated XDM

It is possible to use the Auto SDK’s @autonomys/auto-xdm package to submit these transactions if you’d like to automate them in some way.