execution
eth_estimateGas
Estimate gas
Returns the gas units a transaction would consume if executed against the latest state.POST
https://eth.rpc.pinax.network/v1/<API_KEY>/
Required parameters
| Name | Type | Description |
|---|---|---|
torequired | address | Recipient address. e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
Optional parameters
| Name | Type | Description |
|---|---|---|
data | hex | Optional call data. e.g. 0x18160ddd |
from | address | Optional sender. |
value | hex | Optional wei value to send (hex). |
Request body
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_estimateGas",
"params": [
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"0x18160ddd"
]
}Response
200 OKHex-encoded gas estimate.
{ "jsonrpc": "2.0", "id": 1, "result": "0x5208" }