Documentation ¶
Index ¶
- func AllInvariants(k Keeper) sdk.Invariant
- func AvailableReserveInvariant(k Keeper) sdk.Invariant
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- 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 string, bo types.BuyOrder, ...)
- func (k Keeper) AddSellOrder(ctx sdk.Context, bondDid string, so types.SellOrder, ...)
- func (k Keeper) AddSwapOrder(ctx sdk.Context, bondDid string, 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 string) 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 string) 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 string) (cancelledOrders int)
- func (k Keeper) CancelUnfulfillableOrders(ctx sdk.Context, bondDid string) (cancelledOrders int)
- func (k Keeper) CheckIfBuyOrderFulfillableAtPrice(ctx sdk.Context, bondDid string, bo types.BuyOrder, prices sdk.DecCoins) 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 string, from sdk.AccAddress, amount sdk.Coins) error
- func (k Keeper) DepositOutcomePayment(ctx sdk.Context, bondDid string, from sdk.AccAddress, amount sdk.Coins) error
- func (k Keeper) DepositReserveFromModule(ctx sdk.Context, bondDid string, fromModule string, amount sdk.Coins) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAvailableReserve(ctx sdk.Context, bondDid string) 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 string) (bond types.Bond, found bool)
- func (k Keeper) GetBondDid(ctx sdk.Context, bondToken string) (bondDid string, found bool)
- func (k Keeper) GetBondIterator(ctx sdk.Context) storetypes.Iterator
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetReserveBalances(ctx sdk.Context, bondDid string) sdk.Coins
- func (k Keeper) GetSupplyAdjustedForAlphaEdit(ctx sdk.Context, bondDid string) sdk.Coin
- func (k Keeper) GetSupplyAdjustedForBuy(ctx sdk.Context, bondDid string) sdk.Coin
- func (k Keeper) GetSupplyAdjustedForSell(ctx sdk.Context, bondDid string) sdk.Coin
- func (k Keeper) GetUpdatedBatchPricesAfterBuy(ctx sdk.Context, bondDid string, bo types.BuyOrder) (buyPrices, sellPrices sdk.DecCoins, err error)
- func (k Keeper) GetUpdatedBatchPricesAfterSell(ctx sdk.Context, bondDid string, so types.SellOrder) (buyPrices, sellPrices sdk.DecCoins, err error)
- func (k Keeper) HandleBondingFunctionAlphaUpdate(ctx sdk.Context, bondDid string)
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) LastBatch(c context.Context, req *types.QueryLastBatchRequest) (*types.QueryLastBatchResponse, error)
- func (k Keeper) LastBatchExists(ctx sdk.Context, bondDid string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MoveOutcomePaymentToReserve(ctx sdk.Context, bondDid string)
- func (k Keeper) MustGetBatch(ctx sdk.Context, bondDid string) types.Batch
- func (k Keeper) MustGetBond(ctx sdk.Context, bondDid string) types.Bond
- func (k Keeper) MustGetBondByKey(ctx sdk.Context, key []byte) types.Bond
- func (k Keeper) MustGetLastBatch(ctx sdk.Context, bondDid string) types.Batch
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PerformBuyAtPrice(ctx sdk.Context, bondDid string, bo types.BuyOrder, prices sdk.DecCoins) (err error)
- func (k Keeper) PerformBuyOrders(ctx sdk.Context, bondDid string)
- func (k Keeper) PerformOrders(ctx sdk.Context, bondDid string)
- func (k Keeper) PerformSellAtPrice(ctx sdk.Context, bondDid string, so types.SellOrder, prices sdk.DecCoins) (err error)
- func (k Keeper) PerformSellOrders(ctx sdk.Context, bondDid string)
- func (k Keeper) PerformSwap(ctx sdk.Context, bondDid string, so types.SwapOrder) (err error, ok bool)
- func (k Keeper) PerformSwapOrders(ctx sdk.Context, bondDid string)
- 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 string, batch types.Batch)
- func (k Keeper) SetBond(ctx sdk.Context, bondDid string, bond types.Bond)
- func (k Keeper) SetBondDid(ctx sdk.Context, bondToken string, bondDid string)
- func (k Keeper) SetBondState(ctx sdk.Context, bondDid string, newState string)
- func (k Keeper) SetCurrentSupply(ctx sdk.Context, bondDid string, currentSupply sdk.Coin)
- func (k Keeper) SetLastBatch(ctx sdk.Context, bondDid string, 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 string)
- func (k Keeper) WithdrawFromReserve(ctx sdk.Context, bondDid string, to sdk.AccAddress, amount sdk.Coins) error
Constants ¶
This section is empty.
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 RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers all supply invariants
func ReserveInvariant ¶
func SupplyInvariant ¶
Types ¶
type Keeper ¶
type Keeper struct { BankKeeper types.BankKeeper StakingKeeper types.StakingKeeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, stakingKeeper types.StakingKeeper, iidKeeper types.IidKeeper, storeKey storetypes.StoreKey, paramSpace paramstypes.Subspace, ) 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) Bond ¶
func (k Keeper) Bond(c context.Context, req *types.QueryBondRequest) (*types.QueryBondResponse, error)
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 (Keeper) DepositOutcomePayment ¶
func (Keeper) DepositReserveFromModule ¶
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the x/bonds module's exported genesis.
func (Keeper) GetAvailableReserve ¶
func (Keeper) GetBatchBuySellPrices ¶
func (Keeper) GetBondDid ¶
func (Keeper) GetBondIterator ¶
func (k Keeper) GetBondIterator(ctx sdk.Context) storetypes.Iterator
func (Keeper) GetReserveBalances ¶
func (Keeper) GetSupplyAdjustedForAlphaEdit ¶
func (Keeper) GetSupplyAdjustedForBuy ¶
func (Keeper) GetSupplyAdjustedForSell ¶
func (Keeper) GetUpdatedBatchPricesAfterBuy ¶
func (Keeper) GetUpdatedBatchPricesAfterSell ¶
func (Keeper) HandleBondingFunctionAlphaUpdate ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
InitGenesis initializes the x/bonds module's state from a provided genesis state.
func (Keeper) LastBatch ¶
func (k Keeper) LastBatch(c context.Context, req *types.QueryLastBatchRequest) (*types.QueryLastBatchResponse, error)
func (Keeper) LastBatchExists ¶
func (Keeper) MoveOutcomePaymentToReserve ¶
func (Keeper) MustGetBatch ¶
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) PerformSellAtPrice ¶
func (Keeper) PerformSellOrders ¶
func (Keeper) PerformSwap ¶
func (Keeper) PerformSwapOrders ¶
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)
Click to show internal directories.
Click to hide internal directories.