marketplace

package
v2.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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) BuyDirect

BuyDirect allows for the purchase of credits directly from sell orders.

func (Keeper) CancelSellOrder

CancelSellOrder cancels a sell order and returns the escrowed credits to the seller.

func (Keeper) PruneSellOrders

func (k Keeper) PruneSellOrders(ctx context.Context) error

PruneSellOrders is a BeginBlock function that moves escrowed credits back into their tradable balance and deletes orders that have expired.

func (Keeper) Sell

Sell creates new sell orders for credits

func (Keeper) SellOrders

SellOrders queries all sell orders in state with optional pagination

func (Keeper) SellOrdersByBatch

SellOrdersByBatch queries all sell orders under a specific batch denom with optional pagination

func (Keeper) SellOrdersBySeller

SellOrdersBySeller queries all sell orders created by the given address with optional pagination

func (Keeper) UpdateSellOrders

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL