Replies: 1 comment 2 replies
-
estimating gas is tricky, this is pretty much tx specific, I assume estimagegas is not an option here? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hello I’m measuring gas with debug_traceCall. My contract returns abi.encode(gasleft()). With a very high gas limit I get:
Gross Gas Cost (start − final gasleft()): ~2.46M
Net Gas Cost (trace.gasUsed, due to refunds): ~2.28M
But the tx only succeeds with at least 2.51M gas; setting the limit to ~gross OOGs. Calldata is short.
Is this extra ~0.05M the EIP-150 63/64 forwarding buffer for an early heavy subcall? What’s the correct way to compute the minimal non-OOG gas from a trace?
Beta Was this translation helpful? Give feedback.
All reactions