Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) AllowDenom(ctx sdk.Context, p *marketplace.AllowDenomProposal) error
- func (k Keeper) AllowedDenoms(ctx context.Context, req *marketplace.QueryAllowedDenomsRequest) (*marketplace.QueryAllowedDenomsResponse, error)
- func (k Keeper) BuyDirect(ctx context.Context, req *marketplace.MsgBuyDirect) (*marketplace.MsgBuyDirectResponse, error)
- func (k Keeper) CancelSellOrder(ctx context.Context, req *marketplace.MsgCancelSellOrder) (*marketplace.MsgCancelSellOrderResponse, error)
- func (k Keeper) PruneSellOrders(ctx context.Context) error
- func (k Keeper) Sell(ctx context.Context, req *marketplace.MsgSell) (*marketplace.MsgSellResponse, error)
- func (k Keeper) SellOrder(ctx context.Context, req *marketplace.QuerySellOrderRequest) (*marketplace.QuerySellOrderResponse, error)
- func (k Keeper) SellOrders(ctx context.Context, req *marketplace.QuerySellOrdersRequest) (*marketplace.QuerySellOrdersResponse, error)
- func (k Keeper) SellOrdersByBatch(ctx context.Context, req *marketplace.QuerySellOrdersByBatchRequest) (*marketplace.QuerySellOrdersByBatchResponse, error)
- func (k Keeper) SellOrdersBySeller(ctx context.Context, req *marketplace.QuerySellOrdersBySellerRequest) (*marketplace.QuerySellOrdersBySellerResponse, error)
- func (k Keeper) UpdateSellOrders(ctx context.Context, req *marketplace.MsgUpdateSellOrders) (*marketplace.MsgUpdateSellOrdersResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(ss marketApi.StateStore, cs ecoApi.StateStore, bk ecocredit.BankKeeper, params ecocredit.ParamKeeper) Keeper
func (Keeper) AllowDenom ¶
func (k Keeper) AllowDenom(ctx sdk.Context, p *marketplace.AllowDenomProposal) error
AllowDenom is a gov handler method that adds a denom to the list of approved denoms that may be used in the marketplace.
func (Keeper) AllowedDenoms ¶
func (k Keeper) AllowedDenoms(ctx context.Context, req *marketplace.QueryAllowedDenomsRequest) (*marketplace.QueryAllowedDenomsResponse, error)
func (Keeper) BuyDirect ¶
func (k Keeper) BuyDirect(ctx context.Context, req *marketplace.MsgBuyDirect) (*marketplace.MsgBuyDirectResponse, error)
BuyDirect allows for the purchase of credits directly from sell orders.
func (Keeper) CancelSellOrder ¶
func (k Keeper) CancelSellOrder(ctx context.Context, req *marketplace.MsgCancelSellOrder) (*marketplace.MsgCancelSellOrderResponse, error)
CancelSellOrder cancels a sell order and returns the escrowed credits to the seller.
func (Keeper) PruneSellOrders ¶
PruneSellOrders is a BeginBlock function that moves escrowed credits back into their tradable balance and deletes orders that have expired.
func (Keeper) Sell ¶
func (k Keeper) Sell(ctx context.Context, req *marketplace.MsgSell) (*marketplace.MsgSellResponse, error)
Sell creates new sell orders for credits
func (Keeper) SellOrder ¶
func (k Keeper) SellOrder(ctx context.Context, req *marketplace.QuerySellOrderRequest) (*marketplace.QuerySellOrderResponse, error)
func (Keeper) SellOrders ¶
func (k Keeper) SellOrders(ctx context.Context, req *marketplace.QuerySellOrdersRequest) (*marketplace.QuerySellOrdersResponse, error)
SellOrders queries all sell orders in state with optional pagination
func (Keeper) SellOrdersByBatch ¶
func (k Keeper) SellOrdersByBatch(ctx context.Context, req *marketplace.QuerySellOrdersByBatchRequest) (*marketplace.QuerySellOrdersByBatchResponse, error)
SellOrdersByBatch queries all sell orders under a specific batch denom with optional pagination
func (Keeper) SellOrdersBySeller ¶
func (k Keeper) SellOrdersBySeller(ctx context.Context, req *marketplace.QuerySellOrdersBySellerRequest) (*marketplace.QuerySellOrdersBySellerResponse, error)
SellOrdersBySeller queries all sell orders created by the given address with optional pagination
func (Keeper) UpdateSellOrders ¶
func (k Keeper) UpdateSellOrders(ctx context.Context, req *marketplace.MsgUpdateSellOrders) (*marketplace.MsgUpdateSellOrdersResponse, error)
UpdateSellOrders updates the sellOrder with the provided values. Note: only the DisableAutoRetire lacks field presence, so if the existing value is true, and you do not want to change that, you MUST provide a value of true in the update. Otherwise, the sell order will be changed to false.