0

在向 Rinkeby 和 Kovan 部署一系列合约时尝试了各种 RPC - infura、moralis、alchemy,同时在 Hardhat 上设置了较大的超时设置,但仍然遇到同样的问题:

hijackedStack: 'Error: Failed to check for transaction receipt:\n' + '{\n' + ' "data": {\n' + ' "stack": 

"FetchError: request to https://rinkeby.infura.io/v3/XXX failed, reason: connect ETIMEDOUT 54.85.169.91:443\\n at ClientRequest.<anonymous> (/xxx/node_modules/node-fetch/lib/index.js:1491:11)\\n at ClientRequest.emit (events.js:315:20)\\n at TLSSocket.socketErrorListener (_http_client.js:461:9)\\n at TLSSocket.emit (events.js:315:20)\\n at emitErrorNT (internal/streams/destroy.js:96:8)\\n at emitErrorCloseNT (internal/streams/destroy.js:68:3)\\n at processTicksAndRejections (internal/process/task_queues.js:84:21)",\n' + ' "name": "FetchError"\n' + ' }

\n' + '}\n' + ' at Object._fireError (/xxx/node_modules/web3-core-method/node_modules/web3-utils/lib/index.js:50:17)\n' + ' at /xxx/node_modules/web3-core-method/lib/index.js:243:23'

Hardhat.config.js:

rinkeby: {
       url: infuraRinkeby2(),
       gas: 10000000, // tx gas limit
      timeout: 10000000,
      networkCheckTimeout: 1000000,
      timeoutBlocks: 30000,
      skipDryRun: true,
      confirmations: 10,
      accounts: [      ],

在安全帽配置中尝试了各种超时设置,但在部署我的合约的各个阶段不断出现上述错误 - 有时在其中 3 或 5 个之后,有时在 10 或 12 个之后......因为总合约包约为 20 和更高版本部署时需要以前的地址,如果连接像这样不断下降,它就会变成一个雷区......

任何想法为什么hardhat不尊重超时设置以及如何保持连接有足够的时间来部署合同组合?

4

0 回答 0