币安智能链部署期间出现超时错误

hyu*_*cho 5 blockchain solidity truffle binance

我在币安智能链中部署合约时遇到错误

\n

如果有人知道请帮助我

\n

错误消息看起来像这样

\n
   Deploying \'WhitePaperInterestRateModel\'\n   ---------------------------------------\n   > transaction hash:    0xa24026a456f81238422b262cc49bcb9ee494997b70ea8d41c092710f98b27d50\n   \xe2\xa0\xa7 Blocks: 23           Seconds: 69Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({\n  code: -32603,\n  message: \'ETIMEDOUT\',\n  data: { originalError: { code: \'ETIMEDOUT\', connect: true } },\n  stack: \'Error: ETIMEDOUT\\n\' +\n    \'    at Timeout.<anonymous> (/Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/request/request.js:848:19)\\n\' +\n    \'    at listOnTimeout (node:internal/timers:556:17)\\n\' +\n    \'    at processTimers (node:internal/timers:499:7)\'\n})\n    at new NodeError (node:internal/errors:329:5)\n    at Web3ProviderEngine.emit (node:events:368:17)\n    at /Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/@trufflesuite/web3-provider-engine/index.js:57:14\n    at afterRequest (/Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/@trufflesuite/web3-provider-engine/index.js:151:21)\n    at /Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/@trufflesuite/web3-provider-engine/index.js:176:21\n    at /Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/@trufflesuite/web3-provider-engine/index.js:238:9\n    at /Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/async/internal/once.js:12:16\n    at replenish (/Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/async/internal/eachOfLimit.js:61:25)\n    at /Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/async/internal/eachOfLimit.js:71:9\n    at eachLimit (/Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/async/eachLimit.js:43:36)\n    at /Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/async/internal/doLimit.js:9:16\n    at end (/Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/@trufflesuite/web3-provider-engine/index.js:217:5)\n    at Request._callback (/Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/@trufflesuite/web3-provider-engine/subproviders/rpc.js:36:21)\n    at self.callback (/Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/request/request.js:185:22)\n    at Request.emit (node:events:379:20)\n    at Timeout.<anonymous> (/Users/hyunki/Desktop/compound/compound_test/truffle-compound-bsc/venus-protocol/node_modules/request/request.js:851:16)\n    at listOnTimeout (node:internal/timers:556:17)\n    at processTimers (node:internal/timers:499:7)\n
Run Code Online (Sandbox Code Playgroud)\n

truffle-config.js

\n
    testnet: {\n      provider: () => new HDWalletProvider(mnemonic, `https://data-seed-prebsc-1-s2.binance.org:8545/`),\n      network_id: 97,\n      gas: 20000000,        // Ropsten has a lower block limit than mainnet\n      gasPrice: 20000000000,  // 20 gwei (in wei) (default: 100 gwei)\n      confirmations: 1,\n      timeoutBlocks: 50000,\n      skipDryRun: true\n    },\n\n
Run Code Online (Sandbox Code Playgroud)\n

我在下面的页面得到了端点

\n

https://docs.binance.org/smart-chain/developer/rpc.html

\n

小智 0

我曾经遇到过同样的问题,切换到其他网络连接后工作正常。问题的发生可能是由于连接不稳定造成的。