forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
The state override set option allows you to change the state of a contract before executing the call. This 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 on the blockchain.
ㅤ
In more technical terms, the state override set is an optional parameter that allows executing the call against a modified chain state. It is an address-to-state mapping, where each entry specifies some state to be overridden prior to executing the call. Each address maps to an object containing:
| FIELD | TYPE | BYTES 2 | DESCRIPTION |
|---|---|---|---|
| balance | Quantity | <32 | Fake balance to set for the account before executing the call. |
| nonce | Quantity | <8 | Fake nonce to set for the account before executing the call. |
| code | Binary | any | Fake EVM bytecode to inject into the account before executing the call. |
| state | Object | any | Fake key-value mapping to override all slots in the account storage before executing the call. |
| stateDiff | Object | any | Fake key-value mapping to override individual slots in the account storage before executing the call. |
The state override set is the third parameter in eth_call. We only support the first and the second parameters now. It is a new feature to the xdc blockchain.
Reference:
Metadata
Metadata
Assignees
Labels
No labels