Documentation ¶
Index ¶
- Constants
- func AllInvariants(k Keeper) sdk.Invariant
- func AvailableReserveInvariant(k Keeper) sdk.Invariant
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- func ReserveInvariant(k Keeper) sdk.Invariant
- func SupplyInvariant(k Keeper) sdk.Invariant
- type Keeper
- func (k Keeper) AddBuyOrder(ctx sdk.Context, bondDid didexported.Did, bo types.BuyOrder, ...)
- func (k Keeper) AddSellOrder(ctx sdk.Context, bondDid didexported.Did, so types.SellOrder, ...)
- func (k Keeper) AddSwapOrder(ctx sdk.Context, bondDid didexported.Did, so types.SwapOrder)
- func (k Keeper) AlphaMaximums(c context.Context, req *types.QueryAlphaMaximumsRequest) (*types.QueryAlphaMaximumsResponse, error)
- func (k Keeper) AvailableReserve(c context.Context, req *types.QueryAvailableReserveRequest) (*types.QueryAvailableReserveResponse, error)
- func (k Keeper) Batch(c context.Context, req *types.QueryBatchRequest) (*types.QueryBatchResponse, error)
- func (k Keeper) BatchExists(ctx sdk.Context, bondDid didexported.Did) bool
- func (k Keeper) Bond(c context.Context, req *types.QueryBondRequest) (*types.QueryBondResponse, error)
- func (k Keeper) BondDidExists(ctx sdk.Context, bondToken string) bool
- func (k Keeper) BondExists(ctx sdk.Context, bondDid didexported.Did) bool
- func (k Keeper) Bonds(c context.Context, _ *types.QueryBondsRequest) (*types.QueryBondsResponse, error)
- func (k Keeper) BondsDetailed(c context.Context, _ *types.QueryBondsDetailedRequest) (*types.QueryBondsDetailedResponse, error)
- func (k Keeper) BuyPrice(c context.Context, req *types.QueryBuyPriceRequest) (*types.QueryBuyPriceResponse, error)
- func (k Keeper) CancelUnfulfillableBuys(ctx sdk.Context, bondDid didexported.Did) (cancelledOrders int)
- func (k Keeper) CancelUnfulfillableOrders(ctx sdk.Context, bondDid didexported.Did) (cancelledOrders int)
- func (k Keeper) CheckIfBuyOrderFulfillableAtPrice(ctx sdk.Context, bondDid didexported.Did, bo types.BuyOrder, ...) error
- func (k Keeper) CurrentPrice(c context.Context, req *types.QueryCurrentPriceRequest) (*types.QueryCurrentPriceResponse, error)
- func (k Keeper) CurrentReserve(c context.Context, req *types.QueryCurrentReserveRequest) (*types.QueryCurrentReserveResponse, error)
- func (k Keeper) CustomPrice(c context.Context, req *types.QueryCustomPriceRequest) (*types.QueryCustomPriceResponse, error)
- func (k Keeper) DepositIntoReserve(ctx sdk.Context, bondDid didexported.Did, from sdk.AccAddress, ...) error
- func (k Keeper) DepositOutcomePayment(ctx sdk.Context, bondDid didexported.Did, from sdk.AccAddress, ...) error
- func (k Keeper) DepositReserveFromModule(ctx sdk.Context, bondDid didexported.Did, fromModule string, amount sdk.Coins) error
- func (k Keeper) GetAvailableReserve(ctx sdk.Context, bondDid didexported.Did) sdk.Coins
- func (k Keeper) GetBatchBuySellPrices(ctx sdk.Context, bondDid string, batch types.Batch) (buyPricesPT, sellPricesPT sdk.DecCoins, err error)
- func (k Keeper) GetBond(ctx sdk.Context, bondDid didexported.Did) (bond types.Bond, found bool)
- func (k Keeper) GetBondDid(ctx sdk.Context, bondToken string) (bondDid didexported.Did, found bool)
- func (k Keeper) GetBondIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetReserveBalances(ctx sdk.Context, bondDid didexported.Did) sdk.Coins
- func (k Keeper) GetSupplyAdjustedForAlphaEdit(ctx sdk.Context, bondDid didexported.Did) sdk.Coin
- func (k Keeper) GetSupplyAdjustedForBuy(ctx sdk.Context, bondDid didexported.Did) sdk.Coin
- func (k Keeper) GetSupplyAdjustedForSell(ctx sdk.Context, bondDid didexported.Did) sdk.Coin
- func (k Keeper) GetUpdatedBatchPricesAfterBuy(ctx sdk.Context, bondDid didexported.Did, bo types.BuyOrder) (buyPrices, sellPrices sdk.DecCoins, err error)
- func (k Keeper) GetUpdatedBatchPricesAfterSell(ctx sdk.Context, bondDid didexported.Did, so types.SellOrder) (buyPrices, sellPrices sdk.DecCoins, err error)
- func (k Keeper) HandleBondingFunctionAlphaUpdate(ctx sdk.Context, bondDid didexported.Did)
- func (k Keeper) LastBatch(c context.Context, req *types.QueryLastBatchRequest) (*types.QueryLastBatchResponse, error)
- func (k Keeper) LastBatchExists(ctx sdk.Context, bondDid didexported.Did) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MoveOutcomePaymentToReserve(ctx sdk.Context, bondDid didexported.Did)
- func (k Keeper) MustGetBatch(ctx sdk.Context, bondDid didexported.Did) types.Batch
- func (k Keeper) MustGetBond(ctx sdk.Context, bondDid didexported.Did) types.Bond
- func (k Keeper) MustGetBondByKey(ctx sdk.Context, key []byte) types.Bond
- func (k Keeper) MustGetLastBatch(ctx sdk.Context, bondDid didexported.Did) types.Batch
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PerformBuyAtPrice(ctx sdk.Context, bondDid didexported.Did, bo types.BuyOrder, ...) (err error)
- func (k Keeper) PerformBuyOrders(ctx sdk.Context, bondDid didexported.Did)
- func (k Keeper) PerformOrders(ctx sdk.Context, bondDid didexported.Did)
- func (k Keeper) PerformSellAtPrice(ctx sdk.Context, bondDid didexported.Did, so types.SellOrder, ...) (err error)
- func (k Keeper) PerformSellOrders(ctx sdk.Context, bondDid didexported.Did)
- func (k Keeper) PerformSwap(ctx sdk.Context, bondDid didexported.Did, so types.SwapOrder) (err error, ok bool)
- func (k Keeper) PerformSwapOrders(ctx sdk.Context, bondDid didexported.Did)
- func (k Keeper) ReservedBondToken(ctx sdk.Context, bondToken string) bool
- func (k Keeper) SellReturn(c context.Context, req *types.QuerySellReturnRequest) (*types.QuerySellReturnResponse, error)
- func (k Keeper) SetBatch(ctx sdk.Context, bondDid didexported.Did, batch types.Batch)
- func (k Keeper) SetBond(ctx sdk.Context, bondDid didexported.Did, bond types.Bond)
- func (k Keeper) SetBondDid(ctx sdk.Context, bondToken string, bondDid didexported.Did)
- func (k Keeper) SetBondState(ctx sdk.Context, bondDid didexported.Did, newState string)
- func (k Keeper) SetCurrentSupply(ctx sdk.Context, bondDid didexported.Did, currentSupply sdk.Coin)
- func (k Keeper) SetLastBatch(ctx sdk.Context, bondDid didexported.Did, batch types.Batch)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SwapReturn(c context.Context, req *types.QuerySwapReturnRequest) (*types.QuerySwapReturnResponse, error)
- func (k Keeper) UpdateAlpha(ctx sdk.Context, bondDid didexported.Did)
- func (k Keeper) WithdrawFromReserve(ctx sdk.Context, bondDid didexported.Did, to sdk.AccAddress, amount sdk.Coins) error
Constants ¶
View Source
const ( QueryBonds = "bonds" QueryBondsDetailed = "bonds_detailed" QueryBond = "bond" QueryBatch = "batch" QueryLastBatch = "last_batch" QueryCurrentPrice = "current_price" QueryCurrentReserve = "current_reserve" QueryAvailableReserve = "available_reserve" QueryCustomPrice = "custom_price" QueryBuyPrice = "buy_price" QuerySellReturn = "sell_return" QuerySwapReturn = "swap_return" QueryAlphaMaximums = "alpha_maximums" QueryParams = "params" QueryBondAccountDetails = "bond_account_details" )
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶
AllInvariants runs all invariants of the bonds module.
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the bonds MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier is the module level router for state queries
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers all supply invariants
func ReserveInvariant ¶
func SupplyInvariant ¶
Types ¶
type Keeper ¶
type Keeper struct { BankKeeper bankkeeper.Keeper StakingKeeper stakingkeeper.Keeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper(bankKeeper bankkeeper.Keeper, accountKeeper authkeeper.AccountKeeper, stakingKeeper stakingkeeper.Keeper, iidKeeper iidkeeper.Keeper, storeKey sdk.StoreKey, paramSpace paramstypes.Subspace, cdc codec.BinaryCodec) Keeper
func (Keeper) AddBuyOrder ¶
func (Keeper) AddSellOrder ¶
func (Keeper) AddSwapOrder ¶
func (Keeper) AlphaMaximums ¶
func (k Keeper) AlphaMaximums(c context.Context, req *types.QueryAlphaMaximumsRequest) (*types.QueryAlphaMaximumsResponse, error)
func (Keeper) AvailableReserve ¶
func (k Keeper) AvailableReserve(c context.Context, req *types.QueryAvailableReserveRequest) (*types.QueryAvailableReserveResponse, error)
func (Keeper) Batch ¶
func (k Keeper) Batch(c context.Context, req *types.QueryBatchRequest) (*types.QueryBatchResponse, error)
func (Keeper) BatchExists ¶
func (Keeper) Bond ¶
func (k Keeper) Bond(c context.Context, req *types.QueryBondRequest) (*types.QueryBondResponse, error)
func (Keeper) BondExists ¶
func (Keeper) Bonds ¶
func (k Keeper) Bonds(c context.Context, _ *types.QueryBondsRequest) (*types.QueryBondsResponse, error)
func (Keeper) BondsDetailed ¶
func (k Keeper) BondsDetailed(c context.Context, _ *types.QueryBondsDetailedRequest) (*types.QueryBondsDetailedResponse, error)
func (Keeper) BuyPrice ¶
func (k Keeper) BuyPrice(c context.Context, req *types.QueryBuyPriceRequest) (*types.QueryBuyPriceResponse, error)
func (Keeper) CancelUnfulfillableBuys ¶
func (Keeper) CancelUnfulfillableOrders ¶
func (Keeper) CheckIfBuyOrderFulfillableAtPrice ¶
func (Keeper) CurrentPrice ¶
func (k Keeper) CurrentPrice(c context.Context, req *types.QueryCurrentPriceRequest) (*types.QueryCurrentPriceResponse, error)
func (Keeper) CurrentReserve ¶
func (k Keeper) CurrentReserve(c context.Context, req *types.QueryCurrentReserveRequest) (*types.QueryCurrentReserveResponse, error)
func (Keeper) CustomPrice ¶
func (k Keeper) CustomPrice(c context.Context, req *types.QueryCustomPriceRequest) (*types.QueryCustomPriceResponse, error)
func (Keeper) DepositIntoReserve ¶
func (k Keeper) DepositIntoReserve(ctx sdk.Context, bondDid didexported.Did, from sdk.AccAddress, amount sdk.Coins) error
func (Keeper) DepositOutcomePayment ¶
func (k Keeper) DepositOutcomePayment(ctx sdk.Context, bondDid didexported.Did, from sdk.AccAddress, amount sdk.Coins) error
func (Keeper) DepositReserveFromModule ¶
func (Keeper) GetAvailableReserve ¶
func (Keeper) GetBatchBuySellPrices ¶
func (Keeper) GetBondDid ¶
func (Keeper) GetReserveBalances ¶
func (Keeper) GetSupplyAdjustedForAlphaEdit ¶
func (Keeper) GetSupplyAdjustedForBuy ¶
func (Keeper) GetSupplyAdjustedForSell ¶
func (Keeper) GetUpdatedBatchPricesAfterBuy ¶
func (Keeper) GetUpdatedBatchPricesAfterSell ¶
func (Keeper) HandleBondingFunctionAlphaUpdate ¶
func (k Keeper) HandleBondingFunctionAlphaUpdate(ctx sdk.Context, bondDid didexported.Did)
func (Keeper) LastBatch ¶
func (k Keeper) LastBatch(c context.Context, req *types.QueryLastBatchRequest) (*types.QueryLastBatchResponse, error)
func (Keeper) LastBatchExists ¶
func (Keeper) MoveOutcomePaymentToReserve ¶
func (k Keeper) MoveOutcomePaymentToReserve(ctx sdk.Context, bondDid didexported.Did)
func (Keeper) MustGetBatch ¶
func (Keeper) MustGetBond ¶
func (Keeper) MustGetBondByKey ¶
func (Keeper) MustGetLastBatch ¶
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) PerformBuyAtPrice ¶
func (Keeper) PerformBuyOrders ¶
func (k Keeper) PerformBuyOrders(ctx sdk.Context, bondDid didexported.Did)
func (Keeper) PerformOrders ¶
func (k Keeper) PerformOrders(ctx sdk.Context, bondDid didexported.Did)
func (Keeper) PerformSellAtPrice ¶
func (Keeper) PerformSellOrders ¶
func (k Keeper) PerformSellOrders(ctx sdk.Context, bondDid didexported.Did)
func (Keeper) PerformSwap ¶
func (Keeper) PerformSwapOrders ¶
func (k Keeper) PerformSwapOrders(ctx sdk.Context, bondDid didexported.Did)
func (Keeper) ReservedBondToken ¶
func (Keeper) SellReturn ¶
func (k Keeper) SellReturn(c context.Context, req *types.QuerySellReturnRequest) (*types.QuerySellReturnResponse, error)
func (Keeper) SetBondDid ¶
func (Keeper) SetBondState ¶
func (Keeper) SetCurrentSupply ¶
func (Keeper) SetLastBatch ¶
func (Keeper) SwapReturn ¶
func (k Keeper) SwapReturn(c context.Context, req *types.QuerySwapReturnRequest) (*types.QuerySwapReturnResponse, error)
func (Keeper) UpdateAlpha ¶
func (k Keeper) UpdateAlpha(ctx sdk.Context, bondDid didexported.Did)
func (Keeper) WithdrawFromReserve ¶
func (k Keeper) WithdrawFromReserve(ctx sdk.Context, bondDid didexported.Did, to sdk.AccAddress, amount sdk.Coins) error
Click to show internal directories.
Click to hide internal directories.