object
— the simulation parameters:
blockStateCalls
— an array of transaction call objects:
calls
— an array of transaction objects:
from
— the string of the address used to send the transaction.to
— the string of the address to which the transaction is directed, a wallet, or a smart contract.gas
— the maximum amount of gas that can be used by the transaction.maxFeePerGas
— the maximum fee per gas the sender is willing to pay.maxPriorityFeePerGas
— the maximum priority fee per gas the sender is willing to pay.value
— (optional) the value sent with this transaction, encoded as hexadecimal.data
— (optional) additional data to be sent with the call, usually used to invoke functions from smart contracts.validation
— a boolean indicating whether to validate the transaction.traceTransfers
— a boolean indicating whether to trace token transfers.blockOverride
— (optional) an object to override block properties:
number
— (optional) the block number to override.difficulty
— (optional) the block difficulty to override.time
— (optional) the block timestamp to override.gasLimit
— (optional) the block gas limit to override.coinbase
— (optional) the block coinbase address to override.random
— (optional) the block random value to override.baseFeePerGas
— (optional) the block base fee per gas to override.stateOverride
— (optional) an object to override account states:
address
— the account address to override:
balance
— (optional) the account balance to override.nonce
— (optional) the account nonce to override.code
— (optional) the account code to override.state
— (optional) the account storage to override.stateDiff
— (optional) the account storage diff to override.string
— the block parameter (e.g., “latest”, “earliest”, or a block number).
result
— the result of the simulation, including:
eth_simulateV1
is to test complex smart contract interactions before submitting them to the blockchain. This helps developers predict gas usage, identify potential errors, and understand how their transactions will affect the blockchain state.
For example, you can use eth_simulateV1
to:
The simulation result
The response is of type object
.