I'm trying to estimate Gas for a contract method (both using
geth - tried
web3js). Contract is deployed and proven to be working.
When I use:
to, from, dataI get
gas > 6 700 000, which seems to be an error as it's the whole available gas for the current block
to, from, dataI get the following error:
Internal("Requires higher than upper limit of 1000000000000")
- however when I actually create a transaction it consumes much more
Gas Used By Txn: 108140- which doesn't match the number returned by
eth_estimateGas- if I click
traceon Etherscan (
parity/geth) - gas from the traces matches
108140is used to process the transaction.
Am I missing something here? How can I calculate the gas properly? There is nothing unusual in the contract - constant number of steps. I believe that I should be able to even calculate this manually with a pen and paper.
I've tried a few transactions and gas used by txn is always higher from
32000 units than estimated gas.