I have a simple 100-line contract with 6 functions that I want to deploy to the main net. When I deploy it to the Rinkeby test net through Truffle, I get the following result:
Summary
=======
> Total deployments: 2
> Final cost: 0.01959998 ETH
However, when I try to deploy to the main net, I get the following:
Message: sender doesn't have enough funds to send tx. The upfront cost is: 260000000000000000 and the sender's account only has: 11370852144167560
This is equivalent to over $500 USD. Surely this can't be accurate?
Following is my Truffle config:
live: {
networkCheckTimeout: 100000000,
provider: function() {
return new HDWalletProvider(
privateKeys.split(','), // Array of account private keys
`https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`
)
},
network_id: "1",
gas: 4000000,
gasPrice: 65000000000, // 65Gwei
},
I deployed the contract to the test net on Remix and the estimated fee was 6721074 gwei which is about $15 currently.