extstate

package
v1.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2025 License: GPL-3.0, LGPL-3.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabaseWithConfig added in v1.13.3

func NewDatabaseWithConfig(db ethdb.Database, config *triedb.Config) state.Database

func NewDatabaseWithNodeDB added in v1.13.3

func NewDatabaseWithNodeDB(db ethdb.Database, triedb *triedb.Database) state.Database

func WithConcurrentWorkers added in v1.13.3

func WithConcurrentWorkers(prefetchers int) state.PrefetcherOption

Types

type StateDB

type StateDB struct {
	*state.StateDB
	// contains filtered or unexported fields
}

func New

func New(vm *state.StateDB) *StateDB

New creates a new StateDB with the given state.StateDB, wrapping it with additional functionality.

func (*StateDB) AddBalanceMultiCoin added in v1.13.3

func (s *StateDB) AddBalanceMultiCoin(addr common.Address, coinID common.Hash, amount *big.Int)

AddBalance adds amount to the account associated with addr.

func (*StateDB) GetBalanceMultiCoin added in v1.13.3

func (s *StateDB) GetBalanceMultiCoin(addr common.Address, coinID common.Hash) *big.Int

Retrieve the balance from the given address or 0 if object not found

func (*StateDB) GetPredicateStorageSlots

func (s *StateDB) GetPredicateStorageSlots(address common.Address, index int) ([]byte, bool)

GetPredicateStorageSlots returns the storage slots associated with the address, index pair. A list of access tuples can be included within transaction types post EIP-2930. The address is declared directly on the access tuple and the index is the i'th occurrence of an access tuple with the specified address.

Ex. AccessList[[AddrA, Predicate1], [AddrB, Predicate2], [AddrA, Predicate3]] In this case, the caller could retrieve predicates 1-3 with the following calls: GetPredicateStorageSlots(AddrA, 0) -> Predicate1 GetPredicateStorageSlots(AddrB, 0) -> Predicate2 GetPredicateStorageSlots(AddrA, 1) -> Predicate3

func (*StateDB) Prepare

func (s *StateDB) Prepare(rules params.Rules, sender, coinbase common.Address, dst *common.Address, precompiles []common.Address, list types.AccessList)

func (*StateDB) SubBalanceMultiCoin added in v1.13.3

func (s *StateDB) SubBalanceMultiCoin(addr common.Address, coinID common.Hash, amount *big.Int)

SubBalance subtracts amount from the account associated with addr.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL