The estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance. Estimates are served directly from nodes, we're not doing anything special to the value so the rest of the network is likely seeing the same.
Object- The transaction call object
DATA, 20 Bytes - (optional) The address the transaction is sent from.
DATA, 20 Bytes - The address to which the transaction is directed to.
QUANTITY- (optional) Integer of the gas provided for the transaction execution.
eth_estimateGasconsumes zero gas, but this parameter may be needed by some executions. NOTE: this parameter has a cap of 550 Million gas per request.
QUANTITY- (optional) Integer of the
gasPriceused for each paid gas.
QUANTITY- (optional) Integer of the value sent with this transaction
DATA- (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI
QUANTITY|TAG- integer block number, or the string "latest", "earliest" or "pending", see the default block parameter.
eth_estimateGaswill check the balance of the sender (to make sure that the sender has enough gas to complete the request). This means that even though the call doesn't consume any gas, the
fromaddress must have enough gas to execute the transaction.
- If no
gasis specified geth uses the block gas limit from the pending block as an upper bound. As a result, the returned estimate might not be enough to execute the call/transaction when the amount of actual gas needed is higher than the pending block gas limit.
QUANTITY - the amount of gas used.