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:
Джерело | Призначення | Блок и підтвердження | Час підтвердження |
---|---|---|---|
Consensus | Domain | 100 консенсус | ~10 хвилин |
Домен A | Домен B | 14,400 домен | ~1 день |
Domain | Consensus | 14,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.
- Platform: Ethereum
- RPC Url: https://auto-evm.mainnet.autonomys.xyz/ws
- Network Name: Auto EVM Mainnet (or any name you prefer)
- Native Token Symbol: AI3
- Native Token Coingecko ID: autonomys-network
- Native Token Name: Autonomys EVM (or any name you prefer)
- Block Explorer Url: https://explorer.auto-evm.mainnet.autonomys.xyz/
Working from the top down:
- Select the account you want to XDM consensus tokens from.
- Select the
transporter.transfer()
extrinsic. - Select
Domain
in thedstLocation
chainId
dropdown. - Enter the domain you want to use in the
Domain
with 0 being the Auto EVM domain. - Select
AccountId20
in theAccountId
dropdown. - Enter the
0x
EVM account address you want to send the tokens to on the Auto EVM domain. - Enter the amount, which will be the number of tokens with 18 zeroes afterwards as the value is in Shannons.
- Submit Transaction.
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:
- Select the account you want to XDM from.
- Select the
transporter.transfer()
extrinsic. - Select
Consensus
in thedstLocation
chainId
. - Enter your Autonomys account address in the
AccountId32
textbox. - Enter the amount, which will be the number of tokens with 18 zeroes afterwards as the value is in Shannons.
- Submit Transaction.
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.