squash

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SquashSim

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

SquashSim wraps an op-chain-ops MemporyStateDB, and applies EVM-messages as if they all exist in the same infinite EVM block. The result is squashing all the EVM execution changes into the state.

func NewSimulator

func NewSimulator(db *state.MemoryStateDB) *SquashSim

func (*SquashSim) AddMessage

func (sim *SquashSim) AddMessage(msg *core.Message) (res *core.ExecutionResult, err error)

AddMessage processes a message on top of the chain-state that is squashed into a genesis state allocation.

func (*SquashSim) AddUpgradeTxs

func (sim *SquashSim) AddUpgradeTxs(txs []hexutil.Bytes) error

AddUpgradeTxs traverses a list of encoded deposit transactions. These transactions should match what would be included in the live system upgrade. The resulting state changes are squashed together, such that the final state can then be used as genesis state.

func (*SquashSim) BlockContext

func (sim *SquashSim) BlockContext() *vm.BlockContext

Jump to

Keyboard shortcuts

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