keeper

package
v0.0.0-...-f4c8e74 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAffiliateRefereeLowestTakerFeeFromTiers

func GetAffiliateRefereeLowestTakerFeeFromTiers(tiers []*types.PerpetualFeeTier) int32

GetAffiliateRefereeLowestTakerFeeFromTiers returns the minimum of - the taker fee of the tier that has the max absolute volume requirement - the taker fee of the referee starting fee tier

func GetLowestMakerFeeFromTiers

func GetLowestMakerFeeFromTiers(tiers []*types.PerpetualFeeTier) int32

func NewMsgServerImpl

func NewMsgServerImpl(keeper types.FeeTiersKeeper) 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,
	statsKeeper types.StatsKeeper,
	affiliatesKeeper types.AffiliatesKeeper,
	storeKey storetypes.StoreKey,
	authorities []string,
) *Keeper

func (Keeper) GetAffiliateRefereeLowestTakerFee

func (k Keeper) GetAffiliateRefereeLowestTakerFee(ctx sdk.Context) int32

func (Keeper) GetLowestMakerFee

func (k Keeper) GetLowestMakerFee(ctx sdk.Context) int32

GetLowestMakerFee returns the lowest maker fee among any tiers.

func (Keeper) GetPerpetualFeeParams

func (k Keeper) GetPerpetualFeeParams(
	ctx sdk.Context,
) (
	params types.PerpetualFeeParams,
)

GetPerpetualFeeParams returns the PerpetualFeeParams in state.

func (Keeper) GetPerpetualFeePpm

func (k Keeper) GetPerpetualFeePpm(ctx sdk.Context, address string, isTaker bool) int32

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

Params processes a query request/response for the Params from state.

func (Keeper) SetPerpetualFeeParams

func (k Keeper) SetPerpetualFeeParams(
	ctx sdk.Context,
	params types.PerpetualFeeParams,
) error

SetPerpetualFeeParams updates the PerpetualFeeParams in state. Returns an error iff validation fails.

func (*Keeper) SetRevShareKeeper

func (k *Keeper) SetRevShareKeeper(revShareKeeper types.RevShareKeeper)

func (*Keeper) SetVaultKeeper

func (k *Keeper) SetVaultKeeper(vk types.VaultKeeper)

SetVaultKeeper sets the `VaultKeeper` reference in `FeeTiersKeeper`. The reference is set with an explicit method call rather than during `NewKeeper` due to the circular dependency `Clob` -> `Vault` -> `FeeTiers` -> `Clob`.

func (Keeper) UserFeeTier

Jump to

Keyboard shortcuts

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