arwenmandos

package
v0.0.0-...-33e7cb4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Kalyan3104ProtectedKeyPrefix = "KALYAN3104"

Kalyan3104ProtectedKeyPrefix prefixes all Kalyan3104 reserved storage. Only the protocol can write to keys starting with this.

View Source
const Kalyan3104RewardKey = Kalyan3104ProtectedKeyPrefix + "reward"

Kalyan3104RewardKey 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 ArwenTestExecutor

type ArwenTestExecutor struct {
	World *worldhook.BlockchainHookMock
	// contains filtered or unexported fields
}

ArwenTestExecutor parses, interprets and executes both .test.json tests and .scen.json scenarios with Arwen.

func NewArwenTestExecutor

func NewArwenTestExecutor() (*ArwenTestExecutor, error)

NewArwenTestExecutor prepares a new ArwenTestExecutor instance.

func (*ArwenTestExecutor) ExecuteScenario

func (ae *ArwenTestExecutor) ExecuteScenario(scenario *mj.Scenario, fileResolver mjparse.FileResolver) error

ExecuteScenario executes an individual test.

func (*ArwenTestExecutor) ExecuteStep

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

ExecuteStep executes a single scenario step and updates mock state.

func (*ArwenTestExecutor) ExecuteTest

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

ExecuteTest executes an individual test.

func (*ArwenTestExecutor) ExecuteTxStep

func (ae *ArwenTestExecutor) ExecuteTxStep(txStep *mj.TxStep) (*vmi.VMOutput, error)

ExecuteTxStep executes a tx step and updates mock state.

func (*ArwenTestExecutor) GetVM

GetVM yields a reference to the VMExecutionHandler used.

func (*ArwenTestExecutor) Reset

func (ae *ArwenTestExecutor) Reset()

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

Jump to

Keyboard shortcuts

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