Hyperlane链间通信交互教程

Hyperlane 的 alpha 版本已部署到以下主网(测试网):

Arbitrum (Goerli)

Avalanche (Fuji)

BNB (BSC testnet)

Celo (Alfajores)

Ethereum (Goerli)

Optimism (Goerli)

Polygon (Mumbai)

上面所有主网和测试网都可以交互,不同网络合约地址可以从下面链接里找到:

 

1,咱们选择Polygon为例交互,打开链接

点击Connect to Web3连接钱包

2,点击第2项dispatch 展开:

destinationDomain 指接收消息的目标链代码,我填了Celo 网络的代码:0x63656c6f

各个网络的代码可以从这个链接找到:https://docs.hyperlane.xyz/hyperlane-docs-1/developers-faq-and-troubleshooting/domains

 

3, receipientAddress 指的是接收消息的钱包地址,可用官方的测试收件人地址: 0x000000000000000000000000BC3cFeca7Df5A45d61BC60E7898E63670e1654aE

 

4,messageBody 即传输的消息内容,理论上可以为任何消息,我在这里用【2023 year】的16进制字符串:32303233e5b9b4

字符串到十六进制转换网页链接:https://dencode.com/en/string/hex

 5,点击Write 弹出Metamask 钱包签名,完成

 6,打开Hyperlane 浏览器: https://explorer.hyperlane.xyz/,输入刚才交易的哈希值,可查看跨链消息发送情况

其他链&不同信息和上面操作类似大家可以多尝试下

Hyperlane官网: https://hyperlane.xyz/

Twitter :https://twitter.com/Hyperlane_xyz

Discord社区:https://discord.gg/hyperlane

文档:https://docs.hyperlane.xyz/hyperlane-docs/

Github :https://github.com/hyperlane-xyz

Subscribe to Notes
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.