Cross Domain Messaging (XDM) Guide
Міждоменний обмін повідомленнями в мережі 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 Підтвердження і таймінг
Для забезпечення безпеки існує період очікування, який має сплинути під час переведення токенів між доменами та консенсусним ланцюжком. Токени не стають повністю доступними для використання доти, доки не мине час підтвердження. Ознайомтеся з таблицею нижче, щоб зрозуміти блоки підтвердження і приблизний час:
Джерело | Призначення | Блоки підтвердження | Час підтвердження |
---|---|---|---|
Consensus | Домен | 100 консенсус | ~10 хвилин |
Домен A | Домен B | 14,400 домен | ~1 день |
Домен | Consensus | 14,400 домен | ~1 день |
Повернення коштів у разі невдачі під час виконання XDM-переказу займе загалом 28,800 блоків.
Поки XDM підтверджується на вихідному ланцюжку (100 консенсусних блоків або 14,400 блоків домену), XDM мо жна переказати та виконати на цільовому ланцюжку (переказ відбувається).
Цільовий ланцюжок генерує відповідь XDM, яку буде відправлено назад на вихідний ланцюжок після того, як відповідь XDM буде підтверджено на цільовому ланцюжку (100 консенсусних блоків або 14,400 блоків домену). Однак відповідь XDM здебільшого не чинить дії (no-op) і корисна тільки в разі невдачі XDM, коли необхідно повернути кошти відправникові на вихідному ланцюжку.
Комісії XDM
XDM-переказ у будь-якому напрямку коштує 2 tAI3 на Taurus. Розмір цієї комісії ще не визначений для основної мережі і планується зробити її динамічною. The price is also likely to change based on the outcomes of the SR Labs security audit report.
Що відбувається з комісією XDM?
tAI3 заробляється операторами за обробку транзакції. Вони діляться комісією за виконання зі своїми номінаторами. Частина кош тів також йде фармерам за зберігання транзакції.
Виконання XDM-переказів
Консенсус до домену Auto EVM
Відвідайте https://astral.autonomys.xyz/taurus/transfer
Select networks for XDM Consensus → Auto EVM. Введіть суму для переказу.
Hit Send token and you will be asked to approve the signature request.
After hitting Approve you will see an extrinsic hash.
Which you can search on Astral.
Наш цільовий акаунт спочатку не має токенів.
We can also check the balance on the Auto EVM explorer at https://blockscout.taurus.autonomys.xyz/
We wait 10 minutes for the confirmation…
І ми успішно завершили перехід XDM від консенсусу до Auto EVM.
Auto EVM domain to consensus with SubWallet and PolkadotJS
Отже, тепер у нас є кілька токенів на домені Auto EVM, давайте спробуємо відправити деякі з них у зворотному напрямку.
По-перше, нам знадобиться 0x
відкритий ключ облікового запису, на який ви хочете відправити токени на основі консенсусу. Якщо у вас його немає, ви можете завантажити його з [ss58.org] (http://ss58.org), як показано на скріншоті нижче.
Next, 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.taurus.autonomys.xyz%2Fws#/extrinsics
Working from the top down:
- Select the account you want to XDM from.
- Select the
transporter.transfer()
extrinsic. - Select
Consensus
in thedstLocation
chainId
. - Enter the
0x
account address we got above in theAccountId32
textbox. NOTE: it is possible to use the “Substrate: 42” address that starts with a5
in this box if you find that easier. - 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 Talisman
Transferring tokens from Auto EVM to Consensus can be tricky in SubWallet because of its unified accounts design. With the Talisman Wallet, the flow is far simpler - just as easy as sending tokens from Consensus to Auto EVM.
In your wallet you should have both a consensus account and an EVM account listed.
Make sure that you have some funds in your EVM wallet. For this demonstration, there are 10 tAI3 tokens in both the consensus and EVM accounts.
Відвідайте https://astral.autonomys.xyz/taurus/transfer
Select networks for Auto EVM → Consensus. Enter an amount to transfer, and a destination address.
Hit Send token and you will be asked to approve the signature request.
After hitting Approve you will see an extrinsic hash.
Checking the EVM account balance, you can see that it is now 7. 1 tAI3 token was sent and 2 tAI3 was used for the transaction fee.
After waiting 14,400 domain blocks (can be from 1-2 days depending on block production speed), you can see that the Consensus account balance has increased by 1 tAI3 to 11 tAI3.
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.