Trying to deploy a smart contract with:
$ truffle migrate --network ropsten
But I got this error:
/home/user/Documentos/testcontract/node_modules/eth-block-tracker/src/polling.js:51
const newErr = new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${err.stack}`)
^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
undefined
at PollingBlockTracker._performSync (/home/user/Documentos/testcontract/node_modules/eth-block-tracker/src/polling.js:51:24)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
My truffle-config.js:
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
ropsten: {
provider: () => new HDWalletProvider(mnemonicPhras, 'https://ropsten.infura.io/v3/1a470cedbc0d423592811o8bd1aa3e33'),
network_id: 3, // Ropsten's id
gas: 5500000, // Ropsten has a lower block limit than mainnet
confirmations: 2, // # of confs to wait between deployments. (default: 0)
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
},}
}
With ganache works perfectly, but I need try whit this testnet...
I also got the same error and tried to use ws
instead of https
endpoint and got the following issue.
Error: Unexpected server response: 401.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.