Documentation ¶
Index ¶
- Constants
- func AllInvariants(k Keeper) sdk.Invariant
- func NewQuerier(keeper Keeper) 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 did.Did, bo types.BuyOrder, ...)
- func (k Keeper) AddSellOrder(ctx sdk.Context, bondDid did.Did, so types.SellOrder, ...)
- func (k Keeper) AddSwapOrder(ctx sdk.Context, bondDid did.Did, so types.SwapOrder)
- func (k Keeper) BatchExists(ctx sdk.Context, bondDid did.Did) bool
- func (k Keeper) BondDidExists(ctx sdk.Context, bondToken string) bool
- func (k Keeper) BondExists(ctx sdk.Context, bondDid did.Did) bool
- func (k Keeper) CancelUnfulfillableBuys(ctx sdk.Context, bondDid did.Did) (cancelledOrders int)
- func (k Keeper) CancelUnfulfillableOrders(ctx sdk.Context, bondDid did.Did) (cancelledOrders int)
- func (k Keeper) CheckIfBuyOrderFulfillableAtPrice(ctx sdk.Context, bondDid did.Did, bo types.BuyOrder, prices sdk.DecCoins) sdk.Error
- func (k Keeper) DepositReserve(ctx sdk.Context, bondDid did.Did, from sdk.AccAddress, amount sdk.Coins) sdk.Error
- func (k Keeper) DepositReserveFromModule(ctx sdk.Context, bondDid did.Did, fromModule string, amount sdk.Coins) sdk.Error
- func (k Keeper) GetBatchBuySellPrices(ctx sdk.Context, bondDid string, batch types.Batch) (buyPricesPT, sellPricesPT sdk.DecCoins, err sdk.Error)
- func (k Keeper) GetBond(ctx sdk.Context, bondDid did.Did) (bond types.Bond, found bool)
- func (k Keeper) GetBondDid(ctx sdk.Context, bondToken string) (bondDid did.Did, found bool)
- func (k Keeper) GetBondIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetReserveBalances(ctx sdk.Context, bondDid did.Did) sdk.Coins
- func (k Keeper) GetSupplyAdjustedForBuy(ctx sdk.Context, bondDid did.Did) sdk.Coin
- func (k Keeper) GetSupplyAdjustedForSell(ctx sdk.Context, bondDid did.Did) sdk.Coin
- func (k Keeper) GetUpdatedBatchPricesAfterBuy(ctx sdk.Context, bondDid did.Did, bo types.BuyOrder) (buyPrices, sellPrices sdk.DecCoins, err sdk.Error)
- func (k Keeper) GetUpdatedBatchPricesAfterSell(ctx sdk.Context, bondDid did.Did, so types.SellOrder) (buyPrices, sellPrices sdk.DecCoins, err sdk.Error)
- func (k Keeper) LastBatchExists(ctx sdk.Context, bondDid did.Did) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MustGetBatch(ctx sdk.Context, bondDid did.Did) types.Batch
- func (k Keeper) MustGetBond(ctx sdk.Context, bondDid did.Did) types.Bond
- func (k Keeper) MustGetBondByKey(ctx sdk.Context, key []byte) types.Bond
- func (k Keeper) MustGetLastBatch(ctx sdk.Context, bondDid did.Did) types.Batch
- func (k Keeper) PerformBuyAtPrice(ctx sdk.Context, bondDid did.Did, bo types.BuyOrder, prices sdk.DecCoins) (err sdk.Error)
- func (k Keeper) PerformBuyOrders(ctx sdk.Context, bondDid did.Did)
- func (k Keeper) PerformOrders(ctx sdk.Context, bondDid did.Did)
- func (k Keeper) PerformSellAtPrice(ctx sdk.Context, bondDid did.Did, so types.SellOrder, prices sdk.DecCoins) (err sdk.Error)
- func (k Keeper) PerformSellOrders(ctx sdk.Context, bondDid did.Did)
- func (k Keeper) PerformSwap(ctx sdk.Context, bondDid did.Did, so types.SwapOrder) (err sdk.Error, ok bool)
- func (k Keeper) PerformSwapOrders(ctx sdk.Context, bondDid did.Did)
- func (k Keeper) SetBatch(ctx sdk.Context, bondDid did.Did, batch types.Batch)
- func (k Keeper) SetBond(ctx sdk.Context, bondDid did.Did, bond types.Bond)
- func (k Keeper) SetBondDid(ctx sdk.Context, bondToken string, bondDid did.Did)
- func (k Keeper) SetBondState(ctx sdk.Context, bondDid did.Did, newState string)
- func (k Keeper) SetCurrentSupply(ctx sdk.Context, bondDid did.Did, currentSupply sdk.Coin)
- func (k Keeper) SetLastBatch(ctx sdk.Context, bondDid did.Did, batch types.Batch)
- func (k Keeper) WithdrawReserve(ctx sdk.Context, bondDid did.Did, to sdk.AccAddress, amount sdk.Coins) sdk.Error
Constants ¶
View Source
const ( QueryBonds = "bonds" QueryBond = "bond" QueryBatch = "batch" QueryLastBatch = "last_batch" QueryCurrentPrice = "current_price" QueryCurrentReserve = "current_reserve" QueryCustomPrice = "custom_price" QueryBuyPrice = "buy_price" QuerySellReturn = "sell_return" QuerySwapReturn = "swap_return" )
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶
AllInvariants runs all invariants of the bonds module.
func NewQuerier ¶
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 bank.Keeper SupplyKeeper supply.Keeper StakingKeeper staking.Keeper DidKeeper did.Keeper // contains filtered or unexported fields }
func (Keeper) AddBuyOrder ¶
func (Keeper) AddSellOrder ¶
func (Keeper) AddSwapOrder ¶
func (Keeper) CancelUnfulfillableBuys ¶
func (Keeper) CancelUnfulfillableOrders ¶
func (Keeper) CheckIfBuyOrderFulfillableAtPrice ¶
func (Keeper) DepositReserve ¶ added in v0.12.2
func (Keeper) DepositReserveFromModule ¶ added in v0.12.2
func (Keeper) GetBatchBuySellPrices ¶
func (Keeper) GetBondDid ¶
func (Keeper) GetReserveBalances ¶
func (Keeper) GetSupplyAdjustedForBuy ¶
func (Keeper) GetSupplyAdjustedForSell ¶
func (Keeper) GetUpdatedBatchPricesAfterBuy ¶
func (Keeper) GetUpdatedBatchPricesAfterSell ¶
func (Keeper) LastBatchExists ¶
func (Keeper) MustGetBatch ¶
func (Keeper) MustGetBond ¶
func (Keeper) MustGetBondByKey ¶
func (Keeper) MustGetLastBatch ¶
func (Keeper) PerformBuyAtPrice ¶
func (Keeper) PerformSellAtPrice ¶
func (Keeper) PerformSellOrders ¶
func (Keeper) PerformSwap ¶
func (Keeper) PerformSwapOrders ¶
func (Keeper) SetBondDid ¶
func (Keeper) SetBondState ¶ added in v0.12.2
func (Keeper) SetCurrentSupply ¶
func (Keeper) SetLastBatch ¶
Click to show internal directories.
Click to hide internal directories.