2019-06-10 02:57:38 -07:00
|
|
|
package types // noalias
|
2018-10-19 11:36:00 -07:00
|
|
|
|
2018-10-19 14:01:23 -07:00
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
2020-05-20 12:21:00 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/auth/types"
|
2018-10-19 14:01:23 -07:00
|
|
|
)
|
2018-10-19 11:36:00 -07:00
|
|
|
|
2019-06-28 13:11:27 -07:00
|
|
|
// StakingKeeper defines the expected staking keeper
|
2019-01-11 12:08:01 -08:00
|
|
|
type StakingKeeper interface {
|
2019-06-28 13:11:27 -07:00
|
|
|
StakingTokenSupply(ctx sdk.Context) sdk.Int
|
2018-10-19 11:36:00 -07:00
|
|
|
BondedRatio(ctx sdk.Context) sdk.Dec
|
|
|
|
}
|
|
|
|
|
2020-04-20 12:32:10 -07:00
|
|
|
// AccountKeeper defines the contract required for account APIs.
|
|
|
|
type AccountKeeper interface {
|
2019-06-28 13:11:27 -07:00
|
|
|
GetModuleAddress(name string) sdk.AccAddress
|
|
|
|
|
|
|
|
// TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862
|
2020-05-20 12:21:00 -07:00
|
|
|
SetModuleAccount(sdk.Context, types.ModuleAccountI)
|
|
|
|
GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI
|
2020-04-20 12:32:10 -07:00
|
|
|
}
|
2019-06-28 13:11:27 -07:00
|
|
|
|
2020-04-20 12:32:10 -07:00
|
|
|
// BankKeeper defines the contract needed to be fulfilled for banking and supply
|
|
|
|
// dependencies.
|
|
|
|
type BankKeeper interface {
|
2019-12-27 09:57:54 -08:00
|
|
|
SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
|
|
|
|
SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
|
|
|
|
MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
|
2018-10-19 11:36:00 -07:00
|
|
|
}
|