-
Notifications
You must be signed in to change notification settings - Fork 43
/
expected_keepers.go
40 lines (32 loc) · 1.51 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
39
40
package types // noalias
import (
epochstypes "github.com/dymensionxyz/dymension-rdk/x/epochs/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
)
// AccountKeeper defines the contract required for account APIs.
type AccountKeeper interface {
GetModuleAddress(name string) sdk.AccAddress
HasAccount(ctx sdk.Context, addr sdk.AccAddress) bool
SetAccount(ctx sdk.Context, acc authtypes.AccountI)
NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI
GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
// TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862
SetModuleAccount(sdk.Context, types.ModuleAccountI)
GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI
}
// BankKeeper defines the contract needed to be fulfilled for banking and supply
// dependencies.
type BankKeeper interface {
SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
}
// DistrKeeper defines the contract needed to be fulfilled for distribution keeper.
type DistrKeeper interface {
FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}
// EpochKeeper defines the contract needed to be fulfilled for epochs keeper.
type EpochKeeper interface {
GetEpochInfo(ctx sdk.Context, identifier string) (epochstypes.EpochInfo, bool)
}