Documentation ¶
Index ¶
- Constants
- Variables
- func BancorInfoConsistencyInvariant(keeper Keeper) sdk.Invariant
- 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
- func (keeper *Keeper) DeductFee(ctx sdk.Context, acc sdk.AccAddress, amt sdk.Coins) sdk.Error
- func (keeper *Keeper) DeductInt64CetFee(ctx sdk.Context, addr sdk.AccAddress, amt int64) sdk.Error
- func (keeper *Keeper) FreezeCoins(ctx sdk.Context, acc sdk.AccAddress, amt sdk.Coins) sdk.Error
- func (keeper *Keeper) GetMarketFeeMin(ctx sdk.Context) int64
- func (keeper *Keeper) GetMarketLastExePrice(ctx sdk.Context, symbol string) (sdk.Dec, error)
- func (keeper *Keeper) GetParams(ctx sdk.Context) (param types.Params)
- func (keeper Keeper) IsBancorExist(ctx sdk.Context, stock string) bool
- func (keeper *Keeper) IsForbiddenByTokenIssuer(ctx sdk.Context, denom string, addr sdk.AccAddress) bool
- func (keeper *Keeper) IsMarketExist(ctx sdk.Context, symbol string) bool
- func (keeper *Keeper) IsSubscribed(topic string) bool
- func (keeper *Keeper) IsTokenExists(ctx sdk.Context, denom string) bool
- func (keeper *Keeper) IsTokenIssuer(ctx sdk.Context, denom string, addr sdk.AccAddress) bool
- func (keeper *Keeper) Iterate(ctx sdk.Context, biProc func(bi *BancorInfo))
- func (keeper *Keeper) Load(ctx sdk.Context, symbol string) *BancorInfo
- func (keeper *Keeper) Remove(ctx sdk.Context, bi *BancorInfo)
- func (keeper *Keeper) Save(ctx sdk.Context, bi *BancorInfo)
- func (keeper *Keeper) SendCoins(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, amt sdk.Coins) sdk.Error
- func (keeper *Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (keeper *Keeper) UnFreezeCoins(ctx sdk.Context, acc sdk.AccAddress, amt sdk.Coins) sdk.Error
- type QueryBancorInfoParam
Constants ¶
View Source
const ( QueryBancorInfo = "bancor-info" QueryParameters = "parameters" )
Variables ¶
View Source
var ( BancorInfoKey = []byte{0x10} BancorInfoKeyEnd = []byte{0x11} )
Functions ¶
func BancorInfoConsistencyInvariant ¶ added in v0.0.15
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"` StockPrecision byte `json:"stock_precision"` 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) GetSymbol ¶ added in v0.0.17
func (bi *BancorInfo) GetSymbol() string
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"` StockPrecision string `json:"stock_precision"` 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 {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(bik *BancorInfoKeeper, bxk types.ExpectedBankxKeeper, axk types.ExpectedAssetStatusKeeper, mk types.ExpectedMarketKeeper, mq msgqueue.MsgSender) Keeper
func (*Keeper) DeductInt64CetFee ¶ added in v0.0.17
func (*Keeper) FreezeCoins ¶ added in v0.0.17
func (*Keeper) GetMarketFeeMin ¶ added in v0.0.17
func (*Keeper) GetMarketLastExePrice ¶ added in v0.0.17
func (Keeper) IsBancorExist ¶
func (*Keeper) IsForbiddenByTokenIssuer ¶ added in v0.0.17
func (*Keeper) IsMarketExist ¶ added in v0.0.17
func (*Keeper) IsSubscribed ¶ added in v0.0.17
func (*Keeper) IsTokenExists ¶ added in v0.0.17
func (*Keeper) IsTokenIssuer ¶ added in v0.0.17
func (*Keeper) Iterate ¶ added in v0.0.17
func (keeper *Keeper) Iterate(ctx sdk.Context, biProc func(bi *BancorInfo))
func (*Keeper) Load ¶ added in v0.0.17
func (keeper *Keeper) Load(ctx sdk.Context, symbol string) *BancorInfo
func (*Keeper) Remove ¶ added in v0.0.17
func (keeper *Keeper) Remove(ctx sdk.Context, bi *BancorInfo)
type QueryBancorInfoParam ¶
type QueryBancorInfoParam struct {
Symbol string `json:"symbol"`
}
Click to show internal directories.
Click to hide internal directories.