Documentation ¶
Index ¶
- type BaseKeeperMock
- func (mock *BaseKeeperMock) CreateChain(ctx github_com_cosmos_cosmos_sdk_types.Context, params types.Params) error
- func (mock *BaseKeeperMock) CreateChainCalls() []struct{ ... }
- func (mock *BaseKeeperMock) ForChain(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (types.ChainKeeper, error)
- func (mock *BaseKeeperMock) ForChainCalls() []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, ...) (types.ERC20Token, error)
- func (mock *ChainKeeperMock) CreateERC20TokenCalls() []struct{ ... }
- func (mock *ChainKeeperMock) CreateNewBatchToSign(ctx github_com_cosmos_cosmos_sdk_types.Context) (types.CommandBatch, error)
- func (mock *ChainKeeperMock) CreateNewBatchToSignCalls() []struct{ ... }
- func (mock *ChainKeeperMock) DeleteDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit types.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 types.Command) error
- func (mock *ChainKeeperMock) EnqueueCommandCalls() []struct{ ... }
- func (mock *ChainKeeperMock) EnqueueConfirmedEvent(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error
- func (mock *ChainKeeperMock) EnqueueConfirmedEventCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GenerateSalt(ctx github_com_cosmos_cosmos_sdk_types.Context, recipient string) types.Hash
- func (mock *ChainKeeperMock) GenerateSaltCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetBatchByID(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) types.CommandBatch
- func (mock *ChainKeeperMock) GetBatchByIDCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetBurnerAddress(ctx github_com_cosmos_cosmos_sdk_types.Context, token types.ERC20Token, ...) (types.Address, error)
- func (mock *ChainKeeperMock) GetBurnerAddressCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetBurnerByteCode(ctx github_com_cosmos_cosmos_sdk_types.Context) []byte
- func (mock *ChainKeeperMock) GetBurnerByteCodeCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetBurnerInfo(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.Address) *types.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 types.CommandID) (types.Command, bool)
- func (mock *ChainKeeperMock) GetCommandCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetConfirmedDepositsPaginated(ctx github_com_cosmos_cosmos_sdk_types.Context, pageRequest *query.PageRequest) ([]types.ERC20Deposit, *query.PageResponse, error)
- func (mock *ChainKeeperMock) GetConfirmedDepositsPaginatedCalls() []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 types.Hash, ...) (types.ERC20Deposit, types.DepositStatus, bool)
- func (mock *ChainKeeperMock) GetDepositCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetDepositsByTxID(ctx github_com_cosmos_cosmos_sdk_types.Context, txID types.Hash, ...) ([]types.ERC20Deposit, error)
- func (mock *ChainKeeperMock) GetDepositsByTxIDCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetERC20TokenByAddress(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.Address) types.ERC20Token
- func (mock *ChainKeeperMock) GetERC20TokenByAddressCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetERC20TokenByAsset(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) types.ERC20Token
- func (mock *ChainKeeperMock) GetERC20TokenByAssetCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetERC20TokenBySymbol(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) types.ERC20Token
- func (mock *ChainKeeperMock) GetERC20TokenBySymbolCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetEvent(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) (types.Event, bool)
- func (mock *ChainKeeperMock) GetEventCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetGatewayAddress(ctx github_com_cosmos_cosmos_sdk_types.Context) (types.Address, bool)
- func (mock *ChainKeeperMock) GetGatewayAddressCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetLatestCommandBatch(ctx github_com_cosmos_cosmos_sdk_types.Context) types.CommandBatch
- func (mock *ChainKeeperMock) GetLatestCommandBatchCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetLegacyDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, txID types.Hash, ...) (types.ERC20Deposit, types.DepositStatus, bool)
- func (mock *ChainKeeperMock) GetLegacyDepositCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetMinVoterCount(ctx github_com_cosmos_cosmos_sdk_types.Context) int64
- func (mock *ChainKeeperMock) GetMinVoterCountCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetName() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName
- func (mock *ChainKeeperMock) GetNameCalls() []struct{}
- func (mock *ChainKeeperMock) GetNetwork(ctx github_com_cosmos_cosmos_sdk_types.Context) string
- 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) types.Params
- func (mock *ChainKeeperMock) GetParamsCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetPendingCommands(ctx github_com_cosmos_cosmos_sdk_types.Context) []types.Command
- func (mock *ChainKeeperMock) GetPendingCommandsCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetRequiredConfirmationHeight(ctx github_com_cosmos_cosmos_sdk_types.Context) uint64
- func (mock *ChainKeeperMock) GetRequiredConfirmationHeightCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetRevoteLockingPeriod(ctx github_com_cosmos_cosmos_sdk_types.Context) int64
- func (mock *ChainKeeperMock) GetRevoteLockingPeriodCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetTokenByteCode(ctx github_com_cosmos_cosmos_sdk_types.Context) []byte
- func (mock *ChainKeeperMock) GetTokenByteCodeCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetTokens(ctx github_com_cosmos_cosmos_sdk_types.Context) []types.ERC20Token
- func (mock *ChainKeeperMock) GetTokensCalls() []struct{ ... }
- func (mock *ChainKeeperMock) GetVotingThreshold(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.Threshold
- 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 types.BurnerInfo)
- func (mock *ChainKeeperMock) SetBurnerInfoCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetConfirmedEvent(ctx github_com_cosmos_cosmos_sdk_types.Context, event types.Event) error
- func (mock *ChainKeeperMock) SetConfirmedEventCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit types.ERC20Deposit, ...)
- func (mock *ChainKeeperMock) SetDepositCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetEventCompleted(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error
- func (mock *ChainKeeperMock) SetEventCompletedCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetEventFailed(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error
- func (mock *ChainKeeperMock) SetEventFailedCalls() []struct{ ... }
- func (mock *ChainKeeperMock) SetGateway(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.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{ ... }
- 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) EnqueueRouteMessage(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error
- func (mock *NexusMock) EnqueueRouteMessageCalls() []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) GetChainMaintainerState(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_axelarnetwork_axelar_core_x_nexus_exported.MaintainerState, bool)
- func (mock *NexusMock) GetChainMaintainerStateCalls() []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) GetProcessingMessages(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) []github_com_axelarnetwork_axelar_core_x_nexus_exported.GeneralMessage
- func (mock *NexusMock) GetProcessingMessagesCalls() []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) GetTransfersForChainPaginated(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) ([]github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer, ...)
- func (mock *NexusMock) GetTransfersForChainPaginatedCalls() []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) RateLimitTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) error
- func (mock *NexusMock) RateLimitTransferCalls() []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{ ... }
- func (mock *NexusMock) SetChainMaintainerState(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) error
- func (mock *NexusMock) SetChainMaintainerStateCalls() []struct{ ... }
- func (mock *NexusMock) SetMessageExecuted(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error
- func (mock *NexusMock) SetMessageExecutedCalls() []struct{ ... }
- func (mock *NexusMock) SetMessageFailed(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error
- func (mock *NexusMock) SetMessageFailedCalls() []struct{ ... }
- func (mock *NexusMock) SetNewMessage(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) error
- func (mock *NexusMock) SetNewMessageCalls() []struct{ ... }
- type RewarderMock
- 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) GetProxy(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) (github_com_cosmos_cosmos_sdk_types.AccAddress, bool)
- func (mock *SnapshotterMock) GetProxyCalls() []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 { // CreateChainFunc mocks the CreateChain method. CreateChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, params types.Params) error // ForChainFunc mocks the ForChain method. ForChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (types.ChainKeeper, error) // 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 types.BaseKeeper.
func TestSomethingThatUsesBaseKeeper(t *testing.T) { // make and configure a mocked types.BaseKeeper mockedBaseKeeper := &BaseKeeperMock{ CreateChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, params types.Params) error { panic("mock out the CreateChain method") }, ForChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (types.ChainKeeper, error) { panic("mock out the ForChain 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 types.BaseKeeper // and then make assertions. }
func (*BaseKeeperMock) CreateChain ¶ added in v0.27.0
func (mock *BaseKeeperMock) CreateChain(ctx github_com_cosmos_cosmos_sdk_types.Context, params types.Params) error
CreateChain calls CreateChainFunc.
func (*BaseKeeperMock) CreateChainCalls ¶ added in v0.27.0
func (mock *BaseKeeperMock) CreateChainCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Params types.Params }
CreateChainCalls gets all the calls that were made to CreateChain. Check the length with:
len(mockedBaseKeeper.CreateChainCalls())
func (*BaseKeeperMock) ForChain ¶
func (mock *BaseKeeperMock) ForChain(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (types.ChainKeeper, error)
ForChain calls ForChainFunc.
func (*BaseKeeperMock) ForChainCalls ¶
func (mock *BaseKeeperMock) ForChainCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context 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) 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 types.TokenDetails, address types.Address) (types.ERC20Token, error) // CreateNewBatchToSignFunc mocks the CreateNewBatchToSign method. CreateNewBatchToSignFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (types.CommandBatch, error) // DeleteDepositFunc mocks the DeleteDeposit method. DeleteDepositFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit types.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 types.Command) error // EnqueueConfirmedEventFunc mocks the EnqueueConfirmedEvent method. EnqueueConfirmedEventFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error // GenerateSaltFunc mocks the GenerateSalt method. GenerateSaltFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, recipient string) types.Hash // GetBatchByIDFunc mocks the GetBatchByID method. GetBatchByIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) types.CommandBatch // GetBurnerAddressFunc mocks the GetBurnerAddress method. GetBurnerAddressFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, token types.ERC20Token, salt types.Hash, gatewayAddr types.Address) (types.Address, error) // GetBurnerByteCodeFunc mocks the GetBurnerByteCode method. GetBurnerByteCodeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []byte // GetBurnerInfoFunc mocks the GetBurnerInfo method. GetBurnerInfoFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.Address) *types.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 types.CommandID) (types.Command, bool) // GetConfirmedDepositsPaginatedFunc mocks the GetConfirmedDepositsPaginated method. GetConfirmedDepositsPaginatedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, pageRequest *query.PageRequest) ([]types.ERC20Deposit, *query.PageResponse, error) // 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 types.Hash, logIndex uint64) (types.ERC20Deposit, types.DepositStatus, bool) // GetDepositsByTxIDFunc mocks the GetDepositsByTxID method. GetDepositsByTxIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, txID types.Hash, status types.DepositStatus) ([]types.ERC20Deposit, error) // GetERC20TokenByAddressFunc mocks the GetERC20TokenByAddress method. GetERC20TokenByAddressFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.Address) types.ERC20Token // GetERC20TokenByAssetFunc mocks the GetERC20TokenByAsset method. GetERC20TokenByAssetFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) types.ERC20Token // GetERC20TokenBySymbolFunc mocks the GetERC20TokenBySymbol method. GetERC20TokenBySymbolFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) types.ERC20Token // GetEventFunc mocks the GetEvent method. GetEventFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) (types.Event, bool) // GetGatewayAddressFunc mocks the GetGatewayAddress method. GetGatewayAddressFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (types.Address, bool) // GetLatestCommandBatchFunc mocks the GetLatestCommandBatch method. GetLatestCommandBatchFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) types.CommandBatch // GetLegacyDepositFunc mocks the GetLegacyDeposit method. GetLegacyDepositFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, txID types.Hash, burnerAddr types.Address) (types.ERC20Deposit, types.DepositStatus, bool) // GetMinVoterCountFunc mocks the GetMinVoterCount method. GetMinVoterCountFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) int64 // GetNameFunc mocks the GetName method. GetNameFunc func() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName // GetNetworkFunc mocks the GetNetwork method. GetNetworkFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) string // 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) types.Params // GetPendingCommandsFunc mocks the GetPendingCommands method. GetPendingCommandsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []types.Command // GetRequiredConfirmationHeightFunc mocks the GetRequiredConfirmationHeight method. GetRequiredConfirmationHeightFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) uint64 // GetRevoteLockingPeriodFunc mocks the GetRevoteLockingPeriod method. GetRevoteLockingPeriodFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) int64 // GetTokenByteCodeFunc mocks the GetTokenByteCode method. GetTokenByteCodeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []byte // GetTokensFunc mocks the GetTokens method. GetTokensFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []types.ERC20Token // GetVotingThresholdFunc mocks the GetVotingThreshold method. GetVotingThresholdFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.Threshold // 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 types.BurnerInfo) // SetConfirmedEventFunc mocks the SetConfirmedEvent method. SetConfirmedEventFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, event types.Event) error // SetDepositFunc mocks the SetDeposit method. SetDepositFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit types.ERC20Deposit, state types.DepositStatus) // SetEventCompletedFunc mocks the SetEventCompleted method. SetEventCompletedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error // SetEventFailedFunc mocks the SetEventFailed method. SetEventFailedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error // SetGatewayFunc mocks the SetGateway method. SetGatewayFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.Address) // SetLatestSignedCommandBatchIDFunc mocks the SetLatestSignedCommandBatchID method. SetLatestSignedCommandBatchIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) // contains filtered or unexported fields }
ChainKeeperMock is a mock implementation of types.ChainKeeper.
func TestSomethingThatUsesChainKeeper(t *testing.T) { // make and configure a mocked types.ChainKeeper mockedChainKeeper := &ChainKeeperMock{ CreateERC20TokenFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string, details types.TokenDetails, address types.Address) (types.ERC20Token, error) { panic("mock out the CreateERC20Token method") }, CreateNewBatchToSignFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (types.CommandBatch, error) { panic("mock out the CreateNewBatchToSign method") }, DeleteDepositFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit types.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 types.Command) error { panic("mock out the EnqueueCommand method") }, EnqueueConfirmedEventFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error { panic("mock out the EnqueueConfirmedEvent method") }, GenerateSaltFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, recipient string) types.Hash { panic("mock out the GenerateSalt method") }, GetBatchByIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) types.CommandBatch { panic("mock out the GetBatchByID method") }, GetBurnerAddressFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, token types.ERC20Token, salt types.Hash, gatewayAddr types.Address) (types.Address, error) { panic("mock out the GetBurnerAddress method") }, GetBurnerByteCodeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []byte { panic("mock out the GetBurnerByteCode method") }, GetBurnerInfoFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.Address) *types.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 types.CommandID) (types.Command, bool) { panic("mock out the GetCommand method") }, GetConfirmedDepositsPaginatedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, pageRequest *query.PageRequest) ([]types.ERC20Deposit, *query.PageResponse, error) { panic("mock out the GetConfirmedDepositsPaginated 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 types.Hash, logIndex uint64) (types.ERC20Deposit, types.DepositStatus, bool) { panic("mock out the GetDeposit method") }, GetDepositsByTxIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, txID types.Hash, status types.DepositStatus) ([]types.ERC20Deposit, error) { panic("mock out the GetDepositsByTxID method") }, GetERC20TokenByAddressFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.Address) types.ERC20Token { panic("mock out the GetERC20TokenByAddress method") }, GetERC20TokenByAssetFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) types.ERC20Token { panic("mock out the GetERC20TokenByAsset method") }, GetERC20TokenBySymbolFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) types.ERC20Token { panic("mock out the GetERC20TokenBySymbol method") }, GetEventFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) (types.Event, bool) { panic("mock out the GetEvent method") }, GetGatewayAddressFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (types.Address, bool) { panic("mock out the GetGatewayAddress method") }, GetLatestCommandBatchFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) types.CommandBatch { panic("mock out the GetLatestCommandBatch method") }, GetLegacyDepositFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, txID types.Hash, burnerAddr types.Address) (types.ERC20Deposit, types.DepositStatus, bool) { panic("mock out the GetLegacyDeposit method") }, GetMinVoterCountFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) int64 { panic("mock out the GetMinVoterCount method") }, GetNameFunc: func() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { panic("mock out the GetName method") }, GetNetworkFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) string { 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) types.Params { panic("mock out the GetParams method") }, GetPendingCommandsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []types.Command { panic("mock out the GetPendingCommands method") }, GetRequiredConfirmationHeightFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) uint64 { panic("mock out the GetRequiredConfirmationHeight method") }, GetRevoteLockingPeriodFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) int64 { panic("mock out the GetRevoteLockingPeriod method") }, GetTokenByteCodeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []byte { panic("mock out the GetTokenByteCode method") }, GetTokensFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []types.ERC20Token { panic("mock out the GetTokens method") }, GetVotingThresholdFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.Threshold { 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 types.BurnerInfo) { panic("mock out the SetBurnerInfo method") }, SetConfirmedEventFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, event types.Event) error { panic("mock out the SetConfirmedEvent method") }, SetDepositFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit types.ERC20Deposit, state types.DepositStatus) { panic("mock out the SetDeposit method") }, SetEventCompletedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error { panic("mock out the SetEventCompleted method") }, SetEventFailedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error { panic("mock out the SetEventFailed method") }, SetGatewayFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.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") }, } // use mockedChainKeeper in code that requires types.ChainKeeper // and then make assertions. }
func (*ChainKeeperMock) CreateERC20Token ¶
func (mock *ChainKeeperMock) CreateERC20Token(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string, details types.TokenDetails, address types.Address) (types.ERC20Token, error)
CreateERC20Token calls CreateERC20TokenFunc.
func (*ChainKeeperMock) CreateERC20TokenCalls ¶
func (mock *ChainKeeperMock) CreateERC20TokenCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Asset string Details types.TokenDetails Address types.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) (types.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 types.ERC20Deposit)
DeleteDeposit calls DeleteDepositFunc.
func (*ChainKeeperMock) DeleteDepositCalls ¶
func (mock *ChainKeeperMock) DeleteDepositCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Deposit types.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 types.Command) error
EnqueueCommand calls EnqueueCommandFunc.
func (*ChainKeeperMock) EnqueueCommandCalls ¶
func (mock *ChainKeeperMock) EnqueueCommandCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Cmd types.Command }
EnqueueCommandCalls gets all the calls that were made to EnqueueCommand. Check the length with:
len(mockedChainKeeper.EnqueueCommandCalls())
func (*ChainKeeperMock) EnqueueConfirmedEvent ¶ added in v0.35.0
func (mock *ChainKeeperMock) EnqueueConfirmedEvent(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID types.EventID) error
EnqueueConfirmedEvent calls EnqueueConfirmedEventFunc.
func (*ChainKeeperMock) EnqueueConfirmedEventCalls ¶ added in v0.35.0
func (mock *ChainKeeperMock) EnqueueConfirmedEventCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context EventID types.EventID }
EnqueueConfirmedEventCalls gets all the calls that were made to EnqueueConfirmedEvent. Check the length with:
len(mockedChainKeeper.EnqueueConfirmedEventCalls())
func (*ChainKeeperMock) GenerateSalt ¶ added in v0.23.0
func (mock *ChainKeeperMock) GenerateSalt(ctx github_com_cosmos_cosmos_sdk_types.Context, recipient string) types.Hash
GenerateSalt calls GenerateSaltFunc.
func (*ChainKeeperMock) GenerateSaltCalls ¶ added in v0.23.0
func (mock *ChainKeeperMock) GenerateSaltCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Recipient string }
GenerateSaltCalls gets all the calls that were made to GenerateSalt. Check the length with:
len(mockedChainKeeper.GenerateSaltCalls())
func (*ChainKeeperMock) GetBatchByID ¶
func (mock *ChainKeeperMock) GetBatchByID(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) types.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) GetBurnerAddress ¶ added in v0.23.0
func (mock *ChainKeeperMock) GetBurnerAddress(ctx github_com_cosmos_cosmos_sdk_types.Context, token types.ERC20Token, salt types.Hash, gatewayAddr types.Address) (types.Address, error)
GetBurnerAddress calls GetBurnerAddressFunc.
func (*ChainKeeperMock) GetBurnerAddressCalls ¶ added in v0.23.0
func (mock *ChainKeeperMock) GetBurnerAddressCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Token types.ERC20Token Salt types.Hash GatewayAddr types.Address }
GetBurnerAddressCalls gets all the calls that were made to GetBurnerAddress. Check the length with:
len(mockedChainKeeper.GetBurnerAddressCalls())
func (*ChainKeeperMock) GetBurnerByteCode ¶ added in v0.14.0
func (mock *ChainKeeperMock) GetBurnerByteCode(ctx github_com_cosmos_cosmos_sdk_types.Context) []byte
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 types.Address) *types.BurnerInfo
GetBurnerInfo calls GetBurnerInfoFunc.
func (*ChainKeeperMock) GetBurnerInfoCalls ¶
func (mock *ChainKeeperMock) GetBurnerInfoCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Address types.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 types.CommandID) (types.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 types.CommandID }
GetCommandCalls gets all the calls that were made to GetCommand. Check the length with:
len(mockedChainKeeper.GetCommandCalls())
func (*ChainKeeperMock) GetConfirmedDepositsPaginated ¶ added in v0.25.0
func (mock *ChainKeeperMock) GetConfirmedDepositsPaginated(ctx github_com_cosmos_cosmos_sdk_types.Context, pageRequest *query.PageRequest) ([]types.ERC20Deposit, *query.PageResponse, error)
GetConfirmedDepositsPaginated calls GetConfirmedDepositsPaginatedFunc.
func (*ChainKeeperMock) GetConfirmedDepositsPaginatedCalls ¶ added in v0.25.0
func (mock *ChainKeeperMock) GetConfirmedDepositsPaginatedCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context PageRequest *query.PageRequest }
GetConfirmedDepositsPaginatedCalls gets all the calls that were made to GetConfirmedDepositsPaginated. Check the length with:
len(mockedChainKeeper.GetConfirmedDepositsPaginatedCalls())
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 types.Hash, logIndex uint64) (types.ERC20Deposit, types.DepositStatus, bool)
GetDeposit calls GetDepositFunc.
func (*ChainKeeperMock) GetDepositCalls ¶
func (mock *ChainKeeperMock) GetDepositCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context TxID types.Hash LogIndex uint64 }
GetDepositCalls gets all the calls that were made to GetDeposit. Check the length with:
len(mockedChainKeeper.GetDepositCalls())
func (*ChainKeeperMock) GetDepositsByTxID ¶ added in v0.27.0
func (mock *ChainKeeperMock) GetDepositsByTxID(ctx github_com_cosmos_cosmos_sdk_types.Context, txID types.Hash, status types.DepositStatus) ([]types.ERC20Deposit, error)
GetDepositsByTxID calls GetDepositsByTxIDFunc.
func (*ChainKeeperMock) GetDepositsByTxIDCalls ¶ added in v0.27.0
func (mock *ChainKeeperMock) GetDepositsByTxIDCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context TxID types.Hash Status types.DepositStatus }
GetDepositsByTxIDCalls gets all the calls that were made to GetDepositsByTxID. Check the length with:
len(mockedChainKeeper.GetDepositsByTxIDCalls())
func (*ChainKeeperMock) GetERC20TokenByAddress ¶ added in v0.26.5
func (mock *ChainKeeperMock) GetERC20TokenByAddress(ctx github_com_cosmos_cosmos_sdk_types.Context, address types.Address) types.ERC20Token
GetERC20TokenByAddress calls GetERC20TokenByAddressFunc.
func (*ChainKeeperMock) GetERC20TokenByAddressCalls ¶ added in v0.26.5
func (mock *ChainKeeperMock) GetERC20TokenByAddressCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Address types.Address }
GetERC20TokenByAddressCalls gets all the calls that were made to GetERC20TokenByAddress. Check the length with:
len(mockedChainKeeper.GetERC20TokenByAddressCalls())
func (*ChainKeeperMock) GetERC20TokenByAsset ¶
func (mock *ChainKeeperMock) GetERC20TokenByAsset(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) types.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) types.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 types.EventID) (types.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 types.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) (types.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) types.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) GetLegacyDeposit ¶ added in v0.31.0
func (mock *ChainKeeperMock) GetLegacyDeposit(ctx github_com_cosmos_cosmos_sdk_types.Context, txID types.Hash, burnerAddr types.Address) (types.ERC20Deposit, types.DepositStatus, bool)
GetLegacyDeposit calls GetLegacyDepositFunc.
func (*ChainKeeperMock) GetLegacyDepositCalls ¶ added in v0.31.0
func (mock *ChainKeeperMock) GetLegacyDepositCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context TxID types.Hash BurnerAddr types.Address }
GetLegacyDepositCalls gets all the calls that were made to GetLegacyDeposit. Check the length with:
len(mockedChainKeeper.GetLegacyDepositCalls())
func (*ChainKeeperMock) GetMinVoterCount ¶
func (mock *ChainKeeperMock) GetMinVoterCount(ctx github_com_cosmos_cosmos_sdk_types.Context) int64
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() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName
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
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) types.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) []types.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
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
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
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) []types.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
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 types.BurnerInfo)
SetBurnerInfo calls SetBurnerInfoFunc.
func (*ChainKeeperMock) SetBurnerInfoCalls ¶
func (mock *ChainKeeperMock) SetBurnerInfoCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context BurnerInfo types.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 types.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 types.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 types.ERC20Deposit, state types.DepositStatus)
SetDeposit calls SetDepositFunc.
func (*ChainKeeperMock) SetDepositCalls ¶
func (mock *ChainKeeperMock) SetDepositCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Deposit types.ERC20Deposit State types.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 types.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 types.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 types.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 types.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 types.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 types.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())
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 types.MultisigKeeper.
func TestSomethingThatUsesMultisigKeeper(t *testing.T) { // make and configure a mocked types.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 types.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) // EnqueueRouteMessageFunc mocks the EnqueueRouteMessage method. EnqueueRouteMessageFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) 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) // GetChainMaintainerStateFunc mocks the GetChainMaintainerState method. GetChainMaintainerStateFunc 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) (github_com_axelarnetwork_axelar_core_x_nexus_exported.MaintainerState, 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 // GetProcessingMessagesFunc mocks the GetProcessingMessages method. GetProcessingMessagesFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, limit int64) []github_com_axelarnetwork_axelar_core_x_nexus_exported.GeneralMessage // 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) // GetTransfersForChainPaginatedFunc mocks the GetTransfersForChainPaginated method. GetTransfersForChainPaginatedFunc 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, pageRequest *query.PageRequest) ([]github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer, *query.PageResponse, error) // 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 // RateLimitTransferFunc mocks the RateLimitTransfer method. RateLimitTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, asset github_com_cosmos_cosmos_sdk_types.Coin, direction github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferDirection) error // 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, limit github_com_cosmos_cosmos_sdk_types.Uint, window time.Duration) 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) // SetChainMaintainerStateFunc mocks the SetChainMaintainerState method. SetChainMaintainerStateFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, maintainerState github_com_axelarnetwork_axelar_core_x_nexus_exported.MaintainerState) error // SetMessageExecutedFunc mocks the SetMessageExecuted method. SetMessageExecutedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error // SetMessageFailedFunc mocks the SetMessageFailed method. SetMessageFailedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error // SetNewMessageFunc mocks the SetNewMessage method. SetNewMessageFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, m github_com_axelarnetwork_axelar_core_x_nexus_exported.GeneralMessage) error // contains filtered or unexported fields }
NexusMock is a mock implementation of types.Nexus.
func TestSomethingThatUsesNexus(t *testing.T) { // make and configure a mocked types.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") }, EnqueueRouteMessageFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error { panic("mock out the EnqueueRouteMessage 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") }, GetChainMaintainerStateFunc: 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) (github_com_axelarnetwork_axelar_core_x_nexus_exported.MaintainerState, bool) { panic("mock out the GetChainMaintainerState 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") }, GetProcessingMessagesFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, limit int64) []github_com_axelarnetwork_axelar_core_x_nexus_exported.GeneralMessage { panic("mock out the GetProcessingMessages 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") }, GetTransfersForChainPaginatedFunc: 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, pageRequest *query.PageRequest) ([]github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer, *query.PageResponse, error) { panic("mock out the GetTransfersForChainPaginated 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") }, RateLimitTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, asset github_com_cosmos_cosmos_sdk_types.Coin, direction github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferDirection) error { panic("mock out the RateLimitTransfer 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, limit github_com_cosmos_cosmos_sdk_types.Uint, window time.Duration) 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") }, SetChainMaintainerStateFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, maintainerState github_com_axelarnetwork_axelar_core_x_nexus_exported.MaintainerState) error { panic("mock out the SetChainMaintainerState method") }, SetMessageExecutedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error { panic("mock out the SetMessageExecuted method") }, SetMessageFailedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error { panic("mock out the SetMessageFailed method") }, SetNewMessageFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, m github_com_axelarnetwork_axelar_core_x_nexus_exported.GeneralMessage) error { panic("mock out the SetNewMessage method") }, } // use mockedNexus in code that requires types.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) EnqueueRouteMessage ¶ added in v0.35.0
func (mock *NexusMock) EnqueueRouteMessage(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error
EnqueueRouteMessage calls EnqueueRouteMessageFunc.
func (*NexusMock) EnqueueRouteMessageCalls ¶ added in v0.35.0
func (mock *NexusMock) EnqueueRouteMessageCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ID string }
EnqueueRouteMessageCalls gets all the calls that were made to EnqueueRouteMessage. Check the length with:
len(mockedNexus.EnqueueRouteMessageCalls())
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) GetChainMaintainerState ¶ added in v0.25.0
func (mock *NexusMock) GetChainMaintainerState(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) (github_com_axelarnetwork_axelar_core_x_nexus_exported.MaintainerState, bool)
GetChainMaintainerState calls GetChainMaintainerStateFunc.
func (*NexusMock) GetChainMaintainerStateCalls ¶ added in v0.25.0
func (mock *NexusMock) GetChainMaintainerStateCalls() []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 }
GetChainMaintainerStateCalls gets all the calls that were made to GetChainMaintainerState. Check the length with:
len(mockedNexus.GetChainMaintainerStateCalls())
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) GetProcessingMessages ¶ added in v0.33.0
func (mock *NexusMock) GetProcessingMessages(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, limit int64) []github_com_axelarnetwork_axelar_core_x_nexus_exported.GeneralMessage
GetProcessingMessages calls GetProcessingMessagesFunc.
func (*NexusMock) GetProcessingMessagesCalls ¶ added in v0.33.0
func (mock *NexusMock) GetProcessingMessagesCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName Limit int64 }
GetProcessingMessagesCalls gets all the calls that were made to GetProcessingMessages. Check the length with:
len(mockedNexus.GetProcessingMessagesCalls())
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) GetTransfersForChainPaginated ¶ added in v0.25.0
func (mock *NexusMock) GetTransfersForChainPaginated(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, pageRequest *query.PageRequest) ([]github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer, *query.PageResponse, error)
GetTransfersForChainPaginated calls GetTransfersForChainPaginatedFunc.
func (*NexusMock) GetTransfersForChainPaginatedCalls ¶ added in v0.25.0
func (mock *NexusMock) GetTransfersForChainPaginatedCalls() []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 PageRequest *query.PageRequest }
GetTransfersForChainPaginatedCalls gets all the calls that were made to GetTransfersForChainPaginated. Check the length with:
len(mockedNexus.GetTransfersForChainPaginatedCalls())
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) RateLimitTransfer ¶ added in v0.27.0
func (mock *NexusMock) RateLimitTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, asset github_com_cosmos_cosmos_sdk_types.Coin, direction github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferDirection) error
RateLimitTransfer calls RateLimitTransferFunc.
func (*NexusMock) RateLimitTransferCalls ¶ added in v0.27.0
func (mock *NexusMock) RateLimitTransferCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName Asset github_com_cosmos_cosmos_sdk_types.Coin Direction github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferDirection }
RateLimitTransferCalls gets all the calls that were made to RateLimitTransfer. Check the length with:
len(mockedNexus.RateLimitTransferCalls())
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, limit github_com_cosmos_cosmos_sdk_types.Uint, window time.Duration) 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 Limit github_com_cosmos_cosmos_sdk_types.Uint Window time.Duration }
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())
func (*NexusMock) SetChainMaintainerState ¶ added in v0.25.0
func (mock *NexusMock) SetChainMaintainerState(ctx github_com_cosmos_cosmos_sdk_types.Context, maintainerState github_com_axelarnetwork_axelar_core_x_nexus_exported.MaintainerState) error
SetChainMaintainerState calls SetChainMaintainerStateFunc.
func (*NexusMock) SetChainMaintainerStateCalls ¶ added in v0.25.0
func (mock *NexusMock) SetChainMaintainerStateCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context MaintainerState github_com_axelarnetwork_axelar_core_x_nexus_exported.MaintainerState }
SetChainMaintainerStateCalls gets all the calls that were made to SetChainMaintainerState. Check the length with:
len(mockedNexus.SetChainMaintainerStateCalls())
func (*NexusMock) SetMessageExecuted ¶ added in v0.32.0
func (mock *NexusMock) SetMessageExecuted(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error
SetMessageExecuted calls SetMessageExecutedFunc.
func (*NexusMock) SetMessageExecutedCalls ¶ added in v0.32.0
func (mock *NexusMock) SetMessageExecutedCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ID string }
SetMessageExecutedCalls gets all the calls that were made to SetMessageExecuted. Check the length with:
len(mockedNexus.SetMessageExecutedCalls())
func (*NexusMock) SetMessageFailed ¶ added in v0.32.0
func (mock *NexusMock) SetMessageFailed(ctx github_com_cosmos_cosmos_sdk_types.Context, id string) error
SetMessageFailed calls SetMessageFailedFunc.
func (*NexusMock) SetMessageFailedCalls ¶ added in v0.32.0
func (mock *NexusMock) SetMessageFailedCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ID string }
SetMessageFailedCalls gets all the calls that were made to SetMessageFailed. Check the length with:
len(mockedNexus.SetMessageFailedCalls())
func (*NexusMock) SetNewMessage ¶ added in v0.31.0
func (mock *NexusMock) SetNewMessage(ctx github_com_cosmos_cosmos_sdk_types.Context, m github_com_axelarnetwork_axelar_core_x_nexus_exported.GeneralMessage) error
SetNewMessage calls SetNewMessageFunc.
func (*NexusMock) SetNewMessageCalls ¶ added in v0.31.0
func (mock *NexusMock) SetNewMessageCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context M github_com_axelarnetwork_axelar_core_x_nexus_exported.GeneralMessage }
SetNewMessageCalls gets all the calls that were made to SetNewMessage. Check the length with:
len(mockedNexus.SetNewMessageCalls())
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 types.Rewarder.
func TestSomethingThatUsesRewarder(t *testing.T) { // make and configure a mocked types.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 types.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 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 types.SlashingKeeper.
func TestSomethingThatUsesSlashingKeeper(t *testing.T) { // make and configure a mocked types.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 types.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) // 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) // contains filtered or unexported fields }
SnapshotterMock is a mock implementation of types.Snapshotter.
func TestSomethingThatUsesSnapshotter(t *testing.T) { // make and configure a mocked types.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") }, 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") }, } // use mockedSnapshotter in code that requires types.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) 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())
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 types.StakingKeeper.
func TestSomethingThatUsesStakingKeeper(t *testing.T) { // make and configure a mocked types.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 types.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 types.Voter.
func TestSomethingThatUsesVoter(t *testing.T) { // make and configure a mocked types.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 types.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())