keeper

package
v0.49.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 15 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 AmmHooks added in v0.48.0

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

func (AmmHooks) AfterExitPool added in v0.48.0

func (h AmmHooks) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, shareInAmount math.Int, exitCoins sdk.Coins) error

func (AmmHooks) AfterJoinPool added in v0.48.0

func (h AmmHooks) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, enterCoins sdk.Coins, shareOutAmount math.Int) error

func (AmmHooks) AfterPoolCreated added in v0.48.0

func (h AmmHooks) AfterPoolCreated(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool) error

func (AmmHooks) AfterSwap added in v0.48.0

func (h AmmHooks) AfterSwap(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, input sdk.Coins, output sdk.Coins) error

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	bk types.BankKeeper,
) *Keeper

func (Keeper) AmmHooks added in v0.48.0

func (k Keeper) AmmHooks() AmmHooks

func (Keeper) GetAccountedBalance

func (k Keeper) GetAccountedBalance(ctx sdk.Context, poolId uint64, denom string) math.Int

Get accounted pool balance

func (Keeper) GetAccountedPool

func (k Keeper) GetAccountedPool(ctx sdk.Context, PoolId uint64) (val types.AccountedPool, found bool)

GetAccountedPool returns a accountedPool from its index

func (Keeper) GetAllAccountedPool

func (k Keeper) GetAllAccountedPool(ctx sdk.Context) (list []types.AccountedPool)

GetAllAccountedPool returns all accountedPool

func (Keeper) LeverageLpHooks added in v0.48.0

func (k Keeper) LeverageLpHooks() LeverageLpHooks

Return the wrapper struct

func (Keeper) Logger

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

func (Keeper) OnLeverageLpPoolDisable added in v0.48.0

func (k Keeper) OnLeverageLpPoolDisable(ctx sdk.Context, ammPool ammtypes.Pool) error

func (Keeper) OnLeverageLpPoolEnable added in v0.48.0

func (k Keeper) OnLeverageLpPoolEnable(ctx sdk.Context, ammPool ammtypes.Pool) error

func (Keeper) PerpetualHooks added in v0.29.0

func (k Keeper) PerpetualHooks() PerpetualHooks

Return the wrapper struct

func (Keeper) PerpetualUpdates added in v0.48.0

func (k Keeper) PerpetualUpdates(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, EnableTakeProfitCustodyLiabilities bool) error

func (Keeper) PoolExists

func (k Keeper) PoolExists(ctx sdk.Context, poolId uint64) bool

PoolExists checks if a pool with the given poolId exists in the list of pools

func (Keeper) RemoveAccountedPool

func (k Keeper) RemoveAccountedPool(ctx sdk.Context, poolId uint64)

RemoveAccountedPool removes a accountedPool from the store

func (Keeper) SetAccountedPool

func (k Keeper) SetAccountedPool(ctx sdk.Context, accountedPool types.AccountedPool)

SetAccountedPool set a specific accountedPool in the store from its index

func (Keeper) UpdateAccountedPoolOnAmmChange added in v0.48.0

func (k Keeper) UpdateAccountedPoolOnAmmChange(ctx sdk.Context, ammPool ammtypes.Pool) error

type LeverageLpHooks added in v0.48.0

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

func (LeverageLpHooks) AfterDisablingPool added in v0.48.0

func (h LeverageLpHooks) AfterDisablingPool(ctx sdk.Context, ammPool ammtypes.Pool) error

func (LeverageLpHooks) AfterEnablingPool added in v0.48.0

func (h LeverageLpHooks) AfterEnablingPool(ctx sdk.Context, ammPool ammtypes.Pool) error

func (LeverageLpHooks) AfterLeverageLpPositionClose added in v0.48.0

func (h LeverageLpHooks) AfterLeverageLpPositionClose(ctx sdk.Context, sender sdk.AccAddress, ammPool ammtypes.Pool) error

func (LeverageLpHooks) AfterLeverageLpPositionOpen added in v0.48.0

func (h LeverageLpHooks) AfterLeverageLpPositionOpen(ctx sdk.Context, sender sdk.AccAddress, ammPool ammtypes.Pool) error

func (LeverageLpHooks) AfterLeverageLpPositionOpenConsolidate added in v0.48.0

func (h LeverageLpHooks) AfterLeverageLpPositionOpenConsolidate(ctx sdk.Context, sender sdk.AccAddress, ammPool ammtypes.Pool) error

type PerpetualHooks added in v0.29.0

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

Hooks wrapper struct for tvl keeper

func (PerpetualHooks) AfterParamsChange added in v0.49.0

func (h PerpetualHooks) AfterParamsChange(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, EnableTakeProfitCustodyLiabilities bool) error

func (PerpetualHooks) AfterPerpetualPositionClosed added in v0.29.0

func (h PerpetualHooks) AfterPerpetualPositionClosed(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error

func (PerpetualHooks) AfterPerpetualPositionModified added in v0.29.0

func (h PerpetualHooks) AfterPerpetualPositionModified(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error

func (PerpetualHooks) AfterPerpetualPositionOpen added in v0.29.0

func (h PerpetualHooks) AfterPerpetualPositionOpen(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error

Jump to

Keyboard shortcuts

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