Parameters
- arrayarrayREQUIRED
An array with the following fields:
- transactionsarray
An array of transaction call objects
- fromstring
The address from which the transaction is sent
- tostringREQUIRED
The address to which the transaction is addressed
- gasstring
The integer of gas provided for the transaction execution
- gasPricestring
The integer of gasPrice used for each paid gas encoded as hexadecimal
- valuestring
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
- maxFeePerGasstring
The maximum total fee per gas the sender is willing to pay encoded as hexadecimal
- maxPriorityFeePerGasstring
The maximum priority fee per gas the sender is willing to pay encoded as hexadecimal
- blockOverrideobject
(Optional) Overrides the execution context block header. Use number, time, feeRecipient, and baseFeePerGas; the legacy names blockNumber, timestamp, coinbase, and baseFee are silently ignored. simulationContext.blockNumber is unchanged.
- numberstring
The simulated block number, encoded as a hexadecimal quantity. 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
- feeRecipientaddress
The fee recipient address. Defaults to the fee recipient of the first simulated block.
- timestring
The simulated block timestamp in Unix seconds, encoded as a hexadecimal quantity. Defaults to the timestamp of the first simulated block. Each following block increments its timestamp by 1.
- difficultystring
The difficulty of the current block. Defaults to the difficulty of the first simulated block.
- gasLimitstring
The gas limit of the current block. Defaults to the difficulty of the first simulated block.
- baseFeePerGasstring
The simulated base fee per gas in wei, encoded as a hexadecimal quantity. Defaults to the base fee of the first simulated block.
- simulationContextobjectREQUIRED
(Optional) The simulation context
- blockNumberstring
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.
Returns
- resultarray
An array of bundles; each bundle contains one result per simulated call.
- bundlearray
The call results for one bundle, in transaction order. Each element contains value on success or error on failure.
- valuestring
The hex-encoded return data for a successful call.
- errorobject
The error returned when the call fails.
- codeinteger
The JSON-RPC error code.
- messagestring
A description of the call failure.
1{2"jsonrpc": "2.0",3"id": 1,4"result": [5[6{7"value": "0x"8}9]10]11}
1{2"jsonrpc": "2.0",3"id": 1,4"result": [5[6{7"value": "0x"8}9]10]11}