keeper

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPoolIdFromShareDenom

func GetPoolIdFromShareDenom(shareDenom string) (uint64, error)

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func Pow10

func Pow10(decimal uint64) (value sdk.Dec)

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	bankKeeper types.BankKeeper,
	oracleKeeper types.OracleKeeper,
	assetProfileKeeper types.AssetProfileKeeper,
	amm types.AmmKeeper,
	estaking types.EstakingKeeper,
	masterchef types.MasterchefKeeper,
	commitement types.CommitmentKeeper,
	stakingKeeper types.StakingKeeper,
	perpetual types.PerpetualKeeper,
) *Keeper

func (Keeper) GetAllPortfolio

func (k Keeper) GetAllPortfolio(ctx sdk.Context, timestamp string) (list []types.Portfolio)

GetAllPortfolio returns all portfolio

func (Keeper) GetDateFromBlock

func (k Keeper) GetDateFromBlock(blockTime time.Time) string

func (Keeper) GetMembershipTier

func (k Keeper) GetMembershipTier(ctx sdk.Context, user string) (total_portfoilio sdk.Dec, tier string, discount uint64)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetPortfolio

func (k Keeper) GetPortfolio(
	ctx sdk.Context,
	user string,
	timestamp string,
) (sdk.Dec, bool)

GetPortfolio returns a portfolio from its index

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Params

func (Keeper) RemovePortfolio

func (k Keeper) RemovePortfolio(
	ctx sdk.Context,
	user string,
	timestamp string,
)

RemovePortfolio removes a portfolio from the store

func (Keeper) RetreiveAllPortfolio

func (k Keeper) RetreiveAllPortfolio(ctx sdk.Context, user string)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetPortfolio

func (k Keeper) SetPortfolio(ctx sdk.Context, todayDate string, user string, portfolio types.Portfolio)

SetPortfolio set a specific portfolio in the store from its index

Jump to

Keyboard shortcuts

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