-
Notifications
You must be signed in to change notification settings - Fork 119
/
expected_keepers.go
37 lines (32 loc) · 1.64 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 (
tokenregistryTypes "github.com/Sifchain/sifnode/x/tokenregistry/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
)
// ParamSubspace defines the expected Subspace interfacace
type ParamSubspace interface {
WithKeyTable(table paramtypes.KeyTable) paramtypes.Subspace
Get(ctx sdk.Context, key []byte, ptr interface{})
GetParamSet(ctx sdk.Context, ps paramtypes.ParamSet)
SetParamSet(ctx sdk.Context, ps paramtypes.ParamSet)
}
type BankKeeper interface {
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool
}
type AuthKeeper interface {
SetModuleAccount(sdk.Context, authtypes.ModuleAccountI)
GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI
}
type TokenRegistryKeeper interface {
GetEntry(registry tokenregistryTypes.Registry, denom string) (*tokenregistryTypes.RegistryEntry, error)
CheckEntryPermissions(entry *tokenregistryTypes.RegistryEntry, permissions []tokenregistryTypes.Permission) bool
GetRegistry(ctx sdk.Context) tokenregistryTypes.Registry
}