-
Notifications
You must be signed in to change notification settings - Fork 580
/
expected_keepers.go
37 lines (31 loc) · 1.5 KB
/
expected_keepers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package types
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"
)
// AccountKeeper defines the contract required for account APIs.
type AccountKeeper interface {
GetModuleAddress(name string) sdk.AccAddress
GetAccount(sdk.Context, sdk.AccAddress) types.AccountI
}
// ChannelKeeper defines the expected IBC channel keeper
type ChannelKeeper interface {
GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool)
GetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) []byte
GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)
}
// PortKeeper defines the expected IBC port keeper
type PortKeeper interface {
BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
}
// BankKeeper defines the expected bank keeper
type BankKeeper interface {
HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
BlockedAddr(sdk.AccAddress) bool
IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error
}