Enjoying the course and near the end. Trying to deploy to mainnet but I simply can’t get past the final ‘truffle migrate --network mainnet --reset’. It consistently runs out of gas. I was getting issues where it would show insufficient funds with the code structured the way it’s shown in the training. But then I added the following under ‘mainnet’ in truffle-config.js and I’m not getting that error any more…
provider: () => new HDWalletProvider(
Now my errors look like this…
Error: Deployment Failed
“Migrations” ran out of gas (using a value you set in your network config or deployment parameters.)
- Block limit: 30029295 (0x1ca35ef)
- Gas sent: 30000000 (0x1c9c380)
No matter what I put in the gas and gasPrice I get this error. I’ve got 0.009754 ETH (~$40). The training video says I only need $20-30. Has the cost of deploying for the initial transaction gone up that much since the training video was made? Or, are my gas limit and gas price wrong? I know this is a bidding process for mining but there is too much guessing involved. I just want my code to be accepted and deployed. What do I do?