contracts

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AsyncChildData = " there"
View Source
var AsyncChildFunction = "transferToThirdParty"

Functions

func CallBackMultiChildMock

func CallBackMultiChildMock(instanceMock *mock.InstanceMock, config interface{})

CallBackMultiChildMock is an exposed mock contract method

func CallBackMultiContractParentMock

func CallBackMultiContractParentMock(instanceMock *mock.InstanceMock, config interface{})

CallBackMultiContractParentMock is an exposed mock contract method

func CallBackParentBuiltinMock

func CallBackParentBuiltinMock(instanceMock *mock.InstanceMock, config interface{})

CallBackParentBuiltinMock is an exposed mock contract method

func CallBackParentMock

func CallBackParentMock(instanceMock *mock.InstanceMock, config interface{})

CallBackParentMock is an exposed mock contract method

func CallBackRecursiveChildMock

func CallBackRecursiveChildMock(instanceMock *mock.InstanceMock, config interface{})

CallBackRecursiveChildMock is an exposed mock contract method

func CallBackRecursiveParentMock

func CallBackRecursiveParentMock(instanceMock *mock.InstanceMock, config interface{})

CallBackRecursiveParentMock is an exposed mock contract method

func ExecMECTTransferAndAsyncCallChild

func ExecMECTTransferAndAsyncCallChild(instanceMock *mock.InstanceMock, config interface{})

ExecMECTTransferAndAsyncCallChild is an exposed mock contract method

func ExecMECTTransferAndCallChild

func ExecMECTTransferAndCallChild(instanceMock *mock.InstanceMock, config interface{})

ExecMECTTransferAndCallChild is an exposed mock contract method

func ExecMECTTransferWithAPICall

func ExecMECTTransferWithAPICall(instanceMock *mock.InstanceMock, config interface{})

ExecMECTTransferWithAPICall is an exposed mock contract method

func ExecOnDestCtxParentMock

func ExecOnDestCtxParentMock(instanceMock *mock.InstanceMock, config interface{})

ExecOnDestCtxParentMock is an exposed mock contract method

func ExecOnDestCtxSingleCallParentMock

func ExecOnDestCtxSingleCallParentMock(instanceMock *mock.InstanceMock, config interface{})

ExecOnDestCtxSingleCallParentMock is an exposed mock contract method

func ExecOnSameCtxParentMock

func ExecOnSameCtxParentMock(instanceMock *mock.InstanceMock, config interface{})

ExecOnSameCtxParentMock is an exposed mock contract method

func ExecuteOnDestContextInMockContracts

func ExecuteOnDestContextInMockContracts(host andes.VMHost, input *vmcommon.ContractCallInput) int32

ExecuteOnDestContextInMockContracts - calls the corresponding method in motherearth api

func ExecuteOnSameContextInMockContracts

func ExecuteOnSameContextInMockContracts(host andes.VMHost, input *vmcommon.ContractCallInput) int32

ExecuteOnSameContextInMockContracts - calls the corresponding method in motherearth api

func FailChildAndBurnMECTMock

func FailChildAndBurnMECTMock(instanceMock *mock.InstanceMock, config interface{})

FailChildAndBurnMECTMock is an exposed mock contract method

func FailChildMock

func FailChildMock(instanceMock *mock.InstanceMock, config interface{})

FailChildMock is an exposed mock contract method

func ForwardAsyncCallMultiChildMock

func ForwardAsyncCallMultiChildMock(instanceMock *mock.InstanceMock, config interface{})

ForwardAsyncCallMultiChildMock is an exposed mock contract method

func ForwardAsyncCallMultiContractParentMock

func ForwardAsyncCallMultiContractParentMock(instanceMock *mock.InstanceMock, config interface{})

ForwardAsyncCallMultiContractParentMock is an exposed mock contract method

func ForwardAsyncCallParentBuiltinMock

func ForwardAsyncCallParentBuiltinMock(instanceMock *mock.InstanceMock, config interface{})

ForwardAsyncCallParentBuiltinMock is an exposed mock contract method

func ForwardAsyncCallRecursiveParentMock

func ForwardAsyncCallRecursiveParentMock(instanceMock *mock.InstanceMock, config interface{})

ForwardAsyncCallRecursiveParentMock is an exposed mock contract method

