scenario

package
v1.5.29 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultVMType = []byte{5, 0}

DefaultVMType is the VM type argument we use in tests.

Functions

func DefaultScenarioExecutor

func DefaultScenarioExecutor() *scenexec.ScenarioExecutor

DefaultScenarioExecutor provides a scenario executor with VM 1.5, default configuration

Types

type ScenarioVMHostBuilder

type ScenarioVMHostBuilder struct {
	OverrideVMExecutor executor.ExecutorAbstractFactory
	VMType             []byte
}

VMTestExecutor parses, interprets and executes both .test.json tests and .scen.json scenarios with VM.

func NewScenarioVMHostBuilder

func NewScenarioVMHostBuilder() *ScenarioVMHostBuilder

NewScenarioVMHostBuilder creates a default ScenarioVMHostBuilder.

func (*ScenarioVMHostBuilder) GasScheduleMapFromScenarios

func (svb *ScenarioVMHostBuilder) GasScheduleMapFromScenarios(scenGasSchedule scenmodel.GasSchedule) (worldmock.GasScheduleMap, error)

GasScheduleMapFromScenarios provides the correct gas schedule for the gas schedule named specified in a scenario.

func (*ScenarioVMHostBuilder) GetVMType added in v1.5.27

func (svb *ScenarioVMHostBuilder) GetVMType() []byte

GetVMType returns the configured VM type.

func (*ScenarioVMHostBuilder) NewMockWorld

func (*ScenarioVMHostBuilder) NewMockWorld() *worldmock.MockWorld

NewMockWorld defines how the MockWorld is initialized.

func (*ScenarioVMHostBuilder) NewVM

func (svb *ScenarioVMHostBuilder) NewVM(
	world *worldmock.MockWorld,
	gasSchedule map[string]map[string]uint64,
) (scenexec.VMInterface, error)

NewVM will create a new VM instance with pointers to a mock world and given gas schedule.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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