Skip to main content

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Домен B14,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.

Tailsman Wallet

Работаем сверху вниз:

  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. Отправить транзакцию.

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.

Работаем сверху вниз:

  1. Выберите учетную запись, с которой вы хотите отправлять XDM.
  2. Select the transporter.transfer() extrinsic.
  3. Выберите Consensus в 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. Отправить транзакцию.

PolkadotJS

Автоматизация XDM

Также можно использовать пакет Auto SDK’s @autonomys/auto-xdm для отправки этих транзакций, если вы хотите автоматизировать их каким-либо образом.