extstate

package
v1.16.20 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: GPL-3.0, LGPL-3.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrecompileAdapter added in v0.8.6

func NewPrecompileAdapter(extState *ExtState) contract.StateDB

NewPrecompileAdapter creates a new PrecompileAdapter

Types

type ExtState added in v0.8.8

type ExtState struct {
	// contains filtered or unexported fields
}

ExtState wraps a StateDB for extended state operations

func New

func New(stateDB *state.StateDB) *ExtState

New creates a new ExtState instance

type PrecompileAdapter added in v0.8.8

type PrecompileAdapter struct {
	// contains filtered or unexported fields
}

PrecompileAdapter adapts ExtState for precompile usage

func (*PrecompileAdapter) AddBalance added in v0.8.8

func (p *PrecompileAdapter) AddBalance(addr common.Address, amount *uint256.Int)

AddBalance adds balance to an account

func (*PrecompileAdapter) AddLog added in v0.8.8

func (p *PrecompileAdapter) AddLog(log *types.Log)

AddLog adds a log entry

func (*PrecompileAdapter) CreateAccount added in v0.8.8

func (p *PrecompileAdapter) CreateAccount(addr common.Address)

CreateAccount creates a new account

func (*PrecompileAdapter) Exist added in v0.8.8

func (p *PrecompileAdapter) Exist(addr common.Address) bool

Exist returns whether an account exists

func (*PrecompileAdapter) GetBalance added in v0.8.8

func (p *PrecompileAdapter) GetBalance(addr common.Address) *uint256.Int

GetBalance gets account balance

func (*PrecompileAdapter) GetNonce added in v0.8.8

func (p *PrecompileAdapter) GetNonce(addr common.Address) uint64

GetNonce gets account nonce

func (*PrecompileAdapter) GetPredicateStorageSlots added in v0.8.8

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

GetPredicateStorageSlots gets predicate storage slots

func (*PrecompileAdapter) GetState added in v0.8.8

func (p *PrecompileAdapter) GetState(addr common.Address, key common.Hash) common.Hash

GetState gets state value

func (*PrecompileAdapter) GetTxHash added in v0.8.8

func (p *PrecompileAdapter) GetTxHash() common.Hash

GetTxHash gets the current transaction hash

func (*PrecompileAdapter) RevertToSnapshot added in v0.8.8

func (p *PrecompileAdapter) RevertToSnapshot(snapshot int)

RevertToSnapshot reverts to a previous snapshot

func (*PrecompileAdapter) SetNonce added in v0.8.8

func (p *PrecompileAdapter) SetNonce(addr common.Address, nonce uint64)

SetNonce sets account nonce

func (*PrecompileAdapter) SetState added in v0.8.8

func (p *PrecompileAdapter) SetState(addr common.Address, key common.Hash, value common.Hash)

SetState sets state value

func (*PrecompileAdapter) Snapshot added in v0.8.8

func (p *PrecompileAdapter) Snapshot() int

Snapshot returns the current revision number

Jump to

Keyboard shortcuts

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