scenario

package
v1.5.29-patch1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: GPL-3.0 Imports: 12 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
scripts command

Jump to

Keyboard shortcuts

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