mock

package
v1.4.74 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: GPL-3.0 Imports: 5 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(_ int64) []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) 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 EnableEpochsHandlerStub

type EnableEpochsHandlerStub struct {
	IsGlobalMintBurnFlagEnabledField                     bool
	IsESDTTransferRoleFlagEnabledField                   bool
	IsBuiltInFunctionsFlagEnabledField                   bool
	IsCheckCorrectTokenIDForTransferRoleFlagEnabledField bool
	IsMultiESDTTransferFixOnCallBackFlagEnabledField     bool
	IsFixOOGReturnCodeFlagEnabledField                   bool
	IsRemoveNonUpdatedStorageFlagEnabledField            bool
	IsCreateNFTThroughExecByCallerFlagEnabledField       bool
	IsStorageAPICostOptimizationFlagEnabledField         bool
	IsFailExecutionOnEveryAPIErrorFlagEnabledField       bool
	IsManagedCryptoAPIsFlagEnabledField                  bool
	IsSCDeployFlagEnabledField                           bool
	IsAheadOfTimeGasUsageFlagEnabledField                bool
	IsRepairCallbackFlagEnabledField                     bool
	IsDisableExecByCallerFlagEnabledField                bool
	IsRefactorContextFlagEnabledField                    bool
	IsCheckFunctionArgumentFlagEnabledField              bool
	IsCheckExecuteOnReadOnlyFlagEnabledField             bool
	IsFixAsyncCallbackCheckFlagEnabledField              bool
	IsSaveToSystemAccountFlagEnabledField                bool
	IsCheckFrozenCollectionFlagEnabledField              bool
	IsSendAlwaysFlagEnabledField                         bool
	IsValueLengthCheckFlagEnabledField                   bool
	IsCheckTransferFlagEnabledField                      bool
	IsTransferToMetaFlagEnabledField                     bool
	IsESDTNFTImprovementV1FlagEnabledField               bool
	IsFixOldTokenLiquidityEnabledField                   bool
	IsRuntimeMemStoreLimitEnabledField                   bool
	IsMaxBlockchainHookCountersFlagEnabledField          bool
	IsWipeSingleNFTLiquidityDecreaseEnabledField         bool
	MultiESDTTransferAsyncCallBackEnableEpochField       uint32
	FixOOGReturnCodeEnableEpochField                     uint32
	RemoveNonUpdatedStorageEnableEpochField              uint32
	CreateNFTThroughExecByCallerEnableEpochField         uint32
	FixFailExecutionOnErrorEnableEpochField              uint32
	ManagedCryptoAPIEnableEpochField                     uint32
	DisableExecByCallerEnableEpochField                  uint32
	RefactorContextEnableEpochField                      uint32
	CheckExecuteReadOnlyEnableEpochField                 uint32
	StorageAPICostOptimizationEnableEpochField           uint32
}

EnableEpochsHandlerStub -

func (*EnableEpochsHandlerStub) CheckExecuteReadOnlyEnableEpoch

func (stub *EnableEpochsHandlerStub) CheckExecuteReadOnlyEnableEpoch() uint32

CheckExecuteReadOnlyEnableEpoch -

func (*EnableEpochsHandlerStub) CreateNFTThroughExecByCallerEnableEpoch

func (stub *EnableEpochsHandlerStub) CreateNFTThroughExecByCallerEnableEpoch() uint32

CreateNFTThroughExecByCallerEnableEpoch -

func (*EnableEpochsHandlerStub) DisableExecByCallerEnableEpoch

func (stub *EnableEpochsHandlerStub) DisableExecByCallerEnableEpoch() uint32

DisableExecByCallerEnableEpoch -

func (*EnableEpochsHandlerStub) FixFailExecutionOnErrorEnableEpoch

func (stub *EnableEpochsHandlerStub) FixFailExecutionOnErrorEnableEpoch() uint32

FixFailExecutionOnErrorEnableEpoch -

func (*EnableEpochsHandlerStub) FixOOGReturnCodeEnableEpoch

func (stub *EnableEpochsHandlerStub) FixOOGReturnCodeEnableEpoch() uint32

FixOOGReturnCodeEnableEpoch -

func (*EnableEpochsHandlerStub) IsAheadOfTimeGasUsageFlagEnabled

func (stub *EnableEpochsHandlerStub) IsAheadOfTimeGasUsageFlagEnabled() bool

IsAheadOfTimeGasUsageFlagEnabled -

func (*EnableEpochsHandlerStub) IsBuiltInFunctionsFlagEnabled

