Parameters
- arrayarray
An array with the following fields:
- transactionobject
The transaction call object which contains the following fields:
- fromstring
The address from which the transaction is sent
- tostringREQUIRED
The address to which the transaction is addressed
- gasinteger
The integer of gas provided for the transaction execution
- gasPriceinteger
The integer of gasPrice used for each paid gas encoded as hexadecimal
- valueinteger
The integer of value sent with this transaction encoded as hexadecimal
- datastring
The hash of the method signature and encoded parameters. For more information, see the Contract ABI description in the Solidity documentation
- blockOverrideobject
(Optional) The overrides of the execution context block header
- blockNumberstring
The block number. Defaults to the block number of the first simulated block
- blockHashobject
A dictionary that maps blockNumber to a user-defined hash. It could be queried from the solidity opcode BLOCKHASH
- coinbasestring
The address of miner. Defaults to the original miner of the first simulated block.
- timestampinteger
The timestamp of the current block. Defaults to the timestamp of the first simulated block. Each following block increments its timestamp by 1.
- difficultyinteger
The difficulty of the current block. Defaults to the difficulty of the first simulated block.
- gasLimitinteger
The gas limit of the current block. Defaults to the difficulty of the first simulated block.
- baseFeeinteger
The base fee of the current block. Defaults to the base fee of the first simulated block.
- SIMULATION_CONTEXTobject
(Optional) The simulation context
- blockNumber or Tagstring
The Tag 'latest', 'earliest', 'pending', 'safe' or 'finalized', or a hexadecimal block number
- transactionIndexinteger
The transaction index of the simulated transactions. Default value of the transaction index is -1, which would place the simulated transactions after the entire block.
- STATE_OVERRIDEobject
(Optional) The State Override Set option allows you to change the state of a contract before executing the call, which means you can modify the values of variables stored in the contract, such as balances and approvals for that call without actually modifying the contract. Each address maps to an object containing:
- balancestring
The fake balance to set for the account before executing the call
- noncestring
The fake nonce to set for the account before executing the call
- codestring
The fake EVM bytecode to inject into the account before executing the call
- stateobject
The fake key-value mapping to override all slots in the account storage before executing the call
- stateDiffinteger
The fake key-value mapping to override individual slots in the account storage before executing the call
- timeoutinteger
The upper limit running time for the simulations in milliseconds. Defaults to 5000 milliseconds.
Returns
- arrayarray
An array with the following fields:
- valuestring
The value if the transaction was successful
- errorstring
(Optional) The error if the transaction failed
1{2"jsonrpc": "2.0",3"id": 1,4"result": [5[6{7"value": "0000000000000000000000000000000000000000000000000000000000000001"8},9{10"value": ""11}12]13]14}
1{2"jsonrpc": "2.0",3"id": 1,4"result": [5[6{7"value": "0000000000000000000000000000000000000000000000000000000000000001"8},9{10"value": ""11}12]13]14}