Hacker News new | ask | show | jobs
by trianglesphere 1284 days 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.

1 comments

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