top | item 33876592

(no title)

trianglesphere | 3 years ago

Contract’s don’t (more accurately almost never) pay for gas. Gas estimation is done when sending by the end user.

Some parts of gas estimation can be done statically, but some of the cost of certain operations are dependent on the data being loaded from the state. I’d like a tool to set an upper bound on gas usage (current approach is to execute the tx on pending state and add 10-30%), but solidity does not provide one.

discuss

order

andrewflnr|3 years ago

So it's just the individual user operation or whatever that fails if you mess up the gas estimation?