func (stub *EnableEpochsHandlerStub) IsBuiltInFunctionsFlagEnabled() bool

IsBuiltInFunctionsFlagEnabled -

func (*EnableEpochsHandlerStub) IsCheckCorrectTokenIDForTransferRoleFlagEnabled

func (stub *EnableEpochsHandlerStub) IsCheckCorrectTokenIDForTransferRoleFlagEnabled() bool

IsCheckCorrectTokenIDForTransferRoleFlagEnabled -

func (*EnableEpochsHandlerStub) IsCheckExecuteOnReadOnlyFlagEnabled

func (stub *EnableEpochsHandlerStub) IsCheckExecuteOnReadOnlyFlagEnabled() bool

IsCheckExecuteOnReadOnlyFlagEnabled -

func (*EnableEpochsHandlerStub) IsCheckFrozenCollectionFlagEnabled

func (stub *EnableEpochsHandlerStub) IsCheckFrozenCollectionFlagEnabled() bool

IsCheckFrozenCollectionFlagEnabled -

func (*EnableEpochsHandlerStub) IsCheckFunctionArgumentFlagEnabled

func (stub *EnableEpochsHandlerStub) IsCheckFunctionArgumentFlagEnabled() bool

IsCheckFunctionArgumentFlagEnabled -

func (*EnableEpochsHandlerStub) IsCheckTransferFlagEnabled

func (stub *EnableEpochsHandlerStub) IsCheckTransferFlagEnabled() bool

IsCheckTransferFlagEnabled -

func (*EnableEpochsHandlerStub) IsCreateNFTThroughExecByCallerFlagEnabled

func (stub *EnableEpochsHandlerStub) IsCreateNFTThroughExecByCallerFlagEnabled() bool

IsCreateNFTThroughExecByCallerFlagEnabled -

func (*EnableEpochsHandlerStub) IsDisableExecByCallerFlagEnabled

func (stub *EnableEpochsHandlerStub) IsDisableExecByCallerFlagEnabled() bool

IsDisableExecByCallerFlagEnabled -

func (*EnableEpochsHandlerStub) IsESDTNFTImprovementV1FlagEnabled

func (stub *EnableEpochsHandlerStub) IsESDTNFTImprovementV1FlagEnabled() bool

IsESDTNFTImprovementV1FlagEnabled -

func (*EnableEpochsHandlerStub) IsESDTTransferRoleFlagEnabled

func (stub *EnableEpochsHandlerStub) IsESDTTransferRoleFlagEnabled() bool

IsESDTTransferRoleFlagEnabled -

func (*EnableEpochsHandlerStub) IsFailExecutionOnEveryAPIErrorFlagEnabled

func (stub *EnableEpochsHandlerStub) IsFailExecutionOnEveryAPIErrorFlagEnabled() bool

IsFailExecutionOnEveryAPIErrorFlagEnabled -

func (*EnableEpochsHandlerStub) IsFixAsyncCallbackCheckFlagEnabled

func (stub *EnableEpochsHandlerStub) IsFixAsyncCallbackCheckFlagEnabled() bool

IsFixAsyncCallbackCheckFlagEnabled -

func (*EnableEpochsHandlerStub) IsFixOOGReturnCodeFlagEnabled

func (stub *EnableEpochsHandlerStub) IsFixOOGReturnCodeFlagEnabled() bool

IsFixOOGReturnCodeFlagEnabled -

func (*EnableEpochsHandlerStub) IsFixOldTokenLiquidityEnabled

func (stub *EnableEpochsHandlerStub) IsFixOldTokenLiquidityEnabled() bool

IsFixOldTokenLiquidityEnabled -

func (*EnableEpochsHandlerStub) IsGlobalMintBurnFlagEnabled

func (stub *EnableEpochsHandlerStub) IsGlobalMintBurnFlagEnabled() bool

IsGlobalMintBurnFlagEnabled -

func (*EnableEpochsHandlerStub) IsInterfaceNil

func (stub *EnableEpochsHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EnableEpochsHandlerStub) IsManagedCryptoAPIsFlagEnabled

func (stub *EnableEpochsHandlerStub) IsManagedCryptoAPIsFlagEnabled() bool

IsManagedCryptoAPIsFlagEnabled -

func (*EnableEpochsHandlerStub) IsMaxBlockchainHookCountersFlagEnabled

func (stub *EnableEpochsHandlerStub) IsMaxBlockchainHookCountersFlagEnabled() bool

IsMaxBlockchainHookCountersFlagEnabled -

