Documentation ¶
Index ¶
- func AllInvariants(k Keeper) sdk.Invariant
- func CanCollectInvariant(k Keeper) sdk.Invariant
- func HandlePoolParameterChangeProposal(ctx sdk.Context, k Keeper, p *types.PoolParameterChangeProposal) error
- func HandlePublicFarmingPlanProposal(ctx sdk.Context, k Keeper, p *types.PublicFarmingPlanProposal) error
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NextOrderTick(isBuy bool, liquidity sdk.Int, ...) (tick int32, valid bool)
- func PoolCurrentLiquidityInvariant(k Keeper) sdk.Invariant
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- func RewardsGrowthGlobalInvariant(k Keeper) sdk.Invariant
- func RewardsGrowthOutsideInvariant(k Keeper) sdk.Invariant
- type Keeper
- func (k Keeper) AddLiquidity(ctx sdk.Context, ownerAddr, fromAddr sdk.AccAddress, poolId uint64, ...) (position types.Position, liquidity sdk.Int, amt sdk.Coins, err error)
- func (k Keeper) AfterPoolOrdersExecuted(ctx sdk.Context, pool types.Pool, results []*exchangetypes.MemOrder) error
- func (k Keeper) AllocateFarmingRewards(ctx sdk.Context) error
- func (k Keeper) CanCreatePrivateFarmingPlan(ctx sdk.Context) bool
- func (k Keeper) Collect(ctx sdk.Context, ownerAddr, toAddr sdk.AccAddress, positionId uint64, ...) error
- func (k Keeper) CollectibleCoins(ctx sdk.Context, positionId uint64) (fee, farmingRewards sdk.Coins, err error)
- func (k Keeper) CreatePool(ctx sdk.Context, creatorAddr sdk.AccAddress, marketId uint64, price sdk.Dec) (pool types.Pool, err error)
- func (k Keeper) CreatePrivateFarmingPlan(ctx sdk.Context, creatorAddr sdk.AccAddress, description string, ...) (plan types.FarmingPlan, err error)
- func (k Keeper) CreatePublicFarmingPlan(ctx sdk.Context, description string, farmingPoolAddr, termAddr sdk.AccAddress, ...) (plan types.FarmingPlan, err error)
- func (k Keeper) DeleteFarmingPlan(ctx sdk.Context, plan types.FarmingPlan)
- func (k Keeper) DeleteLastFarmingPlanId(ctx sdk.Context)
- func (k Keeper) DeleteLastPoolId(ctx sdk.Context)
- func (k Keeper) DeleteLastPositionId(ctx sdk.Context)
- func (k Keeper) DeleteNumPrivateFarmingPlans(ctx sdk.Context)
- func (k Keeper) DeletePool(ctx sdk.Context, pool types.Pool)
- func (k Keeper) DeletePoolByReserveAddressIndex(ctx sdk.Context, pool types.Pool)
- func (k Keeper) DeletePoolState(ctx sdk.Context, poolId uint64)
- func (k Keeper) DeletePosition(ctx sdk.Context, position types.Position)
- func (k Keeper) DeleteTickInfo(ctx sdk.Context, poolId uint64, tick int32)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetDefaultMinOrderQuantity(ctx sdk.Context) (minOrderQty sdk.Dec)
- func (k Keeper) GetDefaultMinOrderQuote(ctx sdk.Context) (minOrderQuote sdk.Dec)
- func (k Keeper) GetDefaultTickSpacing(ctx sdk.Context) (tickSpacing uint32)
- func (k Keeper) GetFarmingPlan(ctx sdk.Context, planId uint64) (plan types.FarmingPlan, found bool)
- func (k Keeper) GetLastFarmingPlanId(ctx sdk.Context) (planId uint64)
- func (k Keeper) GetLastPoolId(ctx sdk.Context) (poolId uint64)
- func (k Keeper) GetLastPositionId(ctx sdk.Context) (positionId uint64)
- func (k Keeper) GetMaxFarmingBlockTime(ctx sdk.Context) (blockTime time.Duration)
- func (k Keeper) GetMaxNumPrivateFarmingPlans(ctx sdk.Context) (max uint32)
- func (k Keeper) GetNextFarmingPlanIdWithUpdate(ctx sdk.Context) (planId uint64)
- func (k Keeper) GetNextPoolIdWithUpdate(ctx sdk.Context) (poolId uint64)
- func (k Keeper) GetNextPositionIdWithUpdate(ctx sdk.Context) (positionId uint64)
- func (k Keeper) GetNumPrivateFarmingPlans(ctx sdk.Context) (num uint32)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPool(ctx sdk.Context, poolId uint64) (pool types.Pool, found bool)
- func (k Keeper) GetPoolByMarket(ctx sdk.Context, marketId uint64) (pool types.Pool, found bool)
- func (k Keeper) GetPoolByReserveAddress(ctx sdk.Context, reserveAddr sdk.AccAddress) (pool types.Pool, found bool)
- func (k Keeper) GetPoolCreationFee(ctx sdk.Context) (fee sdk.Coins)
- func (k Keeper) GetPoolState(ctx sdk.Context, poolId uint64) (state types.PoolState, found bool)
- func (k Keeper) GetPosition(ctx sdk.Context, positionId uint64) (position types.Position, found bool)
- func (k Keeper) GetPositionByParams(ctx sdk.Context, ownerAddr sdk.AccAddress, poolId uint64, ...) (position types.Position, found bool)
- func (k Keeper) GetPrivateFarmingPlanCreationFee(ctx sdk.Context) (fee sdk.Coins)
- func (k Keeper) GetTickInfo(ctx sdk.Context, poolId uint64, tick int32) (tickInfo types.TickInfo, found bool)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) IterateAllFarmingPlans(ctx sdk.Context, cb func(plan types.FarmingPlan) (stop bool))
- func (k Keeper) IterateAllPools(ctx sdk.Context, cb func(pool types.Pool) (stop bool))
- func (k Keeper) IterateAllPositions(ctx sdk.Context, cb func(position types.Position) (stop bool))
- func (k Keeper) IterateAllTickInfos(ctx sdk.Context, ...)
- func (k Keeper) IteratePoolOrders(ctx sdk.Context, pool types.Pool, isBuy bool, ...)
- func (k Keeper) IteratePositionsByOwner(ctx sdk.Context, ownerAddr sdk.AccAddress, ...)
- func (k Keeper) IteratePositionsByOwnerAndPool(ctx sdk.Context, ownerAddr sdk.AccAddress, poolId uint64, ...)
- func (k Keeper) IteratePositionsByPool(ctx sdk.Context, poolId uint64, cb func(position types.Position) (stop bool))
- func (k Keeper) IterateTickInfosAbove(ctx sdk.Context, poolId uint64, currentTick int32, ...)
- func (k Keeper) IterateTickInfosBelow(ctx sdk.Context, poolId uint64, currentTick int32, inclusive bool, ...)
- func (k Keeper) IterateTickInfosByPool(ctx sdk.Context, poolId uint64, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) LookupPool(ctx sdk.Context, poolId uint64) (found bool)
- func (k Keeper) LookupPoolByMarket(ctx sdk.Context, marketId uint64) (found bool)
- func (k Keeper) MustGetPool(ctx sdk.Context, poolId uint64) (pool types.Pool)
- func (k Keeper) MustGetPoolByReserveAddress(ctx sdk.Context, reserveAddr sdk.AccAddress) (pool types.Pool)
- func (k Keeper) MustGetPoolState(ctx sdk.Context, poolId uint64) types.PoolState
- func (k Keeper) MustGetPosition(ctx sdk.Context, positionId uint64) (position types.Position)
- func (k Keeper) MustGetTickInfo(ctx sdk.Context, poolId uint64, tick int32) (tickInfo types.TickInfo)
- func (k Keeper) PositionAssets(ctx sdk.Context, positionId uint64) (coin0, coin1 sdk.Coin, err error)
- func (k Keeper) RemoveLiquidity(ctx sdk.Context, ownerAddr, toAddr sdk.AccAddress, positionId uint64, ...) (position types.Position, amt sdk.Coins, err error)
- func (k Keeper) SetDefaultMinOrderQuantity(ctx sdk.Context, minOrderQty sdk.Dec)
- func (k Keeper) SetDefaultMinOrderQuote(ctx sdk.Context, minOrderQuote sdk.Dec)
- func (k Keeper) SetDefaultTickSpacing(ctx sdk.Context, tickSpacing uint32)
- func (k Keeper) SetFarmingPlan(ctx sdk.Context, plan types.FarmingPlan)
- func (k Keeper) SetLastFarmingPlanId(ctx sdk.Context, planId uint64)
- func (k Keeper) SetLastPoolId(ctx sdk.Context, poolId uint64)
- func (k Keeper) SetLastPositionId(ctx sdk.Context, positionId uint64)
- func (k Keeper) SetMaxFarmingBlockTime(ctx sdk.Context, blockTime time.Duration)
- func (k Keeper) SetMaxNumPrivateFarmingPlans(ctx sdk.Context, max uint32)
- func (k Keeper) SetNumPrivateFarmingPlans(ctx sdk.Context, num uint32)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPool(ctx sdk.Context, pool types.Pool)
- func (k Keeper) SetPoolByMarketIndex(ctx sdk.Context, pool types.Pool)
- func (k Keeper) SetPoolByReserveAddressIndex(ctx sdk.Context, pool types.Pool)
- func (k Keeper) SetPoolCreationFee(ctx sdk.Context, fee sdk.Coins)
- func (k Keeper) SetPoolState(ctx sdk.Context, poolId uint64, state types.PoolState)
- func (k Keeper) SetPosition(ctx sdk.Context, position types.Position)
- func (k Keeper) SetPositionByParamsIndex(ctx sdk.Context, position types.Position)
- func (k Keeper) SetPositionsByPoolIndex(ctx sdk.Context, position types.Position)
- func (k Keeper) SetPrivateFarmingPlanCreationFee(ctx sdk.Context, fee sdk.Coins)
- func (k Keeper) SetTickInfo(ctx sdk.Context, poolId uint64, tick int32, tickInfo types.TickInfo)
- func (k Keeper) TerminateEndedFarmingPlans(ctx sdk.Context) (err error)
- func (k Keeper) TerminateFarmingPlan(ctx sdk.Context, plan types.FarmingPlan) error
- type OrderSource
- type Querier
- func (k Querier) AddLiquiditySimulation(c context.Context, req *types.QueryAddLiquiditySimulationRequest) (*types.QueryAddLiquiditySimulationResponse, error)
- func (k Querier) AllFarmingPlans(c context.Context, req *types.QueryAllFarmingPlansRequest) (*types.QueryAllFarmingPlansResponse, error)
- func (k Querier) AllPools(c context.Context, req *types.QueryAllPoolsRequest) (*types.QueryAllPoolsResponse, error)
- func (k Querier) AllPositions(c context.Context, req *types.QueryAllPositionsRequest) (*types.QueryAllPositionsResponse, error)
- func (k Querier) AllTickInfos(c context.Context, req *types.QueryAllTickInfosRequest) (*types.QueryAllTickInfosResponse, error)
- func (k Querier) CollectibleCoins(c context.Context, req *types.QueryCollectibleCoinsRequest) (*types.QueryCollectibleCoinsResponse, error)
- func (k Querier) FarmingPlan(c context.Context, req *types.QueryFarmingPlanRequest) (*types.QueryFarmingPlanResponse, error)
- func (k Querier) MakePoolResponse(ctx sdk.Context, pool types.Pool) types.PoolResponse
- func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Querier) Pool(c context.Context, req *types.QueryPoolRequest) (*types.QueryPoolResponse, error)
- func (k Querier) Position(c context.Context, req *types.QueryPositionRequest) (*types.QueryPositionResponse, error)
- func (k Querier) PositionAssets(c context.Context, req *types.QueryPositionAssetsRequest) (*types.QueryPositionAssetsResponse, error)
- func (k Querier) RemoveLiquiditySimulation(c context.Context, req *types.QueryRemoveLiquiditySimulationRequest) (*types.QueryRemoveLiquiditySimulationResponse, error)
- func (k Querier) TickInfo(c context.Context, req *types.QueryTickInfoRequest) (*types.QueryTickInfoResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶
func CanCollectInvariant ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NextOrderTick ¶
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the module's store.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramSpace paramstypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, exchangeKeeper types.ExchangeKeeper, markerKeeper types.MarkerKeeper, ) Keeper
NewKeeper creates a new Keeper instance.
func (Keeper) AddLiquidity ¶
func (Keeper) AfterPoolOrdersExecuted ¶
func (Keeper) AllocateFarmingRewards ¶
func (Keeper) CanCreatePrivateFarmingPlan ¶
func (Keeper) CollectibleCoins ¶
func (Keeper) CreatePool ¶
func (Keeper) CreatePrivateFarmingPlan ¶
func (k Keeper) CreatePrivateFarmingPlan( ctx sdk.Context, creatorAddr sdk.AccAddress, description string, termAddr sdk.AccAddress, rewardAllocs []types.FarmingRewardAllocation, startTime, endTime time.Time, ) (plan types.FarmingPlan, err error)
func (Keeper) CreatePublicFarmingPlan ¶
func (k Keeper) CreatePublicFarmingPlan( ctx sdk.Context, description string, farmingPoolAddr, termAddr sdk.AccAddress, rewardAllocs []types.FarmingRewardAllocation, startTime, endTime time.Time, ) (plan types.FarmingPlan, err error)
func (Keeper) DeleteFarmingPlan ¶
func (k Keeper) DeleteFarmingPlan(ctx sdk.Context, plan types.FarmingPlan)
func (Keeper) DeleteLastFarmingPlanId ¶
func (Keeper) DeleteLastPoolId ¶
func (Keeper) DeleteLastPositionId ¶
func (Keeper) DeleteNumPrivateFarmingPlans ¶
func (Keeper) DeletePoolByReserveAddressIndex ¶
func (Keeper) DeletePosition ¶
func (Keeper) DeleteTickInfo ¶
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the module's exported genesis.
func (Keeper) GetDefaultMinOrderQuantity ¶
func (Keeper) GetDefaultMinOrderQuote ¶
func (Keeper) GetDefaultTickSpacing ¶
func (Keeper) GetFarmingPlan ¶
func (Keeper) GetLastFarmingPlanId ¶
func (Keeper) GetLastPositionId ¶
func (Keeper) GetMaxFarmingBlockTime ¶
func (Keeper) GetMaxNumPrivateFarmingPlans ¶
func (Keeper) GetNextFarmingPlanIdWithUpdate ¶
func (Keeper) GetNextPoolIdWithUpdate ¶
func (Keeper) GetNextPositionIdWithUpdate ¶
func (Keeper) GetNumPrivateFarmingPlans ¶
func (Keeper) GetPoolByMarket ¶
func (Keeper) GetPoolByReserveAddress ¶
func (Keeper) GetPoolCreationFee ¶
func (Keeper) GetPoolState ¶
func (Keeper) GetPosition ¶
func (Keeper) GetPositionByParams ¶
func (Keeper) GetPrivateFarmingPlanCreationFee ¶
func (Keeper) GetTickInfo ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the module's state from a provided genesis state.
func (Keeper) IterateAllFarmingPlans ¶
func (Keeper) IterateAllPools ¶
func (Keeper) IterateAllPositions ¶
func (Keeper) IterateAllTickInfos ¶
func (Keeper) IteratePoolOrders ¶
func (Keeper) IteratePositionsByOwner ¶
func (Keeper) IteratePositionsByOwnerAndPool ¶
func (Keeper) IteratePositionsByPool ¶
func (Keeper) IterateTickInfosAbove ¶
func (Keeper) IterateTickInfosBelow ¶
func (Keeper) IterateTickInfosByPool ¶
func (Keeper) LookupPoolByMarket ¶
func (Keeper) MustGetPool ¶
func (Keeper) MustGetPoolByReserveAddress ¶
func (Keeper) MustGetPoolState ¶
func (Keeper) MustGetPosition ¶
func (Keeper) MustGetTickInfo ¶
func (Keeper) PositionAssets ¶
func (Keeper) RemoveLiquidity ¶
func (Keeper) SetDefaultMinOrderQuantity ¶
func (Keeper) SetDefaultMinOrderQuote ¶
func (Keeper) SetDefaultTickSpacing ¶
func (Keeper) SetFarmingPlan ¶
func (k Keeper) SetFarmingPlan(ctx sdk.Context, plan types.FarmingPlan)
func (Keeper) SetLastFarmingPlanId ¶
func (Keeper) SetLastPositionId ¶
func (Keeper) SetMaxFarmingBlockTime ¶
func (Keeper) SetMaxNumPrivateFarmingPlans ¶
func (Keeper) SetNumPrivateFarmingPlans ¶
func (Keeper) SetPoolByMarketIndex ¶
func (Keeper) SetPoolByReserveAddressIndex ¶
func (Keeper) SetPoolCreationFee ¶
func (Keeper) SetPoolState ¶
func (Keeper) SetPositionByParamsIndex ¶
func (Keeper) SetPositionsByPoolIndex ¶
func (Keeper) SetPrivateFarmingPlanCreationFee ¶
func (Keeper) SetTickInfo ¶
func (Keeper) TerminateEndedFarmingPlans ¶
func (Keeper) TerminateFarmingPlan ¶
type OrderSource ¶
type OrderSource struct {
Keeper
}
func NewOrderSource ¶
func NewOrderSource(k Keeper) OrderSource
func (OrderSource) AfterOrdersExecuted ¶
func (k OrderSource) AfterOrdersExecuted(ctx sdk.Context, _ exchangetypes.Market, ordererAddr sdk.AccAddress, results []*exchangetypes.MemOrder) error
func (OrderSource) ConstructMemOrderBookSide ¶
func (k OrderSource) ConstructMemOrderBookSide( ctx sdk.Context, market exchangetypes.Market, createOrder exchangetypes.CreateOrderFunc, opts exchangetypes.MemOrderBookSideOptions) error
func (OrderSource) Name ¶
func (k OrderSource) Name() string
type Querier ¶
type Querier struct {
Keeper
}
Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper.
func (Querier) AddLiquiditySimulation ¶
func (k Querier) AddLiquiditySimulation(c context.Context, req *types.QueryAddLiquiditySimulationRequest) (*types.QueryAddLiquiditySimulationResponse, error)
func (Querier) AllFarmingPlans ¶
func (k Querier) AllFarmingPlans(c context.Context, req *types.QueryAllFarmingPlansRequest) (*types.QueryAllFarmingPlansResponse, error)
func (Querier) AllPools ¶
func (k Querier) AllPools(c context.Context, req *types.QueryAllPoolsRequest) (*types.QueryAllPoolsResponse, error)
func (Querier) AllPositions ¶
func (k Querier) AllPositions(c context.Context, req *types.QueryAllPositionsRequest) (*types.QueryAllPositionsResponse, error)
func (Querier) AllTickInfos ¶
func (k Querier) AllTickInfos(c context.Context, req *types.QueryAllTickInfosRequest) (*types.QueryAllTickInfosResponse, error)
func (Querier) CollectibleCoins ¶
func (k Querier) CollectibleCoins(c context.Context, req *types.QueryCollectibleCoinsRequest) (*types.QueryCollectibleCoinsResponse, error)
func (Querier) FarmingPlan ¶
func (k Querier) FarmingPlan(c context.Context, req *types.QueryFarmingPlanRequest) (*types.QueryFarmingPlanResponse, error)
func (Querier) MakePoolResponse ¶
func (Querier) Params ¶
func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries the parameters of the module.
func (Querier) Pool ¶
func (k Querier) Pool(c context.Context, req *types.QueryPoolRequest) (*types.QueryPoolResponse, error)
func (Querier) Position ¶
func (k Querier) Position(c context.Context, req *types.QueryPositionRequest) (*types.QueryPositionResponse, error)
func (Querier) PositionAssets ¶
func (k Querier) PositionAssets(c context.Context, req *types.QueryPositionAssetsRequest) (*types.QueryPositionAssetsResponse, error)
func (Querier) RemoveLiquiditySimulation ¶
func (k Querier) RemoveLiquiditySimulation(c context.Context, req *types.QueryRemoveLiquiditySimulationRequest) (*types.QueryRemoveLiquiditySimulationResponse, error)
func (Querier) TickInfo ¶
func (k Querier) TickInfo(c context.Context, req *types.QueryTickInfoRequest) (*types.QueryTickInfoResponse, error)
Click to show internal directories.
Click to hide internal directories.