Zilliqa / zq2

Zilliqa 2.0 code base
Apache License 2.0
9 stars 0 forks source link

gas estimation issue #1376

Closed DrZoltanFazekas closed 1 month ago

DrZoltanFazekas commented 2 months ago

My Plunderswap transaction reverted with out of gas. It seems to be a gas estimation issue. Here is my reverted transaction with the 2.2m gas limit MetaMask suggested and a successful one with a 22m gas limit I set manually:

I attached the traces of both transactions where you can see the gas left (supplied to the individual calls) and the gas used by them. trace_failing_2200000gas_limit.json trace_successful_22000000gas_limit.json

It ran out of gas in the constructor of a contract deployed using CREATE2.

DrZoltanFazekas commented 1 month ago

It turned out Plunderswap was using a hardcoded gas limit that was too low, after removing it the said transaction worked using the estimated gas