keeper

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Keeper

type Keeper struct {
	PricesKeeper      types.PricesKeeper
	ClobKeeper        types.ClobKeeper
	MarketMapKeeper   types.MarketMapKeeper
	PerpetualsKeeper  types.PerpetualsKeeper
	SubaccountsKeeper types.SubaccountsKeeper
	VaultKeeper       types.VaultKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	authorities []string,
	indexerEventsManager indexer_manager.IndexerEventManager,
	pricesKeeper types.PricesKeeper,
	clobKeeper types.ClobKeeper,
	marketMapKeeper types.MarketMapKeeper,
	perpetualsKeeper types.PerpetualsKeeper,
	subaccountsKeeper types.SubaccountsKeeper,
	vaultKeeper types.VaultKeeper,
) *Keeper

func (Keeper) CreateClobPair

func (k Keeper) CreateClobPair(
	ctx sdk.Context,
	perpetualId uint32,
) (clobPairId uint32, err error)

Function to wrap the creation of a new clob pair Note: This will only list long-tail/isolated markets

func (Keeper) CreateMarket

func (k Keeper) CreateMarket(
	ctx sdk.Context,
	ticker string,
) (marketId uint32, err error)

Function to wrap the creation of a new market Note: This will only list long-tail/isolated markets

func (Keeper) CreatePerpetual

func (k Keeper) CreatePerpetual(
	ctx sdk.Context,
	marketId uint32,
	ticker string,
) (perpetualId uint32, err error)

Function to wrap the creation of a new perpetual Note: This will only list long-tail/isolated markets

func (Keeper) DepositToMegavaultforPML

func (k Keeper) DepositToMegavaultforPML(
	ctx sdk.Context,
	fromSubaccount satypes.SubaccountId,
	clobPairId uint32,
) error

Function to deposit to the megavault for a new PML market This function deposits money to the megavault, transfers the new vault deposit amount to the new market vault and locks the shares for the deposit

func (Keeper) GetIndexerEventManager

func (k Keeper) GetIndexerEventManager() indexer_manager.IndexerEventManager

func (Keeper) GetListingVaultDepositParams

func (k Keeper) GetListingVaultDepositParams(
	ctx sdk.Context,
) (vaultDepositParams types.ListingVaultDepositParams)

Function to get listing vault deposit params from module store

func (Keeper) GetMarketsHardCap

func (k Keeper) GetMarketsHardCap(ctx sdk.Context) (hardCap uint32)

Function to get hard cap on listed markets from module store

func (Keeper) HasAuthority

func (k Keeper) HasAuthority(authority string) bool

func (Keeper) InitializeForGenesis

func (k Keeper) InitializeForGenesis(ctx sdk.Context)

func (Keeper) Logger

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

func (Keeper) MarketsHardCap

func (Keeper) SetListingVaultDepositParams

func (k Keeper) SetListingVaultDepositParams(
	ctx sdk.Context,
	params types.ListingVaultDepositParams,
) error

Function to set listing vault deposit params in module store

func (Keeper) SetMarketsHardCap

func (k Keeper) SetMarketsHardCap(ctx sdk.Context, hardCap uint32) error

Function to set hard cap on listed markets in module store

func (Keeper) UpgradeIsolatedPerpetualToCross

func (k Keeper) UpgradeIsolatedPerpetualToCross(
	ctx sdk.Context,
	perpetualId uint32,
) error

Jump to

Keyboard shortcuts

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