Documentation
¶
Index ¶
- Constants
- Variables
- func NewQuerier(keeper Keeper) sdk.Querier
- type BancorInfo
- type BancorInfoDisplay
- type BancorInfoKeeper
- func (keeper *BancorInfoKeeper) GetParams(ctx sdk.Context) (param types.Params)
- func (keeper *BancorInfoKeeper) Iterate(ctx sdk.Context, biProc func(bi *BancorInfo))
- func (keeper *BancorInfoKeeper) Load(ctx sdk.Context, symbol string) *BancorInfo
- func (keeper *BancorInfoKeeper) Remove(ctx sdk.Context, bi *BancorInfo)
- func (keeper *BancorInfoKeeper) Save(ctx sdk.Context, bi *BancorInfo)
- func (keeper *BancorInfoKeeper) SetParams(ctx sdk.Context, params types.Params)
- type Keeper
- type QueryBancorInfoParam
Constants ¶
View Source
const ( QueryBancorInfo = "bancor-info" QueryParameters = "parameters" )
View Source
const SymbolSeparator = "/"
Variables ¶
View Source
var ( BancorInfoKey = []byte{0x10} BancorInfoKeyEnd = []byte{0x11} )
Functions ¶
func NewQuerier ¶
creates a querier for asset REST endpoints
Types ¶
type BancorInfo ¶
type BancorInfo struct { Owner sdk.AccAddress `json:"sender"` Stock string `json:"stock"` Money string `json:"money"` InitPrice sdk.Dec `json:"init_price"` MaxSupply sdk.Int `json:"max_supply"` MaxPrice sdk.Dec `json:"max_price"` Price sdk.Dec `json:"price"` StockInPool sdk.Int `json:"stock_in_pool"` MoneyInPool sdk.Int `json:"money_in_pool"` EarliestCancelTime int64 `json:"earliest_cancel_time"` }
func (*BancorInfo) IsConsistent ¶
func (bi *BancorInfo) IsConsistent() bool
func (*BancorInfo) UpdateStockInPool ¶
func (bi *BancorInfo) UpdateStockInPool(stockInPool sdk.Int) bool
type BancorInfoDisplay ¶
type BancorInfoDisplay struct { Stock string `json:"stock"` Money string `json:"money"` InitPrice string `json:"init_price"` MaxSupply string `json:"max_supply"` MaxPrice string `json:"max_price"` CurrentPrice string `json:"current_price"` StockInPool string `json:"stock_in_pool"` MoneyInPool string `json:"money_in_pool"` EarliestCancelTime string `json:"earliest_cancel_time"` }
func NewBancorInfoDisplay ¶
func NewBancorInfoDisplay(bi *BancorInfo) BancorInfoDisplay
type BancorInfoKeeper ¶
type BancorInfoKeeper struct {
// contains filtered or unexported fields
}
func NewBancorInfoKeeper ¶
func (*BancorInfoKeeper) GetParams ¶ added in v0.0.13
func (keeper *BancorInfoKeeper) GetParams(ctx sdk.Context) (param types.Params)
func (*BancorInfoKeeper) Iterate ¶
func (keeper *BancorInfoKeeper) Iterate(ctx sdk.Context, biProc func(bi *BancorInfo))
func (*BancorInfoKeeper) Load ¶
func (keeper *BancorInfoKeeper) Load(ctx sdk.Context, symbol string) *BancorInfo
key: stock/money pair
func (*BancorInfoKeeper) Remove ¶
func (keeper *BancorInfoKeeper) Remove(ctx sdk.Context, bi *BancorInfo)
func (*BancorInfoKeeper) Save ¶
func (keeper *BancorInfoKeeper) Save(ctx sdk.Context, bi *BancorInfo)
type Keeper ¶
type Keeper struct { Bik *BancorInfoKeeper Bxk types.ExpectedBankxKeeper Axk types.ExpectedAssetStatusKeeper Mk types.ExpectedMarketKeeper MsgProducer msgqueue.MsgSender }
func NewKeeper ¶
func NewKeeper(bik *BancorInfoKeeper, bxk types.ExpectedBankxKeeper, axk types.ExpectedAssetStatusKeeper, mk types.ExpectedMarketKeeper, mq msgqueue.MsgSender) Keeper
type QueryBancorInfoParam ¶
type QueryBancorInfoParam struct {
Symbol string `json:"symbol"`
}
Click to show internal directories.
Click to hide internal directories.