-
Notifications
You must be signed in to change notification settings - Fork 197
/
expected_keepers.go
38 lines (34 loc) · 1.44 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
38
package types
import (
sdk "github.com/cosmos/cosmos-sdk/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"
"github.com/cosmos/ibc-go/v7/modules/core/exported"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
)
// BankKeeper defines the banking contract that must be fulfilled when
// creating a x/ratelimit keeper.
type BankKeeper interface {
GetSupply(ctx sdk.Context, denom string) sdk.Coin
}
// ChannelKeeper defines the channel contract that must be fulfilled when
// creating a x/ratelimit keeper.
type ChannelKeeper interface {
GetChannel(ctx sdk.Context, portID string, channelID string) (channeltypes.Channel, bool)
GetChannelClientState(ctx sdk.Context, portID string, channelID string) (string, exported.ClientState, error)
}
// ICS4Wrapper defines the expected ICS4Wrapper for middleware
type ICS4Wrapper interface {
WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI, acknowledgement ibcexported.Acknowledgement) error
SendPacket(
ctx sdk.Context,
chanCap *capabilitytypes.Capability,
sourcePort string,
sourceChannel string,
timeoutHeight clienttypes.Height,
timeoutTimestamp uint64,
data []byte,
) (sequence uint64, err error)
GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)
}