andesbaikal

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const MotherEarthProtectedKeyPrefix = "MOTHEREARTH"

MotherEarthProtectedKeyPrefix prefixes all MotherEarth reserved storage. Only the protocol can write to keys starting with this.

View Source
const MotherEarthRewardKey = MotherEarthProtectedKeyPrefix + "reward"

MotherEarthRewardKey is the storage key where the protocol writes when sending out rewards.

Variables

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

TestVMType is the VM type argument we use in tests.

Functions

This section is empty.

Types

type AndesTestExecutor

type AndesTestExecutor struct {
	World *worldhook.MockWorld
	// contains filtered or unexported fields
}

AndesTestExecutor parses, interprets and executes both .test.json tests and .scen.json scenarios with Andes.

func NewAndesTestExecutor

func NewAndesTestExecutor() (*AndesTestExecutor, error)

NewAndesTestExecutor prepares a new AndesTestExecutor instance.

func (*AndesTestExecutor) DumpWorld

func (ae *AndesTestExecutor) DumpWorld() error

DumpWorld prints the state of the MockWorld to stdout.

func (*AndesTestExecutor) ExecuteCheckStateStep

func (ae *AndesTestExecutor) ExecuteCheckStateStep(step *mj.CheckStateStep) error

ExecuteCheckStateStep executes a CheckStateStep defined by the current scenario.

func (*AndesTestExecutor) ExecuteExternalStep

func (ae *AndesTestExecutor) ExecuteExternalStep(step *mj.ExternalStepsStep) error

ExecuteExternalStep executes an external step referenced by the scenario.

func (*AndesTestExecutor) ExecuteScenario

func (ae *AndesTestExecutor) ExecuteScenario(scenario *mj.Scenario, fileResolver fr.FileResolver) error

ExecuteScenario executes an individual test.

func (*AndesTestExecutor) ExecuteSetStateStep

func (ae *AndesTestExecutor) ExecuteSetStateStep(step *mj.SetStateStep) error

ExecuteSetStateStep executes a SetStateStep.

func (*AndesTestExecutor) ExecuteStep

func (ae *AndesTestExecutor) ExecuteStep(generalStep mj.Step) error

ExecuteStep executes an individual step from a scenario.

func (*AndesTestExecutor) ExecuteTest

func (ae *AndesTestExecutor) ExecuteTest(test *mj.Test) error

ExecuteTest executes an individual test.

func (*AndesTestExecutor) ExecuteTxStep

func (ae *AndesTestExecutor) ExecuteTxStep(step *mj.TxStep) (*vmi.VMOutput, error)

ExecuteTxStep executes a TxStep.

func (*AndesTestExecutor) GetVM

GetVM yields a reference to the VMExecutionHandler used.

func (*AndesTestExecutor) Reset

func (ae *AndesTestExecutor) Reset()

Reset clears state/world. Is called in RunAllJSONScenariosInDirectory, but not in RunSingleJSONScenario.

func (*AndesTestExecutor) SetBaikalGasSchedule

func (ae *AndesTestExecutor) SetBaikalGasSchedule(newGasSchedule mj.GasSchedule) error

SetBaikalGasSchedule updates the gas costs based on the baikal scenario config only changes the gas schedule once, this prevents subsequent gasSchedule declarations in externalSteps to overwrite

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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