/
app.go
48 lines (40 loc) · 1.67 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
44
45
46
47
48
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"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types"
poolmanagertypes "github.com/osmosis-labs/osmosis/v21/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() ibctestingtypes.StakingKeeper
GetSDKStakingKeeper() stakingkeeper.Keeper
ModuleManager() module.Manager
GetPoolManagerKeeper() PoolManagerKeeper
GetSubspace(moduleName string) paramtypes.Subspace
}
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)
}