/
expected_keepers.go
63 lines (51 loc) · 2.58 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package types
import (
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
gammmigration "github.com/fury-labs/furya/v20/x/gamm/types/migration"
incentivestypes "github.com/fury-labs/furya/v20/x/incentives/types"
lockuptypes "github.com/fury-labs/furya/v20/x/lockup/types"
poolmanagertypes "github.com/fury-labs/furya/v20/x/poolmanager/types"
epochstypes "github.com/osmosis-labs/osmosis/x/epochs/types"
)
// AccountKeeper interface contains functions for getting accounts and the module address
type AccountKeeper interface {
GetModuleAddress(name string) sdk.AccAddress
GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI
}
// BankKeeper sends tokens across modules and is able to get account balances.
type BankKeeper interface {
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
}
// PoolManagerKeeper gets the pool interface from poolID.
type PoolManagerKeeper interface {
GetNextPoolId(ctx sdk.Context) uint64
GetPool(ctx sdk.Context, poolId uint64) (poolmanagertypes.PoolI, error)
}
type GAMMKeeper interface {
GetAllMigrationInfo(ctx sdk.Context) (gammmigration.MigrationRecords, error)
}
// IncentivesKeeper creates and gets gauges, and also allows additions to gauge rewards.
type IncentivesKeeper interface {
CreateGauge(ctx sdk.Context, isPerpetual bool, owner sdk.AccAddress, coins sdk.Coins, distrTo lockuptypes.QueryCondition, startTime time.Time, numEpochsPaidOver uint64, poolId uint64) (uint64, error)
GetGaugeByID(ctx sdk.Context, gaugeID uint64) (*incentivestypes.Gauge, error)
GetGauges(ctx sdk.Context) []incentivestypes.Gauge
GetParams(ctx sdk.Context) incentivestypes.Params
GetEpochInfo(ctx sdk.Context) epochstypes.EpochInfo
AddToGaugeRewards(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, gaugeID uint64) error
GetGroupByGaugeID(ctx sdk.Context, gaugeID uint64) (incentivestypes.Group, error)
GetPoolIdsAndDurationsFromGaugeRecords(ctx sdk.Context, gaugeRecords []incentivestypes.InternalGaugeRecord) ([]uint64, []time.Duration, error)
}
// DistrKeeper handles pool-fees functionality - setting / getting fees and funding the community pool.
type DistrKeeper interface {
SetFeePool(ctx sdk.Context, feePool distrtypes.FeePool)
FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}
type EpochKeeper interface {
GetEpochInfo(ctx sdk.Context, identifier string) epochstypes.EpochInfo
}
type SuperfluidKeeper interface {
GetAllMigrationInfo(ctx sdk.Context) (MigrationRecords, error)
}