I'm trying to deploy a contract with Remix and Metamask but I get this error every time I'm trying to do it. creation of ICODeployer errored: Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32010,"message":"Transaction cost exceeds current gas limit. Limit: 12487794, got: 13119230. Try decreasing supplied gas."}}'

I don't know why might be the problem since yesterday I tested it and everything was working correctly. I set a lower gas limit in Metamask(below 12487794) but the contract will fail deploying. When I look at the transaction on etherscan, it is same error "Out of gas". This is the link to the transaction.https://kovan.etherscan.io/tx/0x58b73cde126056e9b9cbab251dfdba89d81c1633bc235e8b80f85062c86d70bb

How can I manage this error? I already tried modifying the gas cost in Metamask to a lower value and the gas limit in remix to a higher value but it's not working. Any help would be appreciated!

1 Answer 1


Change testnet, the gas limit per block is not constant and currently on Kovan is about 12.500.000. Yesterday this limit was higher, apparently.

Here you can see the gas limit of the latest blocks.

However, even if the gas limit per block in the mainnet was great enough your transaction would cost thousands of dollars with the current gas price and Ether price. I suggest to optimize the contract, it consumes too much gas.

  • Awesome!Thanks for the answer.Indeed you are right!The gas cost was lower yesterday.Since today I made some modifications in the code, it raised above the limit, hence the error.
    – freezy
    May 26, 2021 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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