-
Notifications
You must be signed in to change notification settings - Fork 590
/
app.go
43 lines (36 loc) · 1.45 KB
/
app.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
41
42
43
package simtypes
import (
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
poolmanagertypes "github.com/osmosis-labs/osmosis/v15/x/poolmanager/types"
)
type AppCreator = func(homepath string, legacyInvariantPeriod uint, baseappOptions ...func(*baseapp.BaseApp)) App
type App interface {
GetBaseApp() *baseapp.BaseApp
AppCodec() codec.Codec
GetAccountKeeper() AccountKeeper
GetBankKeeper() BankKeeper
GetStakingKeeper() stakingkeeper.Keeper
ModuleManager() module.Manager
GetPoolManagerKeeper() PoolManagerKeeper
}
type AccountKeeper interface {
GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
// GetAllAccounts(ctx sdk.Context) []authtypes.AccountI
}
type BankKeeper interface {
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
// TODO: Revisit
SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata)
MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
}
type PoolManagerKeeper interface {
CreatePool(ctx sdk.Context, msg poolmanagertypes.CreatePoolMsg) (uint64, error)
}