keeper

package
v0.29.29 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 14 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 {
	// contains filtered or unexported fields
}

func NewKeeper

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

func (Keeper) AfterAmmExitPool

func (k Keeper) AfterAmmExitPool(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

AfterExitPool is called after ExitPool, ExitSwapShareAmountIn, and ExitSwapExternAmountOut

func (Keeper) AfterAmmJoinPool

func (k Keeper) AfterAmmJoinPool(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

AfterJoinPool is called after JoinPool, JoinSwapExternAmountIn, and JoinSwapShareAmountOut

func (Keeper) AfterAmmPoolCreated

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

AfterPoolCreated is called after CreatePool

func (Keeper) AfterAmmSwap

func (k Keeper) AfterAmmSwap(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

AfterSwap is called after SwapExactAmountIn and SwapExactAmountOut

func (Keeper) AfterPerpetualPositionClosed added in v0.29.0

func (k Keeper) AfterPerpetualPositionClosed(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

func (Keeper) AfterPerpetualPositionModified added in v0.29.0

func (k Keeper) AfterPerpetualPositionModified(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

func (Keeper) AfterPerpetualPositionOpen added in v0.29.0

func (k Keeper) AfterPerpetualPositionOpen(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

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) InitiateAccountedPool

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

func (Keeper) Logger

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

func (Keeper) PerpetualHooks added in v0.29.0

func (k Keeper) PerpetualHooks() PerpetualHooks

Return the wrapper struct

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) UpdateAccountedPool

func (k Keeper) UpdateAccountedPool(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.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) AfterAmmExitPool added in v0.29.0

func (h PerpetualHooks) AfterAmmExitPool(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

func (PerpetualHooks) AfterAmmJoinPool added in v0.29.0

func (h PerpetualHooks) AfterAmmJoinPool(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

func (PerpetualHooks) AfterAmmPoolCreated added in v0.29.0

func (h PerpetualHooks) AfterAmmPoolCreated(ctx sdk.Context, ammPool ammtypes.Pool)

func (PerpetualHooks) AfterAmmSwap added in v0.29.0

func (h PerpetualHooks) AfterAmmSwap(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

func (PerpetualHooks) AfterPerpetualPositionClosed added in v0.29.0

func (h PerpetualHooks) AfterPerpetualPositionClosed(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

func (PerpetualHooks) AfterPerpetualPositionModified added in v0.29.0

func (h PerpetualHooks) AfterPerpetualPositionModified(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

func (PerpetualHooks) AfterPerpetualPositionOpen added in v0.29.0

func (h PerpetualHooks) AfterPerpetualPositionOpen(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool)

Jump to

Keyboard shortcuts

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