Documentation ¶
Index ¶
- Variables
- func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
- func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
- type Account
- func (a *Account) AccountDataHandler() vmcommon.AccountDataHandler
- func (a *Account) AddToBalance(value *big.Int) error
- func (a *Account) AddToDeveloperReward(value *big.Int)
- func (a *Account) AddressBytes() []byte
- func (a *Account) ChangeOwnerAddress(sender []byte, newAddress []byte) error
- func (a *Account) ClaimDeveloperRewards(sender []byte) (*big.Int, error)
- func (a *Account) ClearDataCaches()
- func (a *Account) Clone() *Account
- func (a *Account) DirtyData() map[string][]byte
- func (a *Account) GetBalance() *big.Int
- func (a *Account) GetCode() []byte
- func (a *Account) GetCodeHash() []byte
- func (a *Account) GetCodeMetadata() []byte
- func (a *Account) GetDeveloperReward() *big.Int
- func (a *Account) GetNonce() uint64
- func (a *Account) GetOwnerAddress() []byte
- func (a *Account) GetRootHash() []byte
- func (a *Account) GetUserName() []byte
- func (a *Account) IncreaseNonce(nonce uint64)
- func (a *Account) IsInterfaceNil() bool
- func (a *Account) MigrateDataTrieLeaves(args vmcommon.ArgsMigrateDataTrieLeaves) error
- func (a *Account) RetrieveValue(key []byte) ([]byte, uint32, error)
- func (a *Account) SaveKeyValue(key []byte, value []byte) error
- func (a *Account) SetBalance(balance int64)
- func (a *Account) SetCode(code []byte)
- func (a *Account) SetCodeAndMetadata(code []byte, codeMetadata *vmcommon.CodeMetadata)
- func (a *Account) SetCodeHash(hash []byte)
- func (a *Account) SetCodeMetadata(codeMetadata []byte)
- func (a *Account) SetOwnerAddress(address []byte)
- func (a *Account) SetRootHash(hash []byte)
- func (a *Account) SetUserName(userName []byte)
- func (a *Account) StorageValue(key string) []byte
- func (a *Account) SubFromBalance(value *big.Int) error
- type AccountWrapMock
- func (awm *AccountWrapMock) AccountDataHandler() vmcommon.AccountDataHandler
- func (awm *AccountWrapMock) AddToBalance(_ *big.Int) error
- func (awm *AccountWrapMock) AddToDeveloperReward(_ *big.Int)
- func (awm *AccountWrapMock) AddressBytes() []byte
- func (awm *AccountWrapMock) ChangeOwnerAddress([]byte, []byte) error
- func (awm *AccountWrapMock) ClaimDeveloperRewards([]byte) (*big.Int, error)
- func (awm *AccountWrapMock) ClearDataCaches()
- func (awm *AccountWrapMock) DirtyData() map[string][]byte
- func (awm *AccountWrapMock) GetBalance() *big.Int
- func (awm *AccountWrapMock) GetCodeHash() []byte
- func (awm *AccountWrapMock) GetCodeMetadata() []byte
- func (awm *AccountWrapMock) GetDeveloperReward() *big.Int
- func (awm *AccountWrapMock) GetNonce() uint64
- func (awm *AccountWrapMock) GetOwnerAddress() []byte
- func (awm *AccountWrapMock) GetRootHash() []byte
- func (awm *AccountWrapMock) GetUserName() []byte
- func (awm *AccountWrapMock) HasNewCode() bool
- func (awm *AccountWrapMock) IncreaseNonce(val uint64)
- func (awm *AccountWrapMock) IsInterfaceNil() bool
- func (awm *AccountWrapMock) MigrateDataTrieLeaves(_ vmcommon.ArgsMigrateDataTrieLeaves) error
- func (awm *AccountWrapMock) RetrieveValue(key []byte) ([]byte, uint32, error)
- func (awm *AccountWrapMock) SaveKeyValue(key []byte, value []byte) error
- func (awm *AccountWrapMock) SetCode(code []byte)
- func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
- func (awm *AccountWrapMock) SetCodeMetadata(codeMetadata []byte)
- func (awm *AccountWrapMock) SetOwnerAddress([]byte)
- func (awm *AccountWrapMock) SetRootHash(rootHash []byte)
- func (awm *AccountWrapMock) SetUserName(_ []byte)
- func (awm *AccountWrapMock) SubFromBalance(_ *big.Int) error
- type AccountsStub
- func (as *AccountsStub) Commit() ([]byte, error)
- func (as *AccountsStub) GetCode(codeHash []byte) []byte
- func (as *AccountsStub) GetExistingAccount(address []byte) (vmcommon.AccountHandler, error)
- func (as *AccountsStub) IsInterfaceNil() bool
- func (as *AccountsStub) IsPruningEnabled() bool
- func (as *AccountsStub) JournalLen() int
- func (as *AccountsStub) LoadAccount(address []byte) (vmcommon.AccountHandler, error)
- func (as *AccountsStub) RemoveAccount(address []byte) error
- func (as *AccountsStub) RevertToSnapshot(snapshot int) error
- func (as *AccountsStub) RootHash() ([]byte, error)
- func (as *AccountsStub) SaveAccount(account vmcommon.AccountHandler) error
- func (as *AccountsStub) SetStateCheckpoint(rootHash []byte, _ context.Context)
- func (as *AccountsStub) SnapshotState(rootHash []byte, _ context.Context)
- type BlockChainEpochHookStub
- 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 DCTNFTStorageHandlerStub
- func (stub *DCTNFTStorageHandlerStub) AddToLiquiditySystemAcc(dctTokenKey []byte, nonce uint64, transferValue *big.Int) error
- func (stub *DCTNFTStorageHandlerStub) GetDCTNFTTokenOnDestination(acnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64) (*dct.DCToken, bool, error)
- func (stub *DCTNFTStorageHandlerStub) GetDCTNFTTokenOnDestinationWithCustomSystemAccount(accnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64, ...) (*dct.DCToken, bool, error)
- func (stub *DCTNFTStorageHandlerStub) GetDCTNFTTokenOnSender(acnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64) (*dct.DCToken, error)
- func (stub *DCTNFTStorageHandlerStub) IsInterfaceNil() bool
- func (stub *DCTNFTStorageHandlerStub) SaveDCTNFTToken(senderAddress []byte, acnt vmcommon.UserAccountHandler, dctTokenKey []byte, ...) ([]byte, error)
- func (stub *DCTNFTStorageHandlerStub) SaveNFTMetaDataToSystemAccount(tx data.TransactionHandler) error
- func (stub *DCTNFTStorageHandlerStub) WasAlreadySentToDestinationShardAndUpdateState(tickerID []byte, nonce uint64, dstAddress []byte) (bool, error)
- type DCTRoleHandlerStub
- type DataTrieTrackerStub
- func (dtts *DataTrieTrackerStub) ClearDataCaches()
- func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte
- func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
- func (dtts *DataTrieTrackerStub) MigrateDataTrieLeaves(args vmcommon.ArgsMigrateDataTrieLeaves) error
- func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, uint32, error)
- func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte) error
- type EnableEpochsHandlerStub
- func (stub *EnableEpochsHandlerStub) CheckExecuteReadOnlyEnableEpoch() uint32
- func (stub *EnableEpochsHandlerStub) CreateNFTThroughExecByCallerEnableEpoch() uint32
- func (stub *EnableEpochsHandlerStub) DisableExecByCallerEnableEpoch() uint32
- func (stub *EnableEpochsHandlerStub) FixFailExecutionOnErrorEnableEpoch() uint32
- func (stub *EnableEpochsHandlerStub) FixGasRemainingForSaveKeyValueBuiltinFunctionEnabled() bool
- func (stub *EnableEpochsHandlerStub) FixOOGReturnCodeEnableEpoch() uint32
- func (stub *EnableEpochsHandlerStub) IsAheadOfTimeGasUsageFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsAlwaysSaveTokenMetaDataEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsAutoBalanceDataTriesEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsBuiltInFunctionsFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsChangeOwnerAddressCrossShardThroughSCEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsChangeUsernameEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsCheckCorrectTokenIDForTransferRoleFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsCheckExecuteOnReadOnlyFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsCheckFrozenCollectionFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsCheckFunctionArgumentFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsCheckTransferFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsConsistentTokensValuesLengthCheckEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsCreateNFTThroughExecByCallerFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsDCTNFTImprovementV1FlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsDCTTransferRoleFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsDisableExecByCallerFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsDynamicGasCostForDataTrieStorageLoadEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsFailExecutionOnEveryAPIErrorFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsFixAsyncCallbackCheckFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsFixOOGReturnCodeFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsFixOldTokenLiquidityEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsGlobalMintBurnFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsInterfaceNil() bool
- func (stub *EnableEpochsHandlerStub) IsManagedCryptoAPIsFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsMaxBlockchainHookCountersFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsMigrateDataTrieEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsMultiDCTTransferFixOnCallBackFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsRefactorContextFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsRemoveNonUpdatedStorageFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsRepairCallbackFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsRuntimeCodeSizeFixEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsRuntimeMemStoreLimitEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsSCDeployFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsSaveToSystemAccountFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsScToScEventLogEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsSendAlwaysFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsSetGuardianEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsStorageAPICostOptimizationFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsTransferToMetaFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsValueLengthCheckFlagEnabled() bool
- func (stub *EnableEpochsHandlerStub) IsWipeSingleNFTLiquidityDecreaseEnabled() bool
- func (stub *EnableEpochsHandlerStub) ManagedCryptoAPIEnableEpoch() uint32
- func (stub *EnableEpochsHandlerStub) MultiDCTTransferAsyncCallBackEnableEpoch() uint32
- func (stub *EnableEpochsHandlerStub) RefactorContextEnableEpoch() uint32
- func (stub *EnableEpochsHandlerStub) RemoveNonUpdatedStorageEnableEpoch() uint32
- func (stub *EnableEpochsHandlerStub) StorageAPICostOptimizationEnableEpoch() uint32
- type GlobalSettingsHandlerStub
- func (p *GlobalSettingsHandlerStub) IsBurnForAll(token []byte) bool
- func (p *GlobalSettingsHandlerStub) IsInterfaceNil() bool
- func (p *GlobalSettingsHandlerStub) IsLimitedTransfer(token []byte) bool
- func (p *GlobalSettingsHandlerStub) IsPaused(token []byte) bool
- func (p *GlobalSettingsHandlerStub) IsSenderOrDestinationWithTransferRole(sender, destination, tokenID []byte) bool
- type GuardedAccountHandlerStub
- func (gahs *GuardedAccountHandlerStub) CleanOtherThanActive(uah vmcommon.UserAccountHandler)
- func (gahs *GuardedAccountHandlerStub) GetActiveGuardian(handler vmcommon.UserAccountHandler) ([]byte, error)
- func (gahs *GuardedAccountHandlerStub) IsInterfaceNil() bool
- func (gahs *GuardedAccountHandlerStub) SetGuardian(uah vmcommon.UserAccountHandler, guardianAddress []byte, ...) error
- type MarshalizerMock
- type PayableHandlerStub
- func (p *PayableHandlerStub) CheckPayable(vmInput *vmcommon.ContractCallInput, dstAddress []byte, minArgs int) error
- func (p *PayableHandlerStub) DetermineIsSCCallAfter(vmInput *vmcommon.ContractCallInput, dstAddress []byte, minArgs int) bool
- func (p *PayableHandlerStub) IsInterfaceNil() bool
- func (p *PayableHandlerStub) IsPayable(_, address []byte) (bool, error)
- type ShardCoordinatorStub
- func (coordinator *ShardCoordinatorStub) CommunicationIdentifier(destShardID uint32) string
- func (coordinator *ShardCoordinatorStub) ComputeId(address []byte) uint32
- func (coordinator *ShardCoordinatorStub) IsInterfaceNil() bool
- func (coordinator *ShardCoordinatorStub) NumberOfShards() uint32
- func (coordinator *ShardCoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
- func (coordinator *ShardCoordinatorStub) SelfId() uint32
- type UserAccountStub
- func (u *UserAccountStub) AccountDataHandler() vmcommon.AccountDataHandler
- func (u *UserAccountStub) AddToBalance(value *big.Int) error
- func (u *UserAccountStub) AddToDeveloperReward(_ *big.Int)
- func (u *UserAccountStub) AddressBytes() []byte
- func (u *UserAccountStub) ChangeOwnerAddress([]byte, []byte) error
- func (u *UserAccountStub) ClaimDeveloperRewards([]byte) (*big.Int, error)
- func (u *UserAccountStub) GetBalance() *big.Int
- func (u *UserAccountStub) GetCodeHash() []byte
- func (u *UserAccountStub) GetCodeMetadata() []byte
- func (u *UserAccountStub) GetDeveloperReward() *big.Int
- func (u *UserAccountStub) GetNonce() uint64
- func (u *UserAccountStub) GetOwnerAddress() []byte
- func (u *UserAccountStub) GetRootHash() []byte
- func (u *UserAccountStub) GetUserName() []byte
- func (u *UserAccountStub) HasNewCode() bool
- func (u *UserAccountStub) IncreaseNonce(_ uint64)
- func (u *UserAccountStub) IsInterfaceNil() bool
- func (u *UserAccountStub) SetCode(_ []byte)
- func (u *UserAccountStub) SetCodeHash(_ []byte)
- func (u *UserAccountStub) SetCodeMetadata(codeMetaData []byte)
- func (u *UserAccountStub) SetOwnerAddress([]byte)
- func (u *UserAccountStub) SetRootHash(_ []byte)
- func (u *UserAccountStub) SetUserName(_ []byte)
- func (u *UserAccountStub) SubFromBalance(_ *big.Int) error
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidAddressLength = errors.New("invalid address length")
ErrInvalidAddressLength indicates an incorrect length given for an address.
var ErrOperationNotPermitted = errors.New("operation not permitted")
ErrOperationNotPermitted indicates an operation rejected due to insufficient permissions.
Functions ¶
func NewMultiShardsCoordinatorMock ¶
func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func NewMultipleShardsCoordinatorMock ¶
func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
NewMultipleShardsCoordinatorMock -
Types ¶
type Account ¶
type Account struct { Address []byte Nonce uint64 Balance *big.Int Storage map[string][]byte RootHash []byte Code []byte CodeHash []byte CodeMetadata []byte OwnerAddress []byte Username []byte DeveloperReward *big.Int }
Account holds the account info
func NewUserAccount ¶
func (*Account) AccountDataHandler ¶
func (a *Account) AccountDataHandler() vmcommon.AccountDataHandler
AccountDataHandler -
func (*Account) AddToDeveloperReward ¶
AddToDeveloperReward -
func (*Account) ChangeOwnerAddress ¶
ChangeOwnerAddress -
func (*Account) ClaimDeveloperRewards ¶
ClaimDeveloperRewards -
func (*Account) GetDeveloperReward ¶
GetDeveloperReward -
func (*Account) MigrateDataTrieLeaves ¶ added in v0.1.5
func (a *Account) MigrateDataTrieLeaves(args vmcommon.ArgsMigrateDataTrieLeaves) error
MigrateDataTrieLeaves -
func (*Account) RetrieveValue ¶
RetrieveValue -
func (*Account) SaveKeyValue ¶
SaveKeyValue -
func (*Account) SetCodeAndMetadata ¶
func (a *Account) SetCodeAndMetadata(code []byte, codeMetadata *vmcommon.CodeMetadata)
SetCodeAndMetadata changes the account code, as well as all fields depending on it: CodeHash, IsSmartContract, CodeMetadata. The code metadata must be given explicitly.
func (*Account) SetCodeMetadata ¶
SetCodeMetadata -
func (*Account) SetOwnerAddress ¶
SetOwnerAddress -
func (*Account) StorageValue ¶
StorageValue yields the storage value for key, default 0
type AccountWrapMock ¶
type AccountWrapMock struct { MockValue int SetNonceWithJournalCalled func(nonce uint64) error `json:"-"` SetCodeHashWithJournalCalled func(codeHash []byte) error `json:"-"` SetCodeWithJournalCalled func(codeHash []byte) error `json:"-"` RetrieveValueCalled func(key []byte) ([]byte, uint32, error) // contains filtered or unexported fields }
AccountWrapMock -
func (*AccountWrapMock) AccountDataHandler ¶
func (awm *AccountWrapMock) AccountDataHandler() vmcommon.AccountDataHandler
AccountDataHandler -
func (*AccountWrapMock) AddToBalance ¶
func (awm *AccountWrapMock) AddToBalance(_ *big.Int) error
AddToBalance -
func (*AccountWrapMock) AddToDeveloperReward ¶
func (awm *AccountWrapMock) AddToDeveloperReward(_ *big.Int)
AddToDeveloperReward -
func (*AccountWrapMock) AddressBytes ¶
func (awm *AccountWrapMock) AddressBytes() []byte
AddressBytes -
func (*AccountWrapMock) ChangeOwnerAddress ¶
func (awm *AccountWrapMock) ChangeOwnerAddress([]byte, []byte) error
ChangeOwnerAddress -
func (*AccountWrapMock) ClaimDeveloperRewards ¶
func (awm *AccountWrapMock) ClaimDeveloperRewards([]byte) (*big.Int, error)
ClaimDeveloperRewards -
func (*AccountWrapMock) ClearDataCaches ¶
func (awm *AccountWrapMock) ClearDataCaches()
ClearDataCaches -
func (*AccountWrapMock) DirtyData ¶
func (awm *AccountWrapMock) DirtyData() map[string][]byte
DirtyData -
func (*AccountWrapMock) GetCodeHash ¶
func (awm *AccountWrapMock) GetCodeHash() []byte
GetCodeHash -
func (*AccountWrapMock) GetCodeMetadata ¶
func (awm *AccountWrapMock) GetCodeMetadata() []byte
GetCodeMetadata -
func (*AccountWrapMock) GetDeveloperReward ¶
func (awm *AccountWrapMock) GetDeveloperReward() *big.Int
GetDeveloperReward -
func (*AccountWrapMock) GetOwnerAddress ¶
func (awm *AccountWrapMock) GetOwnerAddress() []byte
GetOwnerAddress -
func (*AccountWrapMock) GetRootHash ¶
func (awm *AccountWrapMock) GetRootHash() []byte
GetRootHash -
func (*AccountWrapMock) GetUserName ¶
func (awm *AccountWrapMock) GetUserName() []byte
GetUserName -
func (*AccountWrapMock) IncreaseNonce ¶
func (awm *AccountWrapMock) IncreaseNonce(val uint64)
IncreaseNonce -
func (*AccountWrapMock) IsInterfaceNil ¶
func (awm *AccountWrapMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*AccountWrapMock) MigrateDataTrieLeaves ¶ added in v0.1.5
func (awm *AccountWrapMock) MigrateDataTrieLeaves(_ vmcommon.ArgsMigrateDataTrieLeaves) error
MigrateDataTrieLeaves -
func (*AccountWrapMock) RetrieveValue ¶
func (awm *AccountWrapMock) RetrieveValue(key []byte) ([]byte, uint32, error)
RetrieveValue -
func (*AccountWrapMock) SaveKeyValue ¶
func (awm *AccountWrapMock) SaveKeyValue(key []byte, value []byte) error
SaveKeyValue -
func (*AccountWrapMock) SetCodeHash ¶
func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
SetCodeHash -
func (*AccountWrapMock) SetCodeMetadata ¶
func (awm *AccountWrapMock) SetCodeMetadata(codeMetadata []byte)
SetCodeMetadata -
func (*AccountWrapMock) SetOwnerAddress ¶
func (awm *AccountWrapMock) SetOwnerAddress([]byte)
SetOwnerAddress -
func (*AccountWrapMock) SetRootHash ¶
func (awm *AccountWrapMock) SetRootHash(rootHash []byte)
SetRootHash -
func (*AccountWrapMock) SetUserName ¶
func (awm *AccountWrapMock) SetUserName(_ []byte)
SetUserName -
func (*AccountWrapMock) SubFromBalance ¶
func (awm *AccountWrapMock) SubFromBalance(_ *big.Int) error
SubFromBalance -
type AccountsStub ¶
type AccountsStub struct { GetExistingAccountCalled func(address []byte) (vmcommon.AccountHandler, error) LoadAccountCalled func(address []byte) (vmcommon.AccountHandler, error) SaveAccountCalled func(account vmcommon.AccountHandler) error RemoveAccountCalled func(address []byte) error CommitCalled func() ([]byte, error) JournalLenCalled func() int RevertToSnapshotCalled func(snapshot int) error RootHashCalled func() ([]byte, error) RecreateTrieCalled func(rootHash []byte) error SnapshotStateCalled func(rootHash []byte) SetStateCheckpointCalled func(rootHash []byte) IsPruningEnabledCalled func() bool GetCodeCalled func([]byte) []byte }
AccountsStub -
func (*AccountsStub) GetExistingAccount ¶
func (as *AccountsStub) GetExistingAccount(address []byte) (vmcommon.AccountHandler, error)
GetExistingAccount -
func (*AccountsStub) IsInterfaceNil ¶
func (as *AccountsStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AccountsStub) IsPruningEnabled ¶
func (as *AccountsStub) IsPruningEnabled() bool
IsPruningEnabled -
func (*AccountsStub) LoadAccount ¶
func (as *AccountsStub) LoadAccount(address []byte) (vmcommon.AccountHandler, error)
LoadAccount -
func (*AccountsStub) RemoveAccount ¶
func (as *AccountsStub) RemoveAccount(address []byte) error
RemoveAccount -
func (*AccountsStub) RevertToSnapshot ¶
func (as *AccountsStub) RevertToSnapshot(snapshot int) error
RevertToSnapshot -
func (*AccountsStub) SaveAccount ¶
func (as *AccountsStub) SaveAccount(account vmcommon.AccountHandler) error
SaveAccount -
func (*AccountsStub) SetStateCheckpoint ¶
func (as *AccountsStub) SetStateCheckpoint(rootHash []byte, _ context.Context)
SetStateCheckpoint -
func (*AccountsStub) SnapshotState ¶
func (as *AccountsStub) SnapshotState(rootHash []byte, _ context.Context)
SnapshotState -
type BlockChainEpochHookStub ¶ added in v0.1.2
type BlockChainEpochHookStub struct {
CurrentEpochCalled func() uint32
}
BlockChainEpochHookStub -
func (*BlockChainEpochHookStub) CurrentEpoch ¶ added in v0.1.2
func (b *BlockChainEpochHookStub) CurrentEpoch() uint32
CurrentEpoch -
func (*BlockChainEpochHookStub) IsInterfaceNil ¶ added in v0.1.2
func (b *BlockChainEpochHookStub) IsInterfaceNil() bool
IsInterfaceNil -
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 DCTNFTStorageHandlerStub ¶ added in v0.0.9
type DCTNFTStorageHandlerStub struct { SaveDCTNFTTokenCalled func(senderAddress []byte, acnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64, dctData *dct.DCToken, mustUpdateAllFields bool, isReturnWithError bool) ([]byte, error) GetDCTNFTTokenOnSenderCalled func(acnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64) (*dct.DCToken, error) GetDCTNFTTokenOnDestinationCalled func(acnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64) (*dct.DCToken, bool, error) GetDCTNFTTokenOnDestinationWithCustomSystemAccountCalled func(accnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64, systemAccount vmcommon.UserAccountHandler) (*dct.DCToken, bool, error) WasAlreadySentToDestinationShardAndUpdateStateCalled func(tickerID []byte, nonce uint64, dstAddress []byte) (bool, error) SaveNFTMetaDataToSystemAccountCalled func(tx data.TransactionHandler) error AddToLiquiditySystemAccCalled func(dctTokenKey []byte, nonce uint64, transferValue *big.Int) error }
DCTNFTStorageHandlerStub -
func (*DCTNFTStorageHandlerStub) AddToLiquiditySystemAcc ¶ added in v0.0.9
func (stub *DCTNFTStorageHandlerStub) AddToLiquiditySystemAcc(dctTokenKey []byte, nonce uint64, transferValue *big.Int) error
AddToLiquiditySystemAcc -
func (*DCTNFTStorageHandlerStub) GetDCTNFTTokenOnDestination ¶ added in v0.0.9
func (stub *DCTNFTStorageHandlerStub) GetDCTNFTTokenOnDestination(acnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64) (*dct.DCToken, bool, error)
GetDCTNFTTokenOnDestination -
func (*DCTNFTStorageHandlerStub) GetDCTNFTTokenOnDestinationWithCustomSystemAccount ¶ added in v0.0.9
func (stub *DCTNFTStorageHandlerStub) GetDCTNFTTokenOnDestinationWithCustomSystemAccount(accnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64, systemAccount vmcommon.UserAccountHandler) (*dct.DCToken, bool, error)
GetDCTNFTTokenOnDestinationWithCustomSystemAccount -
func (*DCTNFTStorageHandlerStub) GetDCTNFTTokenOnSender ¶ added in v0.0.9
func (stub *DCTNFTStorageHandlerStub) GetDCTNFTTokenOnSender(acnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64) (*dct.DCToken, error)
GetDCTNFTTokenOnSender -
func (*DCTNFTStorageHandlerStub) IsInterfaceNil ¶ added in v0.0.9
func (stub *DCTNFTStorageHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*DCTNFTStorageHandlerStub) SaveDCTNFTToken ¶ added in v0.0.9
func (stub *DCTNFTStorageHandlerStub) SaveDCTNFTToken(senderAddress []byte, acnt vmcommon.UserAccountHandler, dctTokenKey []byte, nonce uint64, dctData *dct.DCToken, mustUpdateAllFields bool, isReturnWithError bool) ([]byte, error)
SaveDCTNFTToken -
func (*DCTNFTStorageHandlerStub) SaveNFTMetaDataToSystemAccount ¶ added in v0.0.9
func (stub *DCTNFTStorageHandlerStub) SaveNFTMetaDataToSystemAccount(tx data.TransactionHandler) error
SaveNFTMetaDataToSystemAccount -
func (*DCTNFTStorageHandlerStub) WasAlreadySentToDestinationShardAndUpdateState ¶ added in v0.0.9
func (stub *DCTNFTStorageHandlerStub) WasAlreadySentToDestinationShardAndUpdateState(tickerID []byte, nonce uint64, dstAddress []byte) (bool, error)
WasAlreadySentToDestinationShardAndUpdateState -
type DCTRoleHandlerStub ¶
type DCTRoleHandlerStub struct {
CheckAllowedToExecuteCalled func(account vmcommon.UserAccountHandler, tokenID []byte, action []byte) error
}
DCTRoleHandlerStub -
func (*DCTRoleHandlerStub) CheckAllowedToExecute ¶
func (e *DCTRoleHandlerStub) CheckAllowedToExecute(account vmcommon.UserAccountHandler, tokenID []byte, action []byte) error
CheckAllowedToExecute -
func (*DCTRoleHandlerStub) IsInterfaceNil ¶
func (e *DCTRoleHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type DataTrieTrackerStub ¶
type DataTrieTrackerStub struct { ClearDataCachesCalled func() DirtyDataCalled func() map[string][]byte RetrieveValueCalled func(key []byte) ([]byte, uint32, error) SaveKeyValueCalled func(key []byte, value []byte) error MigrateDataTrieLeavesCalled func(args vmcommon.ArgsMigrateDataTrieLeaves) error }
DataTrieTrackerStub -
func (*DataTrieTrackerStub) ClearDataCaches ¶
func (dtts *DataTrieTrackerStub) ClearDataCaches()
ClearDataCaches -
func (*DataTrieTrackerStub) DirtyData ¶
func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte
DirtyData -
func (*DataTrieTrackerStub) IsInterfaceNil ¶
func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*DataTrieTrackerStub) MigrateDataTrieLeaves ¶ added in v0.1.5
func (dtts *DataTrieTrackerStub) MigrateDataTrieLeaves(args vmcommon.ArgsMigrateDataTrieLeaves) error
MigrateDataTrieLeaves -
func (*DataTrieTrackerStub) RetrieveValue ¶
func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, uint32, error)
RetrieveValue -
func (*DataTrieTrackerStub) SaveKeyValue ¶
func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte) error
SaveKeyValue -
type EnableEpochsHandlerStub ¶ added in v0.0.9
type EnableEpochsHandlerStub struct { IsGlobalMintBurnFlagEnabledField bool IsDCTTransferRoleFlagEnabledField bool IsBuiltInFunctionsFlagEnabledField bool IsCheckCorrectTokenIDForTransferRoleFlagEnabledField bool IsMultiDCTTransferFixOnCallBackFlagEnabledField 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 IsDCTNFTImprovementV1FlagEnabledField bool IsFixOldTokenLiquidityEnabledField bool IsRuntimeMemStoreLimitEnabledField bool IsRuntimeCodeSizeFixEnabledField bool IsMaxBlockchainHookCountersFlagEnabledField bool IsWipeSingleNFTLiquidityDecreaseEnabledField bool IsAlwaysSaveTokenMetaDataEnabledField bool IsChangeUsernameEnabledEpochField bool IsDynamicGasCostForDataTrieStorageLoadEnabledField bool IsSetGuardianEnabledField bool IsScToScEventLogEnabledField bool IsConsistentTokensValuesLengthCheckEnabledField bool IsAutoBalanceDataTriesEnabledField bool IsMigrateDataTrieEnabledField bool IsChangeOwnerAddressCrossShardThroughSCEnabledField bool FixGasRemainingForSaveKeyValueBuiltinFunctionEnabledField bool MultiDCTTransferAsyncCallBackEnableEpochField uint32 FixOOGReturnCodeEnableEpochField uint32 RemoveNonUpdatedStorageEnableEpochField uint32 CreateNFTThroughExecByCallerEnableEpochField uint32 UseDifferentGasCostForReadingCachedStorageEpochField uint32 FixFailExecutionOnErrorEnableEpochField uint32 TimeOutForSCExecutionInMillisecondsField uint32 ManagedCryptoAPIEnableEpochField uint32 DisableExecByCallerEnableEpochField uint32 RefactorContextEnableEpochField uint32 CheckExecuteReadOnlyEnableEpochField uint32 StorageAPICostOptimizationEnableEpochField uint32 }
EnableEpochsHandlerStub -
func (*EnableEpochsHandlerStub) CheckExecuteReadOnlyEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) CheckExecuteReadOnlyEnableEpoch() uint32
CheckExecuteReadOnlyEnableEpoch -
func (*EnableEpochsHandlerStub) CreateNFTThroughExecByCallerEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) CreateNFTThroughExecByCallerEnableEpoch() uint32
CreateNFTThroughExecByCallerEnableEpoch -
func (*EnableEpochsHandlerStub) DisableExecByCallerEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) DisableExecByCallerEnableEpoch() uint32
DisableExecByCallerEnableEpoch -
func (*EnableEpochsHandlerStub) FixFailExecutionOnErrorEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) FixFailExecutionOnErrorEnableEpoch() uint32
FixFailExecutionOnErrorEnableEpoch -
func (*EnableEpochsHandlerStub) FixGasRemainingForSaveKeyValueBuiltinFunctionEnabled ¶ added in v0.1.9
func (stub *EnableEpochsHandlerStub) FixGasRemainingForSaveKeyValueBuiltinFunctionEnabled() bool
FixGasRemainingForSaveKeyValueBuiltinFunctionEnabled -
func (*EnableEpochsHandlerStub) FixOOGReturnCodeEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) FixOOGReturnCodeEnableEpoch() uint32
FixOOGReturnCodeEnableEpoch -
func (*EnableEpochsHandlerStub) IsAheadOfTimeGasUsageFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsAheadOfTimeGasUsageFlagEnabled() bool
IsAheadOfTimeGasUsageFlagEnabled -
func (*EnableEpochsHandlerStub) IsAlwaysSaveTokenMetaDataEnabled ¶ added in v0.1.0
func (stub *EnableEpochsHandlerStub) IsAlwaysSaveTokenMetaDataEnabled() bool
IsAlwaysSaveTokenMetaDataEnabled -
func (*EnableEpochsHandlerStub) IsAutoBalanceDataTriesEnabled ¶ added in v0.1.5
func (stub *EnableEpochsHandlerStub) IsAutoBalanceDataTriesEnabled() bool
IsAutoBalanceDataTriesEnabled -
func (*EnableEpochsHandlerStub) IsBuiltInFunctionsFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsBuiltInFunctionsFlagEnabled() bool
IsBuiltInFunctionsFlagEnabled -
func (*EnableEpochsHandlerStub) IsChangeOwnerAddressCrossShardThroughSCEnabled ¶ added in v0.1.8
func (stub *EnableEpochsHandlerStub) IsChangeOwnerAddressCrossShardThroughSCEnabled() bool
IsChangeOwnerAddressCrossShardThroughSCEnabled -
func (*EnableEpochsHandlerStub) IsChangeUsernameEnabled ¶ added in v0.1.5
func (stub *EnableEpochsHandlerStub) IsChangeUsernameEnabled() bool
IsChangeUsernameEnabled -
func (*EnableEpochsHandlerStub) IsCheckCorrectTokenIDForTransferRoleFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsCheckCorrectTokenIDForTransferRoleFlagEnabled() bool
IsCheckCorrectTokenIDForTransferRoleFlagEnabled -
func (*EnableEpochsHandlerStub) IsCheckExecuteOnReadOnlyFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsCheckExecuteOnReadOnlyFlagEnabled() bool
IsCheckExecuteOnReadOnlyFlagEnabled -
func (*EnableEpochsHandlerStub) IsCheckFrozenCollectionFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsCheckFrozenCollectionFlagEnabled() bool
IsCheckFrozenCollectionFlagEnabled -
func (*EnableEpochsHandlerStub) IsCheckFunctionArgumentFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsCheckFunctionArgumentFlagEnabled() bool
IsCheckFunctionArgumentFlagEnabled -
func (*EnableEpochsHandlerStub) IsCheckTransferFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsCheckTransferFlagEnabled() bool
IsCheckTransferFlagEnabled -
func (*EnableEpochsHandlerStub) IsConsistentTokensValuesLengthCheckEnabled ¶ added in v0.1.5
func (stub *EnableEpochsHandlerStub) IsConsistentTokensValuesLengthCheckEnabled() bool
IsConsistentTokensValuesLengthCheckEnabled -
func (*EnableEpochsHandlerStub) IsCreateNFTThroughExecByCallerFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsCreateNFTThroughExecByCallerFlagEnabled() bool
IsCreateNFTThroughExecByCallerFlagEnabled -
func (*EnableEpochsHandlerStub) IsDCTNFTImprovementV1FlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsDCTNFTImprovementV1FlagEnabled() bool
IsDCTNFTImprovementV1FlagEnabled -
func (*EnableEpochsHandlerStub) IsDCTTransferRoleFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsDCTTransferRoleFlagEnabled() bool
IsDCTTransferRoleFlagEnabled -
func (*EnableEpochsHandlerStub) IsDisableExecByCallerFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsDisableExecByCallerFlagEnabled() bool
IsDisableExecByCallerFlagEnabled -
func (*EnableEpochsHandlerStub) IsDynamicGasCostForDataTrieStorageLoadEnabled ¶ added in v0.1.6
func (stub *EnableEpochsHandlerStub) IsDynamicGasCostForDataTrieStorageLoadEnabled() bool
IsDynamicGasCostForDataTrieStorageLoadEnabled -
func (*EnableEpochsHandlerStub) IsFailExecutionOnEveryAPIErrorFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsFailExecutionOnEveryAPIErrorFlagEnabled() bool
IsFailExecutionOnEveryAPIErrorFlagEnabled -
func (*EnableEpochsHandlerStub) IsFixAsyncCallbackCheckFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsFixAsyncCallbackCheckFlagEnabled() bool
IsFixAsyncCallbackCheckFlagEnabled -
func (*EnableEpochsHandlerStub) IsFixOOGReturnCodeFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsFixOOGReturnCodeFlagEnabled() bool
IsFixOOGReturnCodeFlagEnabled -
func (*EnableEpochsHandlerStub) IsFixOldTokenLiquidityEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsFixOldTokenLiquidityEnabled() bool
IsFixOldTokenLiquidityEnabled -
func (*EnableEpochsHandlerStub) IsGlobalMintBurnFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsGlobalMintBurnFlagEnabled() bool
IsGlobalMintBurnFlagEnabled -
func (*EnableEpochsHandlerStub) IsInterfaceNil ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EnableEpochsHandlerStub) IsManagedCryptoAPIsFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsManagedCryptoAPIsFlagEnabled() bool
IsManagedCryptoAPIsFlagEnabled -
func (*EnableEpochsHandlerStub) IsMaxBlockchainHookCountersFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsMaxBlockchainHookCountersFlagEnabled() bool
IsMaxBlockchainHookCountersFlagEnabled -
func (*EnableEpochsHandlerStub) IsMigrateDataTrieEnabled ¶ added in v0.2.1
func (stub *EnableEpochsHandlerStub) IsMigrateDataTrieEnabled() bool
IsMigrateDataTrieEnabled -
func (*EnableEpochsHandlerStub) IsMultiDCTTransferFixOnCallBackFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsMultiDCTTransferFixOnCallBackFlagEnabled() bool
IsMultiDCTTransferFixOnCallBackFlagEnabled -
func (*EnableEpochsHandlerStub) IsRefactorContextFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsRefactorContextFlagEnabled() bool
IsRefactorContextFlagEnabled -
func (*EnableEpochsHandlerStub) IsRemoveNonUpdatedStorageFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsRemoveNonUpdatedStorageFlagEnabled() bool
IsRemoveNonUpdatedStorageFlagEnabled -
func (*EnableEpochsHandlerStub) IsRepairCallbackFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsRepairCallbackFlagEnabled() bool
IsRepairCallbackFlagEnabled -
func (*EnableEpochsHandlerStub) IsRuntimeCodeSizeFixEnabled ¶ added in v0.1.1
func (stub *EnableEpochsHandlerStub) IsRuntimeCodeSizeFixEnabled() bool
IsRuntimeCodeSizeFixEnabled -
func (*EnableEpochsHandlerStub) IsRuntimeMemStoreLimitEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsRuntimeMemStoreLimitEnabled() bool
IsRuntimeMemStoreLimitEnabled -
func (*EnableEpochsHandlerStub) IsSCDeployFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsSCDeployFlagEnabled() bool
IsSCDeployFlagEnabled -
func (*EnableEpochsHandlerStub) IsSaveToSystemAccountFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsSaveToSystemAccountFlagEnabled() bool
IsSaveToSystemAccountFlagEnabled -
func (*EnableEpochsHandlerStub) IsScToScEventLogEnabled ¶ added in v0.1.6
func (stub *EnableEpochsHandlerStub) IsScToScEventLogEnabled() bool
IsScToScEventLogEnabled -
func (*EnableEpochsHandlerStub) IsSendAlwaysFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsSendAlwaysFlagEnabled() bool
IsSendAlwaysFlagEnabled -
func (*EnableEpochsHandlerStub) IsSetGuardianEnabled ¶ added in v0.1.2
func (stub *EnableEpochsHandlerStub) IsSetGuardianEnabled() bool
IsSetGuardianEnabled -
func (*EnableEpochsHandlerStub) IsStorageAPICostOptimizationFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsStorageAPICostOptimizationFlagEnabled() bool
IsStorageAPICostOptimizationFlagEnabled -
func (*EnableEpochsHandlerStub) IsTransferToMetaFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsTransferToMetaFlagEnabled() bool
IsTransferToMetaFlagEnabled -
func (*EnableEpochsHandlerStub) IsValueLengthCheckFlagEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsValueLengthCheckFlagEnabled() bool
IsValueLengthCheckFlagEnabled -
func (*EnableEpochsHandlerStub) IsWipeSingleNFTLiquidityDecreaseEnabled ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) IsWipeSingleNFTLiquidityDecreaseEnabled() bool
IsWipeSingleNFTLiquidityDecreaseEnabled -
func (*EnableEpochsHandlerStub) ManagedCryptoAPIEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) ManagedCryptoAPIEnableEpoch() uint32
ManagedCryptoAPIEnableEpoch -
func (*EnableEpochsHandlerStub) MultiDCTTransferAsyncCallBackEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) MultiDCTTransferAsyncCallBackEnableEpoch() uint32
MultiDCTTransferAsyncCallBackEnableEpoch -
func (*EnableEpochsHandlerStub) RefactorContextEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) RefactorContextEnableEpoch() uint32
RefactorContextEnableEpoch -
func (*EnableEpochsHandlerStub) RemoveNonUpdatedStorageEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) RemoveNonUpdatedStorageEnableEpoch() uint32
RemoveNonUpdatedStorageEnableEpoch -
func (*EnableEpochsHandlerStub) StorageAPICostOptimizationEnableEpoch ¶ added in v0.0.9
func (stub *EnableEpochsHandlerStub) StorageAPICostOptimizationEnableEpoch() uint32
StorageAPICostOptimizationEnableEpoch -
type GlobalSettingsHandlerStub ¶ added in v0.0.7
type GlobalSettingsHandlerStub struct { IsPausedCalled func(token []byte) bool IsLimiterTransferCalled func(token []byte) bool IsBurnForAllCalled func(token []byte) bool IsSenderOrDestinationWithTransferRoleCalled func(sender, destionation, tokenID []byte) bool }
GlobalSettingsHandlerStub -
func (*GlobalSettingsHandlerStub) IsBurnForAll ¶ added in v0.0.9
func (p *GlobalSettingsHandlerStub) IsBurnForAll(token []byte) bool
IsBurnForAll -
func (*GlobalSettingsHandlerStub) IsInterfaceNil ¶ added in v0.0.7
func (p *GlobalSettingsHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*GlobalSettingsHandlerStub) IsLimitedTransfer ¶ added in v0.0.7
func (p *GlobalSettingsHandlerStub) IsLimitedTransfer(token []byte) bool
IsLimitedTransfer -
func (*GlobalSettingsHandlerStub) IsPaused ¶ added in v0.0.7
func (p *GlobalSettingsHandlerStub) IsPaused(token []byte) bool
IsPaused -
func (*GlobalSettingsHandlerStub) IsSenderOrDestinationWithTransferRole ¶ added in v0.0.9
func (p *GlobalSettingsHandlerStub) IsSenderOrDestinationWithTransferRole(sender, destination, tokenID []byte) bool
IsSenderOrDestinationWithTransferRole -
type GuardedAccountHandlerStub ¶ added in v0.1.2
type GuardedAccountHandlerStub struct { GetActiveGuardianCalled func(handler vmcommon.UserAccountHandler) ([]byte, error) SetGuardianCalled func(uah vmcommon.UserAccountHandler, guardianAddress []byte, txGuardianAddress []byte, guardianServiceUID []byte) error CleanOtherThanActiveCalled func(uah vmcommon.UserAccountHandler) }
GuardedAccountHandlerStub -
func (*GuardedAccountHandlerStub) CleanOtherThanActive ¶ added in v0.1.2
func (gahs *GuardedAccountHandlerStub) CleanOtherThanActive(uah vmcommon.UserAccountHandler)
CleanOtherThanActive -
func (*GuardedAccountHandlerStub) GetActiveGuardian ¶ added in v0.1.2
func (gahs *GuardedAccountHandlerStub) GetActiveGuardian(handler vmcommon.UserAccountHandler) ([]byte, error)
GetActiveGuardian -
func (*GuardedAccountHandlerStub) IsInterfaceNil ¶ added in v0.1.2
func (gahs *GuardedAccountHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*GuardedAccountHandlerStub) SetGuardian ¶ added in v0.1.2
func (gahs *GuardedAccountHandlerStub) SetGuardian(uah vmcommon.UserAccountHandler, guardianAddress []byte, txGuardianAddress []byte, guardianServiceUID []byte) error
SetGuardian -
type MarshalizerMock ¶
type MarshalizerMock struct {
Fail bool
}
MarshalizerMock that will be used for testing
func (*MarshalizerMock) IsInterfaceNil ¶
func (mm *MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerMock) Marshal ¶
func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerMock) Unmarshal ¶
func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type PayableHandlerStub ¶
type PayableHandlerStub struct { IsPayableCalled func(address []byte) (bool, error) CheckPayableCalled func(vmInput *vmcommon.ContractCallInput, dstAddress []byte, minArgs int) error DetermineIsSCCallAfterCalled func(vmInput *vmcommon.ContractCallInput, dstAddress []byte, mintArgs int) bool }
PayableHandlerStub -
func (*PayableHandlerStub) CheckPayable ¶ added in v0.0.9
func (p *PayableHandlerStub) CheckPayable(vmInput *vmcommon.ContractCallInput, dstAddress []byte, minArgs int) error
CheckPayable -
func (*PayableHandlerStub) DetermineIsSCCallAfter ¶ added in v0.0.9
func (p *PayableHandlerStub) DetermineIsSCCallAfter(vmInput *vmcommon.ContractCallInput, dstAddress []byte, minArgs int) bool
DetermineIsSCCallAfter -
func (*PayableHandlerStub) IsInterfaceNil ¶
func (p *PayableHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ShardCoordinatorStub ¶
type ShardCoordinatorStub struct { NumberOfShardsCalled func() uint32 ComputeIdCalled func(address []byte) uint32 SelfIdCalled func() uint32 SameShardCalled func(firstAddress, secondAddress []byte) bool CommunicationIdentifierCalled func(destShardID uint32) string }
ShardCoordinatorStub -
func (*ShardCoordinatorStub) CommunicationIdentifier ¶
func (coordinator *ShardCoordinatorStub) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*ShardCoordinatorStub) ComputeId ¶
func (coordinator *ShardCoordinatorStub) ComputeId(address []byte) uint32
ComputeId -
func (*ShardCoordinatorStub) IsInterfaceNil ¶
func (coordinator *ShardCoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardCoordinatorStub) NumberOfShards ¶
func (coordinator *ShardCoordinatorStub) NumberOfShards() uint32
NumberOfShards -
func (*ShardCoordinatorStub) SameShard ¶
func (coordinator *ShardCoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
SameShard -
func (*ShardCoordinatorStub) SelfId ¶
func (coordinator *ShardCoordinatorStub) SelfId() uint32
SelfId -
type UserAccountStub ¶
type UserAccountStub struct { Address []byte AddToBalanceCalled func(value *big.Int) error AccountDataHandlerCalled func() vmcommon.AccountDataHandler SetCodeMetaDataCalled func(codeMetaData []byte) GetCodeMetaDataCalled func() []byte }
UserAccountStub -
func (*UserAccountStub) AccountDataHandler ¶
func (u *UserAccountStub) AccountDataHandler() vmcommon.AccountDataHandler
AccountDataHandler -
func (*UserAccountStub) AddToBalance ¶
func (u *UserAccountStub) AddToBalance(value *big.Int) error
AddToBalance -
func (*UserAccountStub) AddToDeveloperReward ¶
func (u *UserAccountStub) AddToDeveloperReward(_ *big.Int)
AddToDeveloperReward -
func (*UserAccountStub) AddressBytes ¶
func (u *UserAccountStub) AddressBytes() []byte
AddressBytes -
func (*UserAccountStub) ChangeOwnerAddress ¶
func (u *UserAccountStub) ChangeOwnerAddress([]byte, []byte) error
ChangeOwnerAddress -
func (*UserAccountStub) ClaimDeveloperRewards ¶
func (u *UserAccountStub) ClaimDeveloperRewards([]byte) (*big.Int, error)
ClaimDeveloperRewards -
func (*UserAccountStub) GetCodeMetadata ¶
func (u *UserAccountStub) GetCodeMetadata() []byte
GetCodeMetadata -
func (*UserAccountStub) GetDeveloperReward ¶
func (u *UserAccountStub) GetDeveloperReward() *big.Int
GetDeveloperReward -
func (*UserAccountStub) GetOwnerAddress ¶
func (u *UserAccountStub) GetOwnerAddress() []byte
GetOwnerAddress -
func (*UserAccountStub) IncreaseNonce ¶
func (u *UserAccountStub) IncreaseNonce(_ uint64)
IncreaseNonce -
func (*UserAccountStub) IsInterfaceNil ¶
func (u *UserAccountStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*UserAccountStub) SetCodeMetadata ¶
func (u *UserAccountStub) SetCodeMetadata(codeMetaData []byte)
SetCodeMetadata -
func (*UserAccountStub) SetOwnerAddress ¶
func (u *UserAccountStub) SetOwnerAddress([]byte)
SetOwnerAddress -
func (*UserAccountStub) SubFromBalance ¶
func (u *UserAccountStub) SubFromBalance(_ *big.Int) error
SubFromBalance -
Source Files ¶
- accountWrapperMock.go
- accountsStub.go
- blockChainEpochHookStub.go
- builtInFunctionStub.go
- dataTrieTrackerStub.go
- dctRoleHandlerStub.go
- dctStorageHandlerStub.go
- enableEpochsHandlerStub.go
- guardedAccountHandlerStub.go
- marshalizerMock.go
- multipleShardsCoordinatorMock.go
- pauseHandlerStub.go
- payableHandlerStub.go
- shardCoordinatorStub.go
- userAccountMock.go
- userAccountStub.go