mock

package
v1.4.97 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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ChangeUsernameFlag core.EnableEpochFlag = "ChangeUsernameFlag"

ChangeUsernameFlag is the DNS v1 disable epoch

Variables

This section is empty.

Functions

func NewMockWorldVM14 added in v1.4.93

func NewMockWorldVM14() *worldmock.MockWorld

NewMockWorldVM14 creates a MockWorld specifically configured for all VM 1.4 tests.

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 {
	IsFlagDefinedCalled                            func(flag core.EnableEpochFlag) bool
	IsFlagEnabledCalled                            func(flag core.EnableEpochFlag) bool
	IsFlagEnabledInEpochCalled                     func(flag core.EnableEpochFlag, epoch uint32) bool
	GetActivationEpochCalled                       func(flag core.EnableEpochFlag) uint32
	MultiESDTTransferAsyncCallBackEnableEpochField uint32
	FixOOGReturnCodeEnableEpochField               uint32
	RemoveNonUpdatedStorageEnableEpochField        uint32
	CreateNFTThroughExecByCallerEnableEpochField   uint32
	FixFailExecutionOnErrorEnableEpochField        uint32
	ManagedCryptoAPIEnableEpochField               uint32
	DisableExecByCallerEnableEpochField            uint32
	RefactorContextEnableEpochField                uint32
	CheckExecuteReadOnlyEnableEpochField           uint32
	StorageAPICostOptimizationEnableEpochField     uint32
}

EnableEpochsHandlerStub -

func (*EnableEpochsHandlerStub) GetActivationEpoch added in v1.4.89

func (stub *EnableEpochsHandlerStub) GetActivationEpoch(flag core.EnableEpochFlag) uint32

GetActivationEpoch -

func (*EnableEpochsHandlerStub) IsFlagDefined added in v1.4.89

func (stub *EnableEpochsHandlerStub) IsFlagDefined(flag core.EnableEpochFlag) bool

IsFlagDefined -

func (*EnableEpochsHandlerStub) IsFlagEnabled added in v1.4.89

func (stub *EnableEpochsHandlerStub) IsFlagEnabled(flag core.EnableEpochFlag) bool

IsFlagEnabled -

func (*EnableEpochsHandlerStub) IsFlagEnabledInEpoch added in v1.4.89

func (stub *EnableEpochsHandlerStub) IsFlagEnabledInEpoch(flag core.EnableEpochFlag, epoch uint32) bool

IsFlagEnabledInEpoch -

func (*EnableEpochsHandlerStub) IsInterfaceNil

func (stub *EnableEpochsHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

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