Documentation ¶
Index ¶
- Variables
- type ArgumentParserMock
- func (ap *ArgumentParserMock) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string
- func (ap *ArgumentParserMock) GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error)
- func (ap *ArgumentParserMock) IsInterfaceNil() bool
- func (ap *ArgumentParserMock) ParseArguments(data string) ([][]byte, error)
- func (ap *ArgumentParserMock) ParseCallData(data string) (string, [][]byte, error)
- func (ap *ArgumentParserMock) ParseData(data string) (string, [][]byte, error)
- func (ap *ArgumentParserMock) ParseDeployData(data string) (*parsers.DeployArgs, error)
- type BlockChainHookStub
- func (b *BlockChainHookStub) AccountExists(address []byte) (bool, error)
- func (b *BlockChainHookStub) Close() error
- func (b *BlockChainHookStub) CurrentEpoch() uint32
- func (b *BlockChainHookStub) CurrentNonce() uint64
- func (b *BlockChainHookStub) CurrentRandomSeed() []byte
- func (b *BlockChainHookStub) CurrentRound() uint64
- func (b *BlockChainHookStub) CurrentTimeStamp() uint64
- func (b *BlockChainHookStub) GetAllState(address []byte) (map[string][]byte, error)
- func (b *BlockChainHookStub) GetBlockhash(nonce uint64) ([]byte, error)
- func (b *BlockChainHookStub) GetBuiltinFunctionNames() vmcommon.FunctionNames
- func (b *BlockChainHookStub) GetCode(account vmcommon.UserAccountHandler) []byte
- func (b *BlockChainHookStub) GetShardOfAddress(address []byte) uint32
- func (b *BlockChainHookStub) GetSnapshot() int
- func (b *BlockChainHookStub) GetStateRootHash() []byte
- func (b *BlockChainHookStub) GetStorageData(accountAddress []byte, index []byte) ([]byte, uint32, error)
- func (b *BlockChainHookStub) GetUserAccount(address []byte) (vmcommon.UserAccountHandler, error)
- func (b *BlockChainHookStub) IsPayable(sndAddress []byte, recvAddress []byte) (bool, error)
- func (b *BlockChainHookStub) IsSmartContract(address []byte) bool
- func (b *BlockChainHookStub) LastEpoch() uint32
- func (b *BlockChainHookStub) LastNonce() uint64
- func (b *BlockChainHookStub) LastRandomSeed() []byte
- func (b *BlockChainHookStub) LastRound() uint64
- func (b *BlockChainHookStub) LastTimeStamp() uint64
- func (b *BlockChainHookStub) NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error)
- func (b *BlockChainHookStub) NumberOfShards() uint32
- func (b *BlockChainHookStub) ProcessBuiltInFunction(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
- func (b *BlockChainHookStub) RevertToSnapshot(snapshot int) error
- type EconomicsHandlerStub
- type EpochNotifierStub
- type HasherStub
- type KeyGenMock
- func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
- func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
- func (keyGen *KeyGenMock) IsInterfaceNil() bool
- func (keyGen *KeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
- func (keyGen *KeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
- func (keyGen *KeyGenMock) Suite() crypto.Suite
- type MarshalizerMock
- type MarshalizerStub
- type MessageSignVerifierMock
- type NodesConfigProviderStub
- type PubkeyConverterMock
- type PublicKeyMock
- type RaterMock
- 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 SignerMock
- type SystemEIStub
- func (s *SystemEIStub) AddCode(addr []byte, code []byte)
- func (s *SystemEIStub) AddLogEntry(entry *vmcommon.LogEntry)
- func (s *SystemEIStub) AddReturnMessage(msg string)
- func (s *SystemEIStub) AddTxValueToSmartContract(value *big.Int, scAddress []byte)
- func (s *SystemEIStub) BlockChainHook() vm.BlockchainHook
- func (s *SystemEIStub) CanUnJail(blsKey []byte) bool
- func (s *SystemEIStub) CleanCache()
- func (s *SystemEIStub) CleanStorageUpdates()
- func (s *SystemEIStub) CreateVMOutput() *vmcommon.VMOutput
- func (s *SystemEIStub) CryptoHook() vmcommon.CryptoHook
- func (s *SystemEIStub) DeploySystemSC(baseContract []byte, newAddress []byte, ownerAddress []byte, ...) (vmcommon.ReturnCode, error)
- func (s *SystemEIStub) ExecuteOnDestContext(destination []byte, sender []byte, value *big.Int, input []byte) (*vmcommon.VMOutput, error)
- func (s *SystemEIStub) Finish(value []byte)
- func (s *SystemEIStub) GasLeft() uint64
- func (s *SystemEIStub) GetBalance(addr []byte) *big.Int
- func (s *SystemEIStub) GetContract(address []byte) (vm.SystemSmartContract, error)
- func (s *SystemEIStub) GetReturnMessage() string
- func (s *SystemEIStub) GetStorage(key []byte) []byte
- func (s *SystemEIStub) GetStorageFromAddress(address []byte, key []byte) []byte
- func (s *SystemEIStub) IsBadRating(blsKey []byte) bool
- func (s *SystemEIStub) IsInterfaceNil() bool
- func (s *SystemEIStub) IsValidator(blsKey []byte) bool
- func (s *SystemEIStub) SelfDestruct(beneficiary []byte)
- func (s *SystemEIStub) SendGlobalSettingToAll(sender []byte, input []byte)
- func (s *SystemEIStub) SetGasProvided(_ uint64)
- func (s *SystemEIStub) SetSCAddress(_ []byte)
- func (s *SystemEIStub) SetStorage(key []byte, value []byte)
- func (s *SystemEIStub) SetStorageForAddress(address []byte, key []byte, value []byte)
- func (s *SystemEIStub) SetSystemSCContainer(_ vm.SystemSCContainer) error
- func (s *SystemEIStub) StatusFromValidatorStatistics(blsKey []byte) string
- func (s *SystemEIStub) Transfer(destination []byte, sender []byte, value *big.Int, input []byte, _ uint64) error
- func (s *SystemEIStub) UseGas(gas uint64) error
- type SystemSCContainerStub
- func (s *SystemSCContainerStub) Add(key []byte, val vm.SystemSmartContract) error
- func (s *SystemSCContainerStub) Get(key []byte) (vm.SystemSmartContract, error)
- func (s *SystemSCContainerStub) IsInterfaceNil() bool
- func (s *SystemSCContainerStub) Keys() [][]byte
- func (s *SystemSCContainerStub) Len() int
- func (s *SystemSCContainerStub) Remove(key []byte)
- func (s *SystemSCContainerStub) Replace(key []byte, val vm.SystemSmartContract) error
- type SystemSCStub
Constants ¶
This section is empty.
Variables ¶
var ErrMockMarshalizer = errors.New("MarshalizerMock generic error")
ErrMockMarshalizer -
Functions ¶
This section is empty.
Types ¶
type ArgumentParserMock ¶
type ArgumentParserMock struct { ParseCallDataCalled func(data string) (string, [][]byte, error) ParseArgumentsCalled func(data string) ([][]byte, error) ParseDeployDataCalled func(data string) (*parsers.DeployArgs, error) CreateDataFromStorageUpdateCalled func(storageUpdates []*vmcommon.StorageUpdate) string GetStorageUpdatesCalled func(data string) ([]*vmcommon.StorageUpdate, error) }
ArgumentParserMock -
func (*ArgumentParserMock) CreateDataFromStorageUpdate ¶
func (ap *ArgumentParserMock) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string
CreateDataFromStorageUpdate -
func (*ArgumentParserMock) GetStorageUpdates ¶
func (ap *ArgumentParserMock) GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error)
GetStorageUpdates -
func (*ArgumentParserMock) IsInterfaceNil ¶
func (ap *ArgumentParserMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ArgumentParserMock) ParseArguments ¶ added in v1.3.37
func (ap *ArgumentParserMock) ParseArguments(data string) ([][]byte, error)
ParseArguments -
func (*ArgumentParserMock) ParseCallData ¶ added in v1.0.133
func (ap *ArgumentParserMock) ParseCallData(data string) (string, [][]byte, error)
ParseCallData -
func (*ArgumentParserMock) ParseData ¶
func (ap *ArgumentParserMock) ParseData(data string) (string, [][]byte, error)
ParseData -
func (*ArgumentParserMock) ParseDeployData ¶ added in v1.0.133
func (ap *ArgumentParserMock) ParseDeployData(data string) (*parsers.DeployArgs, error)
ParseDeployData -
type BlockChainHookStub ¶
type BlockChainHookStub struct { AccountExtistsCalled func(address []byte) (bool, error) NewAddressCalled func(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error) GetStorageDataCalled func(accountsAddress []byte, index []byte) ([]byte, uint32, error) GetUserAccountCalled func(address []byte) (vmcommon.UserAccountHandler, error) GetShardOfAddressCalled func(address []byte) uint32 IsSmartContractCalled func(address []byte) bool GetBlockHashCalled func(nonce uint64) ([]byte, error) LastNonceCalled func() uint64 LastRoundCalled func() uint64 LastTimeStampCalled func() uint64 LastRandomSeedCalled func() []byte LastEpochCalled func() uint32 GetStateRootHashCalled func() []byte CurrentNonceCalled func() uint64 CurrentRoundCalled func() uint64 CurrentTimeStampCalled func() uint64 CurrentRandomSeedCalled func() []byte CurrentEpochCalled func() uint32 ProcessBuiltInFunctionCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) GetBuiltinFunctionNamesCalled func() vmcommon.FunctionNames GetAllStateCalled func(address []byte) (map[string][]byte, error) IsPayableCalled func(sndAddress, rcvAddress []byte) (bool, error) NumberOfShardsCalled func() uint32 GetCodeCalled func(account vmcommon.UserAccountHandler) []byte CloseCalled func() error GetSnapshotCalled func() int RevertToSnapshotCalled func(snapshot int) error }
BlockChainHookStub -
func (*BlockChainHookStub) AccountExists ¶
func (b *BlockChainHookStub) AccountExists(address []byte) (bool, error)
AccountExists -
func (*BlockChainHookStub) Close ¶ added in v1.2.0
func (b *BlockChainHookStub) Close() error
Close -
func (*BlockChainHookStub) CurrentEpoch ¶
func (b *BlockChainHookStub) CurrentEpoch() uint32
CurrentEpoch -
func (*BlockChainHookStub) CurrentNonce ¶
func (b *BlockChainHookStub) CurrentNonce() uint64
CurrentNonce -
func (*BlockChainHookStub) CurrentRandomSeed ¶
func (b *BlockChainHookStub) CurrentRandomSeed() []byte
CurrentRandomSeed -
func (*BlockChainHookStub) CurrentRound ¶
func (b *BlockChainHookStub) CurrentRound() uint64
CurrentRound -
func (*BlockChainHookStub) CurrentTimeStamp ¶
func (b *BlockChainHookStub) CurrentTimeStamp() uint64
CurrentTimeStamp -
func (*BlockChainHookStub) GetAllState ¶ added in v1.0.114
func (b *BlockChainHookStub) GetAllState(address []byte) (map[string][]byte, error)
GetAllState -
func (*BlockChainHookStub) GetBlockhash ¶
func (b *BlockChainHookStub) GetBlockhash(nonce uint64) ([]byte, error)
GetBlockhash -
func (*BlockChainHookStub) GetBuiltinFunctionNames ¶ added in v1.0.104
func (b *BlockChainHookStub) GetBuiltinFunctionNames() vmcommon.FunctionNames
GetBuiltinFunctionNames -
func (*BlockChainHookStub) GetCode ¶
func (b *BlockChainHookStub) GetCode(account vmcommon.UserAccountHandler) []byte
GetCode -
func (*BlockChainHookStub) GetShardOfAddress ¶ added in v1.0.133
func (b *BlockChainHookStub) GetShardOfAddress(address []byte) uint32
GetShardOfAddress -
func (*BlockChainHookStub) GetSnapshot ¶ added in v1.1.60
func (b *BlockChainHookStub) GetSnapshot() int
GetSnapshot -
func (*BlockChainHookStub) GetStateRootHash ¶
func (b *BlockChainHookStub) GetStateRootHash() []byte
GetStateRootHash -
func (*BlockChainHookStub) GetStorageData ¶
func (b *BlockChainHookStub) GetStorageData(accountAddress []byte, index []byte) ([]byte, uint32, error)
GetStorageData -
func (*BlockChainHookStub) GetUserAccount ¶ added in v1.0.133
func (b *BlockChainHookStub) GetUserAccount(address []byte) (vmcommon.UserAccountHandler, error)
GetUserAccount -
func (*BlockChainHookStub) IsPayable ¶ added in v1.0.147
func (b *BlockChainHookStub) IsPayable(sndAddress []byte, recvAddress []byte) (bool, error)
IsPayable -
func (*BlockChainHookStub) IsSmartContract ¶ added in v1.0.133
func (b *BlockChainHookStub) IsSmartContract(address []byte) bool
IsSmartContract -
func (*BlockChainHookStub) LastRandomSeed ¶
func (b *BlockChainHookStub) LastRandomSeed() []byte
LastRandomSeed -
func (*BlockChainHookStub) LastTimeStamp ¶
func (b *BlockChainHookStub) LastTimeStamp() uint64
LastTimeStamp -
func (*BlockChainHookStub) NewAddress ¶
func (b *BlockChainHookStub) NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error)
NewAddress -
func (*BlockChainHookStub) NumberOfShards ¶ added in v1.1.12
func (b *BlockChainHookStub) NumberOfShards() uint32
NumberOfShards -
func (*BlockChainHookStub) ProcessBuiltInFunction ¶ added in v1.0.104
func (b *BlockChainHookStub) ProcessBuiltInFunction(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
ProcessBuiltInFunction -
func (*BlockChainHookStub) RevertToSnapshot ¶ added in v1.1.60
func (b *BlockChainHookStub) RevertToSnapshot(snapshot int) error
RevertToSnapshot -
type EconomicsHandlerStub ¶ added in v1.0.147
EconomicsHandlerStub -
func (*EconomicsHandlerStub) GenesisTotalSupply ¶ added in v1.0.147
func (v *EconomicsHandlerStub) GenesisTotalSupply() *big.Int
GenesisTotalSupply -
func (*EconomicsHandlerStub) IsInterfaceNil ¶ added in v1.0.147
func (v *EconomicsHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type EpochNotifierStub ¶ added in v1.1.2
type EpochNotifierStub struct { CheckEpochCalled func(header data.HeaderHandler) CurrentEpochCalled func() uint32 RegisterNotifyHandlerCalled func(handler vmcommon.EpochSubscriberHandler) }
EpochNotifierStub -
func (*EpochNotifierStub) CheckEpoch ¶ added in v1.1.2
func (ens *EpochNotifierStub) CheckEpoch(header data.HeaderHandler)
CheckEpoch -
func (*EpochNotifierStub) CurrentEpoch ¶ added in v1.1.2
func (ens *EpochNotifierStub) CurrentEpoch() uint32
CurrentEpoch -
func (*EpochNotifierStub) IsInterfaceNil ¶ added in v1.1.2
func (ens *EpochNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochNotifierStub) RegisterNotifyHandler ¶ added in v1.1.2
func (ens *EpochNotifierStub) RegisterNotifyHandler(handler vmcommon.EpochSubscriberHandler)
RegisterNotifyHandler -
type HasherStub ¶ added in v1.1.51
HasherStub -
func (*HasherStub) Compute ¶ added in v1.1.51
func (hash *HasherStub) Compute(s string) []byte
Compute -
func (*HasherStub) EmptyHash ¶ added in v1.1.51
func (hash *HasherStub) EmptyHash() []byte
EmptyHash -
func (*HasherStub) IsInterfaceNil ¶ added in v1.1.51
func (hash *HasherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type KeyGenMock ¶
KeyGenMock -
func (*KeyGenMock) CheckPublicKeyValid ¶ added in v1.0.120
func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
CheckPublicKeyValid -
func (*KeyGenMock) GeneratePair ¶
func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*KeyGenMock) IsInterfaceNil ¶
func (keyGen *KeyGenMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*KeyGenMock) PrivateKeyFromByteArray ¶
func (keyGen *KeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGenMock) PublicKeyFromByteArray ¶
func (keyGen *KeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
type MarshalizerMock ¶ added in v1.0.114
type MarshalizerMock struct {
Fail bool
}
MarshalizerMock that will be used for testing
func (*MarshalizerMock) IsInterfaceNil ¶ added in v1.0.114
func (mm *MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerMock) Marshal ¶ added in v1.0.114
func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerMock) Unmarshal ¶ added in v1.0.114
func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MarshalizerStub ¶ added in v1.1.33
type MarshalizerStub struct { MarshalCalled func(obj interface{}) ([]byte, error) UnmarshalCalled func(obj interface{}, buff []byte) error }
MarshalizerStub -
func (*MarshalizerStub) IsInterfaceNil ¶ added in v1.1.33
func (ms *MarshalizerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*MarshalizerStub) Marshal ¶ added in v1.1.33
func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (*MarshalizerStub) Unmarshal ¶ added in v1.1.33
func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type MessageSignVerifierMock ¶
type MessageSignVerifierMock struct {
VerifyCalled func(message []byte, signedMessage []byte, pubKey []byte) error
}
MessageSignVerifierMock -
func (*MessageSignVerifierMock) IsInterfaceNil ¶
func (m *MessageSignVerifierMock) IsInterfaceNil() bool
IsInterfaceNil -
type NodesConfigProviderStub ¶ added in v1.0.110
type NodesConfigProviderStub struct { MinNumberOfNodesCalled func() uint32 MinNumberOfNodesWithHysteresisCalled func() uint32 }
NodesConfigProviderStub -
func (*NodesConfigProviderStub) IsInterfaceNil ¶ added in v1.0.110
func (n *NodesConfigProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodesConfigProviderStub) MinNumberOfNodes ¶ added in v1.0.110
func (n *NodesConfigProviderStub) MinNumberOfNodes() uint32
MinNumberOfNodes -
func (*NodesConfigProviderStub) MinNumberOfNodesWithHysteresis ¶ added in v1.1.3
func (n *NodesConfigProviderStub) MinNumberOfNodesWithHysteresis() uint32
MinNumberOfNodesWithHysteresis -
type PubkeyConverterMock ¶ added in v1.1.15
type PubkeyConverterMock struct {
// contains filtered or unexported fields
}
PubkeyConverterMock -
func NewPubkeyConverterMock ¶ added in v1.1.15
func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock
NewPubkeyConverterMock -
func (*PubkeyConverterMock) Decode ¶ added in v1.1.15
func (pcm *PubkeyConverterMock) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterMock) Encode ¶ added in v1.1.15
func (pcm *PubkeyConverterMock) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterMock) IsInterfaceNil ¶ added in v1.1.15
func (pcm *PubkeyConverterMock) IsInterfaceNil() bool
IsInterfaceNil -
type PublicKeyMock ¶
type PublicKeyMock struct { }
PublicKeyMock mocks a public key implementation
func (*PublicKeyMock) IsInterfaceNil ¶
func (pubKey *PublicKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PublicKeyMock) ToByteArray ¶
func (pubKey *PublicKeyMock) ToByteArray() ([]byte, error)
ToByteArray mocks converting a public key to a byte array
type RaterMock ¶ added in v1.1.1
type RaterMock struct { ComputeRatingCalled func(string, uint32) uint32 GetRatingCalled func(string) uint32 GetStartRatingCalled func() uint32 GetChancesCalled func(uint32) uint32 }
RaterMock -
func (*RaterMock) ComputeRating ¶ added in v1.1.1
ComputeRating -
func (*RaterMock) GetStartRating ¶ added in v1.1.1
GetStartRating -
func (*RaterMock) IsInterfaceNil ¶ added in v1.1.1
IsInterfaceNil -
type ShardCoordinatorStub ¶ added in v1.1.58
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 ¶ added in v1.1.58
func (coordinator *ShardCoordinatorStub) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*ShardCoordinatorStub) ComputeId ¶ added in v1.1.58
func (coordinator *ShardCoordinatorStub) ComputeId(address []byte) uint32
ComputeId -
func (*ShardCoordinatorStub) IsInterfaceNil ¶ added in v1.1.58
func (coordinator *ShardCoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardCoordinatorStub) NumberOfShards ¶ added in v1.1.58
func (coordinator *ShardCoordinatorStub) NumberOfShards() uint32
NumberOfShards -
func (*ShardCoordinatorStub) SameShard ¶ added in v1.1.58
func (coordinator *ShardCoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
SameShard -
func (*ShardCoordinatorStub) SelfId ¶ added in v1.1.58
func (coordinator *ShardCoordinatorStub) SelfId() uint32
SelfId -
type SignerMock ¶
type SignerMock struct { SignCalled func(private crypto.PrivateKey, msg []byte) ([]byte, error) VerifyCalled func(public crypto.PublicKey, msg []byte, sig []byte) error }
SignerMock -
func (*SignerMock) IsInterfaceNil ¶
func (s *SignerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type SystemEIStub ¶
type SystemEIStub struct { TransferCalled func(destination []byte, sender []byte, value *big.Int, input []byte) error GetBalanceCalled func(addr []byte) *big.Int SetStorageCalled func(key []byte, value []byte) AddReturnMessageCalled func(msg string) GetStorageCalled func(key []byte) []byte SelfDestructCalled func(beneficiary []byte) CreateVMOutputCalled func() *vmcommon.VMOutput CleanCacheCalled func() FinishCalled func(value []byte) AddCodeCalled func(addr []byte, code []byte) AddTxValueToSmartContractCalled func(value *big.Int, scAddress []byte) BlockChainHookCalled func() vm.BlockchainHook CryptoHookCalled func() vmcommon.CryptoHook UseGasCalled func(gas uint64) error IsValidatorCalled func(blsKey []byte) bool StatusFromValidatorStatisticsCalled func(blsKey []byte) string ExecuteOnDestContextCalled func(destination, sender []byte, value *big.Int, input []byte) (*vmcommon.VMOutput, error) DeploySystemSCCalled func(baseContract []byte, newAddress []byte, caller []byte, initFunction string, value *big.Int, args [][]byte) (vmcommon.ReturnCode, error) GetStorageFromAddressCalled func(address []byte, key []byte) []byte SetStorageForAddressCalled func(address []byte, key []byte, value []byte) CanUnJailCalled func(blsKey []byte) bool IsBadRatingCalled func(blsKey []byte) bool SendGlobalSettingToAllCalled func(sender []byte, input []byte) GetContractCalled func(address []byte) (vm.SystemSmartContract, error) GasLeftCalled func() uint64 CleanStorageUpdatesCalled func() ReturnMessage string AddLogEntryCalled func(entry *vmcommon.LogEntry) }
SystemEIStub -
func (*SystemEIStub) AddLogEntry ¶ added in v1.2.13
func (s *SystemEIStub) AddLogEntry(entry *vmcommon.LogEntry)
AddLogEntry -
func (*SystemEIStub) AddReturnMessage ¶ added in v1.0.120
func (s *SystemEIStub) AddReturnMessage(msg string)
AddReturnMessage -
func (*SystemEIStub) AddTxValueToSmartContract ¶
func (s *SystemEIStub) AddTxValueToSmartContract(value *big.Int, scAddress []byte)
AddTxValueToSmartContract -
func (*SystemEIStub) BlockChainHook ¶
func (s *SystemEIStub) BlockChainHook() vm.BlockchainHook
BlockChainHook -
func (*SystemEIStub) CanUnJail ¶ added in v1.1.1
func (s *SystemEIStub) CanUnJail(blsKey []byte) bool
CanUnJail -
func (*SystemEIStub) CleanStorageUpdates ¶ added in v1.2.1
func (s *SystemEIStub) CleanStorageUpdates()
CleanStorageUpdates -
func (*SystemEIStub) CreateVMOutput ¶
func (s *SystemEIStub) CreateVMOutput() *vmcommon.VMOutput
CreateVMOutput -
func (*SystemEIStub) CryptoHook ¶
func (s *SystemEIStub) CryptoHook() vmcommon.CryptoHook
CryptoHook -
func (*SystemEIStub) DeploySystemSC ¶ added in v1.1.15
func (s *SystemEIStub) DeploySystemSC( baseContract []byte, newAddress []byte, ownerAddress []byte, initFunction string, value *big.Int, input [][]byte, ) (vmcommon.ReturnCode, error)
DeploySystemSC -
func (*SystemEIStub) ExecuteOnDestContext ¶
func (s *SystemEIStub) ExecuteOnDestContext( destination []byte, sender []byte, value *big.Int, input []byte, ) (*vmcommon.VMOutput, error)
ExecuteOnDestContext -
func (*SystemEIStub) GetBalance ¶
func (s *SystemEIStub) GetBalance(addr []byte) *big.Int
GetBalance -
func (*SystemEIStub) GetContract ¶ added in v1.1.15
func (s *SystemEIStub) GetContract(address []byte) (vm.SystemSmartContract, error)
GetContract -
func (*SystemEIStub) GetReturnMessage ¶ added in v1.3.23
func (s *SystemEIStub) GetReturnMessage() string
GetReturnMessage -
func (*SystemEIStub) GetStorageFromAddress ¶ added in v1.0.150
func (s *SystemEIStub) GetStorageFromAddress(address []byte, key []byte) []byte
GetStorageFromAddress -
func (*SystemEIStub) IsBadRating ¶ added in v1.1.1
func (s *SystemEIStub) IsBadRating(blsKey []byte) bool
IsBadRating -
func (*SystemEIStub) IsValidator ¶ added in v1.0.115
func (s *SystemEIStub) IsValidator(blsKey []byte) bool
IsValidator -
func (*SystemEIStub) SelfDestruct ¶
func (s *SystemEIStub) SelfDestruct(beneficiary []byte)
SelfDestruct -
func (*SystemEIStub) SendGlobalSettingToAll ¶ added in v1.1.3
func (s *SystemEIStub) SendGlobalSettingToAll(sender []byte, input []byte)
SendGlobalSettingToAll -
func (*SystemEIStub) SetGasProvided ¶
func (s *SystemEIStub) SetGasProvided(_ uint64)
SetGasProvided -
func (*SystemEIStub) SetStorage ¶
func (s *SystemEIStub) SetStorage(key []byte, value []byte)
SetStorage -
func (*SystemEIStub) SetStorageForAddress ¶ added in v1.0.150
func (s *SystemEIStub) SetStorageForAddress(address []byte, key []byte, value []byte)
SetStorageForAddress -
func (*SystemEIStub) SetSystemSCContainer ¶
func (s *SystemEIStub) SetSystemSCContainer(_ vm.SystemSCContainer) error
SetSystemSCContainer -
func (*SystemEIStub) StatusFromValidatorStatistics ¶ added in v1.1.15
func (s *SystemEIStub) StatusFromValidatorStatistics(blsKey []byte) string
StatusFromValidatorStatistics -
type SystemSCContainerStub ¶
type SystemSCContainerStub struct { GetCalled func(key []byte) (vm.SystemSmartContract, error) AddCalled func(key []byte, val vm.SystemSmartContract) error ReplaceCalled func(key []byte, val vm.SystemSmartContract) error RemoveCalled func(key []byte) LenCalled func() int KeysCalled func() [][]byte }
SystemSCContainerStub -
func (*SystemSCContainerStub) Add ¶
func (s *SystemSCContainerStub) Add(key []byte, val vm.SystemSmartContract) error
Add -
func (*SystemSCContainerStub) Get ¶
func (s *SystemSCContainerStub) Get(key []byte) (vm.SystemSmartContract, error)
Get -
func (*SystemSCContainerStub) IsInterfaceNil ¶
func (s *SystemSCContainerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*SystemSCContainerStub) Replace ¶
func (s *SystemSCContainerStub) Replace(key []byte, val vm.SystemSmartContract) error
Replace -
type SystemSCStub ¶
type SystemSCStub struct { ExecuteCalled func(args *vmcommon.ContractCallInput) vmcommon.ReturnCode SetNewGasCostCalled func(gasCost vm.GasCost) }
SystemSCStub -
func (*SystemSCStub) CanUseContract ¶ added in v1.1.15
func (s *SystemSCStub) CanUseContract() bool
CanUseContract -
func (*SystemSCStub) Execute ¶
func (s *SystemSCStub) Execute(args *vmcommon.ContractCallInput) vmcommon.ReturnCode
Execute -
func (*SystemSCStub) SetNewGasCost ¶ added in v1.1.12
func (s *SystemSCStub) SetNewGasCost(gasCost vm.GasCost)
SetNewGasCost -
Source Files ¶
- argumentsParserMock.go
- blockChainHookStub.go
- epochNotifierStub.go
- hasherStub.go
- keyGenMock.go
- marshalizerMock.go
- marshalizerStub.go
- messageSignVerifierMock.go
- nodesConfigProviderStub.go
- pubkeyConverterMock.go
- raterMock.go
- shardCoordinatorStub.go
- signerMock.go
- systemEIStub.go
- systemSCContainerStub.go
- systemSCStub.go
- validatorSettingsStub.go