keeper

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupplyInvariant

func SupplyInvariant(ctx sdk.Context, store api.BasketTable, bank bankSupplyStore, basketBalances map[uint64]math.Dec) (string, bool)

SupplyInvariant cross check the balance of baskets and bank

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper is the basket keeper.

func NewKeeper

func NewKeeper(
	ss api.StateStore,
	cs baseapi.StateStore,
	bk ecocredit.BankKeeper,
	ma sdk.AccAddress,
	authority sdk.AccAddress,
) Keeper

NewKeeper returns a new keeper instance.

func (Keeper) Basket

func (Keeper) Baskets

func (Keeper) Create

Create is an RPC to handle basket.MsgCreate

func (Keeper) GetBasketBalanceMap

func (k Keeper) GetBasketBalanceMap(ctx context.Context) (map[uint64]math.Dec, error)

GetBasketBalanceMap calculates credit balance of each batch within the basket

func (Keeper) Put

func (k Keeper) Put(ctx context.Context, req *types.MsgPut) (*types.MsgPutResponse, error)

Put deposits ecocredits into a basket, returning fungible coins to the depositor. NOTE: the credits MUST adhere to the following specifications set by the basket: credit type, class, and date criteria.

func (Keeper) RegisterInvariants

func (k Keeper) RegisterInvariants(ir sdk.InvariantRegistry)

func (Keeper) Take

func (k Keeper) Take(ctx context.Context, msg *types.MsgTake) (*types.MsgTakeResponse, error)

func (Keeper) UpdateBasketFee

UpdateBasketFee is an RPC to handle basket.UpdateBasketFee

func (Keeper) UpdateCurator

UpdateCurator is an RPC to handle basket.UpdateCurator

func (Keeper) UpdateDateCriteria added in v3.3.0

UpdateDateCriteria is an RPC to handle basket.MsgUpdateDateCriteria

Jump to

Keyboard shortcuts

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