state

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemDB

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

MemDB is an in stateful wrapper around core.Genesis, that makes it easier to build genesis state.

func NewMemDB

func NewMemDB(genesis *core.Genesis) *MemDB

func (*MemDB) Genesis

func (db *MemDB) Genesis() *core.Genesis

func (*MemDB) SetCode

func (db *MemDB) SetCode(addr common.Address, code []byte)

func (*MemDB) SetState

func (db *MemDB) SetState(addr common.Address, key, value common.Hash)

type StorageSlot

type StorageSlot struct {
	Key   common.Hash
	Value common.Hash
}

func EncodeStorage

func EncodeStorage(layout solc.StorageLayout, values StorageValues) ([]StorageSlot, error)

EncodeStorage encodes the given storage values according to the given storage layout. If it does not find a slot for a label, it returns an error. If it does not support encoding a value, it returns an error.

type StorageValues

type StorageValues map[string]any

Jump to

Keyboard shortcuts

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