-
Notifications
You must be signed in to change notification settings - Fork 28
/
expected_keepers.go
37 lines (32 loc) · 1.62 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 (
nft "github.com/OmniFlix/omniflixhub/v4/x/onft/exported"
nftypes "github.com/OmniFlix/omniflixhub/v4/x/onft/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
)
type AccountKeeper interface {
// Methods imported from account should be defined here
GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI
GetModuleAddress(module string) sdk.AccAddress
}
type BankKeeper interface {
// Methods imported from bank should be defined here
BlockedAddr(recipient sdk.AccAddress) bool
SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
SendCoins(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, amount sdk.Coins) error
SendCoinsFromModuleToAccount(ctx sdk.Context, formModule string, toAddr sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromModuleToModule(ctx sdk.Context, formModule string, toModule string, amt sdk.Coins) error
SendCoinsFromAccountToModule(ctx sdk.Context, fromAddr sdk.AccAddress, toModule string, amt sdk.Coins) error
}
// NftKeeper methods imported from nft should be defined here
type NftKeeper interface {
GetONFT(ctx sdk.Context, denomId, onftId string) (nft nft.ONFTI, err error)
GetDenomInfo(ctx sdk.Context, denomId string) (*nftypes.Denom, error)
TransferOwnership(ctx sdk.Context, denomId, nftId string, srcOwner, dstOwner sdk.AccAddress) error
}
// DistributionKeeper defines the expected distribution keeper
type DistributionKeeper interface {
FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}