Provider gas issue when deploying new contract?

When using the Infura provider w/ hardhat, I’m running into ProviderError: gas uint64 overflow between both Rinkeby and Mainnet when trying to deploy a new contract.

Are then any gas limits set by Infura I should be aware when deploying between the two? Was able to eventually get around the issue on Rinkeby by setting the gas in the hardhat network config to 10,000,000, but the same did not work for Mainnet.

Transaction takes about 4,050,000 gas to complete with a contract size well under the max limit.

Hoping someone can rule out it is a provider issue or just the gas/block differences between Rinkeby and Mainnet.


There are no gas limits for eth mainnet, or eth testnets for our Infura endpoints. Where there an error message when you did the work around of increasing the gas for mainnet?

Kind regards,
Alex | Infura Support | Consensys