mock

package
v1.5.29 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockchainContextMock

type BlockchainContextMock struct {
}

BlockchainContextMock -

func (*BlockchainContextMock) AccountExists

func (b *BlockchainContextMock) AccountExists(_ []byte) bool

AccountExists -

func (*BlockchainContextMock) BlockHash

func (b *BlockchainContextMock) BlockHash(_ uint64) []byte

BlockHash -

func (*BlockchainContextMock) ClearCompiledCodes

func (b *BlockchainContextMock) ClearCompiledCodes()

ClearCompiledCodes -

func (*BlockchainContextMock) ClearStateStack

func (b *BlockchainContextMock) ClearStateStack()

ClearStateStack -

func (*BlockchainContextMock) CurrentEpoch

func (b *BlockchainContextMock) CurrentEpoch() uint32

CurrentEpoch -

func (*BlockchainContextMock) CurrentNonce

func (b *BlockchainContextMock) CurrentNonce() uint64

CurrentNonce -

func (*BlockchainContextMock) CurrentRandomSeed

func (b *BlockchainContextMock) CurrentRandomSeed() []byte

CurrentRandomSeed -

func (*BlockchainContextMock) CurrentRound

func (b *BlockchainContextMock) CurrentRound() uint64

CurrentRound -

func (*BlockchainContextMock) CurrentTimeStamp

func (b *BlockchainContextMock) CurrentTimeStamp() uint64

CurrentTimeStamp -

func (*BlockchainContextMock) ExecuteSmartContractCallOnOtherVM

func (b *BlockchainContextMock) ExecuteSmartContractCallOnOtherVM(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)

ExecuteSmartContractCallOnOtherVM -

func (*BlockchainContextMock) GetBalance

func (b *BlockchainContextMock) GetBalance(_ []byte) []byte

GetBalance -

func (*BlockchainContextMock) GetBalanceBigInt

func (b *BlockchainContextMock) GetBalanceBigInt(_ []byte) *big.Int

GetBalanceBigInt -

func (*BlockchainContextMock) GetCode

func (b *BlockchainContextMock) GetCode(addr []byte) ([]byte, error)

GetCode -

func (*BlockchainContextMock) GetCodeHash

func (b *BlockchainContextMock) GetCodeHash(addr []byte) []byte

GetCodeHash -

func (*BlockchainContextMock) GetCodeSize

func (b *BlockchainContextMock) GetCodeSize(_ []byte) (int32, error)

GetCodeSize -

func (*BlockchainContextMock) GetCompiledCode

func (b *BlockchainContextMock) GetCompiledCode(_ []byte) (bool, []byte)

GetCompiledCode -

func (*BlockchainContextMock) GetESDTToken

func (b *BlockchainContextMock) GetESDTToken(_ []byte, _ []byte, _ uint64) (*esdt.ESDigitalToken, error)

GetESDTToken -

func (*BlockchainContextMock) GetNonce

func (b *BlockchainContextMock) GetNonce(_ []byte) (uint64, error)

GetNonce -

func (*BlockchainContextMock) GetOwnerAddress

func (b *BlockchainContextMock) GetOwnerAddress() ([]byte, error)

GetOwnerAddress -

func (*BlockchainContextMock) GetShardOfAddress

func (b *BlockchainContextMock) GetShardOfAddress(_ []byte) uint32

GetShardOfAddress -

func (*BlockchainContextMock) GetSnapshot

func (b *BlockchainContextMock) GetSnapshot() int

GetSnapshot -

func (*BlockchainContextMock) GetStateRootHash

func (b *BlockchainContextMock) GetStateRootHash() []byte

GetStateRootHash -

func (*BlockchainContextMock) GetUserAccount

func (b *BlockchainContextMock) GetUserAccount(_ []byte) (vmcommon.UserAccountHandler, error)

GetUserAccount -

func (*BlockchainContextMock) IncreaseNonce

func (b *BlockchainContextMock) IncreaseNonce(_ []byte)

IncreaseNonce -

func (*BlockchainContextMock) InitState

func (b *BlockchainContextMock) InitState()

InitState -

func (*BlockchainContextMock) IsLimitedTransfer

