eth_simulateV1
Executes a sequence of message calls building on each other's state without creating transactions on the block chain, optionally overriding block and state data
https://api.1inch.com/web3/10
Supported on: Optimism
Parameters
Payload (required)
Payload
* any blockStateCalls
* array Definition of blocks that can contain calls and overrides
blockOverrides
object Block overrides can be used to replace fields in a block.
default: no block override.
number
string When overriding block numbers across multiple blocks, block number need to be increasing. Skipping over blocks numbers is possible. If block number is not specified, it's incremented by one for each block.
prevRandao
string time
string Time must either increase or remain constant relative to the previous block. If time is not specified, it's incremented by one for each block.
gasLimit
string feeRecipient
string baseFeePerGas
string withdrawals
array This array can have a maximum length of 16.
items
any blobBaseFee
string stateOverrides
object State overrides can be used to replace existing blockchain state with new state.
Default: no state overrides
additionalProperties
none calls
array List of transactions to execute at this block/state.
Default: []
items
object type
string Default: 0x2
nonce
string Default: Defaults to correct nonce
to
string Default: 0x0
from
string Default: null
gas
string Default: Remaining gas in the current block
value
string Default: 0
input
string Default: no data
gasPrice
string The gas price willing to be paid by the sender in wei
Default: 0
maxPriorityFeePerGas
string Maximum fee per gas the sender is willing to pay to miners in wei
Default: 0
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
Default: 0
maxFeePerBlobGas
string The maximum total fee per blob gas the sender is willing to pay in wei
Default: 0
accessList
array EIP-2930 access list
Default: []
items
object address
* string storageKeys
* array items
string additionalProperties
none blobVersionedHashes
string EIP-4844 versioned hashes
Default: []
traceTransfers
boolean Adds ETH transfers as ERC20 transfer events to the logs. These transfers have emitter contract parameter set as address(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee).
Default: false.
validation
boolean When true, the eth_simulateV1 does all validations that a normal EVM would do, except contract sender and signature checks. When false, eth_simulateV1 behaves like eth_call.
Default: false.
returnFullTransactions
boolean When true, the method returns full transaction objects, otherwise, just hashes are returned.
Block tag
default: 'latest'
Block tag
any anyOf[0]
string anyOf[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
anyOf[2]
string 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]
any blockStateCalls
* array Definition of blocks that can contain calls and overrides
blockOverrides
object Block overrides can be used to replace fields in a block.
default: no block override.
number
string When overriding block numbers across multiple blocks, block number need to be increasing. Skipping over blocks numbers is possible. If block number is not specified, it's incremented by one for each block.
prevRandao
string time
string Time must either increase or remain constant relative to the previous block. If time is not specified, it's incremented by one for each block.
gasLimit
string feeRecipient
string baseFeePerGas
string withdrawals
array This array can have a maximum length of 16.
items
any blobBaseFee
string stateOverrides
object State overrides can be used to replace existing blockchain state with new state.
Default: no state overrides
additionalProperties
none calls
array List of transactions to execute at this block/state.
Default: []
items
object type
string Default: 0x2
nonce
string Default: Defaults to correct nonce
to
string Default: 0x0
from
string Default: null
gas
string Default: Remaining gas in the current block
value
string Default: 0
input
string Default: no data
gasPrice
string The gas price willing to be paid by the sender in wei
Default: 0
maxPriorityFeePerGas
string Maximum fee per gas the sender is willing to pay to miners in wei
Default: 0
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
Default: 0
maxFeePerBlobGas
string The maximum total fee per blob gas the sender is willing to pay in wei
Default: 0
accessList
array EIP-2930 access list
Default: []
items
object address
* string storageKeys
* array items
string additionalProperties
none blobVersionedHashes
string EIP-4844 versioned hashes
Default: []
traceTransfers
boolean Adds ETH transfers as ERC20 transfer events to the logs. These transfers have emitter contract parameter set as address(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee).
Default: false.
validation
boolean When true, the eth_simulateV1 does all validations that a normal EVM would do, except contract sender and signature checks. When false, eth_simulateV1 behaves like eth_call.
Default: false.
returnFullTransactions
boolean When true, the method returns full transaction objects, otherwise, just hashes are returned.
oneOf[1]
any anyOf[0]
string anyOf[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
anyOf[2]
string id
* number Request ID
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const response = await fetch('https://api.1inch.com/web3/10', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${API_KEY}`,
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_simulateV1',
params: ['string'],
id: 1,
}),
});
const data = await response.json();
console.log(data);
Response
Result of calls
Result of calls
object oneOf[0]
object The error messages are suggestions and a client might decide to return a different errror message than specified here. However, the error codes are enforced by this specification.
error
* any oneOf[0]
any oneOf[1]
any oneOf[2]
any oneOf[3]
any oneOf[4]
any oneOf[5]
any oneOf[6]
any oneOf[7]
any oneOf[8]
any oneOf[9]
any oneOf[10]
any oneOf[11]
any oneOf[12]
any oneOf[13]
any oneOf[14]
any oneOf[15]
any oneOf[16]
any oneOf[17]
any oneOf[18]
any oneOf[1]
array items
object hash
* string parentHash
* string sha3Uncles
* string miner
* string stateRoot
* string transactionsRoot
* string receiptsRoot
* string logsBloom
* string difficulty
string number
* string gasLimit
* string gasUsed
* string timestamp
* string extraData
* string mixHash
* string nonce
* string baseFeePerGas
string withdrawalsRoot
string blobGasUsed
string excessBlobGas
string parentBeaconBlockRoot
string size
* string transactions
* any anyOf[0]
array items
string anyOf[1]
array items
object oneOf[0]
object type
* string nonce
* string to
* string gas
* string value
* string input
* string 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
gasPrice
string The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.
accessList
* array EIP-2930 access lists
items
object address
* string storageKeys
* array items
string additionalProperties
none chainId
* string Chain ID that this transaction is valid on
authorizationList
* array List of authorizations for the transaction
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 yParity
* string The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
v
string For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.
r
* string s
* string oneOf[1]
object type
* string nonce
* string to
* string gas
* string value
* string input
* string 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
gasPrice
string The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.
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 chainId
* string Chain ID that this transaction is valid on
yParity
* string The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
v
string For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.
r
* string s
* string oneOf[2]
object type
* string nonce
* string to
any oneOf[0]
null oneOf[1]
string gas
* string value
* string input
* string 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
gasPrice
* string The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.
accessList
* array EIP-2930 access list
items
object address
* string storageKeys
* array items
string additionalProperties
none chainId
* string Chain ID that this transaction is valid on.
yParity
* string The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
v
string For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.
r
* string s
* string oneOf[3]
object type
* string nonce
* string to
any oneOf[0]
null oneOf[1]
string gas
* string value
* string input
* string gasPrice
* string The gas price willing to be paid by the sender in wei
accessList
* array EIP-2930 access list
items
object address
* string storageKeys
* array items
string additionalProperties
none chainId
* string Chain ID that this transaction is valid on.
yParity
* string The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
v
string For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.
r
* string s
* string oneOf[4]
object type
* string nonce
* string to
any oneOf[0]
null oneOf[1]
string gas
* string value
* string input
* string gasPrice
* string The gas price willing to be paid by the sender in wei
chainId
string Chain ID that this transaction is valid on.
v
* string r
* string s
* string blockHash
* string blockNumber
* string from
* string hash
* string transactionIndex
* string withdrawals
array items
object index
* string validatorIndex
* string address
* string amount
* string additionalProperties
none uncles
* array items
string requestsHash
string additionalProperties
none