Versions in this module Expand all Collapse all v0 v0.0.1 Oct 8, 2022 Changes in this version + type BlockchainHookStub struct + CurrentEpochCalled func() uint32 + CurrentNonceCalled func() uint64 + CurrentRandomSeedCalled func() []byte + CurrentRoundCalled func() uint64 + CurrentTimeStampCalled func() uint64 + GetAllStateCalled func(address []byte) (map[string][]byte, error) + GetBlockHashCalled func(nonce uint64) ([]byte, error) + GetBuiltinFunctionNamesCalled func() vmcommon.FunctionNames + GetCodeCalled func(account vmcommon.UserAccountHandler) []byte + GetCompiledCodeCalled func(codeHash []byte) (bool, []byte) + GetMECTTokenCalled func(address []byte, tokenID []byte, nonce uint64) (*mect.MECToken, error) + GetShardOfAddressCalled func(address []byte) uint32 + GetSnapshotCalled func() int + GetStateRootHashCalled func() []byte + GetStorageDataCalled func(accountsAddress []byte, index []byte) ([]byte, error) + GetUserAccountCalled func(address []byte) (vmcommon.UserAccountHandler, error) + IsPayableCalled func(address []byte) (bool, error) + IsSmartContractCalled func(address []byte) bool + LastEpochCalled func() uint32 + LastNonceCalled func() uint64 + LastRandomSeedCalled func() []byte + LastRoundCalled func() uint64 + LastTimeStampCalled func() uint64 + NewAddressCalled func(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error) + ProcessBuiltInFunctionCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) + RevertToSnapshotCalled func(snapshot int) error + SaveCompiledCodeCalled func(codeHash []byte, code []byte) + func (b *BlockchainHookStub) ClearCompiledCodes() + func (b *BlockchainHookStub) CurrentEpoch() uint32 + func (b *BlockchainHookStub) CurrentNonce() uint64 + func (b *BlockchainHookStub) CurrentRandomSeed() []byte + func (b *BlockchainHookStub) CurrentRound() uint64 + func (b *BlockchainHookStub) CurrentTimeStamp() uint64 + func (b *BlockchainHookStub) GetAllState(address []byte) (map[string][]byte, error) + func (b *BlockchainHookStub) GetBlockhash(nonce uint64) ([]byte, error) + func (b *BlockchainHookStub) GetBuiltinFunctionNames() vmcommon.FunctionNames + func (b *BlockchainHookStub) GetCode(account vmcommon.UserAccountHandler) []byte + func (b *BlockchainHookStub) GetCompiledCode(codeHash []byte) (bool, []byte) + func (b *BlockchainHookStub) GetMECTToken(address []byte, tokenID []byte, nonce uint64) (*mect.MECToken, error) + func (b *BlockchainHookStub) GetShardOfAddress(address []byte) uint32 + func (b *BlockchainHookStub) GetSnapshot() int + func (b *BlockchainHookStub) GetStateRootHash() []byte + func (b *BlockchainHookStub) GetStorageData(accountAddress []byte, index []byte) ([]byte, error) + func (b *BlockchainHookStub) GetUserAccount(address []byte) (vmcommon.UserAccountHandler, error) + func (b *BlockchainHookStub) IsInterfaceNil() bool + func (b *BlockchainHookStub) IsLimitedTransfer(_ []byte) bool + func (b *BlockchainHookStub) IsPaused(_ []byte) bool + func (b *BlockchainHookStub) IsPayable(_, address []byte) (bool, error) + func (b *BlockchainHookStub) IsSmartContract(address []byte) bool + func (b *BlockchainHookStub) LastEpoch() uint32 + func (b *BlockchainHookStub) LastNonce() uint64 + func (b *BlockchainHookStub) LastRandomSeed() []byte + func (b *BlockchainHookStub) LastRound() uint64 + func (b *BlockchainHookStub) LastTimeStamp() uint64 + func (b *BlockchainHookStub) NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error) + func (b *BlockchainHookStub) ProcessBuiltInFunction(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) + func (b *BlockchainHookStub) RevertToSnapshot(snapshot int) error + func (b *BlockchainHookStub) SaveCompiledCode(codeHash []byte, code []byte) + type CryptoHookMock struct + Err error + Result []byte + func (c *CryptoHookMock) Ecrecover(hash []byte, recoveryID []byte, r []byte, s []byte) ([]byte, error) + func (c *CryptoHookMock) EncodeSecp256k1DERSignature(r, s []byte) []byte + func (c *CryptoHookMock) Keccak256(data []byte) ([]byte, error) + func (c *CryptoHookMock) Ripemd160(data []byte) ([]byte, error) + func (c *CryptoHookMock) Sha256(data []byte) ([]byte, error) + func (c *CryptoHookMock) VerifyBLS(key []byte, msg []byte, sig []byte) error + func (c *CryptoHookMock) VerifyEd25519(key []byte, msg []byte, sig []byte) error + func (c *CryptoHookMock) VerifySecp256k1(key []byte, msg []byte, sig []byte, hashType uint8) error + type InstanceBuilderMock struct + InstanceMap map[string]InstanceMock + World *worldmock.MockWorld + func NewInstanceBuilderMock(world *worldmock.MockWorld) *InstanceBuilderMock + func (builder *InstanceBuilderMock) CreateAndStoreInstanceMock(t testing.TB, host andes.VMHost, code []byte, codeHash []byte, ...) *InstanceMock + func (builder *InstanceBuilderMock) NewInstanceFromCompiledCodeWithOptions(compiledCode []byte, options wasmer.CompilationOptions) (wasmer.InstanceHandler, error) + func (builder *InstanceBuilderMock) NewInstanceWithOptions(contractCode []byte, options wasmer.CompilationOptions) (wasmer.InstanceHandler, error) + type InstanceBuilderRecorderMock struct + InstanceMap map[string][]wasmer.InstanceHandler + func NewInstanceBuilderRecorderMock() *InstanceBuilderRecorderMock + func (builder *InstanceBuilderRecorderMock) GetContractInstances(code []byte) []wasmer.InstanceHandler + func (builder *InstanceBuilderRecorderMock) NewInstanceFromCompiledCodeWithOptions(compiledCode []byte, options wasmer.CompilationOptions) (wasmer.InstanceHandler, error) + func (builder *InstanceBuilderRecorderMock) NewInstanceWithOptions(contractCode []byte, options wasmer.CompilationOptions) (wasmer.InstanceHandler, error) + type InstanceMock struct + Address []byte + BreakpointValue andes.BreakpointValue + Code []byte + Data uintptr + Exports wasmer.ExportsMap + GasLimit uint64 + Host andes.VMHost + Memory wasmer.MemoryHandler + Points uint64 + T testing.TB + func GetMockInstance(host andes.VMHost) *InstanceMock + func NewInstanceMock(code []byte) *InstanceMock + func (instance *InstanceMock) AddMockMethod(name string, method func() *InstanceMock) + func (instance *InstanceMock) AddMockMethodWithError(name string, method func() *InstanceMock, err error) + func (instance *InstanceMock) Cache() ([]byte, error) + func (instance *InstanceMock) Clean() + func (instance *InstanceMock) GetBreakpointValue() uint64 + func (instance *InstanceMock) GetData() uintptr + func (instance *InstanceMock) GetExports() wasmer.ExportsMap + func (instance *InstanceMock) GetInstanceCtxMemory() wasmer.MemoryHandler + func (instance *InstanceMock) GetMemory() wasmer.MemoryHandler + func (instance *InstanceMock) GetPointsUsed() uint64 + func (instance *InstanceMock) GetSignature(functionName string) (*wasmer.ExportedFunctionSignature, bool) + func (instance *InstanceMock) HasMemory() bool + func (instance *InstanceMock) IsFunctionImported(name string) bool + func (instance *InstanceMock) IsInterfaceNil() bool + func (instance *InstanceMock) SetBreakpointValue(value uint64) + func (instance *InstanceMock) SetContextData(data uintptr) + func (instance *InstanceMock) SetGasLimit(gasLimit uint64) + func (instance *InstanceMock) SetMemory(_ []byte) bool + func (instance *InstanceMock) SetPointsUsed(points uint64) + type MemoryMock struct + Contents []byte + PageSize uint32 + Pages uint32 + func NewMemoryMock() *MemoryMock + func (memory *MemoryMock) Data() []byte + func (memory *MemoryMock) Destroy() + func (memory *MemoryMock) Grow(pages uint32) error + func (memory *MemoryMock) IsInterfaceNil() bool + func (memory *MemoryMock) Length() uint32 + type MeteringContextMock struct + BlockGasLimitMock uint64 + Err error + GasComputedToLock uint64 + GasCost *config.GasCost + GasFreedMock uint64 + GasLeftMock uint64 + GasLockedMock uint64 + func (m *MeteringContextMock) BlockGasLimit() uint64 + func (m *MeteringContextMock) BoundGasLimit(value int64) uint64 + func (m *MeteringContextMock) ClearStateStack() + func (m *MeteringContextMock) ComputeGasLockedForAsync() uint64 + func (m *MeteringContextMock) DeductGasIfAsyncStep() error + func (m *MeteringContextMock) DeductInitialGasForDirectDeployment(_ andes.CodeDeployInput) error + func (m *MeteringContextMock) DeductInitialGasForExecution(_ []byte) error + func (m *MeteringContextMock) DeductInitialGasForIndirectDeployment(_ andes.CodeDeployInput) error + func (m *MeteringContextMock) FreeGas(gas uint64) + func (m *MeteringContextMock) GasLeft() uint64 + func (m *MeteringContextMock) GasSchedule() *config.GasCost + func (m *MeteringContextMock) GasSpentByContract() uint64 + func (m *MeteringContextMock) GasUsedByContract() (uint64, uint64) + func (m *MeteringContextMock) GasUsedForExecution() uint64 + func (m *MeteringContextMock) GetGasForExecution() uint64 + func (m *MeteringContextMock) GetGasLocked() uint64 + func (m *MeteringContextMock) GetGasProvided() uint64 + func (m *MeteringContextMock) GetGasTrace() map[string]map[string][]uint64 + func (m *MeteringContextMock) GetSCPrepareInitialCost() uint64 + func (m *MeteringContextMock) InitState() + func (m *MeteringContextMock) InitStateFromContractCallInput(_ *vmcommon.VMInput) + func (m *MeteringContextMock) PopDiscard() + func (m *MeteringContextMock) PopMergeActiveState() + func (m *MeteringContextMock) PopSetActiveState() + func (m *MeteringContextMock) PushState() + func (m *MeteringContextMock) RestoreGas(gas uint64) + func (m *MeteringContextMock) SetGasSchedule(gasSchedule config.GasScheduleMap) + func (m *MeteringContextMock) SetGasTracing(_ bool) + func (m *MeteringContextMock) StartGasTracing(_ string) + func (m *MeteringContextMock) TrackGasUsedByBuiltinFunction(_ *vmcommon.ContractCallInput, _ *vmcommon.VMOutput, ...) + func (m *MeteringContextMock) UnlockGasIfAsyncCallback() + func (m *MeteringContextMock) UnlockGasIfAsyncStep() + func (m *MeteringContextMock) UpdateGasStateOnFailure(_ *vmcommon.VMOutput) + func (m *MeteringContextMock) UpdateGasStateOnSuccess(_ *vmcommon.VMOutput) error + func (m *MeteringContextMock) UseAndTraceGas(_ uint64) + func (m *MeteringContextMock) UseGas(gas uint64) + func (m *MeteringContextMock) UseGasAndAddTracedGas(_ string, _ uint64) + func (m *MeteringContextMock) UseGasBounded(gas uint64) error + func (m *MeteringContextMock) UseGasForAsyncStep() error + type OutputContextMock struct + DeletedAccounts [][]byte + Err error + GasRefund *big.Int + GasRemaining uint64 + Logs []*vmcommon.LogEntry + OutputAccountIsNew bool + OutputAccountMock *vmcommon.OutputAccount + OutputAccounts map[string]*vmcommon.OutputAccount + OutputStateMock *vmcommon.VMOutput + ReturnCodeMock vmcommon.ReturnCode + ReturnDataMock [][]byte + ReturnMessageMock string + TouchedAccounts [][]byte + TransferResult error + func (o *OutputContextMock) AddToActiveState(_ *vmcommon.VMOutput) + func (o *OutputContextMock) AddTxValueToAccount(_ []byte, _ *big.Int) + func (o *OutputContextMock) CensorVMOutput() + func (o *OutputContextMock) ClearReturnData() + func (o *OutputContextMock) ClearStateStack() + func (o *OutputContextMock) CopyTopOfStackToActiveState() + func (o *OutputContextMock) CreateVMOutputInCaseOfError(_ error) *vmcommon.VMOutput + func (o *OutputContextMock) DeleteFirstReturnData() + func (o *OutputContextMock) DeleteOutputAccount(_ []byte) + func (o *OutputContextMock) DeployCode(_ andes.CodeDeployInput) + func (o *OutputContextMock) Finish(data []byte) + func (o *OutputContextMock) GetCurrentTotalUsedGas() (uint64, bool) + func (o *OutputContextMock) GetOutputAccount(_ []byte) (*vmcommon.OutputAccount, bool) + func (o *OutputContextMock) GetOutputAccounts() map[string]*vmcommon.OutputAccount + func (o *OutputContextMock) GetRefund() uint64 + func (o *OutputContextMock) GetVMOutput() *vmcommon.VMOutput + func (o *OutputContextMock) InitState() + func (o *OutputContextMock) NewVMOutputAccount(address []byte) *vmcommon.OutputAccount + func (o *OutputContextMock) NewVMOutputAccountFromMockAccount(account *worldmock.Account) *vmcommon.OutputAccount + func (o *OutputContextMock) PopDiscard() + func (o *OutputContextMock) PopMergeActiveState() + func (o *OutputContextMock) PopSetActiveState() + func (o *OutputContextMock) PrependFinish(data []byte) + func (o *OutputContextMock) PushState() + func (o *OutputContextMock) RemoveNonUpdatedStorage() + func (o *OutputContextMock) RemoveReturnData(index uint32) + func (o *OutputContextMock) ReturnCode() vmcommon.ReturnCode + func (o *OutputContextMock) ReturnData() [][]byte + func (o *OutputContextMock) ReturnMessage() string + func (o *OutputContextMock) SelfDestruct(_ []byte, _ []byte) + func (o *OutputContextMock) SetRefund(refund uint64) + func (o *OutputContextMock) SetReturnCode(returnCode vmcommon.ReturnCode) + func (o *OutputContextMock) SetReturnMessage(returnMessage string) + func (o *OutputContextMock) Transfer(_ []byte, _ []byte, _ uint64, _ uint64, _ *big.Int, _ []byte, _ vm.CallType) error + func (o *OutputContextMock) TransferMECT(_ []byte, _ []byte, _ []*vmcommon.MECTTransfer, _ *vmcommon.ContractCallInput) (uint64, error) + func (o *OutputContextMock) TransferValueOnly(_ []byte, _ []byte, _ *big.Int, _ bool) error + func (o *OutputContextMock) WriteLog(_ []byte, _ [][]byte, _ []byte) + type OutputContextStub struct + AddToActiveStateCalled func(vmOutput *vmcommon.VMOutput) + AddTxValueToAccountCalled func(address []byte, value *big.Int) + CensorVMOutputCalled func() + ClearReturnDataCalled func() + ClearStateStackCalled func() + CopyTopOfStackToActiveStateCalled func() + CreateVMOutputInCaseOfErrorCalled func(err error) *vmcommon.VMOutput + DeleteFirstReturnDataCalled func() + DeleteOutputAccountCalled func(address []byte) + DeployCodeCalled func(input andes.CodeDeployInput) + FinishCalled func(data []byte) + GetOutputAccountCalled func(address []byte) (*vmcommon.OutputAccount, bool) + GetOutputAccountsCalled func() map[string]*vmcommon.OutputAccount + GetRefundCalled func() uint64 + GetVMOutputCalled func() *vmcommon.VMOutput + InitStateCalled func() + PopDiscardCalled func() + PopMergeActiveStateCalled func() + PopSetActiveStateCalled func() + PrependFinishCalled func(data []byte) + PushStateCalled func() + RemoveNonUpdatedStorageCalled func() + RemoveReturnDataCalled func(index uint32) + ReturnCodeCalled func() vmcommon.ReturnCode + ReturnDataCalled func() [][]byte + ReturnMessageCalled func() string + SelfDestructCalled func(address []byte, beneficiary []byte) + SetRefundCalled func(refund uint64) + SetReturnCodeCalled func(returnCode vmcommon.ReturnCode) + SetReturnMessageCalled func(message string) + TransferCalled func(destination []byte, sender []byte, gasLimit uint64, gasLocked uint64, ...) error + TransferMECTCalled func(destination []byte, sender []byte, transfers []*vmcommon.MECTTransfer, ...) (uint64, error) + TransferValueOnlyCalled func(destination []byte, sender []byte, value *big.Int, checkPayable bool) error + WriteLogCalled func(address []byte, topics [][]byte, data []byte) + func (o *OutputContextStub) AddToActiveState(vmOutput *vmcommon.VMOutput) + func (o *OutputContextStub) AddTxValueToAccount(address []byte, value *big.Int) + func (o *OutputContextStub) CensorVMOutput() + func (o *OutputContextStub) ClearReturnData() + func (o *OutputContextStub) ClearStateStack() + func (o *OutputContextStub) CopyTopOfStackToActiveState() + func (o *OutputContextStub) CreateVMOutputInCaseOfError(err error) *vmcommon.VMOutput + func (o *OutputContextStub) DeleteFirstReturnData() + func (o *OutputContextStub) DeleteOutputAccount(address []byte) + func (o *OutputContextStub) DeployCode(input andes.CodeDeployInput) + func (o *OutputContextStub) Finish(data []byte) + func (o *OutputContextStub) GetOutputAccount(address []byte) (*vmcommon.OutputAccount, bool) + func (o *OutputContextStub) GetOutputAccounts() map[string]*vmcommon.OutputAccount + func (o *OutputContextStub) GetRefund() uint64 + func (o *OutputContextStub) GetVMOutput() *vmcommon.VMOutput + func (o *OutputContextStub) InitState() + func (o *OutputContextStub) PopDiscard() + func (o *OutputContextStub) PopMergeActiveState() + func (o *OutputContextStub) PopSetActiveState() + func (o *OutputContextStub) PrependFinish(data []byte) + func (o *OutputContextStub) PushState() + func (o *OutputContextStub) RemoveNonUpdatedStorage() + func (o *OutputContextStub) RemoveReturnData(index uint32) + func (o *OutputContextStub) ReturnCode() vmcommon.ReturnCode + func (o *OutputContextStub) ReturnData() [][]byte + func (o *OutputContextStub) ReturnMessage() string + func (o *OutputContextStub) SelfDestruct(address []byte, beneficiary []byte) + func (o *OutputContextStub) SetRefund(refund uint64) + func (o *OutputContextStub) SetReturnCode(returnCode vmcommon.ReturnCode) + func (o *OutputContextStub) SetReturnMessage(message string) + func (o *OutputContextStub) Transfer(destination []byte, sender []byte, gasLimit uint64, gasLocked uint64, ...) error + func (o *OutputContextStub) TransferMECT(destination []byte, sender []byte, transfers []*vmcommon.MECTTransfer, ...) (uint64, error) + func (o *OutputContextStub) TransferValueOnly(destination []byte, sender []byte, value *big.Int, checkPayable bool) error + func (o *OutputContextStub) WriteLog(address []byte, topics [][]byte, data []byte) + type RuntimeContextMock struct + AsyncCallInfo *andes.AsyncCallInfo + CallFunction string + CurrentBreakpointValue andes.BreakpointValue + CurrentTxHash []byte + Err error + FailBigFloatAPI bool + FailBigIntAPI bool + FailCryptoAPI bool + FailManagedBuffersAPI bool + FailMotherEarthAPI bool + FailMotherEarthSyncExecAPI bool + GasTrace map[string]map[string][]uint64 + InstanceCtxID int + MemLoadMultipleResult [][]byte + MemLoadResult []byte + OriginalTxHash []byte + PointsUsed uint64 + ReadOnlyFlag bool + RunningInstances uint64 + SCAddress []byte + SCCode []byte + SCCodeSize uint64 + TraceGasEnabled bool + VMInput *vmcommon.ContractCallInput + VMType []byte + VerifyCode bool + func (r *RuntimeContextMock) AddAsyncContextCall(_ []byte, _ *andes.AsyncGeneratedCall) error + func (r *RuntimeContextMock) AddError(_ error, _ ...string) + func (r *RuntimeContextMock) Arguments() [][]byte + func (r *RuntimeContextMock) BigFloatAPIErrorShouldFailExecution() bool + func (r *RuntimeContextMock) BigIntAPIErrorShouldFailExecution() bool + func (r *RuntimeContextMock) CleanInstance() + func (r *RuntimeContextMock) ClearInstanceStack() + func (r *RuntimeContextMock) ClearStateStack() + func (r *RuntimeContextMock) ClearWarmInstanceCache() + func (r *RuntimeContextMock) CryptoAPIErrorShouldFailExecution() bool + func (r *RuntimeContextMock) ExecuteAsyncCall(_ []byte, _ []byte, _ []byte) error + func (r *RuntimeContextMock) ExtractCodeUpgradeFromArgs() ([]byte, []byte, error) + func (r *RuntimeContextMock) FailExecution(_ error) + func (r *RuntimeContextMock) Function() string + func (r *RuntimeContextMock) GetAllErrors() error + func (r *RuntimeContextMock) GetAsyncCallInfo() *andes.AsyncCallInfo + func (r *RuntimeContextMock) GetAsyncContext(_ []byte) (*andes.AsyncContext, error) + func (r *RuntimeContextMock) GetAsyncContextInfo() *andes.AsyncContextInfo + func (r *RuntimeContextMock) GetContextAddress() []byte + func (r *RuntimeContextMock) GetCurrentTxHash() []byte + func (r *RuntimeContextMock) GetFunctionToCall() (wasmer.ExportedFunctionCallback, error) + func (r *RuntimeContextMock) GetInitFunction() wasmer.ExportedFunctionCallback + func (r *RuntimeContextMock) GetInstance() wasmer.InstanceHandler + func (r *RuntimeContextMock) GetInstanceExports() wasmer.ExportsMap + func (r *RuntimeContextMock) GetOriginalTxHash() []byte + func (r *RuntimeContextMock) GetPointsUsed() uint64 + func (r *RuntimeContextMock) GetRuntimeBreakpointValue() andes.BreakpointValue + func (r *RuntimeContextMock) GetSCCode() ([]byte, error) + func (r *RuntimeContextMock) GetSCCodeSize() uint64 + func (r *RuntimeContextMock) GetVMInput() *vmcommon.ContractCallInput + func (r *RuntimeContextMock) GetVMType() []byte + func (r *RuntimeContextMock) InitState() + func (r *RuntimeContextMock) InitStateFromContractCallInput(_ *vmcommon.ContractCallInput) + func (r *RuntimeContextMock) IsFunctionImported(_ string) bool + func (r *RuntimeContextMock) IsWarmInstance() bool + func (r *RuntimeContextMock) ManagedBufferAPIErrorShouldFailExecution() bool + func (r *RuntimeContextMock) MemLoad(_ int32, _ int32) ([]byte, error) + func (r *RuntimeContextMock) MemLoadMultiple(_ int32, _ []int32) ([][]byte, error) + func (r *RuntimeContextMock) MemStore(_ int32, _ []byte) error + func (r *RuntimeContextMock) MotherEarthAPIErrorShouldFailExecution() bool + func (r *RuntimeContextMock) MotherEarthSyncExecAPIErrorShouldFailExecution() bool + func (r *RuntimeContextMock) MustVerifyNextContractCode() + func (r *RuntimeContextMock) PopDiscard() + func (r *RuntimeContextMock) PopInstance() + func (r *RuntimeContextMock) PopSetActiveState() + func (r *RuntimeContextMock) PushInstance() + func (r *RuntimeContextMock) PushState() + func (r *RuntimeContextMock) ReadOnly() bool + func (r *RuntimeContextMock) ReplaceInstanceBuilder(_ andes.InstanceBuilder) + func (r *RuntimeContextMock) ResetWarmInstance() + func (r *RuntimeContextMock) RunningInstancesCount() uint64 + func (r *RuntimeContextMock) SetAsyncCallInfo(asyncCallInfo *andes.AsyncCallInfo) + func (r *RuntimeContextMock) SetCaching(_ bool) + func (r *RuntimeContextMock) SetCodeAddress(scAddress []byte) + func (r *RuntimeContextMock) SetCustomCallFunction(_ string) + func (r *RuntimeContextMock) SetMaxInstanceCount(uint64) + func (r *RuntimeContextMock) SetPointsUsed(gasPoints uint64) + func (r *RuntimeContextMock) SetReadOnly(readOnly bool) + func (r *RuntimeContextMock) SetRuntimeBreakpointValue(_ andes.BreakpointValue) + func (r *RuntimeContextMock) SetVMInput(vmInput *vmcommon.ContractCallInput) + func (r *RuntimeContextMock) SignalExit(_ int) + func (r *RuntimeContextMock) SignalUserError(_ string) + func (r *RuntimeContextMock) StartWasmerInstance(_ []byte, _ uint64, _ bool) error + func (r *RuntimeContextMock) VerifyContractCode() error + type RuntimeContextWrapper struct + AddAsyncContextCallFunc func(contextIdentifier []byte, asyncCall *andes.AsyncGeneratedCall) error + AddErrorFunc func(err error, otherInfo ...string) + ArgumentsFunc func() [][]byte + BigFloatAPIErrorShouldFailExecutionFunc func() bool + BigIntAPIErrorShouldFailExecutionFunc func() bool + ClearStateStackFunc func() + ClearWarmInstanceCacheFunc func() + CryptoAPIErrorShouldFailExecutionFunc func() bool + ExecuteAsyncCallFunc func(address []byte, data []byte, value []byte) error + ExtractCodeUpgradeFromArgsFunc func() ([]byte, []byte, error) + FailExecutionFunc func(err error) + FunctionFunc func() string + GetAllErrorsFunc func() error + GetAsyncCallInfoFunc func() *andes.AsyncCallInfo + GetAsyncContextFunc func(contextIdentifier []byte) (*andes.AsyncContext, error) + GetAsyncContextInfoFunc func() *andes.AsyncContextInfo + GetCurrentTxHashFunc func() []byte + GetFunctionToCallFunc func() (wasmer.ExportedFunctionCallback, error) + GetInitFunctionFunc func() wasmer.ExportedFunctionCallback + GetInstanceExportsFunc func() wasmer.ExportsMap + GetInstanceFunc func() wasmer.InstanceHandler + GetOriginalTxHashFunc func() []byte + GetPointsUsedFunc func() uint64 + GetRuntimeBreakpointValueFunc func() andes.BreakpointValue + GetSCAddressFunc func() []byte + GetSCCodeFunc func() ([]byte, error) + GetSCCodeSizeFunc func() uint64 + GetVMInputFunc func() *vmcommon.ContractCallInput + GetVMTypeFunc func() []byte + InitStateFromContractCallInputFunc func(input *vmcommon.ContractCallInput) + InitStateFunc func() + IsFunctionImportedFunc func(name string) bool + ManagedBufferAPIErrorShouldFailExecutionFunc func() bool + MemLoadFunc func(offset int32, length int32) ([]byte, error) + MemLoadMultipleFunc func(offset int32, lengths []int32) ([][]byte, error) + MemStoreFunc func(offset int32, data []byte) error + MotherEarthAPIErrorShouldFailExecutionFunc func() bool + MotherEarthSyncExecAPIErrorShouldFailExecutionFunc func() bool + MustVerifyNextContractCodeFunc func() + PopDiscardFunc func() + PopSetActiveStateFunc func() + PushStateFunc func() + ReadOnlyFunc func() bool + ReplaceInstanceBuilderFunc func(builder andes.InstanceBuilder) + RunningInstancesCountFunc func() uint64 + SetAsyncCallInfoFunc func(asyncCallInfo *andes.AsyncCallInfo) + SetCodeAddressFunc func(scAddress []byte) + SetCustomCallFunctionFunc func(callFunction string) + SetMaxInstanceCountFunc func(maxInstances uint64) + SetPointsUsedFunc func(gasPoints uint64) + SetReadOnlyFunc func(readOnly bool) + SetRuntimeBreakpointValueFunc func(value andes.BreakpointValue) + SetVMInputFunc func(vmInput *vmcommon.ContractCallInput) + SignalUserErrorFunc func(message string) + StartWasmerInstanceFunc func(contract []byte, gasLimit uint64, newCode bool) error + VerifyContractCodeFunc func() error + func NewRuntimeContextWrapper(inputRuntimeContext *andes.RuntimeContext) *RuntimeContextWrapper + func (contextWrapper *RuntimeContextWrapper) AddAsyncContextCall(contextIdentifier []byte, asyncCall *andes.AsyncGeneratedCall) error + func (contextWrapper *RuntimeContextWrapper) AddError(err error, otherInfo ...string) + func (contextWrapper *RuntimeContextWrapper) Arguments() [][]byte + func (contextWrapper *RuntimeContextWrapper) BigFloatAPIErrorShouldFailExecution() bool + func (contextWrapper *RuntimeContextWrapper) BigIntAPIErrorShouldFailExecution() bool + func (contextWrapper *RuntimeContextWrapper) CleanInstance() + func (contextWrapper *RuntimeContextWrapper) ClearStateStack() + func (contextWrapper *RuntimeContextWrapper) ClearWarmInstanceCache() + func (contextWrapper *RuntimeContextWrapper) CryptoAPIErrorShouldFailExecution() bool + func (contextWrapper *RuntimeContextWrapper) ExecuteAsyncCall(address []byte, data []byte, value []byte) error + func (contextWrapper *RuntimeContextWrapper) ExtractCodeUpgradeFromArgs() ([]byte, []byte, error) + func (contextWrapper *RuntimeContextWrapper) FailExecution(err error) + func (contextWrapper *RuntimeContextWrapper) Function() string + func (contextWrapper *RuntimeContextWrapper) GetAllErrors() error + func (contextWrapper *RuntimeContextWrapper) GetAsyncCallInfo() *andes.AsyncCallInfo + func (contextWrapper *RuntimeContextWrapper) GetAsyncContext(contextIdentifier []byte) (*andes.AsyncContext, error) + func (contextWrapper *RuntimeContextWrapper) GetAsyncContextInfo() *andes.AsyncContextInfo + func (contextWrapper *RuntimeContextWrapper) GetContextAddress() []byte + func (contextWrapper *RuntimeContextWrapper) GetCurrentTxHash() []byte + func (contextWrapper *RuntimeContextWrapper) GetFunctionToCall() (wasmer.ExportedFunctionCallback, error) + func (contextWrapper *RuntimeContextWrapper) GetInitFunction() wasmer.ExportedFunctionCallback + func (contextWrapper *RuntimeContextWrapper) GetInstance() wasmer.InstanceHandler + func (contextWrapper *RuntimeContextWrapper) GetInstanceExports() wasmer.ExportsMap + func (contextWrapper *RuntimeContextWrapper) GetOriginalTxHash() []byte + func (contextWrapper *RuntimeContextWrapper) GetPointsUsed() uint64 + func (contextWrapper *RuntimeContextWrapper) GetRuntimeBreakpointValue() andes.BreakpointValue + func (contextWrapper *RuntimeContextWrapper) GetSCCode() ([]byte, error) + func (contextWrapper *RuntimeContextWrapper) GetSCCodeSize() uint64 + func (contextWrapper *RuntimeContextWrapper) GetVMInput() *vmcommon.ContractCallInput + func (contextWrapper *RuntimeContextWrapper) GetVMType() []byte + func (contextWrapper *RuntimeContextWrapper) GetWrappedRuntimeContext() andes.RuntimeContext + func (contextWrapper *RuntimeContextWrapper) InitState() + func (contextWrapper *RuntimeContextWrapper) InitStateFromContractCallInput(input *vmcommon.ContractCallInput) + func (contextWrapper *RuntimeContextWrapper) IsFunctionImported(name string) bool + func (contextWrapper *RuntimeContextWrapper) ManagedBufferAPIErrorShouldFailExecution() bool + func (contextWrapper *RuntimeContextWrapper) MemLoad(offset int32, length int32) ([]byte, error) + func (contextWrapper *RuntimeContextWrapper) MemLoadMultiple(offset int32, lengths []int32) ([][]byte, error) + func (contextWrapper *RuntimeContextWrapper) MemStore(offset int32, data []byte) error + func (contextWrapper *RuntimeContextWrapper) MotherEarthAPIErrorShouldFailExecution() bool + func (contextWrapper *RuntimeContextWrapper) MotherEarthSyncExecAPIErrorShouldFailExecution() bool + func (contextWrapper *RuntimeContextWrapper) MustVerifyNextContractCode() + func (contextWrapper *RuntimeContextWrapper) PopDiscard() + func (contextWrapper *RuntimeContextWrapper) PopSetActiveState() + func (contextWrapper *RuntimeContextWrapper) PushState() + func (contextWrapper *RuntimeContextWrapper) ReadOnly() bool + func (contextWrapper *RuntimeContextWrapper) ReplaceInstanceBuilder(builder andes.InstanceBuilder) + func (contextWrapper *RuntimeContextWrapper) RunningInstancesCount() uint64 + func (contextWrapper *RuntimeContextWrapper) SetAsyncCallInfo(asyncCallInfo *andes.AsyncCallInfo) + func (contextWrapper *RuntimeContextWrapper) SetCodeAddress(scAddress []byte) + func (contextWrapper *RuntimeContextWrapper) SetCustomCallFunction(callFunction string) + func (contextWrapper *RuntimeContextWrapper) SetMaxInstanceCount(maxInstances uint64) + func (contextWrapper *RuntimeContextWrapper) SetPointsUsed(gasPoints uint64) + func (contextWrapper *RuntimeContextWrapper) SetReadOnly(readOnly bool) + func (contextWrapper *RuntimeContextWrapper) SetRuntimeBreakpointValue(value andes.BreakpointValue) + func (contextWrapper *RuntimeContextWrapper) SetVMInput(vmInput *vmcommon.ContractCallInput) + func (contextWrapper *RuntimeContextWrapper) SignalUserError(message string) + func (contextWrapper *RuntimeContextWrapper) StartWasmerInstance(contract []byte, gasLimit uint64, newCode bool) error + func (contextWrapper *RuntimeContextWrapper) VerifyContractCode() error + type StubAccount struct + Address []byte + Balance *big.Int + CodeHash []byte + CodeMetadata []byte + Err error + Nonce uint64 + OwnerAddress []byte + ShardID uint32 + Storage map[string][]byte + UserName []byte + func (a *StubAccount) AccountDataHandler() vmcommon.AccountDataHandler + func (a *StubAccount) AddToBalance(_ *big.Int) error + func (a *StubAccount) AddressBytes() []byte + func (a *StubAccount) ChangeOwnerAddress(_ []byte, _ []byte) error + func (a *StubAccount) ClaimDeveloperRewards(_ []byte) (*big.Int, error) + func (a *StubAccount) GetBalance() *big.Int + func (a *StubAccount) GetCodeHash() []byte + func (a *StubAccount) GetCodeMetadata() []byte + func (a *StubAccount) GetDeveloperReward() *big.Int + func (a *StubAccount) GetNonce() uint64 + func (a *StubAccount) GetOwnerAddress() []byte + func (a *StubAccount) GetRootHash() []byte + func (a *StubAccount) GetUserName() []byte + func (a *StubAccount) IncreaseNonce(_ uint64) + func (a *StubAccount) IsInterfaceNil() bool + func (a *StubAccount) SetOwnerAddress(_ []byte) + func (a *StubAccount) SetUserName(_ []byte) + type VMHostMock struct + BlockChainHook vmcommon.BlockchainHook + BlockchainContext andes.BlockchainContext + CryptoHook crypto.VMCrypto + EnableEpochsHandlerField vmcommon.EnableEpochsHandler + EthInput []byte + IsBuiltinFunc bool + ManagedTypesContext andes.ManagedTypesContext + MeteringContext andes.MeteringContext + OutputContext andes.OutputContext + RuntimeContext andes.RuntimeContext + SCAPIMethods *wasmer.Imports + StorageContext andes.StorageContext + func (host *VMHostMock) AreInSameShard(_ []byte, _ []byte) bool + func (host *VMHostMock) Blockchain() andes.BlockchainContext + func (host *VMHostMock) CheckExecuteReadOnly() bool + func (host *VMHostMock) ClearStateStack() + func (host *VMHostMock) Close() error + func (host *VMHostMock) CreateNFTOnExecByCallerEnabled() bool + func (host *VMHostMock) CreateNewContract(_ *vmcommon.ContractCreateInput) ([]byte, error) + func (host *VMHostMock) Crypto() crypto.VMCrypto + func (host *VMHostMock) DisableExecByCaller() bool + func (host *VMHostMock) EnableEpochsHandler() vmcommon.EnableEpochsHandler + func (host *VMHostMock) ExecuteMECTTransfer(_ []byte, _ []byte, _ []*vmcommon.MECTTransfer, _ vm.CallType) (*vmcommon.VMOutput, uint64, error) + func (host *VMHostMock) ExecuteOnDestContext(_ *vmcommon.ContractCallInput) (*vmcommon.VMOutput, *andes.AsyncContextInfo, error) + func (host *VMHostMock) ExecuteOnSameContext(_ *vmcommon.ContractCallInput) (*andes.AsyncContextInfo, error) + func (host *VMHostMock) FixFailExecutionEnabled() bool + func (host *VMHostMock) FixOOGReturnCodeEnabled() bool + func (host *VMHostMock) GasScheduleChange(_ config.GasScheduleMap) + func (host *VMHostMock) GetAPIMethods() *wasmer.Imports + func (host *VMHostMock) GetContexts() (andes.ManagedTypesContext, andes.BlockchainContext, andes.MeteringContext, ...) + func (host *VMHostMock) GetGasScheduleMap() config.GasScheduleMap + func (host *VMHostMock) GetVersion() string + func (host *VMHostMock) InitState() + func (host *VMHostMock) IsAheadOfTimeCompileEnabled() bool + func (host *VMHostMock) IsAndesV2Enabled() bool + func (host *VMHostMock) IsAndesV3Enabled() bool + func (host *VMHostMock) IsBuiltinFunctionName(_ string) bool + func (host *VMHostMock) IsDynamicGasLockingEnabled() bool + func (host *VMHostMock) IsInterfaceNil() bool + func (host *VMHostMock) IsMECTFunctionsEnabled() bool + func (host *VMHostMock) ManagedTypes() andes.ManagedTypesContext + func (host *VMHostMock) Metering() andes.MeteringContext + func (host *VMHostMock) Output() andes.OutputContext + func (host *VMHostMock) PopState() + func (host *VMHostMock) PushState() + func (host *VMHostMock) Reset() + func (host *VMHostMock) RunSmartContractCall(_ *vmcommon.ContractCallInput) (vmOutput *vmcommon.VMOutput, err error) + func (host *VMHostMock) RunSmartContractCreate(_ *vmcommon.ContractCreateInput) (vmOutput *vmcommon.VMOutput, err error) + func (host *VMHostMock) Runtime() andes.RuntimeContext + func (host *VMHostMock) SetBuiltInFunctionsContainer(_ vmcommon.BuiltInFunctionContainer) + func (host *VMHostMock) SetRuntimeContext(runtime andes.RuntimeContext) + func (host *VMHostMock) Storage() andes.StorageContext + type VMHostStub struct + AreInSameShardCalled func(left []byte, right []byte) bool + BlockchainCalled func() andes.BlockchainContext + ClearStateStackCalled func() + CreateNewContractCalled func(input *vmcommon.ContractCreateInput) ([]byte, error) + CryptoCalled func() crypto.VMCrypto + EnableEpochsHandlerCalled func() vmcommon.EnableEpochsHandler + ExecuteMECTTransferCalled func(destination []byte, sender []byte, transfers []*vmcommon.MECTTransfer, ...) (*vmcommon.VMOutput, uint64, error) + ExecuteOnDestContextCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, *andes.AsyncContextInfo, error) + ExecuteOnSameContextCalled func(input *vmcommon.ContractCallInput) (*andes.AsyncContextInfo, error) + GasScheduleChangeCalled func(newGasSchedule config.GasScheduleMap) + GetAPIMethodsCalled func() *wasmer.Imports + GetContextsCalled func() (andes.ManagedTypesContext, andes.BlockchainContext, andes.MeteringContext, ...) + GetGasScheduleMapCalled func() config.GasScheduleMap + GetVersionCalled func() string + InitStateCalled func() + IsBuiltinFunctionNameCalled func(functionName string) bool + IsInterfaceNilCalled func() bool + ManagedTypesCalled func() andes.ManagedTypesContext + MeteringCalled func() andes.MeteringContext + OutputCalled func() andes.OutputContext + PopStateCalled func() + PushStateCalled func() + RunSmartContractCallCalled func(input *vmcommon.ContractCallInput) (vmOutput *vmcommon.VMOutput, err error) + RunSmartContractCreateCalled func(input *vmcommon.ContractCreateInput) (vmOutput *vmcommon.VMOutput, err error) + RuntimeCalled func() andes.RuntimeContext + SetBuiltInFunctionsContainerCalled func(builtInFuncs vmcommon.BuiltInFunctionContainer) + SetRuntimeContextCalled func(runtime andes.RuntimeContext) + StorageCalled func() andes.StorageContext + func (vhs *VMHostStub) AreInSameShard(left []byte, right []byte) bool + func (vhs *VMHostStub) Blockchain() andes.BlockchainContext + func (vhs *VMHostStub) CheckExecuteReadOnly() bool + func (vhs *VMHostStub) ClearStateStack() + func (vhs *VMHostStub) Close() error + func (vhs *VMHostStub) CreateNFTOnExecByCallerEnabled() bool + func (vhs *VMHostStub) CreateNewContract(input *vmcommon.ContractCreateInput) ([]byte, error) + func (vhs *VMHostStub) Crypto() crypto.VMCrypto + func (vhs *VMHostStub) DisableExecByCaller() bool + func (vhs *VMHostStub) EnableEpochsHandler() vmcommon.EnableEpochsHandler + func (vhs *VMHostStub) ExecuteMECTTransfer(destination []byte, sender []byte, transfers []*vmcommon.MECTTransfer, ...) (*vmcommon.VMOutput, uint64, error) + func (vhs *VMHostStub) ExecuteOnDestContext(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, *andes.AsyncContextInfo, error) + func (vhs *VMHostStub) ExecuteOnSameContext(input *vmcommon.ContractCallInput) (*andes.AsyncContextInfo, error) + func (vhs *VMHostStub) FixFailExecutionEnabled() bool + func (vhs *VMHostStub) FixOOGReturnCodeEnabled() bool + func (vhs *VMHostStub) GasScheduleChange(newGasSchedule config.GasScheduleMap) + func (vhs *VMHostStub) GetAPIMethods() *wasmer.Imports + func (vhs *VMHostStub) GetContexts() (andes.ManagedTypesContext, andes.BlockchainContext, andes.MeteringContext, ...) + func (vhs *VMHostStub) GetGasScheduleMap() config.GasScheduleMap + func (vhs *VMHostStub) GetVersion() string + func (vhs *VMHostStub) InitState() + func (vhs *VMHostStub) IsAheadOfTimeCompileEnabled() bool + func (vhs *VMHostStub) IsAndesV2Enabled() bool + func (vhs *VMHostStub) IsAndesV3Enabled() bool + func (vhs *VMHostStub) IsBuiltinFunctionName(functionName string) bool + func (vhs *VMHostStub) IsDynamicGasLockingEnabled() bool + func (vhs *VMHostStub) IsInterfaceNil() bool + func (vhs *VMHostStub) IsMECTFunctionsEnabled() bool + func (vhs *VMHostStub) ManagedTypes() andes.ManagedTypesContext + func (vhs *VMHostStub) Metering() andes.MeteringContext + func (vhs *VMHostStub) Output() andes.OutputContext + func (vhs *VMHostStub) PopState() + func (vhs *VMHostStub) PushState() + func (vhs *VMHostStub) Reset() + func (vhs *VMHostStub) RunSmartContractCall(input *vmcommon.ContractCallInput) (vmOutput *vmcommon.VMOutput, err error) + func (vhs *VMHostStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (vmOutput *vmcommon.VMOutput, err error) + func (vhs *VMHostStub) Runtime() andes.RuntimeContext + func (vhs *VMHostStub) SetBuiltInFunctionsContainer(builtInFuncs vmcommon.BuiltInFunctionContainer) + func (vhs *VMHostStub) SetRuntimeContext(runtime andes.RuntimeContext) + func (vhs *VMHostStub) Storage() andes.StorageContext