15 关于LayerZero跨链协议入门教程的复现问题

我再复现这篇文章的时https://learnblockchain.cn/article/3984, 之前都没问题但是运行这条命令从源网络向目标网络发送跨链消息时,报错。

npx hardhat run scripts/demo1_testnet.js --network testnet

错误如下:

 reason: 'missing revert data in call exception; Transaction reverted without a reason string',
  code: 'CALL_EXCEPTION',
  data: '0x',
  transaction: {
    from: '这是我的公钥地址',
    to: '0xD67D01D6893cC4a2E17557765987d41E778fadca',
    data: '0x40a7bb10000000000000000000000000000000000000000000000000000000000000271900000000000000000000000037587469690cc37ee19ff6163ce7275bb1b17d3b00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000002048656c6c6f2031313100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
    accessList: null
  },
  error: ProviderError: execution reverted

我把ehter版本变成5.6.1后错误变了。 新错误:

  reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
  code: 'UNPREDICTABLE_GAS_LIMIT',
  error: ProviderError: execution reverted
      at HttpProvider.request (D:\Document\code\LayerZero-Demo-master\node_modules\hardhat\src\internal\core\providers\http.ts:88:21)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at EthersProviderWrapper.send (D:\Document\code\LayerZero-Demo-master\node_modules\@nomiclabs\hardhat-ethers\src\internal\ethers-provider-wrapper.ts:13:20),
  method: 'call',
  transaction: {
    from: '我的地址',
    gasLimit: BigNumber { value: "1000000" },
    to: '0xD67D01D6893cC4a2E17557765987d41E778fadca',
    data: '0x40a7bb10000000000000000000000000000000000000000000000000000000000000271900000000000000000000000037587469690cc37ee19ff6163ce7275bb1b17d3b00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000002048656c6c6f2031313100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
    accessList: null
  }
}
请先 登录 后评论

最佳答案 2024-03-21 16:14

layerzero更新那篇已经不能用了,我复现之后发了一篇新的,您可以参考一下

请先 登录 后评论

其它 2 个回答

Tiny熊
  擅长:智能合约,以太坊
请先 登录 后评论
用户_18490
请先 登录 后评论
  • 3 关注
  • 1 收藏,1792 浏览
  • 提出于 2024-01-25 11:08