func (b *BlockchainContextMock) IsLimitedTransfer(_ []byte) bool

IsLimitedTransfer -

func (*BlockchainContextMock) IsPaused

func (b *BlockchainContextMock) IsPaused(_ []byte) bool

IsPaused -

func (*BlockchainContextMock) IsPayable

func (b *BlockchainContextMock) IsPayable(_, _ []byte) (bool, error)

IsPayable -

func (*BlockchainContextMock) IsSmartContract

func (b *BlockchainContextMock) IsSmartContract(_ []byte) bool

IsSmartContract -

func (*BlockchainContextMock) LastEpoch

func (b *BlockchainContextMock) LastEpoch() uint32

LastEpoch -

func (*BlockchainContextMock) LastNonce

func (b *BlockchainContextMock) LastNonce() uint64

LastNonce -

func (*BlockchainContextMock) LastRandomSeed

func (b *BlockchainContextMock) LastRandomSeed() []byte

LastRandomSeed -

func (*BlockchainContextMock) LastRound

func (b *BlockchainContextMock) LastRound() uint64

LastRound -

func (*BlockchainContextMock) LastTimeStamp

func (b *BlockchainContextMock) LastTimeStamp() uint64

LastTimeStamp -

func (*BlockchainContextMock) NewAddress

func (b *BlockchainContextMock) NewAddress(creatorAddress []byte) ([]byte, error)

NewAddress -

func (*BlockchainContextMock) PopDiscard

func (b *BlockchainContextMock) PopDiscard()

PopDiscard -

func (*BlockchainContextMock) PopSetActiveState

func (b *BlockchainContextMock) PopSetActiveState()

PopSetActiveState -

func (*BlockchainContextMock) ProcessBuiltInFunction

func (b *BlockchainContextMock) ProcessBuiltInFunction(_ *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)

ProcessBuiltInFunction -

func (*BlockchainContextMock) PushState

func (b *BlockchainContextMock) PushState()

PushState -

func (*BlockchainContextMock) RevertToSnapshot

func (b *BlockchainContextMock) RevertToSnapshot(_ int)

RevertToSnapshot -

func (*BlockchainContextMock) SaveCompiledCode

func (b *BlockchainContextMock) SaveCompiledCode(_ []byte, _ []byte)

SaveCompiledCode -

type BuiltInFunctionStub

