MCPcopy
hub / github.com/ethereum/go-ethereum / StateReader

Interface StateReader

core/state/reader.go:57–72  ·  view source on GitHub ↗

StateReader defines the interface for accessing accounts and storage slots associated with a specific state. StateReader is supposed to be thread-safe.

Source from the content-addressed store, hash-verified

55//
56// StateReader is supposed to be thread-safe.
57type 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.

Callers 1

ServiceGetTrieNodesQueryFunction · 0.95

Implementers 14

ReaderWithBlockLevelAccessListcore/state/reader_eip_7928.go
historicStateReadercore/state/database_history.go
historicalTrieReadercore/state/database_history.go
flatReadercore/state/reader.go
mptTrieReadercore/state/reader.go
ubtTrieReadercore/state/reader.go
multiStateReadercore/state/reader.go
stateReaderWithCachecore/state/reader.go
stateReaderWithStatscore/state/reader.go
countingStateReadercore/state/reader_eip_7928_test.go
diskLayercore/state/snapshot/disklayer.go
diffLayercore/state/snapshot/difflayer.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…