Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
https://api.1inch.com/web3/56
Parameters
Transaction (required)
Transaction
* object
type
string
nonce
string
to
any
oneOf[0]
null
oneOf[1]
string
from
string
gas
string
value
string
input
string
gasPrice
string
The gas price willing to be paid by the sender in wei
maxPriorityFeePerGas
string
Maximum fee per gas the sender is willing to pay to miners in wei
maxFeePerGas
string
The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
maxFeePerBlobGas
string
The maximum total fee per gas the sender is willing to pay for blob gas in wei
accessList
array
EIP-2930 access list
items
object
address
* string
storageKeys
* array
items
string
additionalProperties
none
blobVersionedHashes
array
List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.
items
string
blobs
array
Raw blob data.
items
string
chainId
string
Chain ID that this transaction is valid on.
authorizationList
array
EIP-7702 authorization list
items
object
chainId
* string
Chain ID on which this transaction is valid
nonce
* string
address
* string
yParity
* string
The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature
r
* string
s
* string
additionalProperties
none
Block
Block
any
oneOf[0]
string
oneOf[1]
string (Enum)
`earliest`: The lowest numbered block the client has available; `finalized`: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; `safe`: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; `pending`: A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for `finalized` or `safe` block MUST be responded to with `-39001: Unknown block` error
earliest
finalized
safe
latest
pending
Request
Request
object
jsonrpc
* string (Enum)
JSON-RPC version
2.0
method
* string
The method to call
params
array
Method parameters
items
any
oneOf[0]
object
type
string
nonce
string
to
any
oneOf[0]
null
oneOf[1]
string
from
string
gas
string
value
string
input
string
gasPrice
string
The gas price willing to be paid by the sender in wei
maxPriorityFeePerGas
string
Maximum fee per gas the sender is willing to pay to miners in wei
maxFeePerGas
string
The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
maxFeePerBlobGas
string
The maximum total fee per gas the sender is willing to pay for blob gas in wei
accessList
array
EIP-2930 access list
items
object
address
* string
storageKeys
* array
items
string
additionalProperties
none
blobVersionedHashes
array
List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.
items
string
blobs
array
Raw blob data.
items
string
chainId
string
Chain ID that this transaction is valid on.
authorizationList
array
EIP-7702 authorization list
items
object
chainId
* string
Chain ID on which this transaction is valid
nonce
* string
address
* string
yParity
* string
The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature
r
* string
s
* string
additionalProperties
none
oneOf[1]
any
oneOf[0]
string
oneOf[1]
string (Enum)
`earliest`: The lowest numbered block the client has available; `finalized`: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; `safe`: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; `pending`: A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for `finalized` or `safe` block MUST be responded to with `-39001: Unknown block` error