Documentation
¶
Index ¶
- type Keeper
- func (k Keeper) AddAllowedDenom(ctx context.Context, req *types.MsgAddAllowedDenom) (*types.MsgAddAllowedDenomResponse, error)
- func (k Keeper) AllowedDenoms(ctx context.Context, req *types.QueryAllowedDenomsRequest) (*types.QueryAllowedDenomsResponse, error)
- func (k Keeper) BuyDirect(ctx context.Context, req *types.MsgBuyDirect) (*types.MsgBuyDirectResponse, error)
- func (k Keeper) CancelSellOrder(ctx context.Context, req *types.MsgCancelSellOrder) (*types.MsgCancelSellOrderResponse, error)
- func (k Keeper) PruneSellOrders(ctx context.Context) error
- func (k Keeper) RemoveAllowedDenom(ctx context.Context, req *types.MsgRemoveAllowedDenom) (*types.MsgRemoveAllowedDenomResponse, error)
- func (k Keeper) Sell(ctx context.Context, req *types.MsgSell) (*types.MsgSellResponse, error)
- func (k Keeper) SellOrder(ctx context.Context, req *types.QuerySellOrderRequest) (*types.QuerySellOrderResponse, error)
- func (k Keeper) SellOrders(ctx context.Context, req *types.QuerySellOrdersRequest) (*types.QuerySellOrdersResponse, error)
- func (k Keeper) SellOrdersByBatch(ctx context.Context, req *types.QuerySellOrdersByBatchRequest) (*types.QuerySellOrdersByBatchResponse, error)
- func (k Keeper) SellOrdersBySeller(ctx context.Context, req *types.QuerySellOrdersBySellerRequest) (*types.QuerySellOrdersBySellerResponse, error)
- func (k Keeper) UpdateSellOrders(ctx context.Context, req *types.MsgUpdateSellOrders) (*types.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 baseapi.StateStore, bk ecocredit.BankKeeper, authority sdk.AccAddress) Keeper
func (Keeper) AddAllowedDenom ¶
func (k Keeper) AddAllowedDenom(ctx context.Context, req *types.MsgAddAllowedDenom) (*types.MsgAddAllowedDenomResponse, error)
AddAllowedDenom 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 *types.QueryAllowedDenomsRequest) (*types.QueryAllowedDenomsResponse, error)
func (Keeper) BuyDirect ¶
func (k Keeper) BuyDirect(ctx context.Context, req *types.MsgBuyDirect) (*types.MsgBuyDirectResponse, error)
BuyDirect allows for the purchase of credits directly from sell orders.
func (Keeper) CancelSellOrder ¶
func (k Keeper) CancelSellOrder(ctx context.Context, req *types.MsgCancelSellOrder) (*types.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) RemoveAllowedDenom ¶
func (k Keeper) RemoveAllowedDenom(ctx context.Context, req *types.MsgRemoveAllowedDenom) (*types.MsgRemoveAllowedDenomResponse, error)
RemoveAllowedDenom removes denom from the allowed denoms.
func (Keeper) SellOrder ¶
func (k Keeper) SellOrder(ctx context.Context, req *types.QuerySellOrderRequest) (*types.QuerySellOrderResponse, error)
func (Keeper) SellOrders ¶
func (k Keeper) SellOrders(ctx context.Context, req *types.QuerySellOrdersRequest) (*types.QuerySellOrdersResponse, error)
SellOrders queries all sell orders in state with optional pagination
func (Keeper) SellOrdersByBatch ¶
func (k Keeper) SellOrdersByBatch(ctx context.Context, req *types.QuerySellOrdersByBatchRequest) (*types.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 *types.QuerySellOrdersBySellerRequest) (*types.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 *types.MsgUpdateSellOrders) (*types.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.