Documentation ¶
Index ¶
- Constants
- func CreateDeployTxData(scCode string) string
- func FormatHexNumber(number uint64) string
- func GetSCCode(fileName string) string
- type TestContext
- func (context *TestContext) Close()
- func (context *TestContext) DeploySC(wasmPath string, parametersString string) error
- func (context *TestContext) ExecuteSC(sender *testParticipant, txData string) error
- func (context *TestContext) GetLatestError() error
- func (context *TestContext) QuerySCBytes(function string, args [][]byte) []byte
- func (context *TestContext) QuerySCInt(function string, args [][]byte) uint64
- func (context *TestContext) QuerySCString(function string, args [][]byte) string
- func (context *TestContext) UpgradeSC(wasmPath string, parametersString string) error
Constants ¶
View Source
const DummyCodeMetadataHex = "0102"
DummyCodeMetadataHex -
View Source
const VMTypeHex = "0500"
VMTypeHex -
Variables ¶
This section is empty.
Functions ¶
func CreateDeployTxData ¶ added in v1.0.103
CreateDeployTxData -
Types ¶
type TestContext ¶
type TestContext struct { T *testing.T Round uint64 Owner testParticipant Alice testParticipant Bob testParticipant Carol testParticipant GasLimit uint64 ScAddress []byte ScCodeMetadata vmcommon.CodeMetadata Accounts *state.AccountsDB TxProcessor process.TransactionProcessor ScProcessor process.SmartContractProcessor QueryService external.SCQueryService VMContainer process.VirtualMachinesContainer }
TestContext -
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 -
Click to show internal directories.
Click to hide internal directories.