Skip to content

State override ​

Changes to accounts that apply before a call runs. The chain does not change.

The object maps an address to the changes for that account. The calls (eth_call, eth_estimateGas, eth_createAccessList, eth_callMany, eth_simulateV1, debug_traceCall, trace_call) accept it.

Fields ​

FieldTypeMeaning
balancehex number, weiThe new balance.
noncehex numberThe new nonce.
codehex dataThe new code. Use it to put a contract at an address for the call.
stateobject: slot to 32-byte valueThe full storage. All other slots become zero.
stateDiffobject: slot to 32-byte valueChanges to these slots only. The other slots keep their values.
movePrecompileToAddressaddresseth_simulateV1 only: for that block, the precompile at this account runs at the given address. The account is then a normal account. The other methods accept the field with no effect, as in reth.

Notes ​

  • An account with both state and stateDiff gives -32602.
  • In eth_simulateV1, a move of an account that is not a precompile gives -32000 account 0x... is not a precompile. A move to the same address gives -38022.
  • When two moves in eth_simulateV1 have the same target, the first move in the request runs there. The order of reth is not specified for this case (issue #120).
  • An unknown field gives -32602 Invalid params, with the text of reth in data.

Used by ​

eth_call, eth_callMany, eth_createAccessList, eth_estimateGas, trace_call.