Documentation
¶
Index ¶
- type Keeper
- func (k Keeper) ConcentratedLiquidityListener() concentratedliquiditytypes.ConcentratedLiquidityListener
- func (k Keeper) DeleteHistoricalRecord(ctx sdk.Context, twap types.TwapRecord)
- func (k Keeper) DeleteMostRecentRecord(ctx sdk.Context, twap types.TwapRecord)
- func (k Keeper) EndBlock(ctx sdk.Context)
- func (k Keeper) EpochHooks() epochtypes.EpochHooks
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GammHooks() gammtypes.GammHooks
- func (k Keeper) GetAllHistoricalPoolIndexedTWAPsForPoolId(ctx sdk.Context, poolId uint64) ([]types.TwapRecord, error)
- func (k Keeper) GetAllHistoricalTimeIndexedTWAPs(ctx sdk.Context) ([]types.TwapRecord, error)
- func (k Keeper) GetAllMostRecentRecordsForPool(ctx sdk.Context, poolId uint64) ([]types.TwapRecord, error)
- func (k Keeper) GetArithmeticStrategy() *arithmetic
- func (k Keeper) GetArithmeticTwap(ctx sdk.Context, poolId uint64, baseAssetDenom string, quoteAssetDenom string, ...) (osmomath.Dec, error)
- func (k Keeper) GetArithmeticTwapToNow(ctx sdk.Context, poolId uint64, baseAssetDenom string, quoteAssetDenom string, ...) (osmomath.Dec, error)
- func (k Keeper) GetBeginBlockAccumulatorRecord(ctx sdk.Context, poolId uint64, asset0Denom string, asset1Denom string) (types.TwapRecord, error)
- func (k Keeper) GetGeometricStrategy() *geometric
- func (k Keeper) GetGeometricTwap(ctx sdk.Context, poolId uint64, baseAssetDenom string, quoteAssetDenom string, ...) (osmomath.Dec, error)
- func (k Keeper) GetGeometricTwapToNow(ctx sdk.Context, poolId uint64, baseAssetDenom string, quoteAssetDenom string, ...) (osmomath.Dec, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
- func (k Keeper) MigrateExistingPools(ctx sdk.Context, latestPoolId uint64) error
- func (k *Keeper) PruneEpochIdentifier(ctx sdk.Context) string
- func (k *Keeper) RecordHistoryKeepPeriod(ctx sdk.Context) time.Duration
- func (k Keeper) SetParam(ctx sdk.Context, key []byte, value interface{})
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) StoreHistoricalTWAP(ctx sdk.Context, twap types.TwapRecord)
- func (k Keeper) StoreNewRecord(ctx sdk.Context, twap types.TwapRecord)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(storeKey sdk.StoreKey, transientKey *sdk.TransientStoreKey, paramSpace paramtypes.Subspace, poolmanagerKeeper types.PoolManagerInterface) *Keeper
func (Keeper) ConcentratedLiquidityListener ¶
func (k Keeper) ConcentratedLiquidityListener() concentratedliquiditytypes.ConcentratedLiquidityListener
func (Keeper) DeleteHistoricalRecord ¶
func (k Keeper) DeleteHistoricalRecord(ctx sdk.Context, twap types.TwapRecord)
func (Keeper) DeleteMostRecentRecord ¶
func (k Keeper) DeleteMostRecentRecord(ctx sdk.Context, twap types.TwapRecord)
DeleteMostRecentRecord deletes a given record in most recent record store. Note that if there are entries in historical indexes for this record, they are not deleted by this method.
func (Keeper) EpochHooks ¶
func (k Keeper) EpochHooks() epochtypes.EpochHooks
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the twap module's exported genesis.
func (Keeper) GetAllHistoricalPoolIndexedTWAPsForPoolId ¶
func (k Keeper) GetAllHistoricalPoolIndexedTWAPsForPoolId(ctx sdk.Context, poolId uint64) ([]types.TwapRecord, error)
GetAllHistoricalPoolIndexedTWAPsForPoolId returns HistoricalTwapRecord for a pool give poolId.
func (Keeper) GetAllHistoricalTimeIndexedTWAPs ¶
getAllHistoricalTimeIndexedTWAPs returns all historical TWAPs indexed by time.
func (Keeper) GetAllMostRecentRecordsForPool ¶
func (k Keeper) GetAllMostRecentRecordsForPool(ctx sdk.Context, poolId uint64) ([]types.TwapRecord, error)
GetAllMostRecentRecordsForPool returns all most recent twap records (in state representation) for the provided pool id.
func (Keeper) GetArithmeticStrategy ¶
func (k Keeper) GetArithmeticStrategy() *arithmetic
GetArithmeticStrategy gets arithmetic TWAP keeper.
func (Keeper) GetArithmeticTwap ¶
func (k Keeper) GetArithmeticTwap( ctx sdk.Context, poolId uint64, baseAssetDenom string, quoteAssetDenom string, startTime time.Time, endTime time.Time, ) (osmomath.Dec, error)
N.B. If there is a notable use case, the state machine could maintain more historical records, e.g. at one per hour.
func (Keeper) GetArithmeticTwapToNow ¶
func (k Keeper) GetArithmeticTwapToNow( ctx sdk.Context, poolId uint64, baseAssetDenom string, quoteAssetDenom string, startTime time.Time, ) (osmomath.Dec, error)
GetArithmeticTwapToNow returns arithmetic twap from start time until the current block time for quote and base assets in a given pool.
func (Keeper) GetBeginBlockAccumulatorRecord ¶
func (k Keeper) GetBeginBlockAccumulatorRecord(ctx sdk.Context, poolId uint64, asset0Denom string, asset1Denom string) (types.TwapRecord, error)
GetBeginBlockAccumulatorRecord returns a TwapRecord struct corresponding to the state of pool `poolId` as of the beginning of the block this is called on.
func (Keeper) GetGeometricStrategy ¶
func (k Keeper) GetGeometricStrategy() *geometric
GetGeometricStrategy gets geometric TWAP keeper.
func (Keeper) GetGeometricTwap ¶
func (Keeper) GetGeometricTwapToNow ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
InitGenesis initializes the twap module's state from a provided genesis state.
func (Keeper) MigrateExistingPools ¶
MigrateExistingPools iterates through all pools and creates state entry for the twap module.
func (*Keeper) RecordHistoryKeepPeriod ¶
func (Keeper) SetParam ¶
SetParam sets a specific twap module's parameter with the provided parameter.
func (Keeper) StoreHistoricalTWAP ¶
func (k Keeper) StoreHistoricalTWAP(ctx sdk.Context, twap types.TwapRecord)
storeHistoricalTWAP writes a twap to the store, in all needed indexing.
func (Keeper) StoreNewRecord ¶
func (k Keeper) StoreNewRecord(ctx sdk.Context, twap types.TwapRecord)
StoreNewRecord stores a record, in both the most recent record store and historical stores.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
queryproto
Package queryproto is a reverse proxy.
|
Package queryproto is a reverse proxy. |