Documentation ¶
Index ¶
- Constants
- func NewQuerier(k Keeper) sdk.Querier
- func ParamKeyTable() params.KeyTable
- type Keeper
- func (k Keeper) AddLiquidity(ctx sdk.Context, from sdk.CUAddress, dexID uint32, tokenA, tokenB sdk.Symbol, ...) sdk.Result
- func (k Keeper) BindReferer(ctx sdk.Context, addr, referer sdk.CUAddress)
- func (k Keeper) CalculateLPEarning(ctx sdk.Context, addr sdk.CUAddress, dexID uint32, tokenA, tokenB sdk.Symbol) sdk.Int
- func (k Keeper) CalculateTradeEarning(ctx sdk.Context, addr sdk.CUAddress, dexID uint32, tokenA, tokenB sdk.Symbol) (sdk.Int, sdk.Int, *types.TradeReward)
- func (k Keeper) CancelOrders(ctx sdk.Context, from sdk.CUAddress, orderIDs []string) sdk.Result
- func (k Keeper) CheckSymbol(ctx sdk.Context, symbol sdk.Symbol) (sdk.Token, sdk.Result)
- func (k Keeper) ClaimLPEarning(ctx sdk.Context, addr sdk.CUAddress, dexID uint32, tokenA, tokenB sdk.Symbol) sdk.Result
- func (k Keeper) ClaimTradeEarning(ctx sdk.Context, addr sdk.CUAddress, dexID uint32, tokenA, tokenB sdk.Symbol) sdk.Result
- func (k Keeper) ExpireOrder(ctx sdk.Context, order *types.Order)
- func (k Keeper) GetAddrUnfinishedOrders(ctx sdk.Context, addr sdk.CUAddress, dexID uint32, tokenA, tokenB sdk.Symbol) []*types.Order
- func (k Keeper) GetAllDex(ctx sdk.Context) []*types.Dex
- func (k Keeper) GetAllOrders(dexID uint32, baseSymbol, quoteSymbol sdk.Symbol) ([]*types.Order, []*types.Order)
- func (k Keeper) GetAllTradingPairs(ctx sdk.Context, dexID *uint32) []*types.TradingPair
- func (k Keeper) GetDex(ctx sdk.Context, id uint32) *types.Dex
- func (k Keeper) GetLiquidity(ctx sdk.Context, addr sdk.CUAddress, dexID uint32, tokenA, tokenB sdk.Symbol) sdk.Int
- func (k Keeper) GetOrder(ctx sdk.Context, orderID string) *types.Order
- func (k Keeper) GetPairTradeReward(ctx sdk.Context, dexID uint32, tokenA, tokenB sdk.Symbol) *types.TradeReward
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetReferer(ctx sdk.Context, addr sdk.CUAddress) (ret sdk.CUAddress)
- func (k Keeper) GetTradingPair(ctx sdk.Context, dexID uint32, tokenA, tokenB sdk.Symbol) *types.TradingPair
- func (k Keeper) InitMatchingManager(ctx sdk.Context)
- func (k Keeper) IteratorAllUnfinishedOrder(ctx sdk.Context, f func(*types.Order))
- func (k Keeper) LPMiningRewardRate(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) LPMiningWeights(ctx sdk.Context) (res []*types.MiningWeight)
- func (k Keeper) LimitSwap(ctx sdk.Context, dexID uint32, orderID string, ...) sdk.Result
- func (k Keeper) LimitSwapMatchingGas(ctx sdk.Context) (res sdk.Uint)
- func (k Keeper) LpRewardRate(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) MatchingOrders(ctx sdk.Context)
- func (k Keeper) MaxFeeRate(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) MinimumLiquidity(ctx sdk.Context) (res sdk.Int)
- func (k Keeper) Mining(ctx sdk.Context)
- func (k Keeper) RefererTransactionBonusRate(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) RemoveLiquidity(ctx sdk.Context, from sdk.CUAddress, dexID uint32, tokenA, tokenB sdk.Symbol, ...) sdk.Result
- func (k Keeper) Repurchase(ctx sdk.Context) sdk.Int
- func (k Keeper) RepurchaseDuration(ctx sdk.Context) (res int64)
- func (k Keeper) RepurchaseRate(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) RepurchaseRoutingToken(ctx sdk.Context) (res string)
- func (k Keeper) RepurchaseToken(ctx sdk.Context) (res string)
- func (k Keeper) SaveDex(ctx sdk.Context, dex *types.Dex) *types.Dex
- func (k Keeper) SaveTradingPair(ctx sdk.Context, pair *types.TradingPair)
- func (k Keeper) SetDexID(ctx sdk.Context, dexID uint32)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SortTokens(ctx sdk.Context, symbolA, symbolB sdk.Symbol) (sdk.Symbol, sdk.Symbol, sdk.Result)
- func (k Keeper) SwapExactIn(ctx sdk.Context, dexID uint32, from, referer, receiver sdk.CUAddress, ...) sdk.Result
- func (k Keeper) SwapExactOut(ctx sdk.Context, dexID uint32, from, referer, receiver sdk.CUAddress, ...) sdk.Result
- func (k Keeper) TradeMiningWeights(ctx sdk.Context) (res []*types.MiningWeight)
- func (k Keeper) UpdateOrdersInMatching(ctx sdk.Context)
Constants ¶
View Source
const (
DefaultParamspace = types.ModuleName
)
Default parameter namespace
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, tokenKeeper types.TokenKeeper, rk types.ReceiptKeeper, sk types.SupplyKeeper, tk types.TransferKeeper, paramstore params.Subspace, feeCollectorName string) Keeper
func (Keeper) AddLiquidity ¶
func (Keeper) BindReferer ¶
func (Keeper) CalculateLPEarning ¶
func (Keeper) CalculateTradeEarning ¶
func (Keeper) CancelOrders ¶
func (Keeper) CheckSymbol ¶
func (Keeper) ClaimLPEarning ¶
func (Keeper) ClaimTradeEarning ¶
func (Keeper) GetAddrUnfinishedOrders ¶
func (Keeper) GetAllOrders ¶
func (Keeper) GetAllTradingPairs ¶
func (Keeper) GetLiquidity ¶
func (Keeper) GetPairTradeReward ¶
func (Keeper) GetReferer ¶
func (Keeper) GetTradingPair ¶
func (Keeper) InitMatchingManager ¶
func (Keeper) IteratorAllUnfinishedOrder ¶
func (Keeper) LPMiningRewardRate ¶
func (Keeper) LPMiningWeights ¶
func (k Keeper) LPMiningWeights(ctx sdk.Context) (res []*types.MiningWeight)
func (Keeper) LimitSwapMatchingGas ¶
func (Keeper) MatchingOrders ¶
func (Keeper) RefererTransactionBonusRate ¶
func (Keeper) RemoveLiquidity ¶
func (Keeper) RepurchaseRoutingToken ¶
func (Keeper) SaveTradingPair ¶
func (k Keeper) SaveTradingPair(ctx sdk.Context, pair *types.TradingPair)
func (Keeper) SortTokens ¶
func (Keeper) SwapExactIn ¶
func (Keeper) SwapExactOut ¶
func (Keeper) TradeMiningWeights ¶
func (k Keeper) TradeMiningWeights(ctx sdk.Context) (res []*types.MiningWeight)
func (Keeper) UpdateOrdersInMatching ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.