func (*EnableEpochsHandlerStub) IsMultiESDTTransferFixOnCallBackFlagEnabled

func (stub *EnableEpochsHandlerStub) IsMultiESDTTransferFixOnCallBackFlagEnabled() bool

IsMultiESDTTransferFixOnCallBackFlagEnabled -

func (*EnableEpochsHandlerStub) IsRefactorContextFlagEnabled

func (stub *EnableEpochsHandlerStub) IsRefactorContextFlagEnabled() bool

IsRefactorContextFlagEnabled -

func (*EnableEpochsHandlerStub) IsRemoveNonUpdatedStorageFlagEnabled

func (stub *EnableEpochsHandlerStub) IsRemoveNonUpdatedStorageFlagEnabled() bool

IsRemoveNonUpdatedStorageFlagEnabled -

func (*EnableEpochsHandlerStub) IsRepairCallbackFlagEnabled

func (stub *EnableEpochsHandlerStub) IsRepairCallbackFlagEnabled() bool

IsRepairCallbackFlagEnabled -

func (*EnableEpochsHandlerStub) IsRuntimeMemStoreLimitEnabled

func (stub *EnableEpochsHandlerStub) IsRuntimeMemStoreLimitEnabled() bool

IsRuntimeMemStoreLimitEnabled -

func (*EnableEpochsHandlerStub) IsSCDeployFlagEnabled

func (stub *EnableEpochsHandlerStub) IsSCDeployFlagEnabled() bool

IsSCDeployFlagEnabled -

func (*EnableEpochsHandlerStub) IsSaveToSystemAccountFlagEnabled

func (stub *EnableEpochsHandlerStub) IsSaveToSystemAccountFlagEnabled() bool

IsSaveToSystemAccountFlagEnabled -

func (*EnableEpochsHandlerStub) IsSendAlwaysFlagEnabled

func (stub *EnableEpochsHandlerStub) IsSendAlwaysFlagEnabled() bool

IsSendAlwaysFlagEnabled -

func (*EnableEpochsHandlerStub) IsStorageAPICostOptimizationFlagEnabled

func (stub *EnableEpochsHandlerStub) IsStorageAPICostOptimizationFlagEnabled() bool

IsStorageAPICostOptimizationFlagEnabled -

func (*EnableEpochsHandlerStub) IsTransferToMetaFlagEnabled

func (stub *EnableEpochsHandlerStub) IsTransferToMetaFlagEnabled() bool

IsTransferToMetaFlagEnabled -

func (*EnableEpochsHandlerStub) IsValueLengthCheckFlagEnabled

func (stub *EnableEpochsHandlerStub) IsValueLengthCheckFlagEnabled() bool

IsValueLengthCheckFlagEnabled -

func (*EnableEpochsHandlerStub) IsWipeSingleNFTLiquidityDecreaseEnabled

func (stub *EnableEpochsHandlerStub) IsWipeSingleNFTLiquidityDecreaseEnabled() bool

IsWipeSingleNFTLiquidityDecreaseEnabled -

func (*EnableEpochsHandlerStub) ManagedCryptoAPIEnableEpoch

func (stub *EnableEpochsHandlerStub) ManagedCryptoAPIEnableEpoch() uint32

ManagedCryptoAPIEnableEpoch -

func (*EnableEpochsHandlerStub) MultiESDTTransferAsyncCallBackEnableEpoch

func (stub *EnableEpochsHandlerStub) MultiESDTTransferAsyncCallBackEnableEpoch() uint32

MultiESDTTransferAsyncCallBackEnableEpoch -

func (*EnableEpochsHandlerStub) RefactorContextEnableEpoch

func (stub *EnableEpochsHandlerStub) RefactorContextEnableEpoch() uint32

RefactorContextEnableEpoch -

func (*EnableEpochsHandlerStub) RemoveNonUpdatedStorageEnableEpoch

func (stub *EnableEpochsHandlerStub) RemoveNonUpdatedStorageEnableEpoch() uint32

RemoveNonUpdatedStorageEnableEpoch -

func (*EnableEpochsHandlerStub) StorageAPICostOptimizationEnableEpoch

func (stub *EnableEpochsHandlerStub) StorageAPICostOptimizationEnableEpoch() uint32

StorageAPICostOptimizationEnableEpoch -

type EpochNotifierStub

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

EpochNotifierStub -

func (*EpochNotifierStub) IsInterfaceNil

func (ens *EpochNotifierStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochNotifierStub) RegisterNotifyHandler

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

RegisterNotifyHandler -

Jump to

Keyboard shortcuts

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