Hi guys, I’m trying to deploy an upgradeable contract on Mainnet and i keep getting this error response:
> transaction hash: 0x326b38efb5660c0bc5bfea82febb12724c8732399e89a1890f726024725d081e
⠋ Blocks: 7 Seconds: 45Error: PollingBlockTracker - encountered an error while attempting to update latest block:
Error: getaddrinfo ENOTFOUND eth-mainnet.alchemyapi.io
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
at PollingBlockTracker._performSync (/Users/apple/Downloads/ETH-GAS 2/node_modules/eth-block-tracker/src/polling.js:51:24)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
truffle-config.js
const HDWalletProvider = require('@truffle/hdwallet-provider');
const { alchemyApiKey, mnemonic } = require('./secret.json');
module.exports = {
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
live: {
provider: () => new HDWalletProvider(mnemonic, `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`),
network_id: 1, // Mainnet's id
gas: 5500000,
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 )
}
},
// Set default mocha options here, use special reporters etc.
mocha: {
// timeout: 100000
},
// Configure your compilers
compilers: {
solc: {
version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version)
// docker: true, // Use "0.5.1" you've installed locally with docker (default: false)
// settings: { // See the solidity docs for advice about optimization and evmVersion
// optimizer: {
// enabled: false,
// runs: 200
// },
// evmVersion: "byzantium"
// }
}
}
};
I’ve deployed the contract on ropsten and Kovan network and it works perfectly but fails to deploy on mainnet