Documentation
¶
Index ¶
- type AccountKeeperMock
- type BankKeeperMock
- func (mock *BankKeeperMock) BurnCoins(ctx cosmossdktypes.Context, moduleName string, amt cosmossdktypes.Coins) error
- func (mock *BankKeeperMock) BurnCoinsCalls() []struct{ ... }
- func (mock *BankKeeperMock) MintCoins(ctx cosmossdktypes.Context, moduleName string, amt cosmossdktypes.Coins) error
- func (mock *BankKeeperMock) MintCoinsCalls() []struct{ ... }
- func (mock *BankKeeperMock) SendCoins(ctx cosmossdktypes.Context, fromAddr cosmossdktypes.AccAddress, ...) error
- func (mock *BankKeeperMock) SendCoinsCalls() []struct{ ... }
- func (mock *BankKeeperMock) SendCoinsFromAccountToModule(ctx cosmossdktypes.Context, senderAddr cosmossdktypes.AccAddress, ...) error
- func (mock *BankKeeperMock) SendCoinsFromAccountToModuleCalls() []struct{ ... }
- func (mock *BankKeeperMock) SendCoinsFromModuleToAccount(ctx cosmossdktypes.Context, senderModule string, ...) error
- func (mock *BankKeeperMock) SendCoinsFromModuleToAccountCalls() []struct{ ... }
- type BaseKeeperMock
- func (mock *BaseKeeperMock) DeletePendingIBCTransfer(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64)
- func (mock *BaseKeeperMock) DeletePendingIBCTransferCalls() []struct{ ... }
- func (mock *BaseKeeperMock) DeletePendingRefund(ctx cosmossdktypes.Context, req dkgTypes.MsgRefundMsgRequest)
- func (mock *BaseKeeperMock) DeletePendingRefundCalls() []struct{ ... }
- func (mock *BaseKeeperMock) GetCosmosChain(ctx cosmossdktypes.Context, asset string) (string, bool)
- func (mock *BaseKeeperMock) GetCosmosChainCalls() []struct{ ... }
- func (mock *BaseKeeperMock) GetCosmosChains(ctx cosmossdktypes.Context) []string
- func (mock *BaseKeeperMock) GetCosmosChainsCalls() []struct{ ... }
- func (mock *BaseKeeperMock) GetFeeCollector(ctx cosmossdktypes.Context) (cosmossdktypes.AccAddress, bool)
- func (mock *BaseKeeperMock) GetFeeCollectorCalls() []struct{ ... }
- func (mock *BaseKeeperMock) GetIBCPath(ctx cosmossdktypes.Context, chain string) (string, bool)
- func (mock *BaseKeeperMock) GetIBCPathCalls() []struct{ ... }
- func (mock *BaseKeeperMock) GetPendingIBCTransfer(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64) (dkgTypes.IBCTransfer, bool)
- func (mock *BaseKeeperMock) GetPendingIBCTransferCalls() []struct{ ... }
- func (mock *BaseKeeperMock) GetPendingRefund(ctx cosmossdktypes.Context, req dkgTypes.MsgRefundMsgRequest) (cosmossdktypes.Coin, bool)
- func (mock *BaseKeeperMock) GetPendingRefundCalls() []struct{ ... }
- func (mock *BaseKeeperMock) GetRouteTimeoutWindow(ctx cosmossdktypes.Context) uint64
- func (mock *BaseKeeperMock) GetRouteTimeoutWindowCalls() []struct{ ... }
- func (mock *BaseKeeperMock) Logger(ctx cosmossdktypes.Context) log.Logger
- func (mock *BaseKeeperMock) LoggerCalls() []struct{ ... }
- func (mock *BaseKeeperMock) RegisterAssetToCosmosChain(ctx cosmossdktypes.Context, asset string, chain string)
- func (mock *BaseKeeperMock) RegisterAssetToCosmosChainCalls() []struct{ ... }
- func (mock *BaseKeeperMock) RegisterIBCPath(ctx cosmossdktypes.Context, asset string, path string) error
- func (mock *BaseKeeperMock) RegisterIBCPathCalls() []struct{ ... }
- func (mock *BaseKeeperMock) SetFeeCollector(ctx cosmossdktypes.Context, address cosmossdktypes.AccAddress)
- func (mock *BaseKeeperMock) SetFeeCollectorCalls() []struct{ ... }
- func (mock *BaseKeeperMock) SetParams(ctx cosmossdktypes.Context, n dkgTypes.Nexus, p dkgTypes.Params)
- func (mock *BaseKeeperMock) SetParamsCalls() []struct{ ... }
- func (mock *BaseKeeperMock) SetPendingIBCTransfer(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64, ...)
- func (mock *BaseKeeperMock) SetPendingIBCTransferCalls() []struct{ ... }
- type ChannelKeeperMock
- func (mock *ChannelKeeperMock) GetChannelClientState(ctx cosmossdktypes.Context, portID string, channelID string) (string, ibcclient.ClientState, error)
- func (mock *ChannelKeeperMock) GetChannelClientStateCalls() []struct{ ... }
- func (mock *ChannelKeeperMock) GetNextSequenceSend(ctx cosmossdktypes.Context, portID string, channelID string) (uint64, bool)
- func (mock *ChannelKeeperMock) GetNextSequenceSendCalls() []struct{ ... }
- type IBCTransferKeeperMock
- func (mock *IBCTransferKeeperMock) GetDenomTrace(ctx cosmossdktypes.Context, denomTraceHash tmbytes.HexBytes) (ibctypes.DenomTrace, bool)
- func (mock *IBCTransferKeeperMock) GetDenomTraceCalls() []struct{ ... }
- func (mock *IBCTransferKeeperMock) SendTransfer(ctx cosmossdktypes.Context, sourcePort string, sourceChannel string, ...) error
- func (mock *IBCTransferKeeperMock) SendTransferCalls() []struct{ ... }
- type NexusMock
- func (mock *NexusMock) AddToChainTotal(ctx cosmossdktypes.Context, chain exported.Chain, amount cosmossdktypes.Coin)
- func (mock *NexusMock) AddToChainTotalCalls() []struct{ ... }
- func (mock *NexusMock) ArchivePendingTransfer(ctx cosmossdktypes.Context, transfer exported.CrossChainTransfer)
- func (mock *NexusMock) ArchivePendingTransferCalls() []struct{ ... }
- func (mock *NexusMock) EnqueueForTransfer(ctx cosmossdktypes.Context, sender exported.CrossChainAddress, ...) error
- func (mock *NexusMock) EnqueueForTransferCalls() []struct{ ... }
- func (mock *NexusMock) GetChain(ctx cosmossdktypes.Context, chain string) (exported.Chain, bool)
- func (mock *NexusMock) GetChainCalls() []struct{ ... }
- func (mock *NexusMock) GetRecipient(ctx cosmossdktypes.Context, sender exported.CrossChainAddress) (exported.CrossChainAddress, bool)
- func (mock *NexusMock) GetRecipientCalls() []struct{ ... }
- func (mock *NexusMock) GetTransfersForChain(ctx cosmossdktypes.Context, chain exported.Chain, state exported.TransferState) []exported.CrossChainTransfer
- func (mock *NexusMock) GetTransfersForChainCalls() []struct{ ... }
- func (mock *NexusMock) IsAssetRegistered(ctx cosmossdktypes.Context, chainName string, denom string) bool
- func (mock *NexusMock) IsAssetRegisteredCalls() []struct{ ... }
- func (mock *NexusMock) LinkAddresses(ctx cosmossdktypes.Context, sender exported.CrossChainAddress, ...)
- func (mock *NexusMock) LinkAddressesCalls() []struct{ ... }
- func (mock *NexusMock) RegisterAsset(ctx cosmossdktypes.Context, chainName string, denom string)
- func (mock *NexusMock) RegisterAssetCalls() []struct{ ... }
- func (mock *NexusMock) SetChain(ctx cosmossdktypes.Context, chain exported.Chain)
- func (mock *NexusMock) SetChainCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountKeeperMock ¶
type AccountKeeperMock struct {
// GetModuleAddressFunc mocks the GetModuleAddress method.
GetModuleAddressFunc func(moduleName string) cosmossdktypes.AccAddress
// contains filtered or unexported fields
}
AccountKeeperMock is a mock implementation of dkgTypes.AccountKeeper.
func TestSomethingThatUsesAccountKeeper(t *testing.T) {
// make and configure a mocked dkgTypes.AccountKeeper
mockedAccountKeeper := &AccountKeeperMock{
GetModuleAddressFunc: func(moduleName string) cosmossdktypes.AccAddress {
panic("mock out the GetModuleAddress method")
},
}
// use mockedAccountKeeper in code that requires dkgTypes.AccountKeeper
// and then make assertions.
}
func (*AccountKeeperMock) GetModuleAddress ¶
func (mock *AccountKeeperMock) GetModuleAddress(moduleName string) cosmossdktypes.AccAddress
GetModuleAddress calls GetModuleAddressFunc.
func (*AccountKeeperMock) GetModuleAddressCalls ¶
func (mock *AccountKeeperMock) GetModuleAddressCalls() []struct { ModuleName string }
GetModuleAddressCalls gets all the calls that were made to GetModuleAddress. Check the length with:
len(mockedAccountKeeper.GetModuleAddressCalls())
type BankKeeperMock ¶
type BankKeeperMock struct {
// BurnCoinsFunc mocks the BurnCoins method.
BurnCoinsFunc func(ctx cosmossdktypes.Context, moduleName string, amt cosmossdktypes.Coins) error
// MintCoinsFunc mocks the MintCoins method.
MintCoinsFunc func(ctx cosmossdktypes.Context, moduleName string, amt cosmossdktypes.Coins) error
// SendCoinsFunc mocks the SendCoins method.
SendCoinsFunc func(ctx cosmossdktypes.Context, fromAddr cosmossdktypes.AccAddress, toAddr cosmossdktypes.AccAddress, amt cosmossdktypes.Coins) error
// SendCoinsFromAccountToModuleFunc mocks the SendCoinsFromAccountToModule method.
SendCoinsFromAccountToModuleFunc func(ctx cosmossdktypes.Context, senderAddr cosmossdktypes.AccAddress, recipientModule string, amt cosmossdktypes.Coins) error
// SendCoinsFromModuleToAccountFunc mocks the SendCoinsFromModuleToAccount method.
SendCoinsFromModuleToAccountFunc func(ctx cosmossdktypes.Context, senderModule string, recipientAddr cosmossdktypes.AccAddress, amt cosmossdktypes.Coins) error
// contains filtered or unexported fields
}
BankKeeperMock is a mock implementation of dkgTypes.BankKeeper.
func TestSomethingThatUsesBankKeeper(t *testing.T) {
// make and configure a mocked dkgTypes.BankKeeper
mockedBankKeeper := &BankKeeperMock{
BurnCoinsFunc: func(ctx cosmossdktypes.Context, moduleName string, amt cosmossdktypes.Coins) error {
panic("mock out the BurnCoins method")
},
MintCoinsFunc: func(ctx cosmossdktypes.Context, moduleName string, amt cosmossdktypes.Coins) error {
panic("mock out the MintCoins method")
},
SendCoinsFunc: func(ctx cosmossdktypes.Context, fromAddr cosmossdktypes.AccAddress, toAddr cosmossdktypes.AccAddress, amt cosmossdktypes.Coins) error {
panic("mock out the SendCoins method")
},
SendCoinsFromAccountToModuleFunc: func(ctx cosmossdktypes.Context, senderAddr cosmossdktypes.AccAddress, recipientModule string, amt cosmossdktypes.Coins) error {
panic("mock out the SendCoinsFromAccountToModule method")
},
SendCoinsFromModuleToAccountFunc: func(ctx cosmossdktypes.Context, senderModule string, recipientAddr cosmossdktypes.AccAddress, amt cosmossdktypes.Coins) error {
panic("mock out the SendCoinsFromModuleToAccount method")
},
}
// use mockedBankKeeper in code that requires dkgTypes.BankKeeper
// and then make assertions.
}
func (*BankKeeperMock) BurnCoins ¶
func (mock *BankKeeperMock) BurnCoins(ctx cosmossdktypes.Context, moduleName string, amt cosmossdktypes.Coins) error
BurnCoins calls BurnCoinsFunc.
func (*BankKeeperMock) BurnCoinsCalls ¶
func (mock *BankKeeperMock) BurnCoinsCalls() []struct { Ctx cosmossdktypes.Context ModuleName string Amt cosmossdktypes.Coins }
BurnCoinsCalls gets all the calls that were made to BurnCoins. Check the length with:
len(mockedBankKeeper.BurnCoinsCalls())
func (*BankKeeperMock) MintCoins ¶
func (mock *BankKeeperMock) MintCoins(ctx cosmossdktypes.Context, moduleName string, amt cosmossdktypes.Coins) error
MintCoins calls MintCoinsFunc.
func (*BankKeeperMock) MintCoinsCalls ¶
func (mock *BankKeeperMock) MintCoinsCalls() []struct { Ctx cosmossdktypes.Context ModuleName string Amt cosmossdktypes.Coins }
MintCoinsCalls gets all the calls that were made to MintCoins. Check the length with:
len(mockedBankKeeper.MintCoinsCalls())
func (*BankKeeperMock) SendCoins ¶
func (mock *BankKeeperMock) SendCoins(ctx cosmossdktypes.Context, fromAddr cosmossdktypes.AccAddress, toAddr cosmossdktypes.AccAddress, amt cosmossdktypes.Coins) error
SendCoins calls SendCoinsFunc.
func (*BankKeeperMock) SendCoinsCalls ¶
func (mock *BankKeeperMock) SendCoinsCalls() []struct { Ctx cosmossdktypes.Context FromAddr cosmossdktypes.AccAddress ToAddr cosmossdktypes.AccAddress Amt cosmossdktypes.Coins }
SendCoinsCalls gets all the calls that were made to SendCoins. Check the length with:
len(mockedBankKeeper.SendCoinsCalls())
func (*BankKeeperMock) SendCoinsFromAccountToModule ¶
func (mock *BankKeeperMock) SendCoinsFromAccountToModule(ctx cosmossdktypes.Context, senderAddr cosmossdktypes.AccAddress, recipientModule string, amt cosmossdktypes.Coins) error
SendCoinsFromAccountToModule calls SendCoinsFromAccountToModuleFunc.
func (*BankKeeperMock) SendCoinsFromAccountToModuleCalls ¶
func (mock *BankKeeperMock) SendCoinsFromAccountToModuleCalls() []struct { Ctx cosmossdktypes.Context SenderAddr cosmossdktypes.AccAddress RecipientModule string Amt cosmossdktypes.Coins }
SendCoinsFromAccountToModuleCalls gets all the calls that were made to SendCoinsFromAccountToModule. Check the length with:
len(mockedBankKeeper.SendCoinsFromAccountToModuleCalls())
func (*BankKeeperMock) SendCoinsFromModuleToAccount ¶
func (mock *BankKeeperMock) SendCoinsFromModuleToAccount(ctx cosmossdktypes.Context, senderModule string, recipientAddr cosmossdktypes.AccAddress, amt cosmossdktypes.Coins) error
SendCoinsFromModuleToAccount calls SendCoinsFromModuleToAccountFunc.
func (*BankKeeperMock) SendCoinsFromModuleToAccountCalls ¶
func (mock *BankKeeperMock) SendCoinsFromModuleToAccountCalls() []struct { Ctx cosmossdktypes.Context SenderModule string RecipientAddr cosmossdktypes.AccAddress Amt cosmossdktypes.Coins }
SendCoinsFromModuleToAccountCalls gets all the calls that were made to SendCoinsFromModuleToAccount. Check the length with:
len(mockedBankKeeper.SendCoinsFromModuleToAccountCalls())
type BaseKeeperMock ¶
type BaseKeeperMock struct {
// DeletePendingIBCTransferFunc mocks the DeletePendingIBCTransfer method.
DeletePendingIBCTransferFunc func(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64)
// DeletePendingRefundFunc mocks the DeletePendingRefund method.
DeletePendingRefundFunc func(ctx cosmossdktypes.Context, req dkgTypes.MsgRefundMsgRequest)
// GetCosmosChainFunc mocks the GetCosmosChain method.
GetCosmosChainFunc func(ctx cosmossdktypes.Context, asset string) (string, bool)
// GetCosmosChainsFunc mocks the GetCosmosChains method.
GetCosmosChainsFunc func(ctx cosmossdktypes.Context) []string
// GetFeeCollectorFunc mocks the GetFeeCollector method.
GetFeeCollectorFunc func(ctx cosmossdktypes.Context) (cosmossdktypes.AccAddress, bool)
// GetIBCPathFunc mocks the GetIBCPath method.
GetIBCPathFunc func(ctx cosmossdktypes.Context, chain string) (string, bool)
// GetPendingIBCTransferFunc mocks the GetPendingIBCTransfer method.
GetPendingIBCTransferFunc func(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64) (dkgTypes.IBCTransfer, bool)
// GetPendingRefundFunc mocks the GetPendingRefund method.
GetPendingRefundFunc func(ctx cosmossdktypes.Context, req dkgTypes.MsgRefundMsgRequest) (cosmossdktypes.Coin, bool)
// GetRouteTimeoutWindowFunc mocks the GetRouteTimeoutWindow method.
GetRouteTimeoutWindowFunc func(ctx cosmossdktypes.Context) uint64
// LoggerFunc mocks the Logger method.
LoggerFunc func(ctx cosmossdktypes.Context) log.Logger
// RegisterAssetToCosmosChainFunc mocks the RegisterAssetToCosmosChain method.
RegisterAssetToCosmosChainFunc func(ctx cosmossdktypes.Context, asset string, chain string)
// RegisterIBCPathFunc mocks the RegisterIBCPath method.
RegisterIBCPathFunc func(ctx cosmossdktypes.Context, asset string, path string) error
// SetFeeCollectorFunc mocks the SetFeeCollector method.
SetFeeCollectorFunc func(ctx cosmossdktypes.Context, address cosmossdktypes.AccAddress)
// SetParamsFunc mocks the SetParams method.
SetParamsFunc func(ctx cosmossdktypes.Context, n dkgTypes.Nexus, p dkgTypes.Params)
// SetPendingIBCTransferFunc mocks the SetPendingIBCTransfer method.
SetPendingIBCTransferFunc func(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64, value dkgTypes.IBCTransfer)
// contains filtered or unexported fields
}
BaseKeeperMock is a mock implementation of dkgTypes.BaseKeeper.
func TestSomethingThatUsesBaseKeeper(t *testing.T) {
// make and configure a mocked dkgTypes.BaseKeeper
mockedBaseKeeper := &BaseKeeperMock{
DeletePendingIBCTransferFunc: func(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64) {
panic("mock out the DeletePendingIBCTransfer method")
},
DeletePendingRefundFunc: func(ctx cosmossdktypes.Context, req dkgTypes.MsgRefundMsgRequest) {
panic("mock out the DeletePendingRefund method")
},
GetCosmosChainFunc: func(ctx cosmossdktypes.Context, asset string) (string, bool) {
panic("mock out the GetCosmosChain method")
},
GetCosmosChainsFunc: func(ctx cosmossdktypes.Context) []string {
panic("mock out the GetCosmosChains method")
},
GetFeeCollectorFunc: func(ctx cosmossdktypes.Context) (cosmossdktypes.AccAddress, bool) {
panic("mock out the GetFeeCollector method")
},
GetIBCPathFunc: func(ctx cosmossdktypes.Context, chain string) (string, bool) {
panic("mock out the GetIBCPath method")
},
GetPendingIBCTransferFunc: func(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64) (dkgTypes.IBCTransfer, bool) {
panic("mock out the GetPendingIBCTransfer method")
},
GetPendingRefundFunc: func(ctx cosmossdktypes.Context, req dkgTypes.MsgRefundMsgRequest) (cosmossdktypes.Coin, bool) {
panic("mock out the GetPendingRefund method")
},
GetRouteTimeoutWindowFunc: func(ctx cosmossdktypes.Context) uint64 {
panic("mock out the GetRouteTimeoutWindow method")
},
LoggerFunc: func(ctx cosmossdktypes.Context) log.Logger {
panic("mock out the Logger method")
},
RegisterAssetToCosmosChainFunc: func(ctx cosmossdktypes.Context, asset string, chain string) {
panic("mock out the RegisterAssetToCosmosChain method")
},
RegisterIBCPathFunc: func(ctx cosmossdktypes.Context, asset string, path string) error {
panic("mock out the RegisterIBCPath method")
},
SetFeeCollectorFunc: func(ctx cosmossdktypes.Context, address cosmossdktypes.AccAddress) {
panic("mock out the SetFeeCollector method")
},
SetParamsFunc: func(ctx cosmossdktypes.Context, n dkgTypes.Nexus, p dkgTypes.Params) {
panic("mock out the SetParams method")
},
SetPendingIBCTransferFunc: func(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64, value dkgTypes.IBCTransfer) {
panic("mock out the SetPendingIBCTransfer method")
},
}
// use mockedBaseKeeper in code that requires dkgTypes.BaseKeeper
// and then make assertions.
}
func (*BaseKeeperMock) DeletePendingIBCTransfer ¶
func (mock *BaseKeeperMock) DeletePendingIBCTransfer(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64)
DeletePendingIBCTransfer calls DeletePendingIBCTransferFunc.
func (*BaseKeeperMock) DeletePendingIBCTransferCalls ¶
func (mock *BaseKeeperMock) DeletePendingIBCTransferCalls() []struct { Ctx cosmossdktypes.Context PortID string ChannelID string Sequence uint64 }
DeletePendingIBCTransferCalls gets all the calls that were made to DeletePendingIBCTransfer. Check the length with:
len(mockedBaseKeeper.DeletePendingIBCTransferCalls())
func (*BaseKeeperMock) DeletePendingRefund ¶
func (mock *BaseKeeperMock) DeletePendingRefund(ctx cosmossdktypes.Context, req dkgTypes.MsgRefundMsgRequest)
DeletePendingRefund calls DeletePendingRefundFunc.
func (*BaseKeeperMock) DeletePendingRefundCalls ¶
func (mock *BaseKeeperMock) DeletePendingRefundCalls() []struct { Ctx cosmossdktypes.Context Req dkgTypes.MsgRefundMsgRequest }
DeletePendingRefundCalls gets all the calls that were made to DeletePendingRefund. Check the length with:
len(mockedBaseKeeper.DeletePendingRefundCalls())
func (*BaseKeeperMock) GetCosmosChain ¶
func (mock *BaseKeeperMock) GetCosmosChain(ctx cosmossdktypes.Context, asset string) (string, bool)
GetCosmosChain calls GetCosmosChainFunc.
func (*BaseKeeperMock) GetCosmosChainCalls ¶
func (mock *BaseKeeperMock) GetCosmosChainCalls() []struct { Ctx cosmossdktypes.Context Asset string }
GetCosmosChainCalls gets all the calls that were made to GetCosmosChain. Check the length with:
len(mockedBaseKeeper.GetCosmosChainCalls())
func (*BaseKeeperMock) GetCosmosChains ¶
func (mock *BaseKeeperMock) GetCosmosChains(ctx cosmossdktypes.Context) []string
GetCosmosChains calls GetCosmosChainsFunc.
func (*BaseKeeperMock) GetCosmosChainsCalls ¶
func (mock *BaseKeeperMock) GetCosmosChainsCalls() []struct { Ctx cosmossdktypes.Context }
GetCosmosChainsCalls gets all the calls that were made to GetCosmosChains. Check the length with:
len(mockedBaseKeeper.GetCosmosChainsCalls())
func (*BaseKeeperMock) GetFeeCollector ¶
func (mock *BaseKeeperMock) GetFeeCollector(ctx cosmossdktypes.Context) (cosmossdktypes.AccAddress, bool)
GetFeeCollector calls GetFeeCollectorFunc.
func (*BaseKeeperMock) GetFeeCollectorCalls ¶
func (mock *BaseKeeperMock) GetFeeCollectorCalls() []struct { Ctx cosmossdktypes.Context }
GetFeeCollectorCalls gets all the calls that were made to GetFeeCollector. Check the length with:
len(mockedBaseKeeper.GetFeeCollectorCalls())
func (*BaseKeeperMock) GetIBCPath ¶
func (mock *BaseKeeperMock) GetIBCPath(ctx cosmossdktypes.Context, chain string) (string, bool)
GetIBCPath calls GetIBCPathFunc.
func (*BaseKeeperMock) GetIBCPathCalls ¶
func (mock *BaseKeeperMock) GetIBCPathCalls() []struct { Ctx cosmossdktypes.Context Chain string }
GetIBCPathCalls gets all the calls that were made to GetIBCPath. Check the length with:
len(mockedBaseKeeper.GetIBCPathCalls())
func (*BaseKeeperMock) GetPendingIBCTransfer ¶
func (mock *BaseKeeperMock) GetPendingIBCTransfer(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64) (dkgTypes.IBCTransfer, bool)
GetPendingIBCTransfer calls GetPendingIBCTransferFunc.
func (*BaseKeeperMock) GetPendingIBCTransferCalls ¶
func (mock *BaseKeeperMock) GetPendingIBCTransferCalls() []struct { Ctx cosmossdktypes.Context PortID string ChannelID string Sequence uint64 }
GetPendingIBCTransferCalls gets all the calls that were made to GetPendingIBCTransfer. Check the length with:
len(mockedBaseKeeper.GetPendingIBCTransferCalls())
func (*BaseKeeperMock) GetPendingRefund ¶
func (mock *BaseKeeperMock) GetPendingRefund(ctx cosmossdktypes.Context, req dkgTypes.MsgRefundMsgRequest) (cosmossdktypes.Coin, bool)
GetPendingRefund calls GetPendingRefundFunc.
func (*BaseKeeperMock) GetPendingRefundCalls ¶
func (mock *BaseKeeperMock) GetPendingRefundCalls() []struct { Ctx cosmossdktypes.Context Req dkgTypes.MsgRefundMsgRequest }
GetPendingRefundCalls gets all the calls that were made to GetPendingRefund. Check the length with:
len(mockedBaseKeeper.GetPendingRefundCalls())
func (*BaseKeeperMock) GetRouteTimeoutWindow ¶
func (mock *BaseKeeperMock) GetRouteTimeoutWindow(ctx cosmossdktypes.Context) uint64
GetRouteTimeoutWindow calls GetRouteTimeoutWindowFunc.
func (*BaseKeeperMock) GetRouteTimeoutWindowCalls ¶
func (mock *BaseKeeperMock) GetRouteTimeoutWindowCalls() []struct { Ctx cosmossdktypes.Context }
GetRouteTimeoutWindowCalls gets all the calls that were made to GetRouteTimeoutWindow. Check the length with:
len(mockedBaseKeeper.GetRouteTimeoutWindowCalls())
func (*BaseKeeperMock) Logger ¶
func (mock *BaseKeeperMock) Logger(ctx cosmossdktypes.Context) log.Logger
Logger calls LoggerFunc.
func (*BaseKeeperMock) LoggerCalls ¶
func (mock *BaseKeeperMock) LoggerCalls() []struct { Ctx cosmossdktypes.Context }
LoggerCalls gets all the calls that were made to Logger. Check the length with:
len(mockedBaseKeeper.LoggerCalls())
func (*BaseKeeperMock) RegisterAssetToCosmosChain ¶
func (mock *BaseKeeperMock) RegisterAssetToCosmosChain(ctx cosmossdktypes.Context, asset string, chain string)
RegisterAssetToCosmosChain calls RegisterAssetToCosmosChainFunc.
func (*BaseKeeperMock) RegisterAssetToCosmosChainCalls ¶
func (mock *BaseKeeperMock) RegisterAssetToCosmosChainCalls() []struct { Ctx cosmossdktypes.Context Asset string Chain string }
RegisterAssetToCosmosChainCalls gets all the calls that were made to RegisterAssetToCosmosChain. Check the length with:
len(mockedBaseKeeper.RegisterAssetToCosmosChainCalls())
func (*BaseKeeperMock) RegisterIBCPath ¶
func (mock *BaseKeeperMock) RegisterIBCPath(ctx cosmossdktypes.Context, asset string, path string) error
RegisterIBCPath calls RegisterIBCPathFunc.
func (*BaseKeeperMock) RegisterIBCPathCalls ¶
func (mock *BaseKeeperMock) RegisterIBCPathCalls() []struct { Ctx cosmossdktypes.Context Asset string Path string }
RegisterIBCPathCalls gets all the calls that were made to RegisterIBCPath. Check the length with:
len(mockedBaseKeeper.RegisterIBCPathCalls())
func (*BaseKeeperMock) SetFeeCollector ¶
func (mock *BaseKeeperMock) SetFeeCollector(ctx cosmossdktypes.Context, address cosmossdktypes.AccAddress)
SetFeeCollector calls SetFeeCollectorFunc.
func (*BaseKeeperMock) SetFeeCollectorCalls ¶
func (mock *BaseKeeperMock) SetFeeCollectorCalls() []struct { Ctx cosmossdktypes.Context Address cosmossdktypes.AccAddress }
SetFeeCollectorCalls gets all the calls that were made to SetFeeCollector. Check the length with:
len(mockedBaseKeeper.SetFeeCollectorCalls())
func (*BaseKeeperMock) SetParams ¶
func (mock *BaseKeeperMock) SetParams(ctx cosmossdktypes.Context, n dkgTypes.Nexus, p dkgTypes.Params)
SetParams calls SetParamsFunc.
func (*BaseKeeperMock) SetParamsCalls ¶
func (mock *BaseKeeperMock) SetParamsCalls() []struct { Ctx cosmossdktypes.Context N dkgTypes.Nexus P dkgTypes.Params }
SetParamsCalls gets all the calls that were made to SetParams. Check the length with:
len(mockedBaseKeeper.SetParamsCalls())
func (*BaseKeeperMock) SetPendingIBCTransfer ¶
func (mock *BaseKeeperMock) SetPendingIBCTransfer(ctx cosmossdktypes.Context, portID string, channelID string, sequence uint64, value dkgTypes.IBCTransfer)
SetPendingIBCTransfer calls SetPendingIBCTransferFunc.
func (*BaseKeeperMock) SetPendingIBCTransferCalls ¶
func (mock *BaseKeeperMock) SetPendingIBCTransferCalls() []struct { Ctx cosmossdktypes.Context PortID string ChannelID string Sequence uint64 Value dkgTypes.IBCTransfer }
SetPendingIBCTransferCalls gets all the calls that were made to SetPendingIBCTransfer. Check the length with:
len(mockedBaseKeeper.SetPendingIBCTransferCalls())
type ChannelKeeperMock ¶
type ChannelKeeperMock struct {
// GetChannelClientStateFunc mocks the GetChannelClientState method.
GetChannelClientStateFunc func(ctx cosmossdktypes.Context, portID string, channelID string) (string, ibcclient.ClientState, error)
// GetNextSequenceSendFunc mocks the GetNextSequenceSend method.
GetNextSequenceSendFunc func(ctx cosmossdktypes.Context, portID string, channelID string) (uint64, bool)
// contains filtered or unexported fields
}
ChannelKeeperMock is a mock implementation of dkgTypes.ChannelKeeper.
func TestSomethingThatUsesChannelKeeper(t *testing.T) {
// make and configure a mocked dkgTypes.ChannelKeeper
mockedChannelKeeper := &ChannelKeeperMock{
GetChannelClientStateFunc: func(ctx cosmossdktypes.Context, portID string, channelID string) (string, ibcclient.ClientState, error) {
panic("mock out the GetChannelClientState method")
},
GetNextSequenceSendFunc: func(ctx cosmossdktypes.Context, portID string, channelID string) (uint64, bool) {
panic("mock out the GetNextSequenceSend method")
},
}
// use mockedChannelKeeper in code that requires dkgTypes.ChannelKeeper
// and then make assertions.
}
func (*ChannelKeeperMock) GetChannelClientState ¶
func (mock *ChannelKeeperMock) GetChannelClientState(ctx cosmossdktypes.Context, portID string, channelID string) (string, ibcclient.ClientState, error)
GetChannelClientState calls GetChannelClientStateFunc.
func (*ChannelKeeperMock) GetChannelClientStateCalls ¶
func (mock *ChannelKeeperMock) GetChannelClientStateCalls() []struct { Ctx cosmossdktypes.Context PortID string ChannelID string }
GetChannelClientStateCalls gets all the calls that were made to GetChannelClientState. Check the length with:
len(mockedChannelKeeper.GetChannelClientStateCalls())
func (*ChannelKeeperMock) GetNextSequenceSend ¶
func (mock *ChannelKeeperMock) GetNextSequenceSend(ctx cosmossdktypes.Context, portID string, channelID string) (uint64, bool)
GetNextSequenceSend calls GetNextSequenceSendFunc.
func (*ChannelKeeperMock) GetNextSequenceSendCalls ¶
func (mock *ChannelKeeperMock) GetNextSequenceSendCalls() []struct { Ctx cosmossdktypes.Context PortID string ChannelID string }
GetNextSequenceSendCalls gets all the calls that were made to GetNextSequenceSend. Check the length with:
len(mockedChannelKeeper.GetNextSequenceSendCalls())
type IBCTransferKeeperMock ¶
type IBCTransferKeeperMock struct {
// GetDenomTraceFunc mocks the GetDenomTrace method.
GetDenomTraceFunc func(ctx cosmossdktypes.Context, denomTraceHash tmbytes.HexBytes) (ibctypes.DenomTrace, bool)
// SendTransferFunc mocks the SendTransfer method.
SendTransferFunc func(ctx cosmossdktypes.Context, sourcePort string, sourceChannel string, token cosmossdktypes.Coin, sender cosmossdktypes.AccAddress, receiver string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64) error
// contains filtered or unexported fields
}
IBCTransferKeeperMock is a mock implementation of dkgTypes.IBCTransferKeeper.
func TestSomethingThatUsesIBCTransferKeeper(t *testing.T) {
// make and configure a mocked dkgTypes.IBCTransferKeeper
mockedIBCTransferKeeper := &IBCTransferKeeperMock{
GetDenomTraceFunc: func(ctx cosmossdktypes.Context, denomTraceHash tmbytes.HexBytes) (ibctypes.DenomTrace, bool) {
panic("mock out the GetDenomTrace method")
},
SendTransferFunc: func(ctx cosmossdktypes.Context, sourcePort string, sourceChannel string, token cosmossdktypes.Coin, sender cosmossdktypes.AccAddress, receiver string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64) error {
panic("mock out the SendTransfer method")
},
}
// use mockedIBCTransferKeeper in code that requires dkgTypes.IBCTransferKeeper
// and then make assertions.
}
func (*IBCTransferKeeperMock) GetDenomTrace ¶
func (mock *IBCTransferKeeperMock) GetDenomTrace(ctx cosmossdktypes.Context, denomTraceHash tmbytes.HexBytes) (ibctypes.DenomTrace, bool)
GetDenomTrace calls GetDenomTraceFunc.
func (*IBCTransferKeeperMock) GetDenomTraceCalls ¶
func (mock *IBCTransferKeeperMock) GetDenomTraceCalls() []struct { Ctx cosmossdktypes.Context DenomTraceHash tmbytes.HexBytes }
GetDenomTraceCalls gets all the calls that were made to GetDenomTrace. Check the length with:
len(mockedIBCTransferKeeper.GetDenomTraceCalls())
func (*IBCTransferKeeperMock) SendTransfer ¶
func (mock *IBCTransferKeeperMock) SendTransfer(ctx cosmossdktypes.Context, sourcePort string, sourceChannel string, token cosmossdktypes.Coin, sender cosmossdktypes.AccAddress, receiver string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64) error
SendTransfer calls SendTransferFunc.
func (*IBCTransferKeeperMock) SendTransferCalls ¶
func (mock *IBCTransferKeeperMock) SendTransferCalls() []struct { Ctx cosmossdktypes.Context SourcePort string SourceChannel string Token cosmossdktypes.Coin Sender cosmossdktypes.AccAddress Receiver string TimeoutHeight clienttypes.Height TimeoutTimestamp uint64 }
SendTransferCalls gets all the calls that were made to SendTransfer. Check the length with:
len(mockedIBCTransferKeeper.SendTransferCalls())
type NexusMock ¶
type NexusMock struct {
// AddToChainTotalFunc mocks the AddToChainTotal method.
AddToChainTotalFunc func(ctx cosmossdktypes.Context, chain exported.Chain, amount cosmossdktypes.Coin)
// ArchivePendingTransferFunc mocks the ArchivePendingTransfer method.
ArchivePendingTransferFunc func(ctx cosmossdktypes.Context, transfer exported.CrossChainTransfer)
// EnqueueForTransferFunc mocks the EnqueueForTransfer method.
EnqueueForTransferFunc func(ctx cosmossdktypes.Context, sender exported.CrossChainAddress, amount cosmossdktypes.Coin) error
// GetChainFunc mocks the GetChain method.
GetChainFunc func(ctx cosmossdktypes.Context, chain string) (exported.Chain, bool)
// GetRecipientFunc mocks the GetRecipient method.
GetRecipientFunc func(ctx cosmossdktypes.Context, sender exported.CrossChainAddress) (exported.CrossChainAddress, bool)
// GetTransfersForChainFunc mocks the GetTransfersForChain method.
GetTransfersForChainFunc func(ctx cosmossdktypes.Context, chain exported.Chain, state exported.TransferState) []exported.CrossChainTransfer
// IsAssetRegisteredFunc mocks the IsAssetRegistered method.
IsAssetRegisteredFunc func(ctx cosmossdktypes.Context, chainName string, denom string) bool
// LinkAddressesFunc mocks the LinkAddresses method.
LinkAddressesFunc func(ctx cosmossdktypes.Context, sender exported.CrossChainAddress, recipient exported.CrossChainAddress)
// RegisterAssetFunc mocks the RegisterAsset method.
RegisterAssetFunc func(ctx cosmossdktypes.Context, chainName string, denom string)
// SetChainFunc mocks the SetChain method.
SetChainFunc func(ctx cosmossdktypes.Context, chain exported.Chain)
// contains filtered or unexported fields
}
NexusMock is a mock implementation of dkgTypes.Nexus.
func TestSomethingThatUsesNexus(t *testing.T) {
// make and configure a mocked dkgTypes.Nexus
mockedNexus := &NexusMock{
AddToChainTotalFunc: func(ctx cosmossdktypes.Context, chain exported.Chain, amount cosmossdktypes.Coin) {
panic("mock out the AddToChainTotal method")
},
ArchivePendingTransferFunc: func(ctx cosmossdktypes.Context, transfer exported.CrossChainTransfer) {
panic("mock out the ArchivePendingTransfer method")
},
EnqueueForTransferFunc: func(ctx cosmossdktypes.Context, sender exported.CrossChainAddress, amount cosmossdktypes.Coin) error {
panic("mock out the EnqueueForTransfer method")
},
GetChainFunc: func(ctx cosmossdktypes.Context, chain string) (exported.Chain, bool) {
panic("mock out the GetChain method")
},
GetRecipientFunc: func(ctx cosmossdktypes.Context, sender exported.CrossChainAddress) (exported.CrossChainAddress, bool) {
panic("mock out the GetRecipient method")
},
GetTransfersForChainFunc: func(ctx cosmossdktypes.Context, chain exported.Chain, state exported.TransferState) []exported.CrossChainTransfer {
panic("mock out the GetTransfersForChain method")
},
IsAssetRegisteredFunc: func(ctx cosmossdktypes.Context, chainName string, denom string) bool {
panic("mock out the IsAssetRegistered method")
},
LinkAddressesFunc: func(ctx cosmossdktypes.Context, sender exported.CrossChainAddress, recipient exported.CrossChainAddress) {
panic("mock out the LinkAddresses method")
},
RegisterAssetFunc: func(ctx cosmossdktypes.Context, chainName string, denom string) {
panic("mock out the RegisterAsset method")
},
SetChainFunc: func(ctx cosmossdktypes.Context, chain exported.Chain) {
panic("mock out the SetChain method")
},
}
// use mockedNexus in code that requires dkgTypes.Nexus
// and then make assertions.
}
func (*NexusMock) AddToChainTotal ¶
func (mock *NexusMock) AddToChainTotal(ctx cosmossdktypes.Context, chain exported.Chain, amount cosmossdktypes.Coin)
AddToChainTotal calls AddToChainTotalFunc.
func (*NexusMock) AddToChainTotalCalls ¶
func (mock *NexusMock) AddToChainTotalCalls() []struct { Ctx cosmossdktypes.Context Chain exported.Chain Amount cosmossdktypes.Coin }
AddToChainTotalCalls gets all the calls that were made to AddToChainTotal. Check the length with:
len(mockedNexus.AddToChainTotalCalls())
func (*NexusMock) ArchivePendingTransfer ¶
func (mock *NexusMock) ArchivePendingTransfer(ctx cosmossdktypes.Context, transfer exported.CrossChainTransfer)
ArchivePendingTransfer calls ArchivePendingTransferFunc.
func (*NexusMock) ArchivePendingTransferCalls ¶
func (mock *NexusMock) ArchivePendingTransferCalls() []struct { Ctx cosmossdktypes.Context Transfer exported.CrossChainTransfer }
ArchivePendingTransferCalls gets all the calls that were made to ArchivePendingTransfer. Check the length with:
len(mockedNexus.ArchivePendingTransferCalls())
func (*NexusMock) EnqueueForTransfer ¶
func (mock *NexusMock) EnqueueForTransfer(ctx cosmossdktypes.Context, sender exported.CrossChainAddress, amount cosmossdktypes.Coin) error
EnqueueForTransfer calls EnqueueForTransferFunc.
func (*NexusMock) EnqueueForTransferCalls ¶
func (mock *NexusMock) EnqueueForTransferCalls() []struct { Ctx cosmossdktypes.Context Sender exported.CrossChainAddress Amount cosmossdktypes.Coin }
EnqueueForTransferCalls gets all the calls that were made to EnqueueForTransfer. Check the length with:
len(mockedNexus.EnqueueForTransferCalls())
func (*NexusMock) GetChainCalls ¶
func (mock *NexusMock) GetChainCalls() []struct { Ctx cosmossdktypes.Context Chain string }
GetChainCalls gets all the calls that were made to GetChain. Check the length with:
len(mockedNexus.GetChainCalls())
func (*NexusMock) GetRecipient ¶
func (mock *NexusMock) GetRecipient(ctx cosmossdktypes.Context, sender exported.CrossChainAddress) (exported.CrossChainAddress, bool)
GetRecipient calls GetRecipientFunc.
func (*NexusMock) GetRecipientCalls ¶
func (mock *NexusMock) GetRecipientCalls() []struct { Ctx cosmossdktypes.Context Sender exported.CrossChainAddress }
GetRecipientCalls gets all the calls that were made to GetRecipient. Check the length with:
len(mockedNexus.GetRecipientCalls())
func (*NexusMock) GetTransfersForChain ¶
func (mock *NexusMock) GetTransfersForChain(ctx cosmossdktypes.Context, chain exported.Chain, state exported.TransferState) []exported.CrossChainTransfer
GetTransfersForChain calls GetTransfersForChainFunc.
func (*NexusMock) GetTransfersForChainCalls ¶
func (mock *NexusMock) GetTransfersForChainCalls() []struct { Ctx cosmossdktypes.Context Chain exported.Chain State exported.TransferState }
GetTransfersForChainCalls gets all the calls that were made to GetTransfersForChain. Check the length with:
len(mockedNexus.GetTransfersForChainCalls())
func (*NexusMock) IsAssetRegistered ¶
func (mock *NexusMock) IsAssetRegistered(ctx cosmossdktypes.Context, chainName string, denom string) bool
IsAssetRegistered calls IsAssetRegisteredFunc.
func (*NexusMock) IsAssetRegisteredCalls ¶
func (mock *NexusMock) IsAssetRegisteredCalls() []struct { Ctx cosmossdktypes.Context ChainName string Denom string }
IsAssetRegisteredCalls gets all the calls that were made to IsAssetRegistered. Check the length with:
len(mockedNexus.IsAssetRegisteredCalls())
func (*NexusMock) LinkAddresses ¶
func (mock *NexusMock) LinkAddresses(ctx cosmossdktypes.Context, sender exported.CrossChainAddress, recipient exported.CrossChainAddress)
LinkAddresses calls LinkAddressesFunc.
func (*NexusMock) LinkAddressesCalls ¶
func (mock *NexusMock) LinkAddressesCalls() []struct { Ctx cosmossdktypes.Context Sender exported.CrossChainAddress Recipient exported.CrossChainAddress }
LinkAddressesCalls gets all the calls that were made to LinkAddresses. Check the length with:
len(mockedNexus.LinkAddressesCalls())
func (*NexusMock) RegisterAsset ¶
func (mock *NexusMock) RegisterAsset(ctx cosmossdktypes.Context, chainName string, denom string)
RegisterAsset calls RegisterAssetFunc.
func (*NexusMock) RegisterAssetCalls ¶
func (mock *NexusMock) RegisterAssetCalls() []struct { Ctx cosmossdktypes.Context ChainName string Denom string }
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 cosmossdktypes.Context, chain exported.Chain)
SetChain calls SetChainFunc.
func (*NexusMock) SetChainCalls ¶
func (mock *NexusMock) SetChainCalls() []struct { Ctx cosmossdktypes.Context Chain exported.Chain }
SetChainCalls gets all the calls that were made to SetChain. Check the length with:
len(mockedNexus.SetChainCalls())