-
Notifications
You must be signed in to change notification settings - Fork 574
/
expected_keepers.go
73 lines (58 loc) · 2.95 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
64
65
66
67
68
69
70
71
72
73
package types
import (
time "time"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/osmosis-labs/osmosis/osmomath"
cltypes "github.com/osmosis-labs/osmosis/v22/x/concentrated-liquidity/types"
lockuptypes "github.com/osmosis-labs/osmosis/v22/x/lockup/types"
poolmanagertypes "github.com/osmosis-labs/osmosis/v22/x/poolmanager/types"
epochstypes "github.com/osmosis-labs/osmosis/x/epochs/types"
)
// BankKeeper defines the expected interface needed to retrieve account balances.
type BankKeeper interface {
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
HasSupply(ctx sdk.Context, denom string) bool
SendCoinsFromModuleToManyAccounts(
ctx sdk.Context, senderModule string, recipientAddrs []sdk.AccAddress, amts []sdk.Coins,
) error
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}
// LockupKeeper defines the expected interface needed to retrieve locks.
type LockupKeeper interface {
GetLocksLongerThanDurationDenom(ctx sdk.Context, denom string, duration time.Duration) []lockuptypes.PeriodLock
GetPeriodLocksAccumulation(ctx sdk.Context, query lockuptypes.QueryCondition) osmomath.Int
GetAccountPeriodLocks(ctx sdk.Context, addr sdk.AccAddress) []lockuptypes.PeriodLock
GetLockByID(ctx sdk.Context, lockID uint64) (*lockuptypes.PeriodLock, error)
}
// EpochKeeper defines the expected interface needed to retrieve epoch info.
type EpochKeeper interface {
GetEpochInfo(ctx sdk.Context, identifier string) epochstypes.EpochInfo
}
// CommunityPoolKeeper defines the contract needed to be fulfilled for distribution keeper.
type CommunityPoolKeeper interface {
FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}
// TxFeesKeeper defines the expected interface needed to managing transaction fees.
type TxFeesKeeper interface {
GetBaseDenom(ctx sdk.Context) (denom string, err error)
}
type ConcentratedLiquidityKeeper interface {
CreateIncentive(ctx sdk.Context, poolId uint64, sender sdk.AccAddress, incentiveCoin sdk.Coin, emissionRate osmomath.Dec, startTime time.Time, minUptime time.Duration) (cltypes.IncentiveRecord, error)
GetConcentratedPoolById(ctx sdk.Context, poolId uint64) (cltypes.ConcentratedPoolExtension, error)
}
type AccountKeeper interface {
GetModuleAddress(moduleName string) sdk.AccAddress
}
type PoolIncentiveKeeper interface {
GetPoolIdFromGaugeId(ctx sdk.Context, gaugeId uint64, lockableDuration time.Duration) (uint64, error)
GetInternalGaugeIDForPool(ctx sdk.Context, poolID uint64) (uint64, error)
SetPoolGaugeIdNoLock(ctx sdk.Context, poolId uint64, gaugeId uint64)
GetLongestLockableDuration(ctx sdk.Context) (time.Duration, error)
}
type GAMMKeeper interface {
GetPoolType(ctx sdk.Context, poolId uint64) (poolmanagertypes.PoolType, error)
}
type PoolManagerKeeper interface {
GetPool(ctx sdk.Context, poolId uint64) (poolmanagertypes.PoolI, error)
GetOsmoVolumeForPool(ctx sdk.Context, poolId uint64) osmomath.Int
}