Documentation ¶
Index ¶
- Constants
- func NewMockWorldVM14() *worldmock.MockWorld
- type BlockchainContextMock
- func (b *BlockchainContextMock) AccountExists(_ []byte) bool
- func (b *BlockchainContextMock) BlockHash(_ int64) []byte
- func (b *BlockchainContextMock) ClearCompiledCodes()
- func (b *BlockchainContextMock) ClearStateStack()
- func (b *BlockchainContextMock) CurrentEpoch() uint32
- func (b *BlockchainContextMock) CurrentNonce() uint64
- func (b *BlockchainContextMock) CurrentRandomSeed() []byte
- func (b *BlockchainContextMock) CurrentRound() uint64
- func (b *BlockchainContextMock) CurrentTimeStamp() uint64
- func (b *BlockchainContextMock) GetBalance(_ []byte) []byte
- func (b *BlockchainContextMock) GetBalanceBigInt(_ []byte) *big.Int
- func (b *BlockchainContextMock) GetCode(addr []byte) ([]byte, error)
- func (b *BlockchainContextMock) GetCodeHash(addr []byte) []byte
- func (b *BlockchainContextMock) GetCodeSize(_ []byte) (int32, error)
- func (b *BlockchainContextMock) GetCompiledCode(_ []byte) (bool, []byte)
- func (b *BlockchainContextMock) GetESDTToken(_ []byte, _ []byte, _ uint64) (*esdt.ESDigitalToken, error)
- func (b *BlockchainContextMock) GetNonce(_ []byte) (uint64, error)
- func (b *BlockchainContextMock) GetOwnerAddress() ([]byte, error)
- func (b *BlockchainContextMock) GetShardOfAddress(_ []byte) uint32
- func (b *BlockchainContextMock) GetSnapshot() int
- func (b *BlockchainContextMock) GetStateRootHash() []byte
- func (b *BlockchainContextMock) GetUserAccount(_ []byte) (vmcommon.UserAccountHandler, error)
- func (b *BlockchainContextMock) IncreaseNonce(_ []byte)
- func (b *BlockchainContextMock) InitState()
- func (b *BlockchainContextMock) IsLimitedTransfer(_ []byte) bool
- func (b *BlockchainContextMock) IsPaused(_ []byte) bool
- func (b *BlockchainContextMock) IsPayable(_, _ []byte) (bool, error)
- func (b *BlockchainContextMock) IsSmartContract(_ []byte) bool
- func (b *BlockchainContextMock) LastEpoch() uint32
- func (b *BlockchainContextMock) LastNonce() uint64
- func (b *BlockchainContextMock) LastRandomSeed() []byte
- func (b *BlockchainContextMock) LastRound() uint64
- func (b *BlockchainContextMock) LastTimeStamp() uint64
- func (b *BlockchainContextMock) NewAddress(creatorAddress []byte) ([]byte, error)
- func (b *BlockchainContextMock) PopDiscard()
- func (b *BlockchainContextMock) PopSetActiveState()
- func (b *BlockchainContextMock) ProcessBuiltInFunction(_ *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
- func (b *BlockchainContextMock) PushState()
- func (b *BlockchainContextMock) RevertToSnapshot(_ int)
- func (b *BlockchainContextMock) SaveCompiledCode(_ []byte, _ []byte)
- type BuiltInFunctionStub
- func (b *BuiltInFunctionStub) IsActive() bool
- func (b *BuiltInFunctionStub) IsInterfaceNil() bool
- func (b *BuiltInFunctionStub) ProcessBuiltinFunction(acntSnd, acntDst vmcommon.UserAccountHandler, ...) (*vmcommon.VMOutput, error)
- func (b *BuiltInFunctionStub) SetNewGasConfig(gasCost *vmcommon.GasCost)
- type EnableEpochsHandlerStub
- func (stub *EnableEpochsHandlerStub) GetActivationEpoch(flag core.EnableEpochFlag) uint32
- func (stub *EnableEpochsHandlerStub) IsFlagDefined(flag core.EnableEpochFlag) bool
- func (stub *EnableEpochsHandlerStub) IsFlagEnabled(flag core.EnableEpochFlag) bool
- func (stub *EnableEpochsHandlerStub) IsFlagEnabledInEpoch(flag core.EnableEpochFlag, epoch uint32) bool
- func (stub *EnableEpochsHandlerStub) IsInterfaceNil() bool
- type EpochNotifierStub
Constants ¶
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
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) 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) 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) 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 -