arwen

package
v1.0.112 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DummyCodeMetadataHex = "0100"

DummyCodeMetadataHex -

View Source
const VMTypeHex = "0500"

VMTypeHex -

Variables

This section is empty.

Functions

func CreateDeployTxData added in v1.0.103

func CreateDeployTxData(scCode string) string

CreateDeployTxData -

func FormatHexNumber

func FormatHexNumber(number uint64) string

FormatHexNumber -

func GetSCCode added in v0.0.5

func GetSCCode(fileName string) string

GetSCCode -

Types

type TestContext

type TestContext struct {
	T *testing.T

	Round uint64

	Owner testParticipant
	Alice testParticipant
	Bob   testParticipant
	Carol testParticipant

	ScAddress      []byte
	ScCodeMetadata vmcommon.CodeMetadata
	Accounts       *state.AccountsDB
	TxProcessor    process.TransactionProcessor
	ScProcessor    process.SmartContractProcessor
	QueryService   external.SCQueryService
	VMContainer    process.VirtualMachinesContainer
}

TestContext -

func SetupTestContext

func SetupTestContext(t *testing.T) TestContext

SetupTestContext -

func (*TestContext) Close added in v0.0.5

func (context *TestContext) Close()

Close closes the test context

func (*TestContext) DeploySC

func (context *TestContext) DeploySC(wasmPath string, parametersString string) error

DeploySC -

func (*TestContext) ExecuteSC

func (context *TestContext) ExecuteSC(sender *testParticipant, txData string) error

ExecuteSC -

func (*TestContext) GetLatestError added in v1.0.103

func (context *TestContext) GetLatestError() error

GetLatestError -

func (*TestContext) QuerySCBytes added in v1.0.103

func (context *TestContext) QuerySCBytes(function string, args [][]byte) []byte

QuerySCBytes -

func (*TestContext) QuerySCInt

func (context *TestContext) QuerySCInt(function string, args [][]byte) uint64

QuerySCInt -

func (*TestContext) QuerySCString added in v1.0.103

func (context *TestContext) QuerySCString(function string, args [][]byte) string

QuerySCString -

func (*TestContext) UpgradeSC added in v1.0.103

func (context *TestContext) UpgradeSC(wasmPath string, parametersString string) error

UpgradeSC -

Jump to

Keyboard shortcuts

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