0

我想将一个有两个智能合约的项目部署到币安智能链测试网。
我正在使用松露开发版本:

Truffle v5.3.9 (core: 5.3.9)
Solidity v0.5.16 (solc-js)
Node v14.17.0
Web3.js v1.3.6

我正在使用Moralis的节点端点来部署合同。
当我尝试部署智能合约或仅打开 truffle 控制台以与网络交互时,我收到此错误。

/home/stutter/Dev/Smart Contracts/token-airdrop/node_modules/@trufflesuite/web3-provider-engine/node_modules/request/request.js:848
          var e = new Error('ETIMEDOUT')
                  ^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
Error: ETIMEDOUT
    at Timeout.<anonymous> (/home/stutter/Dev/Smart Contracts/token-airdrop/node_modules/@trufflesuite/web3-provider-engine/node_modules/request/request.js:848:19)
    at listOnTimeout (internal/timers.js:555:17)
    at processTimers (internal/timers.js:498:7)
    at PollingBlockTracker._performSync (/home/stutter/Dev/Smart Contracts/token-airdrop/node_modules/eth-block-tracker/src/polling.js:51:24)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

这是我在 truffle-config.js 中的网络对象

bscTestnet: {
    provider: () => new HDWalletProvider(mnemonic, `https://speedy-nodes-nyc.moralis.io/225d3aa06df7d2f1c351e260/bsc/testnet`),
    network_id: 97,       // Ropsten's id
    gas: 5500000,        // Ropsten has a lower block limit than mainnet
    confirmations: 10,    // # of confs to wait between deployments. (default: 0)
    timeoutBlocks: 50000,  // # of blocks before a deployment times out  (minimum/default: 50)
    skipDryRun: true     // Skip dry run before migrations? (default: false for public nets )
    }

在以太坊上,Infura 端点曾在此github 问题中描述过此错误。

当我使用 infura 端点部署到 ropsten 时,我没有收到此错误。
我似乎没有发现任何提及 Binance Smart Chain 上的moralis 端点发生的此错误。

任何有关如何解决此问题的建议表示赞赏。
谢谢!

4

0 回答 0