func MECTTransferToParentCallbackWillFail

func MECTTransferToParentCallbackWillFail(instanceMock *mock.InstanceMock, config interface{})

MECTTransferToParentCallbackWillFail is an exposed mock contract method

func MECTTransferToParentMock

func MECTTransferToParentMock(instanceMock *mock.InstanceMock, config interface{})

MECTTransferToParentMock is an exposed mock contract method

func MECTTransferToParentWrongMECTArgsNumberMock

func MECTTransferToParentWrongMECTArgsNumberMock(instanceMock *mock.InstanceMock, config interface{})

MECTTransferToParentWrongMECTArgsNumberMock is an exposed mock contract method

func PerformAsyncCallParentMock

func PerformAsyncCallParentMock(instanceMock *mock.InstanceMock, config interface{})

PerformAsyncCallParentMock is an exposed mock contract method

func RecursiveAsyncCallRecursiveChildMock

func RecursiveAsyncCallRecursiveChildMock(instanceMock *mock.InstanceMock, config interface{})

RecursiveAsyncCallRecursiveChildMock is an exposed mock contract method

func SimpleCallbackMock

func SimpleCallbackMock(instanceMock *mock.InstanceMock, config interface{})

SimpleCallbackMock is an exposed mock contract method

func TransferToThirdPartyAsyncChildMock

func TransferToThirdPartyAsyncChildMock(instanceMock *mock.InstanceMock, config interface{})

TransferToThirdPartyAsyncChildMock is an exposed mock contract method

func WasteGasChildMock

func WasteGasChildMock(instanceMock *mock.InstanceMock, config interface{})

WasteGasChildMock is an exposed mock contract method

func WasteGasParentMock

func WasteGasParentMock(instanceMock *mock.InstanceMock, config interface{})

WasteGasParentMock is an exposed mock contract method

Types

type AsyncBuiltInCallTestConfig

type AsyncBuiltInCallTestConfig struct {
	AsyncCallBaseTestConfig
	TransferFromChildToParent int64
}

AsyncBuiltInCallTestConfig is configuration for async call tests of builtin functions

type AsyncCallBaseTestConfig

type AsyncCallBaseTestConfig struct {
	GasProvided       uint64
	GasUsedByParent   uint64
	GasUsedByChild    uint64
	GasUsedByCallback uint64
	GasLockCost       uint64

	TransferFromParentToChild int64

	ParentBalance int64
	ChildBalance  int64
}

AsyncCallBaseTestConfig is base configuration for async call tests

type AsyncCallMultiChildTestConfig

type AsyncCallMultiChildTestConfig struct {
	AsyncCallBaseTestConfig
	ChildCalls int
}

AsyncCallMultiChildTestConfig is configuration for recursivemultiple children async call tests

type AsyncCallRecursiveTestConfig

type AsyncCallRecursiveTestConfig struct {
	AsyncCallBaseTestConfig
	RecursiveChildCalls int
}

AsyncCallRecursiveTestConfig is configuration for recursive async call tests

type AsyncCallTestConfig

type AsyncCallTestConfig struct {
	AsyncCallBaseTestConfig
	TransferToThirdParty         int64
	TransferToVault              int64
	MECTTokensToTransfer         uint64
	CallbackMECTTokensToTransfer uint64
}

AsyncCallTestConfig is configuration for async call tests

func (AsyncCallTestConfig) GetGasUsedByChild

func (config AsyncCallTestConfig) GetGasUsedByChild() uint64

GetGasUsedByChild - getter for GasUsedByChild

type DirectCallGasTestConfig

type DirectCallGasTestConfig struct {
	GasUsedByParent      uint64
	GasUsedByChild       uint64
	GasProvided          uint64
	GasProvidedToChild   uint64
	ParentBalance        int64
	ChildBalance         int64
	MECTTokensToTransfer uint64
}

DirectCallGasTestConfig is configuration for direct call tests

func (DirectCallGasTestConfig) GetGasUsedByChild

func (config DirectCallGasTestConfig) GetGasUsedByChild() uint64

GetGasUsedByChild - getter for GasUsedByChild

type GasTestConfig

type GasTestConfig interface {
	GetGasUsedByChild() uint64
}

GasTestConfig interface for gas tests configs

Jump to

Keyboard shortcuts

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