klay_estimateGas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
Parameters
Name | Type | Description |
---|---|---|
callObject | Object | The transaction call object. See the next table for the object's properties. |
callObject
has the following properties:
Name | Type | Description |
---|---|---|
from | 20-byte DATA | (optional) The address the transaction is sent from. |
to | 20-byte DATA | (optional when testing the deployment of a new contract) The address the transaction is directed to. |
gas | QUANTITY | (optional) Integer of the upper gas limit provided for the gas estimation. If no gas limit is specified, the Klaytn node uses the designated gas limit as an upper bound. |
gasPrice | QUANTITY | (optional) Integer of the gasPrice used for each paid gas. |
value | QUANTITY | (optional) Integer of the value sent with this transaction. |
data | DATA | (optional) Hash of the method signature and encoded parameters. |
Return Value
Type | Description |
---|---|
QUANTITY | The amount of gas used. |