eth_estimateGas
The amount of gas used
Params
(2)1. transaction (required)
accessList
array[AccessListItem] or null
address
stringMatch pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
storageKeys
array[string]data
string or null
Match pattern:
^0x[0-9a-f]*$
from
string or null
Match pattern:
^0x[0-9,a-f,A-F]{40}$
gas
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
gasPrice
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
maxFeePerGas
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
maxPriorityFeePerGas
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
nonce
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
to
string or null
Match pattern:
^0x[0-9,a-f,A-F]{40}$
transactionType
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
value
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
2. block (required)
U64
(one of)
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
Result
(gasUsed)string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$