Documentation ¶
Index ¶
- Variables
- func CallBackMultiChildMock(instanceMock *mock.InstanceMock, config interface{})
- func CallBackMultiContractParentMock(instanceMock *mock.InstanceMock, config interface{})
- func CallBackParentBuiltinMock(instanceMock *mock.InstanceMock, config interface{})
- func CallBackParentMock(instanceMock *mock.InstanceMock, config interface{})
- func CallBackRecursiveChildMock(instanceMock *mock.InstanceMock, config interface{})
- func CallBackRecursiveParentMock(instanceMock *mock.InstanceMock, config interface{})
- func CallbackMockMethodThatCouldFail(instanceMock *mock.InstanceMock, config interface{})
- func CallbackWithOnSameContext(instanceMock *mock.InstanceMock, _ interface{})
- func ChildSetStorageMock(instanceMock *mock.InstanceMock, _ interface{})
- func DCDTTransferToParentCallbackWillFail(instanceMock *mock.InstanceMock, config interface{})
- func DCDTTransferToParentMock(instanceMock *mock.InstanceMock, config interface{})
- func DCDTTransferToParentWrongDCDTArgsNumberMock(instanceMock *mock.InstanceMock, config interface{})
- func DeployContractFromSourceMock(instanceMock *mock.InstanceMock, _ interface{})
- func EvilCallback(instanceMock *mock.InstanceMock, _ interface{})
- func ExecDCDTTransferAndAsyncCallChild(instanceMock *mock.InstanceMock, config interface{})
- func ExecDCDTTransferAndCallChild(instanceMock *mock.InstanceMock, config interface{})
- func ExecDCDTTransferInAsyncCall(instanceMock *mock.InstanceMock, config interface{})
- func ExecDCDTTransferWithAPICall(instanceMock *mock.InstanceMock, config interface{})
- func ExecOnDestCtxParentMock(instanceMock *mock.InstanceMock, config interface{})
- func ExecOnDestCtxSingleCallParentMock(instanceMock *mock.InstanceMock, config interface{})
- func ExecOnSameCtxParentMock(instanceMock *mock.InstanceMock, config interface{})
- func ExecuteOnDestContextInMockContracts(host vmhost.VMHost, input *vmcommon.ContractCallInput) int32
- func ExecuteOnSameContextInMockContracts(host vmhost.VMHost, input *vmcommon.ContractCallInput) int32
- func ExecutedOnSameContextByCallback(instanceMock *mock.InstanceMock, _ interface{})
- func FailChildAndBurnDCDTMock(instanceMock *mock.InstanceMock, _ interface{})
- func FailChildMock(instanceMock *mock.InstanceMock, _ interface{})
- func ForwardAsyncCallMultiChildMock(instanceMock *mock.InstanceMock, config interface{})
- func ForwardAsyncCallMultiContractParentMock(instanceMock *mock.InstanceMock, config interface{})
- func ForwardAsyncCallParentBuiltinMock(instanceMock *mock.InstanceMock, config interface{})
- func ForwardAsyncCallRecursiveParentMock(instanceMock *mock.InstanceMock, config interface{})
- func GasMismatchAsyncCallChildMock(instanceMock *mock.InstanceMock, _ interface{})
- func GasMismatchAsyncCallParentMock(instanceMock *mock.InstanceMock, _ interface{})
- func GasMismatchCallBackParentMock(instanceMock *mock.InstanceMock, _ interface{})
- func GetChildAddressForTransfer(transfer int) []byte
- func InitMockMethod(instanceMock *mock.InstanceMock, config interface{})
- func LoadStore(instanceMock *mock.InstanceMock, _ interface{})
- func LoadStoreFromAddress(instanceMock *mock.InstanceMock, _ interface{})
- func ParentSetStorageMock(instanceMock *mock.InstanceMock, config interface{})
- func PerformAsyncCallParentMock(instanceMock *mock.InstanceMock, config interface{})
- func RecursiveAsyncCallRecursiveChildMock(instanceMock *mock.InstanceMock, config interface{})
- func SetStore(instanceMock *mock.InstanceMock, _ interface{})
- func SimpleCallbackMock(instanceMock *mock.InstanceMock, config interface{})
- func TransferAndExecute(instanceMock *mock.InstanceMock, config interface{})
- func TransferToAsyncParentOnCallbackChildMock(instanceMock *mock.InstanceMock, config interface{})
- func TransferToThirdPartyAsyncChildMock(instanceMock *mock.InstanceMock, config interface{})
- func UpdateContractFromSourceMock(instanceMock *mock.InstanceMock, _ interface{})
- func WasteGasChildMock(instanceMock *mock.InstanceMock, config interface{})
- func WasteGasParentMock(instanceMock *mock.InstanceMock, config interface{})
- type AsyncBuiltInCallTestConfig
- type AsyncCallBaseTestConfig
- type AsyncCallMultiChildTestConfig
- type AsyncCallRecursiveTestConfig
- type AsyncCallTestConfig
- type CallbackTestConfig
- type DirectCallGasTestConfig
- type GasTestConfig
- type TransferAndExecuteTestConfig
Constants ¶
This section is empty.
Variables ¶
var AsyncChildData = " there"
var AsyncChildFunction = "transferToThirdParty"
var TestStorageValue1 = []byte{1, 2, 3, 4}
var TestStorageValue2 = []byte{1, 2, 3}
var TestStorageValue3 = []byte{1, 2}
var TestStorageValue4 = []byte{1}
var TransferAndExecuteFuncName = "transferAndExecute"
TransferAndExecuteFuncName -
var TransferAndExecuteReturnData = []byte{1, 2, 3}
TransferAndExecuteReturnData -
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 CallbackMockMethodThatCouldFail ¶
func CallbackMockMethodThatCouldFail(instanceMock *mock.InstanceMock, config interface{})
CallbackMockMethodThatCouldFail -
func CallbackWithOnSameContext ¶
func CallbackWithOnSameContext(instanceMock *mock.InstanceMock, _ interface{})
CallbackWithOnSameContext is an exposed mock contract method
func ChildSetStorageMock ¶
func ChildSetStorageMock(instanceMock *mock.InstanceMock, _ interface{})
ChildSetStorageMock is an exposed mock contract method
func DCDTTransferToParentCallbackWillFail ¶
func DCDTTransferToParentCallbackWillFail(instanceMock *mock.InstanceMock, config interface{})
DCDTTransferToParentCallbackWillFail is an exposed mock contract method
func DCDTTransferToParentMock ¶
func DCDTTransferToParentMock(instanceMock *mock.InstanceMock, config interface{})
DCDTTransferToParentMock is an exposed mock contract method
func DCDTTransferToParentWrongDCDTArgsNumberMock ¶
func DCDTTransferToParentWrongDCDTArgsNumberMock(instanceMock *mock.InstanceMock, config interface{})
DCDTTransferToParentWrongDCDTArgsNumberMock is an exposed mock contract method
func DeployContractFromSourceMock ¶
func DeployContractFromSourceMock(instanceMock *mock.InstanceMock, _ interface{})
DeployContractFromSourceMock creates a mock method which deploys a cotract from source
func EvilCallback ¶
func EvilCallback(instanceMock *mock.InstanceMock, _ interface{})
EvilCallback is an exposed mock contract method
func ExecDCDTTransferAndAsyncCallChild ¶
func ExecDCDTTransferAndAsyncCallChild(instanceMock *mock.InstanceMock, config interface{})
ExecDCDTTransferAndAsyncCallChild is an exposed mock contract method
func ExecDCDTTransferAndCallChild ¶
func ExecDCDTTransferAndCallChild(instanceMock *mock.InstanceMock, config interface{})
ExecDCDTTransferAndCallChild is an exposed mock contract method
func ExecDCDTTransferInAsyncCall ¶
func ExecDCDTTransferInAsyncCall(instanceMock *mock.InstanceMock, config interface{})
ExecDCDTTransferInAsyncCall is an exposed mock contract method
func ExecDCDTTransferWithAPICall ¶
func ExecDCDTTransferWithAPICall(instanceMock *mock.InstanceMock, config interface{})
ExecDCDTTransferWithAPICall 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 vmhost.VMHost, input *vmcommon.ContractCallInput) int32
ExecuteOnDestContextInMockContracts - calls the corresponding method in VM hooks
func ExecuteOnSameContextInMockContracts ¶
func ExecuteOnSameContextInMockContracts(host vmhost.VMHost, input *vmcommon.ContractCallInput) int32
ExecuteOnSameContextInMockContracts - calls the corresponding method in VM hooks
func ExecutedOnSameContextByCallback ¶
func ExecutedOnSameContextByCallback(instanceMock *mock.InstanceMock, _ interface{})
ExecutedOnSameContextByCallback is an exposed mock contract method
func FailChildAndBurnDCDTMock ¶
func FailChildAndBurnDCDTMock(instanceMock *mock.InstanceMock, _ interface{})
FailChildAndBurnDCDTMock is an exposed mock contract method
func FailChildMock ¶
func FailChildMock(instanceMock *mock.InstanceMock, _ 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 GasMismatchAsyncCallChildMock ¶
func GasMismatchAsyncCallChildMock(instanceMock *mock.InstanceMock, _ interface{})
GasMismatchAsyncCallChildMock is an exposed mock contract method
func GasMismatchAsyncCallParentMock ¶
func GasMismatchAsyncCallParentMock(instanceMock *mock.InstanceMock, _ interface{})
GasMismatchAsyncCallParentMock is an exposed mock contract method
func GasMismatchCallBackParentMock ¶
func GasMismatchCallBackParentMock(instanceMock *mock.InstanceMock, _ interface{})
GasMismatchCallBackParentMock is an exposed mock contract method
func GetChildAddressForTransfer ¶
GetChildAddressForTransfer -
func InitMockMethod ¶
func InitMockMethod(instanceMock *mock.InstanceMock, config interface{})
InitMockMethod -
func LoadStore ¶
func LoadStore(instanceMock *mock.InstanceMock, _ interface{})
LoadStore is an exposed mock contract method
func LoadStoreFromAddress ¶
func LoadStoreFromAddress(instanceMock *mock.InstanceMock, _ interface{})
LoadStoreFromAddress is an exposed mock contract method
func ParentSetStorageMock ¶
func ParentSetStorageMock(instanceMock *mock.InstanceMock, config interface{})
ParentSetStorageMock 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 SetStore ¶
func SetStore(instanceMock *mock.InstanceMock, _ interface{})
SetStore is an exposed mock contract method
func SimpleCallbackMock ¶
func SimpleCallbackMock(instanceMock *mock.InstanceMock, config interface{})
SimpleCallbackMock is an exposed mock contract method
func TransferAndExecute ¶
func TransferAndExecute(instanceMock *mock.InstanceMock, config interface{})
TransferAndExecute is an exposed mock contract method
func TransferToAsyncParentOnCallbackChildMock ¶
func TransferToAsyncParentOnCallbackChildMock(instanceMock *mock.InstanceMock, config interface{})
func TransferToThirdPartyAsyncChildMock ¶
func TransferToThirdPartyAsyncChildMock(instanceMock *mock.InstanceMock, config interface{})
TransferToThirdPartyAsyncChildMock is an exposed mock contract method
func UpdateContractFromSourceMock ¶
func UpdateContractFromSourceMock(instanceMock *mock.InstanceMock, _ interface{})
UpdateContractFromSourceMock -
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 DCDTTokensToTransfer uint64 CallbackDCDTTokensToTransfer uint64 }
AsyncCallTestConfig is configuration for async call tests
func (AsyncCallTestConfig) GetGasUsedByChild ¶
func (config AsyncCallTestConfig) GetGasUsedByChild() uint64
GetGasUsedByChild - getter for GasUsedByChild
type CallbackTestConfig ¶
type CallbackTestConfig interface {
CallbackFails() bool
}
CallbackTestConfig -
type DirectCallGasTestConfig ¶
type DirectCallGasTestConfig struct { GasUsedByParent uint64 GasUsedByChild uint64 GasProvided uint64 GasProvidedToChild uint64 ParentBalance int64 ChildBalance int64 DCDTTokensToTransfer 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
type TransferAndExecuteTestConfig ¶
type TransferAndExecuteTestConfig struct { DirectCallGasTestConfig TransferFromParentToChild int64 GasTransferToChild uint64 }
TransferAndExecuteTestConfig is configuration for transfer and execute tests
Source Files ¶
- asyncChildSC.go
- asyncChildSCRecursive.go
- asyncParentSC.go
- asyncParentSCBuitin.go
- asyncParentSCBuitinMultiContract.go
- asyncParentSCMultiChild.go
- asyncParentSCRecursive.go
- common.go
- dcdtSimpleSC.go
- deployerSimpleSC.go
- directSimpleSC.go
- gasMismatchChild.go
- gasMismatchParent.go
- storageSimpleSC.go
- transferAndExecuteSC.go