type BuiltInFunctionStub struct {
	ProcessBuiltinFunctionCalled func(acntSnd, acntDst vmcommon.UserAccountHandler, vmInput *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
	SetNewGasConfigCalled        func(gasCost *vmcommon.GasCost)
	IsActiveCalled               func() bool
}

BuiltInFunctionStub -

func (*BuiltInFunctionStub) IsActive

func (b *BuiltInFunctionStub) IsActive() bool

IsActive -

func (*BuiltInFunctionStub) IsInterfaceNil

func (b *BuiltInFunctionStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*BuiltInFunctionStub) ProcessBuiltinFunction

func (b *BuiltInFunctionStub) ProcessBuiltinFunction(acntSnd, acntDst vmcommon.UserAccountHandler, vmInput *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)

ProcessBuiltinFunction -

func (*BuiltInFunctionStub) SetNewGasConfig

func (b *BuiltInFunctionStub) SetNewGasConfig(gasCost *vmcommon.GasCost)

SetNewGasConfig -

type EpochNotifierStub

type EpochNotifierStub struct {
	CurrentEpochCalled          func() uint32
	RegisterNotifyHandlerCalled func(handler vmcommon.EpochSubscriberHandler)
}

EpochNotifierStub -

func (*EpochNotifierStub) CheckExecuteReadOnlyEnableEpoch

func (ens *EpochNotifierStub) CheckExecuteReadOnlyEnableEpoch() uint32

CheckExecuteReadOnlyEnableEpoch -

func (*EpochNotifierStub) CreateNFTThroughExecByCallerEnableEpoch

func (ens *EpochNotifierStub) CreateNFTThroughExecByCallerEnableEpoch() uint32

CreateNFTThroughExecByCallerEnableEpoch -

func (*EpochNotifierStub) DisableExecByCallerEnableEpoch

func (ens *EpochNotifierStub) DisableExecByCallerEnableEpoch() uint32

DisableExecByCallerEnableEpoch -

func (*EpochNotifierStub) FixFailExecutionOnErrorEnableEpoch

func (ens *EpochNotifierStub) FixFailExecutionOnErrorEnableEpoch() uint32

FixFailExecutionOnErrorEnableEpoch -

func (*EpochNotifierStub) FixOOGReturnCodeEnableEpoch

func (ens *EpochNotifierStub) FixOOGReturnCodeEnableEpoch() uint32

FixOOGReturnCodeEnableEpoch -

func (*EpochNotifierStub) IsAheadOfTimeGasUsageFlagEnabled

func (ens *EpochNotifierStub) IsAheadOfTimeGasUsageFlagEnabled() bool

IsAheadOfTimeGasUsageFlagEnabled -

func (*EpochNotifierStub) IsBuiltInFunctionsFlagEnabled

func (ens *EpochNotifierStub) IsBuiltInFunctionsFlagEnabled() bool

IsBuiltInFunctionsFlagEnabled -

func (*EpochNotifierStub) IsCheckCorrectTokenIDForTransferRoleFlagEnabled

func (ens *EpochNotifierStub) IsCheckCorrectTokenIDForTransferRoleFlagEnabled() bool

IsCheckCorrectTokenIDForTransferRoleFlagEnabled -

func (*EpochNotifierStub) IsCheckExecuteOnReadOnlyFlagEnabled

func (ens *EpochNotifierStub) IsCheckExecuteOnReadOnlyFlagEnabled() bool

IsCheckExecuteOnReadOnlyFlagEnabled -

func (*EpochNotifierStub) IsCheckFrozenCollectionFlagEnabled

func (ens *EpochNotifierStub) IsCheckFrozenCollectionFlagEnabled() bool

IsCheckFrozenCollectionFlagEnabled -

func (*EpochNotifierStub) IsCheckFunctionArgumentFlagEnabled

func (ens *EpochNotifierStub) IsCheckFunctionArgumentFlagEnabled() bool

IsCheckFunctionArgumentFlagEnabled -

func (*EpochNotifierStub) IsCheckTransferFlagEnabled

func (ens *EpochNotifierStub) IsCheckTransferFlagEnabled() bool

IsCheckTransferFlagEnabled -

func (*EpochNotifierStub) IsCreateNFTThroughExecByCallerFlagEnabled

func (ens *EpochNotifierStub) IsCreateNFTThroughExecByCallerFlagEnabled() bool

IsCreateNFTThroughExecByCallerFlagEnabled -

func (*EpochNotifierStub) IsDisableExecByCallerFlagEnabled

func (ens *EpochNotifierStub) IsDisableExecByCallerFlagEnabled() bool

IsDisableExecByCallerFlagEnabled -

func (*EpochNotifierStub) IsESDTNFTImprovementV1FlagEnabled

func (ens *EpochNotifierStub) IsESDTNFTImprovementV1FlagEnabled() bool

IsESDTNFTImprovementV1FlagEnabled -

func (*EpochNotifierStub) IsESDTTransferRoleFlagEnabled

func (ens *EpochNotifierStub) IsESDTTransferRoleFlagEnabled() bool

IsESDTTransferRoleFlagEnabled -

func (*EpochNotifierStub) IsFailExecutionOnEveryAPIErrorFlagEnabled

func (ens *EpochNotifierStub) IsFailExecutionOnEveryAPIErrorFlagEnabled() bool

IsFailExecutionOnEveryAPIErrorFlagEnabled -

func (*EpochNotifierStub) IsFixAsyncCallbackCheckFlagEnabled

func (ens *EpochNotifierStub) IsFixAsyncCallbackCheckFlagEnabled() bool

IsFixAsyncCallbackCheckFlagEnabled -

func (*EpochNotifierStub) IsFixOOGReturnCodeFlagEnabled

func (ens *EpochNotifierStub) IsFixOOGReturnCodeFlagEnabled() bool

IsFixOOGReturnCodeFlagEnabled -

func (*EpochNotifierStub) IsGlobalMintBurnFlagEnabled

func (ens *EpochNotifierStub) IsGlobalMintBurnFlagEnabled() bool

IsGlobalMintBurnFlagEnabled -

func (*EpochNotifierStub) IsInterfaceNil

func (ens *EpochNotifierStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochNotifierStub) IsManagedCryptoAPIsFlagEnabled

func (ens *EpochNotifierStub) IsManagedCryptoAPIsFlagEnabled() bool

IsManagedCryptoAPIsFlagEnabled -

func (*EpochNotifierStub) IsMultiESDTTransferFixOnCallBackFlagEnabled

func (ens *EpochNotifierStub) IsMultiESDTTransferFixOnCallBackFlagEnabled() bool

IsMultiESDTTransferFixOnCallBackFlagEnabled -

func (*EpochNotifierStub) IsRefactorContextFlagEnabled

func (ens *EpochNotifierStub) IsRefactorContextFlagEnabled() bool

IsRefactorContextFlagEnabled -

func (*EpochNotifierStub) IsRemoveNonUpdatedStorageFlagEnabled

func (ens *EpochNotifierStub) IsRemoveNonUpdatedStorageFlagEnabled() bool

IsRemoveNonUpdatedStorageFlagEnabled -

func (*EpochNotifierStub) IsRepairCallbackFlagEnabled

func (ens *EpochNotifierStub) IsRepairCallbackFlagEnabled() bool

IsRepairCallbackFlagEnabled -

func (*EpochNotifierStub) IsSCDeployFlagEnabled

func (ens *EpochNotifierStub) IsSCDeployFlagEnabled() bool

IsSCDeployFlagEnabled -

func (*EpochNotifierStub) IsSaveToSystemAccountFlagEnabled

func (ens *EpochNotifierStub) IsSaveToSystemAccountFlagEnabled() bool

IsSaveToSystemAccountFlagEnabled -

func (*EpochNotifierStub) IsSendAlwaysFlagEnabled

func (ens *EpochNotifierStub) IsSendAlwaysFlagEnabled() bool

IsSendAlwaysFlagEnabled -

func (*EpochNotifierStub) IsStorageAPICostOptimizationFlagEnabled

func (ens *EpochNotifierStub) IsStorageAPICostOptimizationFlagEnabled() bool

IsStorageAPICostOptimizationFlagEnabled -

func (*EpochNotifierStub) IsTransferToMetaFlagEnabled

func (ens *EpochNotifierStub) IsTransferToMetaFlagEnabled() bool

IsTransferToMetaFlagEnabled -

func (*EpochNotifierStub) IsValueLengthCheckFlagEnabled

func (ens *EpochNotifierStub) IsValueLengthCheckFlagEnabled() bool

IsValueLengthCheckFlagEnabled -

func (*EpochNotifierStub) ManagedCryptoAPIEnableEpoch

func (ens *EpochNotifierStub) ManagedCryptoAPIEnableEpoch() uint32

ManagedCryptoAPIEnableEpoch -

func (*EpochNotifierStub) MultiESDTTransferAsyncCallBackEnableEpoch

func (ens *EpochNotifierStub) MultiESDTTransferAsyncCallBackEnableEpoch() uint32

MultiESDTTransferAsyncCallBackEnableEpoch -

func (*EpochNotifierStub) RefactorContextEnableEpoch

func (ens *EpochNotifierStub) RefactorContextEnableEpoch() uint32

RefactorContextEnableEpoch -

func (*EpochNotifierStub) RegisterNotifyHandler

func (ens *EpochNotifierStub) RegisterNotifyHandler(handler vmcommon.EpochSubscriberHandler)

RegisterNotifyHandler -

func (*EpochNotifierStub) RemoveNonUpdatedStorageEnableEpoch

func (ens *EpochNotifierStub) RemoveNonUpdatedStorageEnableEpoch() uint32

RemoveNonUpdatedStorageEnableEpoch -

func (*EpochNotifierStub) StorageAPICostOptimizationEnableEpoch

func (ens *EpochNotifierStub) StorageAPICostOptimizationEnableEpoch() uint32

StorageAPICostOptimizationEnableEpoch -

Jump to

Keyboard shortcuts

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