Documentation
¶
Overview ¶
Package state provides a caching layer atop the Ethereum state trie.
Index ¶
- func NewDatabase(db ethdb.Database) ethstate.Database
- func NewDatabaseWithConfig(db ethdb.Database, config *triedb.Config) ethstate.Database
- func NewDatabaseWithNodeDB(db ethdb.Database, tdb *triedb.Database) ethstate.Database
- type Database
- type Dump
- type DumpAccount
- type DumpCollector
- type DumpConfig
- type StateDB
- func (s *StateDB) AddBalanceMultiCoin(addr common.Address, coinID common.Hash, amount *big.Int)
- func (s *StateDB) AddLog(addr common.Address, topics []common.Hash, data []byte, blockNumber uint64)
- func (s *StateDB) Copy() *StateDB
- func (s *StateDB) GetBalanceMultiCoin(addr common.Address, coinID common.Hash) *big.Int
- func (s *StateDB) GetCommittedStateAP1(addr common.Address, hash common.Hash) common.Hash
- func (s *StateDB) GetLogData() (topics [][]common.Hash, data [][]byte)
- func (s *StateDB) GetPredicateStorageSlots(address common.Address, index int) ([]byte, bool)
- func (s *StateDB) GetTxHash() common.Hash
- func (s *StateDB) Logs() []*evmtypes.Log
- func (s *StateDB) SelfDestruct(addr common.Address)
- func (s *StateDB) Selfdestruct6780(addr common.Address)
- func (s *StateDB) SetCode(addr common.Address, code []byte)
- func (s *StateDB) SetPredicateStorageSlots(address common.Address, predicates [][]byte)
- func (s *StateDB) SetState(addr common.Address, key, value common.Hash)
- func (s *StateDB) SetTxContext(thash common.Hash, ti int)
- func (s *StateDB) SubBalanceMultiCoin(addr common.Address, coinID common.Hash, amount *big.Int)
- type Trie
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDatabaseWithConfig ¶
Types ¶
type DumpAccount ¶
type DumpAccount = ethstate.DumpAccount
type DumpCollector ¶
type DumpCollector = ethstate.DumpCollector
type DumpConfig ¶
type DumpConfig = ethstate.DumpConfig
type StateDB ¶
StateDB wraps go-ethereum's StateDB with minimal extensions
func (*StateDB) AddBalanceMultiCoin ¶ added in v0.8.1
AddBalanceMultiCoin adds amount to the multi-coin balance for addr and coinID
func (*StateDB) AddLog ¶ added in v0.8.1
func (s *StateDB) AddLog(addr common.Address, topics []common.Hash, data []byte, blockNumber uint64)
AddLog adds a log entry - wrapper to match vm.StateDB interface
func (*StateDB) Copy ¶
Copy creates a deep, independent copy of the state. It overrides the embedded StateDB's Copy to ensure our wrapper type is returned.
func (*StateDB) GetBalanceMultiCoin ¶ added in v0.8.1
GetBalanceMultiCoin returns the multi-coin balance for addr and coinID
func (*StateDB) GetCommittedStateAP1 ¶ added in v0.8.1
GetCommittedStateAP1 retrieves a value from the committed storage for AP1
func (*StateDB) GetLogData ¶ added in v0.8.1
GetLogData returns the log topics and data
func (*StateDB) GetPredicateStorageSlots ¶ added in v0.8.1
GetPredicateStorageSlots returns predicate storage slots
func (*StateDB) SelfDestruct ¶ added in v0.8.1
SelfDestruct marks the account for deletion - wrapper to match vm.StateDB interface
func (*StateDB) Selfdestruct6780 ¶ added in v0.8.1
Selfdestruct6780 marks the account for deletion per EIP-6780 - wrapper to match vm.StateDB interface
func (*StateDB) SetCode ¶ added in v0.8.1
SetCode sets the code for an account - wrapper to match vm.StateDB interface
func (*StateDB) SetPredicateStorageSlots ¶ added in v0.8.1
SetPredicateStorageSlots sets predicate storage slots
func (*StateDB) SetTxContext ¶
SetTxContext sets the current transaction hash and index