StateReader defines the interface for accessing accounts and storage slots associated with a specific state. StateReader is supposed to be thread-safe.
| 55 | // |
| 56 | // StateReader is supposed to be thread-safe. |
| 57 | type StateReader interface { |
| 58 | // Account retrieves the account associated with a particular address. |
| 59 | // |
| 60 | // - Returns a nil account if it does not exist |
| 61 | // - Returns an error only if an unexpected issue occurs |
| 62 | // - The returned account is safe to modify after the call |
| 63 | Account(addr common.Address) (*types.StateAccount, error) |
| 64 | |
| 65 | // Storage retrieves the storage slot associated with a particular account |
| 66 | // address and slot key. |
| 67 | // |
| 68 | // - Returns an empty slot if it does not exist |
| 69 | // - Returns an error only if an unexpected issue occurs |
| 70 | // - The returned storage slot is safe to modify after the call |
| 71 | Storage(addr common.Address, slot common.Hash) (common.Hash, error) |
| 72 | } |
| 73 | |
| 74 | // Reader defines the interface for accessing accounts, storage slots and contract |
| 75 | // code associated with a specific state. |
no outgoing calls
no test coverage detected
searching dependent graphs…