I'm trying to deploy a smart contract to the Ethereum mainnet. I paid about $161 in gas fees before the transaction failed, because it ran out of gas.

I tried again with a higher gas limit, and it ran out again.

It seems insane that it'd cost much more than that to deploy a contract. Am I doing something wrong? Or is this normal, and I just need to adjust my expectations of how much I'll be spending to deploy this thing?

2 Answers 2


Gas prices are astronomically high as we await Ethereum 2. It could be 300 to 10,000 dollars for just gas fees alone, depending on the complexity of the smart contract(s). If you're just deploying just to test or nothing too important, I would hold off unless you're deploying something "worth" deploying and I mean if you believe this is a functioning working contract you want on the mainnet and its worth spending hundreds on gas fees.


I guess one way to estimate the cost in mainnet is to deploy on testnet first, and from there u can see the actual gas consumption for deploying contract, then use the mainnet gas price to calculate the cost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.