Documentation ¶
Index ¶
- Variables
- func BasketSupplyInvariant(ctx sdk.Context, store api.BasketTable, bank bankSupplyStore, ...) (string, bool)
- type Keeper
- func (k Keeper) Basket(ctx context.Context, request *baskettypes.QueryBasketRequest) (*baskettypes.QueryBasketResponse, error)
- func (k Keeper) BasketBalance(ctx context.Context, request *baskettypes.QueryBasketBalanceRequest) (*baskettypes.QueryBasketBalanceResponse, error)
- func (k Keeper) BasketBalances(ctx context.Context, request *baskettypes.QueryBasketBalancesRequest) (*baskettypes.QueryBasketBalancesResponse, error)
- func (k Keeper) Baskets(ctx context.Context, request *baskettypes.QueryBasketsRequest) (*baskettypes.QueryBasketsResponse, error)
- func (k Keeper) Create(ctx context.Context, msg *basket.MsgCreate) (*basket.MsgCreateResponse, error)
- func (k Keeper) GetBasketBalanceMap(ctx context.Context) (map[uint64]math.Dec, error)
- func (k Keeper) Put(ctx context.Context, req *baskettypes.MsgPut) (*baskettypes.MsgPutResponse, error)
- func (k Keeper) RegisterInvariants(ir sdk.InvariantRegistry)
- func (k Keeper) Take(ctx context.Context, msg *baskettypes.MsgTake) (*baskettypes.MsgTakeResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCantDisableRetire = sdkerrors.Register(codespace, 2, "can't disable retirement when taking from this basket")
)
Functions ¶
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper is the basket keeper.
func NewKeeper ¶
func NewKeeper( ss api.StateStore, cs ecoApi.StateStore, bk ecocredit.BankKeeper, pk ecocredit.ParamKeeper, ma sdk.AccAddress, ) Keeper
NewKeeper returns a new keeper instance.
func (Keeper) Basket ¶
func (k Keeper) Basket(ctx context.Context, request *baskettypes.QueryBasketRequest) (*baskettypes.QueryBasketResponse, error)
func (Keeper) BasketBalance ¶
func (k Keeper) BasketBalance(ctx context.Context, request *baskettypes.QueryBasketBalanceRequest) (*baskettypes.QueryBasketBalanceResponse, error)
func (Keeper) BasketBalances ¶
func (k Keeper) BasketBalances(ctx context.Context, request *baskettypes.QueryBasketBalancesRequest) (*baskettypes.QueryBasketBalancesResponse, error)
func (Keeper) Baskets ¶
func (k Keeper) Baskets(ctx context.Context, request *baskettypes.QueryBasketsRequest) (*baskettypes.QueryBasketsResponse, error)
func (Keeper) Create ¶
func (k Keeper) Create(ctx context.Context, msg *basket.MsgCreate) (*basket.MsgCreateResponse, error)
Create is an RPC to handle basket.MsgCreate
func (Keeper) GetBasketBalanceMap ¶
GetBasketBalanceMap calculates credit balance of each batch within the basket
func (Keeper) Put ¶
func (k Keeper) Put(ctx context.Context, req *baskettypes.MsgPut) (*baskettypes.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 *baskettypes.MsgTake) (*baskettypes.MsgTakeResponse, error)
Click to show internal directories.
Click to hide internal directories.