Documentation
¶
Index ¶
- type BaseKeeperMock
- func (mock *BaseKeeperMock) ExportGenesis(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.GenesisState
- func (mock *BaseKeeperMock) ExportGenesisCalls() []struct{ ... }
- func (mock *BaseKeeperMock) ForChain(chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) evmtypes.ChainKeeper
- func (mock *BaseKeeperMock) ForChainCalls() []struct{ ... }
- func (mock *BaseKeeperMock) HasChain(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) bool
- func (mock *BaseKeeperMock) HasChainCalls() []struct{ ... }
- func (mock *BaseKeeperMock) InitGenesis(ctx github_com_cosmos_cosmos_sdk_types.Context, state evmtypes.GenesisState)
- func (mock *BaseKeeperMock) InitGenesisCalls() []struct{ ... }
- func (mock *BaseKeeperMock) Logger(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger
- func (mock *BaseKeeperMock) LoggerCalls() []struct{ ... }
- type ChainKeeperMock
- func (mock *ChainKeeperMock) CreateERC20Token(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string, ...) (evmtypes.ERC20Token, error)
- func (mock *ChainKeeperMock) CreateERC20TokenCalls() []struct{ ... }
- func (mock *ChainKeeperMock) CreateNewBatchToSign(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.CommandBatch, error)
- func (mock *ChainKeeperMock) CreateNewBatchToSignCalls() []struct{ ... }
- func (mock *ChainKeeperMock) DeleteDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit)
- func (mock *ChainKeeperMock) DeleteDepositCalls() []struct{ ... }
- func (mock *ChainKeeperMock) DeleteUnsignedCommandBatchID(ctx github_com_cosmos_cosmos_sdk_types.Context)
- func (mock *ChainKeeperMock) DeleteUnsignedCommandBatchIDCalls() []struct{ ... }
- func (mock *ChainKeeperMock) EnqueueCommand(ctx github_com_cosmos_cosmos_sdk_types.Context, cmd evmtypes.Command) error
- func (mock *ChainKeeperMock) EnqueueCommandCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetBatchByID(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) evmtypes.CommandBatch
- func (mock *ChainKeeperMock) GetBatchByIDCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetBurnerAddressAndSalt(ctx github_com_cosmos_cosmos_sdk_types.Context, token evmtypes.ERC20Token, ...) (evmtypes.Address, evmtypes.Hash, error)
- func (mock *ChainKeeperMock) GetBurnerAddressAndSaltCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetBurnerByteCode(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool)
- func (mock *ChainKeeperMock) GetBurnerByteCodeCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetBurnerInfo(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address) *evmtypes.BurnerInfo
- func (mock *ChainKeeperMock) GetBurnerInfoCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetChainID(ctx github_com_cosmos_cosmos_sdk_types.Context) (github_com_cosmos_cosmos_sdk_types.Int, bool)
- func (mock *ChainKeeperMock) GetChainIDByNetwork(ctx github_com_cosmos_cosmos_sdk_types.Context, network string) (github_com_cosmos_cosmos_sdk_types.Int, bool)
- func (mock *ChainKeeperMock) GetChainIDByNetworkCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetChainIDCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetCommand(ctx github_com_cosmos_cosmos_sdk_types.Context, id evmtypes.CommandID) (evmtypes.Command, bool)
- func (mock *ChainKeeperMock) GetCommandCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetConfirmedDeposits(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Deposit
- func (mock *ChainKeeperMock) GetConfirmedDepositsCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetConfirmedEventQueue(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.KVQueue
- func (mock *ChainKeeperMock) GetConfirmedEventQueueCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, txID evmtypes.Hash, ...) (evmtypes.ERC20Deposit, evmtypes.DepositStatus, bool)
- func (mock *ChainKeeperMock) GetDepositCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetERC20TokenByAsset(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) evmtypes.ERC20Token
- func (mock *ChainKeeperMock) GetERC20TokenByAssetCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetERC20TokenBySymbol(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) evmtypes.ERC20Token
- func (mock *ChainKeeperMock) GetERC20TokenBySymbolCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetEvent(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) (evmtypes.Event, bool)
- func (mock *ChainKeeperMock) GetEventCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetGatewayAddress(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.Address, bool)
- func (mock *ChainKeeperMock) GetGatewayAddressCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetLatestCommandBatch(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.CommandBatch
- func (mock *ChainKeeperMock) GetLatestCommandBatchCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetMinVoterCount(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool)
- func (mock *ChainKeeperMock) GetMinVoterCountCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetName() string
- func (mock *ChainKeeperMock) GetNameCalls() []struct{}
- func (mock *ChainKeeperMock) GetNetwork(ctx github_com_cosmos_cosmos_sdk_types.Context) (string, bool)
- func (mock *ChainKeeperMock) GetNetworkByID(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (string, bool)
- func (mock *ChainKeeperMock) GetNetworkByIDCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetNetworkCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetParams(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.Params
- func (mock *ChainKeeperMock) GetParamsCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetPendingCommands(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.Command
- func (mock *ChainKeeperMock) GetPendingCommandsCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetRequiredConfirmationHeight(ctx github_com_cosmos_cosmos_sdk_types.Context) (uint64, bool)
- func (mock *ChainKeeperMock) GetRequiredConfirmationHeightCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetRevoteLockingPeriod(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool)
- func (mock *ChainKeeperMock) GetRevoteLockingPeriodCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetTokenByteCode(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool)
- func (mock *ChainKeeperMock) GetTokenByteCodeCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetTokens(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Token
- func (mock *ChainKeeperMock) GetTokensCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetVotingThreshold(ctx github_com_cosmos_cosmos_sdk_types.Context) (utils.Threshold, bool)
- func (mock *ChainKeeperMock) GetVotingThresholdCalls() []struct{ ... }
- func (mock *ChainKeeperMock) Logger(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger
- func (mock *ChainKeeperMock) LoggerCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetBurnerInfo(ctx github_com_cosmos_cosmos_sdk_types.Context, burnerInfo evmtypes.BurnerInfo)
- func (mock *ChainKeeperMock) SetBurnerInfoCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetConfirmedEvent(ctx github_com_cosmos_cosmos_sdk_types.Context, event evmtypes.Event) error
- func (mock *ChainKeeperMock) SetConfirmedEventCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit, ...)
- func (mock *ChainKeeperMock) SetDepositCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetEventCompleted(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error
- func (mock *ChainKeeperMock) SetEventCompletedCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetEventFailed(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error
- func (mock *ChainKeeperMock) SetEventFailedCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetGateway(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address)
- func (mock *ChainKeeperMock) SetGatewayCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetLatestSignedCommandBatchID(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte)
- func (mock *ChainKeeperMock) SetLatestSignedCommandBatchIDCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetParams(ctx github_com_cosmos_cosmos_sdk_types.Context, p evmtypes.Params)
- func (mock *ChainKeeperMock) SetParamsCalls() []struct{ ... }
- type MultisigKeeperMock
- func (mock *MultisigKeeperMock) AssignKey(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) error
- func (mock *MultisigKeeperMock) AssignKeyCalls() []struct{ ... }
- func (mock *MultisigKeeperMock) GetCurrentKeyID(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool)
- func (mock *MultisigKeeperMock) GetCurrentKeyIDCalls() []struct{ ... }
- func (mock *MultisigKeeperMock) GetKey(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_axelarnetwork_axelar_core_x_multisig_exported.Key, bool)
- func (mock *MultisigKeeperMock) GetKeyCalls() []struct{ ... }
- func (mock *MultisigKeeperMock) GetNextKeyID(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool)
- func (mock *MultisigKeeperMock) GetNextKeyIDCalls() []struct{ ... }
- func (mock *MultisigKeeperMock) RotateKey(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) error
- func (mock *MultisigKeeperMock) RotateKeyCalls() []struct{ ... }
- func (mock *MultisigKeeperMock) Sign(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) error
- func (mock *MultisigKeeperMock) SignCalls() []struct{ ... }
- type NexusMock
- func (mock *NexusMock) AddTransferFee(ctx github_com_cosmos_cosmos_sdk_types.Context, ...)
- func (mock *NexusMock) AddTransferFeeCalls() []struct{ ... }
- func (mock *NexusMock) ArchivePendingTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, ...)
- func (mock *NexusMock) ArchivePendingTransferCalls() []struct{ ... }
- func (mock *NexusMock) ComputeTransferFee(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_cosmos_cosmos_sdk_types.Coin, error)
- func (mock *NexusMock) ComputeTransferFeeCalls() []struct{ ... }
- func (mock *NexusMock) EnqueueForTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error)
- func (mock *NexusMock) EnqueueForTransferCalls() []struct{ ... }
- func (mock *NexusMock) EnqueueTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error)
- func (mock *NexusMock) EnqueueTransferCalls() []struct{ ... }
- func (mock *NexusMock) GetChain(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool)
- func (mock *NexusMock) GetChainByNativeAsset(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool)
- func (mock *NexusMock) GetChainByNativeAssetCalls() []struct{ ... }
- func (mock *NexusMock) GetChainCalls() []struct{ ... }
- func (mock *NexusMock) GetChainMaintainers(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) []github_com_cosmos_cosmos_sdk_types.ValAddress
- func (mock *NexusMock) GetChainMaintainersCalls() []struct{ ... }
- func (mock *NexusMock) GetChains(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
- func (mock *NexusMock) GetChainsCalls() []struct{ ... }
- func (mock *NexusMock) GetRecipient(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, bool)
- func (mock *NexusMock) GetRecipientCalls() []struct{ ... }
- func (mock *NexusMock) GetTransfersForChain(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) []github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer
- func (mock *NexusMock) GetTransfersForChainCalls() []struct{ ... }
- func (mock *NexusMock) IsAssetRegistered(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) bool
- func (mock *NexusMock) IsAssetRegisteredCalls() []struct{ ... }
- func (mock *NexusMock) IsChainActivated(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) bool
- func (mock *NexusMock) IsChainActivatedCalls() []struct{ ... }
- func (mock *NexusMock) LinkAddresses(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) error
- func (mock *NexusMock) LinkAddressesCalls() []struct{ ... }
- func (mock *NexusMock) MarkChainMaintainerIncorrectVote(ctx github_com_cosmos_cosmos_sdk_types.Context, ...)
- func (mock *NexusMock) MarkChainMaintainerIncorrectVoteCalls() []struct{ ... }
- func (mock *NexusMock) MarkChainMaintainerMissingVote(ctx github_com_cosmos_cosmos_sdk_types.Context, ...)
- func (mock *NexusMock) MarkChainMaintainerMissingVoteCalls() []struct{ ... }
- func (mock *NexusMock) RegisterAsset(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) error
- func (mock *NexusMock) RegisterAssetCalls() []struct{ ... }
- func (mock *NexusMock) SetChain(ctx github_com_cosmos_cosmos_sdk_types.Context, ...)
- func (mock *NexusMock) SetChainCalls() []struct{ ... }
- type RewarderMock
- type SignerMock
- func (mock *SignerMock) GetKey(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID exported.KeyID) (exported.Key, bool)
- func (mock *SignerMock) GetKeyCalls() []struct{ ... }
- func (mock *SignerMock) GetMultisigSignInfo(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (tsstypes.MultisigSignInfo, bool)
- func (mock *SignerMock) GetMultisigSignInfoCalls() []struct{ ... }
- func (mock *SignerMock) GetSig(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (exported.Signature, exported.SigStatus)
- func (mock *SignerMock) GetSigCalls() []struct{ ... }
- type SlashingKeeperMock
- type SnapshotterMock
- func (mock *SnapshotterMock) CreateSnapshot(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (snapshot.Snapshot, error)
- func (mock *SnapshotterMock) CreateSnapshotCalls() []struct{ ... }
- func (mock *SnapshotterMock) GetLatestSnapshot(ctx github_com_cosmos_cosmos_sdk_types.Context) (snapshot.Snapshot, bool)
- func (mock *SnapshotterMock) GetLatestSnapshotCalls() []struct{ ... }
- func (mock *SnapshotterMock) GetOperator(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) github_com_cosmos_cosmos_sdk_types.ValAddress
- func (mock *SnapshotterMock) GetOperatorCalls() []struct{ ... }
- func (mock *SnapshotterMock) GetProxy(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_cosmos_cosmos_sdk_types.AccAddress, bool)
- func (mock *SnapshotterMock) GetProxyCalls() []struct{ ... }
- func (mock *SnapshotterMock) GetSnapshot(ctx github_com_cosmos_cosmos_sdk_types.Context, seqNo int64) (snapshot.Snapshot, bool)
- func (mock *SnapshotterMock) GetSnapshotCalls() []struct{ ... }
- func (mock *SnapshotterMock) GetValidatorIllegibility(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (snapshot.ValidatorIllegibility, error)
- func (mock *SnapshotterMock) GetValidatorIllegibilityCalls() []struct{ ... }
- func (mock *SnapshotterMock) TakeSnapshot(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (snapshot.Snapshot, error)
- func (mock *SnapshotterMock) TakeSnapshotCalls() []struct{ ... }
- type StakingKeeperMock
- type VoterMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseKeeperMock ¶
type BaseKeeperMock struct { // ExportGenesisFunc mocks the ExportGenesis method. ExportGenesisFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.GenesisState // ForChainFunc mocks the ForChain method. ForChainFunc func(chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) evmtypes.ChainKeeper // HasChainFunc mocks the HasChain method. HasChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) bool // InitGenesisFunc mocks the InitGenesis method. InitGenesisFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, state evmtypes.GenesisState) // LoggerFunc mocks the Logger method. LoggerFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger // contains filtered or unexported fields }
BaseKeeperMock is a mock implementation of evmtypes.BaseKeeper.
func TestSomethingThatUsesBaseKeeper(t *testing.T) { // make and configure a mocked evmtypes.BaseKeeper mockedBaseKeeper := &BaseKeeperMock{ ExportGenesisFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.GenesisState { panic("mock out the ExportGenesis method") }, ForChainFunc: func(chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) evmtypes.ChainKeeper { panic("mock out the ForChain method") }, HasChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) bool { panic("mock out the HasChain method") }, InitGenesisFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, state evmtypes.GenesisState) { panic("mock out the InitGenesis method") }, LoggerFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger { panic("mock out the Logger method") }, } // use mockedBaseKeeper in code that requires evmtypes.BaseKeeper // and then make assertions. }
func (*BaseKeeperMock) ExportGenesis ¶ added in v0.9.0
func (mock *BaseKeeperMock) ExportGenesis(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.GenesisState
ExportGenesis calls ExportGenesisFunc.
func (*BaseKeeperMock) ExportGenesisCalls ¶ added in v0.9.0
func (mock *BaseKeeperMock) ExportGenesisCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
ExportGenesisCalls gets all the calls that were made to ExportGenesis. Check the length with:
len(mockedBaseKeeper.ExportGenesisCalls())
func (*BaseKeeperMock) ForChain ¶
func (mock *BaseKeeperMock) ForChain(chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) evmtypes.ChainKeeper
ForChain calls ForChainFunc.
func (*BaseKeeperMock) ForChainCalls ¶
func (mock *BaseKeeperMock) ForChainCalls() []struct { Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName }
ForChainCalls gets all the calls that were made to ForChain. Check the length with:
len(mockedBaseKeeper.ForChainCalls())
func (*BaseKeeperMock) HasChain ¶ added in v0.13.3
func (mock *BaseKeeperMock) HasChain(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) bool
HasChain calls HasChainFunc.
func (*BaseKeeperMock) HasChainCalls ¶ added in v0.13.3
func (mock *BaseKeeperMock) HasChainCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName }
HasChainCalls gets all the calls that were made to HasChain. Check the length with:
len(mockedBaseKeeper.HasChainCalls())
func (*BaseKeeperMock) InitGenesis ¶ added in v0.9.0
func (mock *BaseKeeperMock) InitGenesis(ctx github_com_cosmos_cosmos_sdk_types.Context, state evmtypes.GenesisState)
InitGenesis calls InitGenesisFunc.
func (*BaseKeeperMock) InitGenesisCalls ¶ added in v0.9.0
func (mock *BaseKeeperMock) InitGenesisCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context State evmtypes.GenesisState }
InitGenesisCalls gets all the calls that were made to InitGenesis. Check the length with:
len(mockedBaseKeeper.InitGenesisCalls())
func (*BaseKeeperMock) Logger ¶
func (mock *BaseKeeperMock) Logger(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger
Logger calls LoggerFunc.
func (*BaseKeeperMock) LoggerCalls ¶
func (mock *BaseKeeperMock) LoggerCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
LoggerCalls gets all the calls that were made to Logger. Check the length with:
len(mockedBaseKeeper.LoggerCalls())
type ChainKeeperMock ¶
type ChainKeeperMock struct { // CreateERC20TokenFunc mocks the CreateERC20Token method. CreateERC20TokenFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string, details evmtypes.TokenDetails, address evmtypes.Address) (evmtypes.ERC20Token, error) // CreateNewBatchToSignFunc mocks the CreateNewBatchToSign method. CreateNewBatchToSignFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.CommandBatch, error) // DeleteDepositFunc mocks the DeleteDeposit method. DeleteDepositFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit) // DeleteUnsignedCommandBatchIDFunc mocks the DeleteUnsignedCommandBatchID method. DeleteUnsignedCommandBatchIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) // EnqueueCommandFunc mocks the EnqueueCommand method. EnqueueCommandFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, cmd evmtypes.Command) error // GetBatchByIDFunc mocks the GetBatchByID method. GetBatchByIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) evmtypes.CommandBatch // GetBurnerAddressAndSaltFunc mocks the GetBurnerAddressAndSalt method. GetBurnerAddressAndSaltFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, token evmtypes.ERC20Token, recipient string, gatewayAddr evmtypes.Address) (evmtypes.Address, evmtypes.Hash, error) // GetBurnerByteCodeFunc mocks the GetBurnerByteCode method. GetBurnerByteCodeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool) // GetBurnerInfoFunc mocks the GetBurnerInfo method. GetBurnerInfoFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address) *evmtypes.BurnerInfo // GetChainIDFunc mocks the GetChainID method. GetChainIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (github_com_cosmos_cosmos_sdk_types.Int, bool) // GetChainIDByNetworkFunc mocks the GetChainIDByNetwork method. GetChainIDByNetworkFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, network string) (github_com_cosmos_cosmos_sdk_types.Int, bool) // GetCommandFunc mocks the GetCommand method. GetCommandFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id evmtypes.CommandID) (evmtypes.Command, bool) // GetConfirmedDepositsFunc mocks the GetConfirmedDeposits method. GetConfirmedDepositsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Deposit // GetConfirmedEventQueueFunc mocks the GetConfirmedEventQueue method. GetConfirmedEventQueueFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.KVQueue // GetDepositFunc mocks the GetDeposit method. GetDepositFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, txID evmtypes.Hash, burnerAddr evmtypes.Address) (evmtypes.ERC20Deposit, evmtypes.DepositStatus, bool) // GetERC20TokenByAssetFunc mocks the GetERC20TokenByAsset method. GetERC20TokenByAssetFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) evmtypes.ERC20Token // GetERC20TokenBySymbolFunc mocks the GetERC20TokenBySymbol method. GetERC20TokenBySymbolFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) evmtypes.ERC20Token // GetEventFunc mocks the GetEvent method. GetEventFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) (evmtypes.Event, bool) // GetGatewayAddressFunc mocks the GetGatewayAddress method. GetGatewayAddressFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.Address, bool) // GetLatestCommandBatchFunc mocks the GetLatestCommandBatch method. GetLatestCommandBatchFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.CommandBatch // GetMinVoterCountFunc mocks the GetMinVoterCount method. GetMinVoterCountFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool) // GetNameFunc mocks the GetName method. GetNameFunc func() string // GetNetworkFunc mocks the GetNetwork method. GetNetworkFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (string, bool) // GetNetworkByIDFunc mocks the GetNetworkByID method. GetNetworkByIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id github_com_cosmos_cosmos_sdk_types.Int) (string, bool) // GetParamsFunc mocks the GetParams method. GetParamsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.Params // GetPendingCommandsFunc mocks the GetPendingCommands method. GetPendingCommandsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.Command // GetRequiredConfirmationHeightFunc mocks the GetRequiredConfirmationHeight method. GetRequiredConfirmationHeightFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (uint64, bool) // GetRevoteLockingPeriodFunc mocks the GetRevoteLockingPeriod method. GetRevoteLockingPeriodFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool) // GetTokenByteCodeFunc mocks the GetTokenByteCode method. GetTokenByteCodeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool) // GetTokensFunc mocks the GetTokens method. GetTokensFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Token // GetVotingThresholdFunc mocks the GetVotingThreshold method. GetVotingThresholdFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (utils.Threshold, bool) // LoggerFunc mocks the Logger method. LoggerFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger // SetBurnerInfoFunc mocks the SetBurnerInfo method. SetBurnerInfoFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, burnerInfo evmtypes.BurnerInfo) // SetConfirmedEventFunc mocks the SetConfirmedEvent method. SetConfirmedEventFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, event evmtypes.Event) error // SetDepositFunc mocks the SetDeposit method. SetDepositFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit, state evmtypes.DepositStatus) // SetEventCompletedFunc mocks the SetEventCompleted method. SetEventCompletedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error // SetEventFailedFunc mocks the SetEventFailed method. SetEventFailedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error // SetGatewayFunc mocks the SetGateway method. SetGatewayFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address) // SetLatestSignedCommandBatchIDFunc mocks the SetLatestSignedCommandBatchID method. SetLatestSignedCommandBatchIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) // SetParamsFunc mocks the SetParams method. SetParamsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, p evmtypes.Params) // contains filtered or unexported fields }
ChainKeeperMock is a mock implementation of evmtypes.ChainKeeper.
func TestSomethingThatUsesChainKeeper(t *testing.T) { // make and configure a mocked evmtypes.ChainKeeper mockedChainKeeper := &ChainKeeperMock{ CreateERC20TokenFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string, details evmtypes.TokenDetails, address evmtypes.Address) (evmtypes.ERC20Token, error) { panic("mock out the CreateERC20Token method") }, CreateNewBatchToSignFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.CommandBatch, error) { panic("mock out the CreateNewBatchToSign method") }, DeleteDepositFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit) { panic("mock out the DeleteDeposit method") }, DeleteUnsignedCommandBatchIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) { panic("mock out the DeleteUnsignedCommandBatchID method") }, EnqueueCommandFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, cmd evmtypes.Command) error { panic("mock out the EnqueueCommand method") }, GetBatchByIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) evmtypes.CommandBatch { panic("mock out the GetBatchByID method") }, GetBurnerAddressAndSaltFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, token evmtypes.ERC20Token, recipient string, gatewayAddr evmtypes.Address) (evmtypes.Address, evmtypes.Hash, error) { panic("mock out the GetBurnerAddressAndSalt method") }, GetBurnerByteCodeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool) { panic("mock out the GetBurnerByteCode method") }, GetBurnerInfoFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address) *evmtypes.BurnerInfo { panic("mock out the GetBurnerInfo method") }, GetChainIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (github_com_cosmos_cosmos_sdk_types.Int, bool) { panic("mock out the GetChainID method") }, GetChainIDByNetworkFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, network string) (github_com_cosmos_cosmos_sdk_types.Int, bool) { panic("mock out the GetChainIDByNetwork method") }, GetCommandFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id evmtypes.CommandID) (evmtypes.Command, bool) { panic("mock out the GetCommand method") }, GetConfirmedDepositsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Deposit { panic("mock out the GetConfirmedDeposits method") }, GetConfirmedEventQueueFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.KVQueue { panic("mock out the GetConfirmedEventQueue method") }, GetDepositFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, txID evmtypes.Hash, burnerAddr evmtypes.Address) (evmtypes.ERC20Deposit, evmtypes.DepositStatus, bool) { panic("mock out the GetDeposit method") }, GetERC20TokenByAssetFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) evmtypes.ERC20Token { panic("mock out the GetERC20TokenByAsset method") }, GetERC20TokenBySymbolFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) evmtypes.ERC20Token { panic("mock out the GetERC20TokenBySymbol method") }, GetEventFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) (evmtypes.Event, bool) { panic("mock out the GetEvent method") }, GetGatewayAddressFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.Address, bool) { panic("mock out the GetGatewayAddress method") }, GetLatestCommandBatchFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.CommandBatch { panic("mock out the GetLatestCommandBatch method") }, GetMinVoterCountFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool) { panic("mock out the GetMinVoterCount method") }, GetNameFunc: func() string { panic("mock out the GetName method") }, GetNetworkFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (string, bool) { panic("mock out the GetNetwork method") }, GetNetworkByIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id github_com_cosmos_cosmos_sdk_types.Int) (string, bool) { panic("mock out the GetNetworkByID method") }, GetParamsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.Params { panic("mock out the GetParams method") }, GetPendingCommandsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.Command { panic("mock out the GetPendingCommands method") }, GetRequiredConfirmationHeightFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (uint64, bool) { panic("mock out the GetRequiredConfirmationHeight method") }, GetRevoteLockingPeriodFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool) { panic("mock out the GetRevoteLockingPeriod method") }, GetTokenByteCodeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool) { panic("mock out the GetTokenByteCode method") }, GetTokensFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Token { panic("mock out the GetTokens method") }, GetVotingThresholdFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (utils.Threshold, bool) { panic("mock out the GetVotingThreshold method") }, LoggerFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger { panic("mock out the Logger method") }, SetBurnerInfoFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, burnerInfo evmtypes.BurnerInfo) { panic("mock out the SetBurnerInfo method") }, SetConfirmedEventFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, event evmtypes.Event) error { panic("mock out the SetConfirmedEvent method") }, SetDepositFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit, state evmtypes.DepositStatus) { panic("mock out the SetDeposit method") }, SetEventCompletedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error { panic("mock out the SetEventCompleted method") }, SetEventFailedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error { panic("mock out the SetEventFailed method") }, SetGatewayFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address) { panic("mock out the SetGateway method") }, SetLatestSignedCommandBatchIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) { panic("mock out the SetLatestSignedCommandBatchID method") }, SetParamsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, p evmtypes.Params) { panic("mock out the SetParams method") }, } // use mockedChainKeeper in code that requires evmtypes.ChainKeeper // and then make assertions. }
func (*ChainKeeperMock) CreateERC20Token ¶
func (mock *ChainKeeperMock) CreateERC20Token(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string, details evmtypes.TokenDetails, address evmtypes.Address) (evmtypes.ERC20Token, error)
CreateERC20Token calls CreateERC20TokenFunc.
func (*ChainKeeperMock) CreateERC20TokenCalls ¶
func (mock *ChainKeeperMock) CreateERC20TokenCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Asset string Details evmtypes.TokenDetails Address evmtypes.Address }
CreateERC20TokenCalls gets all the calls that were made to CreateERC20Token. Check the length with:
len(mockedChainKeeper.CreateERC20TokenCalls())
func (*ChainKeeperMock) CreateNewBatchToSign ¶
func (mock *ChainKeeperMock) CreateNewBatchToSign(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.CommandBatch, error)
CreateNewBatchToSign calls CreateNewBatchToSignFunc.
func (*ChainKeeperMock) CreateNewBatchToSignCalls ¶
func (mock *ChainKeeperMock) CreateNewBatchToSignCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
CreateNewBatchToSignCalls gets all the calls that were made to CreateNewBatchToSign. Check the length with:
len(mockedChainKeeper.CreateNewBatchToSignCalls())
func (*ChainKeeperMock) DeleteDeposit ¶
func (mock *ChainKeeperMock) DeleteDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit)
DeleteDeposit calls DeleteDepositFunc.
func (*ChainKeeperMock) DeleteDepositCalls ¶
func (mock *ChainKeeperMock) DeleteDepositCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Deposit evmtypes.ERC20Deposit }
DeleteDepositCalls gets all the calls that were made to DeleteDeposit. Check the length with:
len(mockedChainKeeper.DeleteDepositCalls())
func (*ChainKeeperMock) DeleteUnsignedCommandBatchID ¶ added in v0.10.0
func (mock *ChainKeeperMock) DeleteUnsignedCommandBatchID(ctx github_com_cosmos_cosmos_sdk_types.Context)
DeleteUnsignedCommandBatchID calls DeleteUnsignedCommandBatchIDFunc.
func (*ChainKeeperMock) DeleteUnsignedCommandBatchIDCalls ¶ added in v0.10.0
func (mock *ChainKeeperMock) DeleteUnsignedCommandBatchIDCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
DeleteUnsignedCommandBatchIDCalls gets all the calls that were made to DeleteUnsignedCommandBatchID. Check the length with:
len(mockedChainKeeper.DeleteUnsignedCommandBatchIDCalls())
func (*ChainKeeperMock) EnqueueCommand ¶
func (mock *ChainKeeperMock) EnqueueCommand(ctx github_com_cosmos_cosmos_sdk_types.Context, cmd evmtypes.Command) error
EnqueueCommand calls EnqueueCommandFunc.
func (*ChainKeeperMock) EnqueueCommandCalls ¶
func (mock *ChainKeeperMock) EnqueueCommandCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Cmd evmtypes.Command }
EnqueueCommandCalls gets all the calls that were made to EnqueueCommand. Check the length with:
len(mockedChainKeeper.EnqueueCommandCalls())
func (*ChainKeeperMock) GetBatchByID ¶
func (mock *ChainKeeperMock) GetBatchByID(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) evmtypes.CommandBatch
GetBatchByID calls GetBatchByIDFunc.
func (*ChainKeeperMock) GetBatchByIDCalls ¶
func (mock *ChainKeeperMock) GetBatchByIDCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ID []byte }
GetBatchByIDCalls gets all the calls that were made to GetBatchByID. Check the length with:
len(mockedChainKeeper.GetBatchByIDCalls())
func (*ChainKeeperMock) GetBurnerAddressAndSalt ¶
func (mock *ChainKeeperMock) GetBurnerAddressAndSalt(ctx github_com_cosmos_cosmos_sdk_types.Context, token evmtypes.ERC20Token, recipient string, gatewayAddr evmtypes.Address) (evmtypes.Address, evmtypes.Hash, error)
GetBurnerAddressAndSalt calls GetBurnerAddressAndSaltFunc.
func (*ChainKeeperMock) GetBurnerAddressAndSaltCalls ¶
func (mock *ChainKeeperMock) GetBurnerAddressAndSaltCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Token evmtypes.ERC20Token Recipient string GatewayAddr evmtypes.Address }
GetBurnerAddressAndSaltCalls gets all the calls that were made to GetBurnerAddressAndSalt. Check the length with:
len(mockedChainKeeper.GetBurnerAddressAndSaltCalls())
func (*ChainKeeperMock) GetBurnerByteCode ¶ added in v0.14.0
func (mock *ChainKeeperMock) GetBurnerByteCode(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool)
GetBurnerByteCode calls GetBurnerByteCodeFunc.
func (*ChainKeeperMock) GetBurnerByteCodeCalls ¶ added in v0.14.0
func (mock *ChainKeeperMock) GetBurnerByteCodeCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetBurnerByteCodeCalls gets all the calls that were made to GetBurnerByteCode. Check the length with:
len(mockedChainKeeper.GetBurnerByteCodeCalls())
func (*ChainKeeperMock) GetBurnerInfo ¶
func (mock *ChainKeeperMock) GetBurnerInfo(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address) *evmtypes.BurnerInfo
GetBurnerInfo calls GetBurnerInfoFunc.
func (*ChainKeeperMock) GetBurnerInfoCalls ¶
func (mock *ChainKeeperMock) GetBurnerInfoCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Address evmtypes.Address }
GetBurnerInfoCalls gets all the calls that were made to GetBurnerInfo. Check the length with:
len(mockedChainKeeper.GetBurnerInfoCalls())
func (*ChainKeeperMock) GetChainID ¶ added in v0.9.0
func (mock *ChainKeeperMock) GetChainID(ctx github_com_cosmos_cosmos_sdk_types.Context) (github_com_cosmos_cosmos_sdk_types.Int, bool)
GetChainID calls GetChainIDFunc.
func (*ChainKeeperMock) GetChainIDByNetwork ¶
func (mock *ChainKeeperMock) GetChainIDByNetwork(ctx github_com_cosmos_cosmos_sdk_types.Context, network string) (github_com_cosmos_cosmos_sdk_types.Int, bool)
GetChainIDByNetwork calls GetChainIDByNetworkFunc.
func (*ChainKeeperMock) GetChainIDByNetworkCalls ¶
func (mock *ChainKeeperMock) GetChainIDByNetworkCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Network string }
GetChainIDByNetworkCalls gets all the calls that were made to GetChainIDByNetwork. Check the length with:
len(mockedChainKeeper.GetChainIDByNetworkCalls())
func (*ChainKeeperMock) GetChainIDCalls ¶ added in v0.9.0
func (mock *ChainKeeperMock) GetChainIDCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetChainIDCalls gets all the calls that were made to GetChainID. Check the length with:
len(mockedChainKeeper.GetChainIDCalls())
func (*ChainKeeperMock) GetCommand ¶ added in v0.10.0
func (mock *ChainKeeperMock) GetCommand(ctx github_com_cosmos_cosmos_sdk_types.Context, id evmtypes.CommandID) (evmtypes.Command, bool)
GetCommand calls GetCommandFunc.
func (*ChainKeeperMock) GetCommandCalls ¶ added in v0.10.0
func (mock *ChainKeeperMock) GetCommandCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ID evmtypes.CommandID }
GetCommandCalls gets all the calls that were made to GetCommand. Check the length with:
len(mockedChainKeeper.GetCommandCalls())
func (*ChainKeeperMock) GetConfirmedDeposits ¶
func (mock *ChainKeeperMock) GetConfirmedDeposits(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Deposit
GetConfirmedDeposits calls GetConfirmedDepositsFunc.
func (*ChainKeeperMock) GetConfirmedDepositsCalls ¶
func (mock *ChainKeeperMock) GetConfirmedDepositsCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetConfirmedDepositsCalls gets all the calls that were made to GetConfirmedDeposits. Check the length with:
len(mockedChainKeeper.GetConfirmedDepositsCalls())
func (*ChainKeeperMock) GetConfirmedEventQueue ¶ added in v0.17.0
func (mock *ChainKeeperMock) GetConfirmedEventQueue(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.KVQueue
GetConfirmedEventQueue calls GetConfirmedEventQueueFunc.
func (*ChainKeeperMock) GetConfirmedEventQueueCalls ¶ added in v0.17.0
func (mock *ChainKeeperMock) GetConfirmedEventQueueCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetConfirmedEventQueueCalls gets all the calls that were made to GetConfirmedEventQueue. Check the length with:
len(mockedChainKeeper.GetConfirmedEventQueueCalls())
func (*ChainKeeperMock) GetDeposit ¶
func (mock *ChainKeeperMock) GetDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, txID evmtypes.Hash, burnerAddr evmtypes.Address) (evmtypes.ERC20Deposit, evmtypes.DepositStatus, bool)
GetDeposit calls GetDepositFunc.
func (*ChainKeeperMock) GetDepositCalls ¶
func (mock *ChainKeeperMock) GetDepositCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context TxID evmtypes.Hash BurnerAddr evmtypes.Address }
GetDepositCalls gets all the calls that were made to GetDeposit. Check the length with:
len(mockedChainKeeper.GetDepositCalls())
func (*ChainKeeperMock) GetERC20TokenByAsset ¶
func (mock *ChainKeeperMock) GetERC20TokenByAsset(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) evmtypes.ERC20Token
GetERC20TokenByAsset calls GetERC20TokenByAssetFunc.
func (*ChainKeeperMock) GetERC20TokenByAssetCalls ¶
func (mock *ChainKeeperMock) GetERC20TokenByAssetCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Asset string }
GetERC20TokenByAssetCalls gets all the calls that were made to GetERC20TokenByAsset. Check the length with:
len(mockedChainKeeper.GetERC20TokenByAssetCalls())
func (*ChainKeeperMock) GetERC20TokenBySymbol ¶
func (mock *ChainKeeperMock) GetERC20TokenBySymbol(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) evmtypes.ERC20Token
GetERC20TokenBySymbol calls GetERC20TokenBySymbolFunc.
func (*ChainKeeperMock) GetERC20TokenBySymbolCalls ¶
func (mock *ChainKeeperMock) GetERC20TokenBySymbolCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Symbol string }
GetERC20TokenBySymbolCalls gets all the calls that were made to GetERC20TokenBySymbol. Check the length with:
len(mockedChainKeeper.GetERC20TokenBySymbolCalls())
func (*ChainKeeperMock) GetEvent ¶ added in v0.17.0
func (mock *ChainKeeperMock) GetEvent(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) (evmtypes.Event, bool)
GetEvent calls GetEventFunc.
func (*ChainKeeperMock) GetEventCalls ¶ added in v0.17.0
func (mock *ChainKeeperMock) GetEventCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context EventID evmtypes.EventID }
GetEventCalls gets all the calls that were made to GetEvent. Check the length with:
len(mockedChainKeeper.GetEventCalls())
func (*ChainKeeperMock) GetGatewayAddress ¶
func (mock *ChainKeeperMock) GetGatewayAddress(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.Address, bool)
GetGatewayAddress calls GetGatewayAddressFunc.
func (*ChainKeeperMock) GetGatewayAddressCalls ¶
func (mock *ChainKeeperMock) GetGatewayAddressCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetGatewayAddressCalls gets all the calls that were made to GetGatewayAddress. Check the length with:
len(mockedChainKeeper.GetGatewayAddressCalls())
func (*ChainKeeperMock) GetLatestCommandBatch ¶
func (mock *ChainKeeperMock) GetLatestCommandBatch(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.CommandBatch
GetLatestCommandBatch calls GetLatestCommandBatchFunc.
func (*ChainKeeperMock) GetLatestCommandBatchCalls ¶
func (mock *ChainKeeperMock) GetLatestCommandBatchCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetLatestCommandBatchCalls gets all the calls that were made to GetLatestCommandBatch. Check the length with:
len(mockedChainKeeper.GetLatestCommandBatchCalls())
func (*ChainKeeperMock) GetMinVoterCount ¶
func (mock *ChainKeeperMock) GetMinVoterCount(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool)
GetMinVoterCount calls GetMinVoterCountFunc.
func (*ChainKeeperMock) GetMinVoterCountCalls ¶
func (mock *ChainKeeperMock) GetMinVoterCountCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetMinVoterCountCalls gets all the calls that were made to GetMinVoterCount. Check the length with:
len(mockedChainKeeper.GetMinVoterCountCalls())
func (*ChainKeeperMock) GetName ¶
func (mock *ChainKeeperMock) GetName() string
GetName calls GetNameFunc.
func (*ChainKeeperMock) GetNameCalls ¶
func (mock *ChainKeeperMock) GetNameCalls() []struct { }
GetNameCalls gets all the calls that were made to GetName. Check the length with:
len(mockedChainKeeper.GetNameCalls())
func (*ChainKeeperMock) GetNetwork ¶
func (mock *ChainKeeperMock) GetNetwork(ctx github_com_cosmos_cosmos_sdk_types.Context) (string, bool)
GetNetwork calls GetNetworkFunc.
func (*ChainKeeperMock) GetNetworkByID ¶
func (mock *ChainKeeperMock) GetNetworkByID(ctx github_com_cosmos_cosmos_sdk_types.Context, id github_com_cosmos_cosmos_sdk_types.Int) (string, bool)
GetNetworkByID calls GetNetworkByIDFunc.
func (*ChainKeeperMock) GetNetworkByIDCalls ¶
func (mock *ChainKeeperMock) GetNetworkByIDCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ID github_com_cosmos_cosmos_sdk_types.Int }
GetNetworkByIDCalls gets all the calls that were made to GetNetworkByID. Check the length with:
len(mockedChainKeeper.GetNetworkByIDCalls())
func (*ChainKeeperMock) GetNetworkCalls ¶
func (mock *ChainKeeperMock) GetNetworkCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetNetworkCalls gets all the calls that were made to GetNetwork. Check the length with:
len(mockedChainKeeper.GetNetworkCalls())
func (*ChainKeeperMock) GetParams ¶ added in v0.9.0
func (mock *ChainKeeperMock) GetParams(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.Params
GetParams calls GetParamsFunc.
func (*ChainKeeperMock) GetParamsCalls ¶ added in v0.9.0
func (mock *ChainKeeperMock) GetParamsCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetParamsCalls gets all the calls that were made to GetParams. Check the length with:
len(mockedChainKeeper.GetParamsCalls())
func (*ChainKeeperMock) GetPendingCommands ¶ added in v0.10.0
func (mock *ChainKeeperMock) GetPendingCommands(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.Command
GetPendingCommands calls GetPendingCommandsFunc.
func (*ChainKeeperMock) GetPendingCommandsCalls ¶ added in v0.10.0
func (mock *ChainKeeperMock) GetPendingCommandsCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetPendingCommandsCalls gets all the calls that were made to GetPendingCommands. Check the length with:
len(mockedChainKeeper.GetPendingCommandsCalls())
func (*ChainKeeperMock) GetRequiredConfirmationHeight ¶
func (mock *ChainKeeperMock) GetRequiredConfirmationHeight(ctx github_com_cosmos_cosmos_sdk_types.Context) (uint64, bool)
GetRequiredConfirmationHeight calls GetRequiredConfirmationHeightFunc.
func (*ChainKeeperMock) GetRequiredConfirmationHeightCalls ¶
func (mock *ChainKeeperMock) GetRequiredConfirmationHeightCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetRequiredConfirmationHeightCalls gets all the calls that were made to GetRequiredConfirmationHeight. Check the length with:
len(mockedChainKeeper.GetRequiredConfirmationHeightCalls())
func (*ChainKeeperMock) GetRevoteLockingPeriod ¶
func (mock *ChainKeeperMock) GetRevoteLockingPeriod(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool)
GetRevoteLockingPeriod calls GetRevoteLockingPeriodFunc.
func (*ChainKeeperMock) GetRevoteLockingPeriodCalls ¶
func (mock *ChainKeeperMock) GetRevoteLockingPeriodCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetRevoteLockingPeriodCalls gets all the calls that were made to GetRevoteLockingPeriod. Check the length with:
len(mockedChainKeeper.GetRevoteLockingPeriodCalls())
func (*ChainKeeperMock) GetTokenByteCode ¶ added in v0.14.0
func (mock *ChainKeeperMock) GetTokenByteCode(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool)
GetTokenByteCode calls GetTokenByteCodeFunc.
func (*ChainKeeperMock) GetTokenByteCodeCalls ¶ added in v0.14.0
func (mock *ChainKeeperMock) GetTokenByteCodeCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetTokenByteCodeCalls gets all the calls that were made to GetTokenByteCode. Check the length with:
len(mockedChainKeeper.GetTokenByteCodeCalls())
func (*ChainKeeperMock) GetTokens ¶ added in v0.14.0
func (mock *ChainKeeperMock) GetTokens(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Token
GetTokens calls GetTokensFunc.
func (*ChainKeeperMock) GetTokensCalls ¶ added in v0.14.0
func (mock *ChainKeeperMock) GetTokensCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetTokensCalls gets all the calls that were made to GetTokens. Check the length with:
len(mockedChainKeeper.GetTokensCalls())
func (*ChainKeeperMock) GetVotingThreshold ¶
func (mock *ChainKeeperMock) GetVotingThreshold(ctx github_com_cosmos_cosmos_sdk_types.Context) (utils.Threshold, bool)
GetVotingThreshold calls GetVotingThresholdFunc.
func (*ChainKeeperMock) GetVotingThresholdCalls ¶
func (mock *ChainKeeperMock) GetVotingThresholdCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetVotingThresholdCalls gets all the calls that were made to GetVotingThreshold. Check the length with:
len(mockedChainKeeper.GetVotingThresholdCalls())
func (*ChainKeeperMock) Logger ¶
func (mock *ChainKeeperMock) Logger(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger
Logger calls LoggerFunc.
func (*ChainKeeperMock) LoggerCalls ¶
func (mock *ChainKeeperMock) LoggerCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
LoggerCalls gets all the calls that were made to Logger. Check the length with:
len(mockedChainKeeper.LoggerCalls())
func (*ChainKeeperMock) SetBurnerInfo ¶
func (mock *ChainKeeperMock) SetBurnerInfo(ctx github_com_cosmos_cosmos_sdk_types.Context, burnerInfo evmtypes.BurnerInfo)
SetBurnerInfo calls SetBurnerInfoFunc.
func (*ChainKeeperMock) SetBurnerInfoCalls ¶
func (mock *ChainKeeperMock) SetBurnerInfoCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context BurnerInfo evmtypes.BurnerInfo }
SetBurnerInfoCalls gets all the calls that were made to SetBurnerInfo. Check the length with:
len(mockedChainKeeper.SetBurnerInfoCalls())
func (*ChainKeeperMock) SetConfirmedEvent ¶ added in v0.17.0
func (mock *ChainKeeperMock) SetConfirmedEvent(ctx github_com_cosmos_cosmos_sdk_types.Context, event evmtypes.Event) error
SetConfirmedEvent calls SetConfirmedEventFunc.
func (*ChainKeeperMock) SetConfirmedEventCalls ¶ added in v0.17.0
func (mock *ChainKeeperMock) SetConfirmedEventCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Event evmtypes.Event }
SetConfirmedEventCalls gets all the calls that were made to SetConfirmedEvent. Check the length with:
len(mockedChainKeeper.SetConfirmedEventCalls())
func (*ChainKeeperMock) SetDeposit ¶
func (mock *ChainKeeperMock) SetDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit, state evmtypes.DepositStatus)
SetDeposit calls SetDepositFunc.
func (*ChainKeeperMock) SetDepositCalls ¶
func (mock *ChainKeeperMock) SetDepositCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Deposit evmtypes.ERC20Deposit State evmtypes.DepositStatus }
SetDepositCalls gets all the calls that were made to SetDeposit. Check the length with:
len(mockedChainKeeper.SetDepositCalls())
func (*ChainKeeperMock) SetEventCompleted ¶ added in v0.17.0
func (mock *ChainKeeperMock) SetEventCompleted(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error
SetEventCompleted calls SetEventCompletedFunc.
func (*ChainKeeperMock) SetEventCompletedCalls ¶ added in v0.17.0
func (mock *ChainKeeperMock) SetEventCompletedCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context EventID evmtypes.EventID }
SetEventCompletedCalls gets all the calls that were made to SetEventCompleted. Check the length with:
len(mockedChainKeeper.SetEventCompletedCalls())
func (*ChainKeeperMock) SetEventFailed ¶ added in v0.17.0
func (mock *ChainKeeperMock) SetEventFailed(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error
SetEventFailed calls SetEventFailedFunc.
func (*ChainKeeperMock) SetEventFailedCalls ¶ added in v0.17.0
func (mock *ChainKeeperMock) SetEventFailedCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context EventID evmtypes.EventID }
SetEventFailedCalls gets all the calls that were made to SetEventFailed. Check the length with:
len(mockedChainKeeper.SetEventFailedCalls())
func (*ChainKeeperMock) SetGateway ¶ added in v0.17.0
func (mock *ChainKeeperMock) SetGateway(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address)
SetGateway calls SetGatewayFunc.
func (*ChainKeeperMock) SetGatewayCalls ¶ added in v0.17.0
func (mock *ChainKeeperMock) SetGatewayCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Address evmtypes.Address }
SetGatewayCalls gets all the calls that were made to SetGateway. Check the length with:
len(mockedChainKeeper.SetGatewayCalls())
func (*ChainKeeperMock) SetLatestSignedCommandBatchID ¶ added in v0.10.0
func (mock *ChainKeeperMock) SetLatestSignedCommandBatchID(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte)
SetLatestSignedCommandBatchID calls SetLatestSignedCommandBatchIDFunc.
func (*ChainKeeperMock) SetLatestSignedCommandBatchIDCalls ¶ added in v0.10.0
func (mock *ChainKeeperMock) SetLatestSignedCommandBatchIDCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ID []byte }
SetLatestSignedCommandBatchIDCalls gets all the calls that were made to SetLatestSignedCommandBatchID. Check the length with:
len(mockedChainKeeper.SetLatestSignedCommandBatchIDCalls())
func (*ChainKeeperMock) SetParams ¶ added in v0.9.0
func (mock *ChainKeeperMock) SetParams(ctx github_com_cosmos_cosmos_sdk_types.Context, p evmtypes.Params)
SetParams calls SetParamsFunc.
func (*ChainKeeperMock) SetParamsCalls ¶ added in v0.9.0
func (mock *ChainKeeperMock) SetParamsCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context P evmtypes.Params }
SetParamsCalls gets all the calls that were made to SetParams. Check the length with:
len(mockedChainKeeper.SetParamsCalls())
type MultisigKeeperMock ¶ added in v0.21.0
type MultisigKeeperMock struct { // AssignKeyFunc mocks the AssignKey method. AssignKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) error // GetCurrentKeyIDFunc mocks the GetCurrentKeyID method. GetCurrentKeyIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool) // GetKeyFunc mocks the GetKey method. GetKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) (github_com_axelarnetwork_axelar_core_x_multisig_exported.Key, bool) // GetNextKeyIDFunc mocks the GetNextKeyID method. GetNextKeyIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool) // RotateKeyFunc mocks the RotateKey method. RotateKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) error // SignFunc mocks the Sign method. SignFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, payloadHash github_com_axelarnetwork_axelar_core_x_multisig_exported.Hash, module string, moduleMetadata ...codec.ProtoMarshaler) error // contains filtered or unexported fields }
MultisigKeeperMock is a mock implementation of evmtypes.MultisigKeeper.
func TestSomethingThatUsesMultisigKeeper(t *testing.T) { // make and configure a mocked evmtypes.MultisigKeeper mockedMultisigKeeper := &MultisigKeeperMock{ AssignKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) error { panic("mock out the AssignKey method") }, GetCurrentKeyIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool) { panic("mock out the GetCurrentKeyID method") }, GetKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) (github_com_axelarnetwork_axelar_core_x_multisig_exported.Key, bool) { panic("mock out the GetKey method") }, GetNextKeyIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool) { panic("mock out the GetNextKeyID method") }, RotateKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) error { panic("mock out the RotateKey method") }, SignFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, payloadHash github_com_axelarnetwork_axelar_core_x_multisig_exported.Hash, module string, moduleMetadata ...codec.ProtoMarshaler) error { panic("mock out the Sign method") }, } // use mockedMultisigKeeper in code that requires evmtypes.MultisigKeeper // and then make assertions. }
func (*MultisigKeeperMock) AssignKey ¶ added in v0.21.0
func (mock *MultisigKeeperMock) AssignKey(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) error
AssignKey calls AssignKeyFunc.
func (*MultisigKeeperMock) AssignKeyCalls ¶ added in v0.21.0
func (mock *MultisigKeeperMock) AssignKeyCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ChainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName KeyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID }
AssignKeyCalls gets all the calls that were made to AssignKey. Check the length with:
len(mockedMultisigKeeper.AssignKeyCalls())
func (*MultisigKeeperMock) GetCurrentKeyID ¶ added in v0.21.0
func (mock *MultisigKeeperMock) GetCurrentKeyID(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool)
GetCurrentKeyID calls GetCurrentKeyIDFunc.
func (*MultisigKeeperMock) GetCurrentKeyIDCalls ¶ added in v0.21.0
func (mock *MultisigKeeperMock) GetCurrentKeyIDCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ChainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName }
GetCurrentKeyIDCalls gets all the calls that were made to GetCurrentKeyID. Check the length with:
len(mockedMultisigKeeper.GetCurrentKeyIDCalls())
func (*MultisigKeeperMock) GetKey ¶ added in v0.21.0
func (mock *MultisigKeeperMock) GetKey(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) (github_com_axelarnetwork_axelar_core_x_multisig_exported.Key, bool)
GetKey calls GetKeyFunc.
func (*MultisigKeeperMock) GetKeyCalls ¶ added in v0.21.0
func (mock *MultisigKeeperMock) GetKeyCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context KeyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID }
GetKeyCalls gets all the calls that were made to GetKey. Check the length with:
len(mockedMultisigKeeper.GetKeyCalls())
func (*MultisigKeeperMock) GetNextKeyID ¶ added in v0.21.0
func (mock *MultisigKeeperMock) GetNextKeyID(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool)
GetNextKeyID calls GetNextKeyIDFunc.
func (*MultisigKeeperMock) GetNextKeyIDCalls ¶ added in v0.21.0
func (mock *MultisigKeeperMock) GetNextKeyIDCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ChainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName }
GetNextKeyIDCalls gets all the calls that were made to GetNextKeyID. Check the length with:
len(mockedMultisigKeeper.GetNextKeyIDCalls())
func (*MultisigKeeperMock) RotateKey ¶ added in v0.21.0
func (mock *MultisigKeeperMock) RotateKey(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) error
RotateKey calls RotateKeyFunc.
func (*MultisigKeeperMock) RotateKeyCalls ¶ added in v0.21.0
func (mock *MultisigKeeperMock) RotateKeyCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ChainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName }
RotateKeyCalls gets all the calls that were made to RotateKey. Check the length with:
len(mockedMultisigKeeper.RotateKeyCalls())
func (*MultisigKeeperMock) Sign ¶ added in v0.21.0
func (mock *MultisigKeeperMock) Sign(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, payloadHash github_com_axelarnetwork_axelar_core_x_multisig_exported.Hash, module string, moduleMetadata ...codec.ProtoMarshaler) error
Sign calls SignFunc.
func (*MultisigKeeperMock) SignCalls ¶ added in v0.21.0
func (mock *MultisigKeeperMock) SignCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context KeyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID PayloadHash github_com_axelarnetwork_axelar_core_x_multisig_exported.Hash Module string ModuleMetadata []codec.ProtoMarshaler }
SignCalls gets all the calls that were made to Sign. Check the length with:
len(mockedMultisigKeeper.SignCalls())
type NexusMock ¶
type NexusMock struct { // AddTransferFeeFunc mocks the AddTransferFee method. AddTransferFeeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, coin github_com_cosmos_cosmos_sdk_types.Coin) // ArchivePendingTransferFunc mocks the ArchivePendingTransfer method. ArchivePendingTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer) // ComputeTransferFeeFunc mocks the ComputeTransferFee method. ComputeTransferFeeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, destinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_cosmos_cosmos_sdk_types.Coin, error) // EnqueueForTransferFunc mocks the EnqueueForTransfer method. EnqueueForTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, amount github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) // EnqueueTransferFunc mocks the EnqueueTransfer method. EnqueueTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, senderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) // GetChainFunc mocks the GetChain method. GetChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) // GetChainByNativeAssetFunc mocks the GetChainByNativeAsset method. GetChainByNativeAssetFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) // GetChainMaintainersFunc mocks the GetChainMaintainers method. GetChainMaintainersFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) []github_com_cosmos_cosmos_sdk_types.ValAddress // GetChainsFunc mocks the GetChains method. GetChainsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain // GetRecipientFunc mocks the GetRecipient method. GetRecipientFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) (github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, bool) // GetTransfersForChainFunc mocks the GetTransfersForChain method. GetTransfersForChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, state github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState) []github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer // IsAssetRegisteredFunc mocks the IsAssetRegistered method. IsAssetRegisteredFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, denom string) bool // IsChainActivatedFunc mocks the IsChainActivated method. IsChainActivatedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) bool // LinkAddressesFunc mocks the LinkAddresses method. LinkAddressesFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) error // MarkChainMaintainerIncorrectVoteFunc mocks the MarkChainMaintainerIncorrectVote method. MarkChainMaintainerIncorrectVoteFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, incorrectVote bool) // MarkChainMaintainerMissingVoteFunc mocks the MarkChainMaintainerMissingVote method. MarkChainMaintainerMissingVoteFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, missingVote bool) // RegisterAssetFunc mocks the RegisterAsset method. RegisterAssetFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_axelarnetwork_axelar_core_x_nexus_exported.Asset) error // SetChainFunc mocks the SetChain method. SetChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) // contains filtered or unexported fields }
NexusMock is a mock implementation of evmtypes.Nexus.
func TestSomethingThatUsesNexus(t *testing.T) { // make and configure a mocked evmtypes.Nexus mockedNexus := &NexusMock{ AddTransferFeeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, coin github_com_cosmos_cosmos_sdk_types.Coin) { panic("mock out the AddTransferFee method") }, ArchivePendingTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer) { panic("mock out the ArchivePendingTransfer method") }, ComputeTransferFeeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, destinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_cosmos_cosmos_sdk_types.Coin, error) { panic("mock out the ComputeTransferFee method") }, EnqueueForTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, amount github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) { panic("mock out the EnqueueForTransfer method") }, EnqueueTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, senderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) { panic("mock out the EnqueueTransfer method") }, GetChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) { panic("mock out the GetChain method") }, GetChainByNativeAssetFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) { panic("mock out the GetChainByNativeAsset method") }, GetChainMaintainersFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) []github_com_cosmos_cosmos_sdk_types.ValAddress { panic("mock out the GetChainMaintainers method") }, GetChainsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain { panic("mock out the GetChains method") }, GetRecipientFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) (github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, bool) { panic("mock out the GetRecipient method") }, GetTransfersForChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, state github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState) []github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer { panic("mock out the GetTransfersForChain method") }, IsAssetRegisteredFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, denom string) bool { panic("mock out the IsAssetRegistered method") }, IsChainActivatedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) bool { panic("mock out the IsChainActivated method") }, LinkAddressesFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) error { panic("mock out the LinkAddresses method") }, MarkChainMaintainerIncorrectVoteFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, incorrectVote bool) { panic("mock out the MarkChainMaintainerIncorrectVote method") }, MarkChainMaintainerMissingVoteFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, missingVote bool) { panic("mock out the MarkChainMaintainerMissingVote method") }, RegisterAssetFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_axelarnetwork_axelar_core_x_nexus_exported.Asset) error { panic("mock out the RegisterAsset method") }, SetChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) { panic("mock out the SetChain method") }, } // use mockedNexus in code that requires evmtypes.Nexus // and then make assertions. }
func (*NexusMock) AddTransferFee ¶ added in v0.17.0
func (mock *NexusMock) AddTransferFee(ctx github_com_cosmos_cosmos_sdk_types.Context, coin github_com_cosmos_cosmos_sdk_types.Coin)
AddTransferFee calls AddTransferFeeFunc.
func (*NexusMock) AddTransferFeeCalls ¶ added in v0.17.0
func (mock *NexusMock) AddTransferFeeCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Coin github_com_cosmos_cosmos_sdk_types.Coin }
AddTransferFeeCalls gets all the calls that were made to AddTransferFee. Check the length with:
len(mockedNexus.AddTransferFeeCalls())
func (*NexusMock) ArchivePendingTransfer ¶
func (mock *NexusMock) ArchivePendingTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer)
ArchivePendingTransfer calls ArchivePendingTransferFunc.
func (*NexusMock) ArchivePendingTransferCalls ¶
func (mock *NexusMock) ArchivePendingTransferCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer }
ArchivePendingTransferCalls gets all the calls that were made to ArchivePendingTransfer. Check the length with:
len(mockedNexus.ArchivePendingTransferCalls())
func (*NexusMock) ComputeTransferFee ¶ added in v0.17.0
func (mock *NexusMock) ComputeTransferFee(ctx github_com_cosmos_cosmos_sdk_types.Context, sourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, destinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_cosmos_cosmos_sdk_types.Coin, error)
ComputeTransferFee calls ComputeTransferFeeFunc.
func (*NexusMock) ComputeTransferFeeCalls ¶ added in v0.17.0
func (mock *NexusMock) ComputeTransferFeeCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain Asset github_com_cosmos_cosmos_sdk_types.Coin }
ComputeTransferFeeCalls gets all the calls that were made to ComputeTransferFee. Check the length with:
len(mockedNexus.ComputeTransferFeeCalls())
func (*NexusMock) EnqueueForTransfer ¶
func (mock *NexusMock) EnqueueForTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, amount github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error)
EnqueueForTransfer calls EnqueueForTransferFunc.
func (*NexusMock) EnqueueForTransferCalls ¶
func (mock *NexusMock) EnqueueForTransferCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress Amount github_com_cosmos_cosmos_sdk_types.Coin }
EnqueueForTransferCalls gets all the calls that were made to EnqueueForTransfer. Check the length with:
len(mockedNexus.EnqueueForTransferCalls())
func (*NexusMock) EnqueueTransfer ¶ added in v0.17.0
func (mock *NexusMock) EnqueueTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, senderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error)
EnqueueTransfer calls EnqueueTransferFunc.
func (*NexusMock) EnqueueTransferCalls ¶ added in v0.17.0
func (mock *NexusMock) EnqueueTransferCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context SenderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain Recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress Asset github_com_cosmos_cosmos_sdk_types.Coin }
EnqueueTransferCalls gets all the calls that were made to EnqueueTransfer. Check the length with:
len(mockedNexus.EnqueueTransferCalls())
func (*NexusMock) GetChain ¶
func (mock *NexusMock) GetChain(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool)
GetChain calls GetChainFunc.
func (*NexusMock) GetChainByNativeAsset ¶ added in v0.14.0
func (mock *NexusMock) GetChainByNativeAsset(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool)
GetChainByNativeAsset calls GetChainByNativeAssetFunc.
func (*NexusMock) GetChainByNativeAssetCalls ¶ added in v0.14.0
func (mock *NexusMock) GetChainByNativeAssetCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Asset string }
GetChainByNativeAssetCalls gets all the calls that were made to GetChainByNativeAsset. Check the length with:
len(mockedNexus.GetChainByNativeAssetCalls())
func (*NexusMock) GetChainCalls ¶
func (mock *NexusMock) GetChainCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName }
GetChainCalls gets all the calls that were made to GetChain. Check the length with:
len(mockedNexus.GetChainCalls())
func (*NexusMock) GetChainMaintainers ¶
func (mock *NexusMock) GetChainMaintainers(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) []github_com_cosmos_cosmos_sdk_types.ValAddress
GetChainMaintainers calls GetChainMaintainersFunc.
func (*NexusMock) GetChainMaintainersCalls ¶
func (mock *NexusMock) GetChainMaintainersCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain }
GetChainMaintainersCalls gets all the calls that were made to GetChainMaintainers. Check the length with:
len(mockedNexus.GetChainMaintainersCalls())
func (*NexusMock) GetChains ¶
func (mock *NexusMock) GetChains(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
GetChains calls GetChainsFunc.
func (*NexusMock) GetChainsCalls ¶
func (mock *NexusMock) GetChainsCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetChainsCalls gets all the calls that were made to GetChains. Check the length with:
len(mockedNexus.GetChainsCalls())
func (*NexusMock) GetRecipient ¶
func (mock *NexusMock) GetRecipient(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) (github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, bool)
GetRecipient calls GetRecipientFunc.
func (*NexusMock) GetRecipientCalls ¶
func (mock *NexusMock) GetRecipientCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress }
GetRecipientCalls gets all the calls that were made to GetRecipient. Check the length with:
len(mockedNexus.GetRecipientCalls())
func (*NexusMock) GetTransfersForChain ¶
func (mock *NexusMock) GetTransfersForChain(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, state github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState) []github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer
GetTransfersForChain calls GetTransfersForChainFunc.
func (*NexusMock) GetTransfersForChainCalls ¶
func (mock *NexusMock) GetTransfersForChainCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain State github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState }
GetTransfersForChainCalls gets all the calls that were made to GetTransfersForChain. Check the length with:
len(mockedNexus.GetTransfersForChainCalls())
func (*NexusMock) IsAssetRegistered ¶
func (mock *NexusMock) IsAssetRegistered(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, denom string) bool
IsAssetRegistered calls IsAssetRegisteredFunc.
func (*NexusMock) IsAssetRegisteredCalls ¶
func (mock *NexusMock) IsAssetRegisteredCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain Denom string }
IsAssetRegisteredCalls gets all the calls that were made to IsAssetRegistered. Check the length with:
len(mockedNexus.IsAssetRegisteredCalls())
func (*NexusMock) IsChainActivated ¶
func (mock *NexusMock) IsChainActivated(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) bool
IsChainActivated calls IsChainActivatedFunc.
func (*NexusMock) IsChainActivatedCalls ¶
func (mock *NexusMock) IsChainActivatedCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain }
IsChainActivatedCalls gets all the calls that were made to IsChainActivated. Check the length with:
len(mockedNexus.IsChainActivatedCalls())
func (*NexusMock) LinkAddresses ¶
func (mock *NexusMock) LinkAddresses(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) error
LinkAddresses calls LinkAddressesFunc.
func (*NexusMock) LinkAddressesCalls ¶
func (mock *NexusMock) LinkAddressesCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress Recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress }
LinkAddressesCalls gets all the calls that were made to LinkAddresses. Check the length with:
len(mockedNexus.LinkAddressesCalls())
func (*NexusMock) MarkChainMaintainerIncorrectVote ¶ added in v0.18.0
func (mock *NexusMock) MarkChainMaintainerIncorrectVote(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, incorrectVote bool)
MarkChainMaintainerIncorrectVote calls MarkChainMaintainerIncorrectVoteFunc.
func (*NexusMock) MarkChainMaintainerIncorrectVoteCalls ¶ added in v0.18.0
func (mock *NexusMock) MarkChainMaintainerIncorrectVoteCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain Address github_com_cosmos_cosmos_sdk_types.ValAddress IncorrectVote bool }
MarkChainMaintainerIncorrectVoteCalls gets all the calls that were made to MarkChainMaintainerIncorrectVote. Check the length with:
len(mockedNexus.MarkChainMaintainerIncorrectVoteCalls())
func (*NexusMock) MarkChainMaintainerMissingVote ¶ added in v0.18.0
func (mock *NexusMock) MarkChainMaintainerMissingVote(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, missingVote bool)
MarkChainMaintainerMissingVote calls MarkChainMaintainerMissingVoteFunc.
func (*NexusMock) MarkChainMaintainerMissingVoteCalls ¶ added in v0.18.0
func (mock *NexusMock) MarkChainMaintainerMissingVoteCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain Address github_com_cosmos_cosmos_sdk_types.ValAddress MissingVote bool }
MarkChainMaintainerMissingVoteCalls gets all the calls that were made to MarkChainMaintainerMissingVote. Check the length with:
len(mockedNexus.MarkChainMaintainerMissingVoteCalls())
func (*NexusMock) RegisterAsset ¶
func (mock *NexusMock) RegisterAsset(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_axelarnetwork_axelar_core_x_nexus_exported.Asset) error
RegisterAsset calls RegisterAssetFunc.
func (*NexusMock) RegisterAssetCalls ¶
func (mock *NexusMock) RegisterAssetCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain Asset github_com_axelarnetwork_axelar_core_x_nexus_exported.Asset }
RegisterAssetCalls gets all the calls that were made to RegisterAsset. Check the length with:
len(mockedNexus.RegisterAssetCalls())
func (*NexusMock) SetChain ¶
func (mock *NexusMock) SetChain(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain)
SetChain calls SetChainFunc.
func (*NexusMock) SetChainCalls ¶
func (mock *NexusMock) SetChainCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain }
SetChainCalls gets all the calls that were made to SetChain. Check the length with:
len(mockedNexus.SetChainCalls())
type RewarderMock ¶ added in v0.18.0
type RewarderMock struct { // GetPoolFunc mocks the GetPool method. GetPoolFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, name string) reward.RewardPool // contains filtered or unexported fields }
RewarderMock is a mock implementation of evmtypes.Rewarder.
func TestSomethingThatUsesRewarder(t *testing.T) { // make and configure a mocked evmtypes.Rewarder mockedRewarder := &RewarderMock{ GetPoolFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, name string) reward.RewardPool { panic("mock out the GetPool method") }, } // use mockedRewarder in code that requires evmtypes.Rewarder // and then make assertions. }
func (*RewarderMock) GetPool ¶ added in v0.18.0
func (mock *RewarderMock) GetPool(ctx github_com_cosmos_cosmos_sdk_types.Context, name string) reward.RewardPool
GetPool calls GetPoolFunc.
func (*RewarderMock) GetPoolCalls ¶ added in v0.18.0
func (mock *RewarderMock) GetPoolCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Name string }
GetPoolCalls gets all the calls that were made to GetPool. Check the length with:
len(mockedRewarder.GetPoolCalls())
type SignerMock ¶
type SignerMock struct { // GetKeyFunc mocks the GetKey method. GetKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID exported.KeyID) (exported.Key, bool) // GetMultisigSignInfoFunc mocks the GetMultisigSignInfo method. GetMultisigSignInfoFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (tsstypes.MultisigSignInfo, bool) // GetSigFunc mocks the GetSig method. GetSigFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (exported.Signature, exported.SigStatus) // contains filtered or unexported fields }
SignerMock is a mock implementation of evmtypes.Signer.
func TestSomethingThatUsesSigner(t *testing.T) { // make and configure a mocked evmtypes.Signer mockedSigner := &SignerMock{ GetKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID exported.KeyID) (exported.Key, bool) { panic("mock out the GetKey method") }, GetMultisigSignInfoFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (tsstypes.MultisigSignInfo, bool) { panic("mock out the GetMultisigSignInfo method") }, GetSigFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (exported.Signature, exported.SigStatus) { panic("mock out the GetSig method") }, } // use mockedSigner in code that requires evmtypes.Signer // and then make assertions. }
func (*SignerMock) GetKey ¶
func (mock *SignerMock) GetKey(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID exported.KeyID) (exported.Key, bool)
GetKey calls GetKeyFunc.
func (*SignerMock) GetKeyCalls ¶
func (mock *SignerMock) GetKeyCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context KeyID exported.KeyID }
GetKeyCalls gets all the calls that were made to GetKey. Check the length with:
len(mockedSigner.GetKeyCalls())
func (*SignerMock) GetMultisigSignInfo ¶ added in v0.21.0
func (mock *SignerMock) GetMultisigSignInfo(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (tsstypes.MultisigSignInfo, bool)
GetMultisigSignInfo calls GetMultisigSignInfoFunc.
func (*SignerMock) GetMultisigSignInfoCalls ¶ added in v0.21.0
func (mock *SignerMock) GetMultisigSignInfoCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context SigID string }
GetMultisigSignInfoCalls gets all the calls that were made to GetMultisigSignInfo. Check the length with:
len(mockedSigner.GetMultisigSignInfoCalls())
func (*SignerMock) GetSig ¶
func (mock *SignerMock) GetSig(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (exported.Signature, exported.SigStatus)
GetSig calls GetSigFunc.
func (*SignerMock) GetSigCalls ¶
func (mock *SignerMock) GetSigCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context SigID string }
GetSigCalls gets all the calls that were made to GetSig. Check the length with:
len(mockedSigner.GetSigCalls())
type SlashingKeeperMock ¶ added in v0.21.0
type SlashingKeeperMock struct { // IsTombstonedFunc mocks the IsTombstoned method. IsTombstonedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, consAddr github_com_cosmos_cosmos_sdk_types.ConsAddress) bool // contains filtered or unexported fields }
SlashingKeeperMock is a mock implementation of evmtypes.SlashingKeeper.
func TestSomethingThatUsesSlashingKeeper(t *testing.T) { // make and configure a mocked evmtypes.SlashingKeeper mockedSlashingKeeper := &SlashingKeeperMock{ IsTombstonedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, consAddr github_com_cosmos_cosmos_sdk_types.ConsAddress) bool { panic("mock out the IsTombstoned method") }, } // use mockedSlashingKeeper in code that requires evmtypes.SlashingKeeper // and then make assertions. }
func (*SlashingKeeperMock) IsTombstoned ¶ added in v0.21.0
func (mock *SlashingKeeperMock) IsTombstoned(ctx github_com_cosmos_cosmos_sdk_types.Context, consAddr github_com_cosmos_cosmos_sdk_types.ConsAddress) bool
IsTombstoned calls IsTombstonedFunc.
func (*SlashingKeeperMock) IsTombstonedCalls ¶ added in v0.21.0
func (mock *SlashingKeeperMock) IsTombstonedCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ConsAddr github_com_cosmos_cosmos_sdk_types.ConsAddress }
IsTombstonedCalls gets all the calls that were made to IsTombstoned. Check the length with:
len(mockedSlashingKeeper.IsTombstonedCalls())
type SnapshotterMock ¶
type SnapshotterMock struct { // CreateSnapshotFunc mocks the CreateSnapshot method. CreateSnapshotFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, candidates []github_com_cosmos_cosmos_sdk_types.ValAddress, filterFunc func(snapshot.ValidatorI) bool, weightFunc func(consensusPower github_com_cosmos_cosmos_sdk_types.Uint) github_com_cosmos_cosmos_sdk_types.Uint, threshold utils.Threshold) (snapshot.Snapshot, error) // GetLatestSnapshotFunc mocks the GetLatestSnapshot method. GetLatestSnapshotFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (snapshot.Snapshot, bool) // GetOperatorFunc mocks the GetOperator method. GetOperatorFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, proxy github_com_cosmos_cosmos_sdk_types.AccAddress) github_com_cosmos_cosmos_sdk_types.ValAddress // GetProxyFunc mocks the GetProxy method. GetProxyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, principal github_com_cosmos_cosmos_sdk_types.ValAddress) (github_com_cosmos_cosmos_sdk_types.AccAddress, bool) // GetSnapshotFunc mocks the GetSnapshot method. GetSnapshotFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, seqNo int64) (snapshot.Snapshot, bool) // GetValidatorIllegibilityFunc mocks the GetValidatorIllegibility method. GetValidatorIllegibilityFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, validator snapshot.SDKValidator) (snapshot.ValidatorIllegibility, error) // TakeSnapshotFunc mocks the TakeSnapshot method. TakeSnapshotFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyRequirement exported.KeyRequirement) (snapshot.Snapshot, error) // contains filtered or unexported fields }
SnapshotterMock is a mock implementation of evmtypes.Snapshotter.
func TestSomethingThatUsesSnapshotter(t *testing.T) { // make and configure a mocked evmtypes.Snapshotter mockedSnapshotter := &SnapshotterMock{ CreateSnapshotFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, candidates []github_com_cosmos_cosmos_sdk_types.ValAddress, filterFunc func(snapshot.ValidatorI) bool, weightFunc func(consensusPower github_com_cosmos_cosmos_sdk_types.Uint) github_com_cosmos_cosmos_sdk_types.Uint, threshold utils.Threshold) (snapshot.Snapshot, error) { panic("mock out the CreateSnapshot method") }, GetLatestSnapshotFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (snapshot.Snapshot, bool) { panic("mock out the GetLatestSnapshot method") }, GetOperatorFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, proxy github_com_cosmos_cosmos_sdk_types.AccAddress) github_com_cosmos_cosmos_sdk_types.ValAddress { panic("mock out the GetOperator method") }, GetProxyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, principal github_com_cosmos_cosmos_sdk_types.ValAddress) (github_com_cosmos_cosmos_sdk_types.AccAddress, bool) { panic("mock out the GetProxy method") }, GetSnapshotFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, seqNo int64) (snapshot.Snapshot, bool) { panic("mock out the GetSnapshot method") }, GetValidatorIllegibilityFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, validator snapshot.SDKValidator) (snapshot.ValidatorIllegibility, error) { panic("mock out the GetValidatorIllegibility method") }, TakeSnapshotFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyRequirement exported.KeyRequirement) (snapshot.Snapshot, error) { panic("mock out the TakeSnapshot method") }, } // use mockedSnapshotter in code that requires evmtypes.Snapshotter // and then make assertions. }
func (*SnapshotterMock) CreateSnapshot ¶ added in v0.21.0
func (mock *SnapshotterMock) CreateSnapshot(ctx github_com_cosmos_cosmos_sdk_types.Context, candidates []github_com_cosmos_cosmos_sdk_types.ValAddress, filterFunc func(snapshot.ValidatorI) bool, weightFunc func(consensusPower github_com_cosmos_cosmos_sdk_types.Uint) github_com_cosmos_cosmos_sdk_types.Uint, threshold utils.Threshold) (snapshot.Snapshot, error)
CreateSnapshot calls CreateSnapshotFunc.
func (*SnapshotterMock) CreateSnapshotCalls ¶ added in v0.21.0
func (mock *SnapshotterMock) CreateSnapshotCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Candidates []github_com_cosmos_cosmos_sdk_types.ValAddress FilterFunc func(snapshot.ValidatorI) bool WeightFunc func(consensusPower github_com_cosmos_cosmos_sdk_types.Uint) github_com_cosmos_cosmos_sdk_types.Uint Threshold utils.Threshold }
CreateSnapshotCalls gets all the calls that were made to CreateSnapshot. Check the length with:
len(mockedSnapshotter.CreateSnapshotCalls())
func (*SnapshotterMock) GetLatestSnapshot ¶
func (mock *SnapshotterMock) GetLatestSnapshot(ctx github_com_cosmos_cosmos_sdk_types.Context) (snapshot.Snapshot, bool)
GetLatestSnapshot calls GetLatestSnapshotFunc.
func (*SnapshotterMock) GetLatestSnapshotCalls ¶
func (mock *SnapshotterMock) GetLatestSnapshotCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetLatestSnapshotCalls gets all the calls that were made to GetLatestSnapshot. Check the length with:
len(mockedSnapshotter.GetLatestSnapshotCalls())
func (*SnapshotterMock) GetOperator ¶
func (mock *SnapshotterMock) GetOperator(ctx github_com_cosmos_cosmos_sdk_types.Context, proxy github_com_cosmos_cosmos_sdk_types.AccAddress) github_com_cosmos_cosmos_sdk_types.ValAddress
GetOperator calls GetOperatorFunc.
func (*SnapshotterMock) GetOperatorCalls ¶
func (mock *SnapshotterMock) GetOperatorCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Proxy github_com_cosmos_cosmos_sdk_types.AccAddress }
GetOperatorCalls gets all the calls that were made to GetOperator. Check the length with:
len(mockedSnapshotter.GetOperatorCalls())
func (*SnapshotterMock) GetProxy ¶
func (mock *SnapshotterMock) GetProxy(ctx github_com_cosmos_cosmos_sdk_types.Context, principal github_com_cosmos_cosmos_sdk_types.ValAddress) (github_com_cosmos_cosmos_sdk_types.AccAddress, bool)
GetProxy calls GetProxyFunc.
func (*SnapshotterMock) GetProxyCalls ¶
func (mock *SnapshotterMock) GetProxyCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Principal github_com_cosmos_cosmos_sdk_types.ValAddress }
GetProxyCalls gets all the calls that were made to GetProxy. Check the length with:
len(mockedSnapshotter.GetProxyCalls())
func (*SnapshotterMock) GetSnapshot ¶
func (mock *SnapshotterMock) GetSnapshot(ctx github_com_cosmos_cosmos_sdk_types.Context, seqNo int64) (snapshot.Snapshot, bool)
GetSnapshot calls GetSnapshotFunc.
func (*SnapshotterMock) GetSnapshotCalls ¶
func (mock *SnapshotterMock) GetSnapshotCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context SeqNo int64 }
GetSnapshotCalls gets all the calls that were made to GetSnapshot. Check the length with:
len(mockedSnapshotter.GetSnapshotCalls())
func (*SnapshotterMock) GetValidatorIllegibility ¶
func (mock *SnapshotterMock) GetValidatorIllegibility(ctx github_com_cosmos_cosmos_sdk_types.Context, validator snapshot.SDKValidator) (snapshot.ValidatorIllegibility, error)
GetValidatorIllegibility calls GetValidatorIllegibilityFunc.
func (*SnapshotterMock) GetValidatorIllegibilityCalls ¶
func (mock *SnapshotterMock) GetValidatorIllegibilityCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Validator snapshot.SDKValidator }
GetValidatorIllegibilityCalls gets all the calls that were made to GetValidatorIllegibility. Check the length with:
len(mockedSnapshotter.GetValidatorIllegibilityCalls())
func (*SnapshotterMock) TakeSnapshot ¶
func (mock *SnapshotterMock) TakeSnapshot(ctx github_com_cosmos_cosmos_sdk_types.Context, keyRequirement exported.KeyRequirement) (snapshot.Snapshot, error)
TakeSnapshot calls TakeSnapshotFunc.
func (*SnapshotterMock) TakeSnapshotCalls ¶
func (mock *SnapshotterMock) TakeSnapshotCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context KeyRequirement exported.KeyRequirement }
TakeSnapshotCalls gets all the calls that were made to TakeSnapshot. Check the length with:
len(mockedSnapshotter.TakeSnapshotCalls())
type StakingKeeperMock ¶ added in v0.21.0
type StakingKeeperMock struct { // PowerReductionFunc mocks the PowerReduction method. PowerReductionFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) github_com_cosmos_cosmos_sdk_types.Int // contains filtered or unexported fields }
StakingKeeperMock is a mock implementation of evmtypes.StakingKeeper.
func TestSomethingThatUsesStakingKeeper(t *testing.T) { // make and configure a mocked evmtypes.StakingKeeper mockedStakingKeeper := &StakingKeeperMock{ PowerReductionFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) github_com_cosmos_cosmos_sdk_types.Int { panic("mock out the PowerReduction method") }, } // use mockedStakingKeeper in code that requires evmtypes.StakingKeeper // and then make assertions. }
func (*StakingKeeperMock) PowerReduction ¶ added in v0.21.0
func (mock *StakingKeeperMock) PowerReduction(ctx github_com_cosmos_cosmos_sdk_types.Context) github_com_cosmos_cosmos_sdk_types.Int
PowerReduction calls PowerReductionFunc.
func (*StakingKeeperMock) PowerReductionCalls ¶ added in v0.21.0
func (mock *StakingKeeperMock) PowerReductionCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
PowerReductionCalls gets all the calls that were made to PowerReduction. Check the length with:
len(mockedStakingKeeper.PowerReductionCalls())
type VoterMock ¶
type VoterMock struct { // InitializePollFunc mocks the InitializePoll method. InitializePollFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, pollBuilder vote.PollBuilder) (vote.PollID, error) // contains filtered or unexported fields }
VoterMock is a mock implementation of evmtypes.Voter.
func TestSomethingThatUsesVoter(t *testing.T) { // make and configure a mocked evmtypes.Voter mockedVoter := &VoterMock{ InitializePollFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, pollBuilder vote.PollBuilder) (vote.PollID, error) { panic("mock out the InitializePoll method") }, } // use mockedVoter in code that requires evmtypes.Voter // and then make assertions. }
func (*VoterMock) InitializePoll ¶
func (mock *VoterMock) InitializePoll(ctx github_com_cosmos_cosmos_sdk_types.Context, pollBuilder vote.PollBuilder) (vote.PollID, error)
InitializePoll calls InitializePollFunc.
func (*VoterMock) InitializePollCalls ¶
func (mock *VoterMock) InitializePollCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context PollBuilder vote.PollBuilder }
InitializePollCalls gets all the calls that were made to InitializePoll. Check the length with:
len(mockedVoter.InitializePollCalls())