scenario

package
v1.4.95-pre Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestVMType = []byte{0, 0}

TestVMType 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 {
}

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) 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