Documentation ¶
Index ¶
- Constants
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (k Keeper) AddOrder(ctx sdk.Context, buyer sdk.AccAddress, amount sdk.Coins) (uint64, error)
- func (k Keeper) GetChannel(ctx sdk.Context, chainName string, port string) (string, error)
- func (k Keeper) GetNextOrderCount(ctx sdk.Context) uint64
- func (k Keeper) GetOrder(ctx sdk.Context, id uint64) (types.Order, error)
- func (k Keeper) GetOrderCount(ctx sdk.Context) uint64
- func (k Keeper) HasChannel(ctx sdk.Context, chainName string, port string) bool
- func (k Keeper) SetChannel(ctx sdk.Context, chainName string, port string, channel string)
- func (k Keeper) SetOrder(ctx sdk.Context, id uint64, order types.Order)
Constants ¶
View Source
const (
QueryOrder = "order"
)
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier is the module level router for state queries.
Types ¶
type Keeper ¶
type Keeper struct { BankKeeper types.BankKeeper ChannelKeeper types.ChannelKeeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, bankKeeper types.BankKeeper, channelKeeper types.ChannelKeeper, ) Keeper
NewKeeper creates a new band consumer Keeper instance.
func (Keeper) GetChannel ¶
func (Keeper) GetNextOrderCount ¶
GetNextOrderCount increments and returns the current number of orders. If the global order count is not set, it initializes it with value 0.
func (Keeper) GetOrderCount ¶
GetOrderCount returns the current number of all orders ever exist.
func (Keeper) HasChannel ¶
func (Keeper) SetChannel ¶
Click to show internal directories.
Click to hide internal directories.