stateupgrade

package
v0.6.8-status-removal Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: GPL-3.0, LGPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(stateUpgrade *params.StateUpgrade, chainConfig ChainContext, state StateDB, blockContext BlockContext) error

Configure applies the state upgrade to the state.

Types

type BlockContext

type BlockContext interface {
	Number() *big.Int
}

BlockContext defines an interface that provides information to a state upgrade about the block that activates the upgrade.

type ChainContext

type ChainContext interface {
	IsEIP158(num *big.Int) bool
}

ChainContext defines an interface that provides information to a state upgrade about the chain configuration.

type StateDB

type StateDB interface {
	SetState(common.Address, common.Hash, common.Hash)
	SetCode(common.Address, []byte)
	AddBalance(common.Address, *big.Int)

	GetNonce(common.Address) uint64
	SetNonce(common.Address, uint64)

	CreateAccount(common.Address)
	Exist(common.Address) bool
}

StateDB is the interface for accessing EVM state in state upgrades

Jump to

Keyboard shortcuts

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