Cross Domain Messaging (XDM)
Междоменный обмен сообщениями в сети Autonomys
Это руководство объясняет что такое XDM и рассказывает о том, как передавать активы между цепочками домена.
Представляем междоменные сообщения (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:
Источник | Назначение | Подтверждение блоков | Время подтверждения |
---|---|---|---|
Консенсус | Домен | 100 блоков консенсуса | 10 минут |
Домен A | Домен B | 14,400 блоков домена | ~1 день |
Домен | Консенсус | 14,400 блоков домена | ~1 день |
Возврат средств из-за невозможности завершить XDM перевод займет всего 28 800 блоков
Пока XDM подтвержден в исходной цепочке (100 консенсусных блоков или 14 400 доменных блоков), XDM может быть передан и выполнен (происходит передача) в целевой цепочке.
Цепочка назначения генерирует XDM ответ, который будет отправлен обратно в цепочку источника после подтверждения ответа XDM на цепочке назначения (100 блоков или 14, 00 блоков домена), но ответ XDM в основном является необязательным и полезен только в том случае, если 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/
Работаем сверху вниз:
- 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.
- Отправить транзакцию.
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.
Работаем сверху вниз:
- Выберите учетную запись, с которой вы хотите отправлять XDM.
- Select the
transporter.transfer()
extrinsic. - Выберите
Consensus
вdstLocation
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.
- Отправить транзакцию.
Автоматизация XDM
Также можно использовать пакет Auto SDK’s @autonomys/auto-xdm
для отправки этих транзакций, если вы хотите автоматизировать их каким-либо образом.