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: 28 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) Close

func (ae *AndesTestExecutor) Close()

Close will simply close the VM

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

func (ae *AndesTestExecutor) GetVMHost() andes.VMHost

GetVMHost returns de vm Context from the vm context map

func (*AndesTestExecutor) InitVM

func (ae *AndesTestExecutor) InitVM(baikalGasSchedule mj.GasSchedule) error

InitVM will initialize the VM and the builtin function container. Does nothing if the VM is already initialized.

func (*AndesTestExecutor) PeekTraceGas

func (ae *AndesTestExecutor) PeekTraceGas() bool

func (*AndesTestExecutor) PutNewAccount

func (ae *AndesTestExecutor) PutNewAccount(baikalAccount *mj.Account) error

PutNewAccount Puts a new account in world account map. Overwrites.

func (*AndesTestExecutor) Reset

func (ae *AndesTestExecutor) Reset()

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

func (*AndesTestExecutor) UpdateAccount

func (ae *AndesTestExecutor) UpdateAccount(baikalAccount *mj.Account) error

UpdateAccount Updates an account in world account map.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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