我再复现这篇文章的时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
}
}