Documentation ¶
Index ¶
- func GetPoolIdFromShareDenom(shareDenom string) (uint64, error)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type AmmHooks
- func (h AmmHooks) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, ...) error
- func (h AmmHooks) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, ...) error
- func (h AmmHooks) AfterPoolCreated(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool) error
- func (h AmmHooks) AfterSwap(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, input sdk.Coins, ...) error
- type Keeper
- func (k Keeper) AmmHooks() AmmHooks
- func (k Keeper) BeginBlocker(ctx sdk.Context)
- func (k Keeper) CalculateDiscount(goCtx context.Context, req *types.QueryCalculateDiscountRequest) (*types.QueryCalculateDiscountResponse, error)
- func (k Keeper) GetAllPortfolio(ctx sdk.Context) (list []types.Portfolio)
- func (k Keeper) GetAmmPrice(goCtx context.Context, req *types.QueryGetAmmPriceRequest) (*types.QueryGetAmmPriceResponse, error)
- func (k Keeper) GetConsolidatedPrice(goCtx context.Context, req *types.QueryGetConsolidatedPriceRequest) (*types.QueryGetConsolidatedPriceResponse, error)
- func (k Keeper) GetDateAfterDaysFromContext(ctx sdk.Context, n int) string
- func (k Keeper) GetDateFromContext(ctx sdk.Context) string
- func (k Keeper) GetLegacyPortfolios(ctx sdk.Context, date string) (list []types.Portfolio)
- func (k Keeper) GetMembershipTier(ctx sdk.Context, user sdk.AccAddress) (total_portfolio sdkmath.LegacyDec, membership_tier types.MembershipTier)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPortfolio(ctx sdk.Context, user sdk.AccAddress, date string) (sdkmath.LegacyDec, bool)
- func (k Keeper) GetUsersPoolData(goCtx context.Context, req *types.QueryGetUsersPoolDataRequest) (*types.QueryGetUsersPoolDataResponse, error)
- func (k Keeper) LeverageLpHooks() LeverageLpHooks
- func (k Keeper) LeverageLpTotal(goCtx context.Context, req *types.QueryLeverageLpTotalRequest) (*types.QueryLeverageLpTotalResponse, error)
- func (k Keeper) LiquidTotal(goCtx context.Context, req *types.QueryLiquidTotalRequest) (*types.QueryLiquidTotalResponse, error)
- func (k Keeper) LockedOrder(goCtx context.Context, req *types.QueryLockedOrderRequest) (*types.QueryLockedOrderResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Perpetual(goCtx context.Context, req *types.QueryPerpetualRequest) (*types.QueryPerpetualResponse, error)
- func (k Keeper) PerpetualHooks() PerpetualHooks
- func (k Keeper) Portfolio(goCtx context.Context, req *types.QueryGetPortfolioRequest) (*types.QueryGetPortfolioResponse, error)
- func (k Keeper) PortfolioAll(goCtx context.Context, req *types.QueryAllPortfolioRequest) (*types.QueryAllPortfolioResponse, error)
- func (k Keeper) RemoveLegacyPortfolio(ctx sdk.Context, date string, user string)
- func (k Keeper) RemoveLegacyPortfolioCounted(ctx sdk.Context, date string, num uint64)
- func (k Keeper) RemovePortfolioLast(ctx sdk.Context, date string, num uint64) uint64
- func (k Keeper) RetrieveAllPortfolio(ctx sdk.Context, user sdk.AccAddress)
- func (k Keeper) RetrieveConsolidatedPrice(ctx sdk.Context, denom string) (sdkmath.LegacyDec, sdkmath.LegacyDec, sdkmath.LegacyDec)
- func (k Keeper) RetrieveLeverageLpTotal(ctx sdk.Context, user sdk.AccAddress) (sdkmath.LegacyDec, sdkmath.LegacyDec, sdkmath.LegacyDec)
- func (k Keeper) RetrieveLiquidAssetsTotal(ctx sdk.Context, user sdk.AccAddress) sdkmath.LegacyDec
- func (k Keeper) RetrievePerpetualTotal(ctx sdk.Context, user sdk.AccAddress) (sdkmath.LegacyDec, sdkmath.LegacyDec, sdkmath.LegacyDec)
- func (k Keeper) RetrievePoolTotal(ctx sdk.Context, user sdk.AccAddress) sdkmath.LegacyDec
- func (k Keeper) RetrieveRewardsTotal(ctx sdk.Context, user sdk.AccAddress) sdkmath.LegacyDec
- func (k Keeper) RetrieveStaked(ctx sdk.Context, user sdk.AccAddress) (sdkmath.LegacyDec, sdkmath.LegacyDec, sdkmath.LegacyDec, sdkmath.LegacyDec)
- func (k Keeper) RetrieveTradeshieldTotal(ctx sdk.Context, user sdk.AccAddress) sdkmath.LegacyDec
- func (k Keeper) RewardsTotal(goCtx context.Context, req *types.QueryRewardsTotalRequest) (*types.QueryRewardsTotalResponse, error)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPortfolio(ctx sdk.Context, portfolio types.Portfolio)
- func (k *Keeper) SetTradeshieldKeeper(tk *tradeshieldkeeper.Keeper)
- func (k Keeper) StableStakeHooks() StableStakeHooks
- func (k Keeper) Staked(goCtx context.Context, req *types.QueryStakedRequest) (*types.QueryStakedResponse, error)
- func (k Keeper) StakedPool(goCtx context.Context, req *types.QueryStakedPoolRequest) (*types.QueryStakedPoolResponse, error)
- func (k Keeper) StakingHooks() StakingHooks
- type LeverageLpHooks
- func (h LeverageLpHooks) AfterDisablingPool(_ sdk.Context, _ ammtypes.Pool) error
- func (h LeverageLpHooks) AfterEnablingPool(_ sdk.Context, _ ammtypes.Pool) error
- func (h LeverageLpHooks) AfterLeverageLpPositionClose(ctx sdk.Context, sender sdk.AccAddress, _ ammtypes.Pool) error
- func (h LeverageLpHooks) AfterLeverageLpPositionOpen(ctx sdk.Context, sender sdk.AccAddress, _ ammtypes.Pool) error
- func (h LeverageLpHooks) AfterLeverageLpPositionOpenConsolidate(ctx sdk.Context, sender sdk.AccAddress, _ ammtypes.Pool) error
- type PerpetualHooks
- func (h PerpetualHooks) AfterParamsChange(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, ...) error
- func (h PerpetualHooks) AfterPerpetualPositionClosed(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, ...) error
- func (h PerpetualHooks) AfterPerpetualPositionModified(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, ...) error
- func (h PerpetualHooks) AfterPerpetualPositionOpen(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, ...) error
- type StableStakeHooks
- type StakingHooks
- func (h StakingHooks) AfterDelegationModified(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterUnbondingInitiated(goCtx context.Context, id uint64) error
- func (h StakingHooks) AfterValidatorBeginUnbonding(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorBonded(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorCreated(goCtx context.Context, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorRemoved(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationCreated(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationRemoved(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationSharesModified(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeValidatorModified(goCtx context.Context, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeValidatorSlashed(goCtx context.Context, valAddr sdk.ValAddress, fraction sdkmath.LegacyDec) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPoolIdFromShareDenom ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type AmmHooks ¶ added in v0.35.0
type AmmHooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for incentive keeper
func (AmmHooks) AfterExitPool ¶ added in v0.35.0
func (h AmmHooks) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, shareInAmount math.Int, exitCoins sdk.Coins) error
AfterExitPool is called after ExitPool, ExitSwapShareAmountIn, and ExitSwapExternAmountOut
func (AmmHooks) AfterJoinPool ¶ added in v0.35.0
func (h AmmHooks) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, enterCoins sdk.Coins, shareOutAmount math.Int) error
AfterJoinPool is called after JoinPool, JoinSwapExternAmountIn, and JoinSwapShareAmountOut
func (AmmHooks) AfterPoolCreated ¶ added in v0.35.0
func (h AmmHooks) AfterPoolCreated(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool) error
AfterPoolCreated is called after CreatePool
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, 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, leveragelp types.LeverageLpKeeper, stablestakeKeeper types.StablestakeKeeper, tradeshieldKeeper types.TradeshieldKeeper, ) *Keeper
func (Keeper) BeginBlocker ¶ added in v0.37.0
func (Keeper) CalculateDiscount ¶
func (k Keeper) CalculateDiscount(goCtx context.Context, req *types.QueryCalculateDiscountRequest) (*types.QueryCalculateDiscountResponse, error)
func (Keeper) GetAllPortfolio ¶
GetAllPortfolio returns all portfolio
func (Keeper) GetAmmPrice ¶ added in v0.35.0
func (k Keeper) GetAmmPrice(goCtx context.Context, req *types.QueryGetAmmPriceRequest) (*types.QueryGetAmmPriceResponse, error)
func (Keeper) GetConsolidatedPrice ¶ added in v0.38.0
func (k Keeper) GetConsolidatedPrice(goCtx context.Context, req *types.QueryGetConsolidatedPriceRequest) (*types.QueryGetConsolidatedPriceResponse, error)
func (Keeper) GetDateAfterDaysFromContext ¶ added in v0.45.0
func (Keeper) GetDateFromContext ¶ added in v0.45.0
func (Keeper) GetLegacyPortfolios ¶ added in v0.45.0
remove after migrations
func (Keeper) GetMembershipTier ¶
func (k Keeper) GetMembershipTier(ctx sdk.Context, user sdk.AccAddress) (total_portfolio sdkmath.LegacyDec, membership_tier types.MembershipTier)
func (Keeper) GetPortfolio ¶
func (k Keeper) GetPortfolio(ctx sdk.Context, user sdk.AccAddress, date string) (sdkmath.LegacyDec, bool)
GetPortfolio returns a portfolio from its index
func (Keeper) GetUsersPoolData ¶ added in v0.49.4
func (k Keeper) GetUsersPoolData(goCtx context.Context, req *types.QueryGetUsersPoolDataRequest) (*types.QueryGetUsersPoolDataResponse, error)
func (Keeper) LeverageLpHooks ¶ added in v0.44.0
func (k Keeper) LeverageLpHooks() LeverageLpHooks
Return the wrapper struct
func (Keeper) LeverageLpTotal ¶ added in v0.34.0
func (k Keeper) LeverageLpTotal(goCtx context.Context, req *types.QueryLeverageLpTotalRequest) (*types.QueryLeverageLpTotalResponse, error)
func (Keeper) LiquidTotal ¶ added in v0.35.0
func (k Keeper) LiquidTotal(goCtx context.Context, req *types.QueryLiquidTotalRequest) (*types.QueryLiquidTotalResponse, error)
func (Keeper) LockedOrder ¶ added in v0.54.0
func (k Keeper) LockedOrder(goCtx context.Context, req *types.QueryLockedOrderRequest) (*types.QueryLockedOrderResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) Perpetual ¶ added in v0.35.0
func (k Keeper) Perpetual(goCtx context.Context, req *types.QueryPerpetualRequest) (*types.QueryPerpetualResponse, error)
func (Keeper) PerpetualHooks ¶ added in v0.35.0
func (k Keeper) PerpetualHooks() PerpetualHooks
Return the wrapper struct
func (Keeper) Portfolio ¶
func (k Keeper) Portfolio(goCtx context.Context, req *types.QueryGetPortfolioRequest) (*types.QueryGetPortfolioResponse, error)
func (Keeper) PortfolioAll ¶
func (k Keeper) PortfolioAll(goCtx context.Context, req *types.QueryAllPortfolioRequest) (*types.QueryAllPortfolioResponse, error)
func (Keeper) RemoveLegacyPortfolio ¶ added in v0.45.0
func (Keeper) RemoveLegacyPortfolioCounted ¶ added in v0.45.0
func (Keeper) RemovePortfolioLast ¶ added in v0.37.0
RemovePortfolioLast removes a portfolio from the store with a specific date
func (Keeper) RetrieveAllPortfolio ¶ added in v0.38.0
func (k Keeper) RetrieveAllPortfolio(ctx sdk.Context, user sdk.AccAddress)
func (Keeper) RetrieveConsolidatedPrice ¶ added in v0.38.0
func (Keeper) RetrieveLeverageLpTotal ¶ added in v0.38.0
func (Keeper) RetrieveLiquidAssetsTotal ¶ added in v0.38.0
func (Keeper) RetrievePerpetualTotal ¶ added in v0.38.0
func (Keeper) RetrievePoolTotal ¶ added in v0.39.0
func (Keeper) RetrieveRewardsTotal ¶ added in v0.38.0
func (Keeper) RetrieveStaked ¶ added in v0.39.0
func (Keeper) RetrieveTradeshieldTotal ¶ added in v0.53.0
func (Keeper) RewardsTotal ¶ added in v0.35.0
func (k Keeper) RewardsTotal(goCtx context.Context, req *types.QueryRewardsTotalRequest) (*types.QueryRewardsTotalResponse, error)
func (Keeper) SetPortfolio ¶
SetPortfolio set a specific portfolio in the store from its index
func (*Keeper) SetTradeshieldKeeper ¶ added in v0.53.0
func (k *Keeper) SetTradeshieldKeeper(tk *tradeshieldkeeper.Keeper)
func (Keeper) StableStakeHooks ¶ added in v0.35.0
func (k Keeper) StableStakeHooks() StableStakeHooks
Return the wrapper struct
func (Keeper) Staked ¶ added in v0.39.0
func (k Keeper) Staked(goCtx context.Context, req *types.QueryStakedRequest) (*types.QueryStakedResponse, error)
func (Keeper) StakedPool ¶ added in v0.35.0
func (k Keeper) StakedPool(goCtx context.Context, req *types.QueryStakedPoolRequest) (*types.QueryStakedPoolResponse, error)
func (Keeper) StakingHooks ¶ added in v0.35.0
func (k Keeper) StakingHooks() StakingHooks
Return the wrapper struct
type LeverageLpHooks ¶ added in v0.44.0
type LeverageLpHooks struct {
// contains filtered or unexported fields
}
func (LeverageLpHooks) AfterDisablingPool ¶ added in v0.48.0
func (LeverageLpHooks) AfterEnablingPool ¶ added in v0.48.0
func (LeverageLpHooks) AfterLeverageLpPositionClose ¶ added in v0.44.0
func (h LeverageLpHooks) AfterLeverageLpPositionClose(ctx sdk.Context, sender sdk.AccAddress, _ ammtypes.Pool) error
func (LeverageLpHooks) AfterLeverageLpPositionOpen ¶ added in v0.44.0
func (h LeverageLpHooks) AfterLeverageLpPositionOpen(ctx sdk.Context, sender sdk.AccAddress, _ ammtypes.Pool) error
func (LeverageLpHooks) AfterLeverageLpPositionOpenConsolidate ¶ added in v0.44.0
func (h LeverageLpHooks) AfterLeverageLpPositionOpenConsolidate(ctx sdk.Context, sender sdk.AccAddress, _ ammtypes.Pool) error
type PerpetualHooks ¶ added in v0.35.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.35.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.35.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.35.0
func (h PerpetualHooks) AfterPerpetualPositionOpen(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool perpetualtypes.Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error
type StableStakeHooks ¶ added in v0.35.0
type StableStakeHooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for incentive keeper
func (StableStakeHooks) AfterBond ¶ added in v0.35.0
func (h StableStakeHooks) AfterBond(ctx sdk.Context, sender sdk.AccAddress, shareAmount math.Int) error
func (StableStakeHooks) AfterUnbond ¶ added in v0.35.0
func (h StableStakeHooks) AfterUnbond(ctx sdk.Context, sender sdk.AccAddress, shareAmount math.Int) error
type StakingHooks ¶ added in v0.35.0
type StakingHooks struct {
// contains filtered or unexported fields
}
StakingHooks wrapper struct for slashing keeper
func (StakingHooks) AfterDelegationModified ¶ added in v0.35.0
func (h StakingHooks) AfterDelegationModified(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (StakingHooks) AfterUnbondingInitiated ¶ added in v0.35.0
func (h StakingHooks) AfterUnbondingInitiated(goCtx context.Context, id uint64) error
staking StakingHooks Must be called when a validator is created
func (StakingHooks) AfterValidatorBeginUnbonding ¶ added in v0.35.0
func (h StakingHooks) AfterValidatorBeginUnbonding(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
Must be called when a validator begins unbonding
func (StakingHooks) AfterValidatorBonded ¶ added in v0.35.0
func (h StakingHooks) AfterValidatorBonded(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
Must be called when a validator is bonded
func (StakingHooks) AfterValidatorCreated ¶ added in v0.35.0
func (h StakingHooks) AfterValidatorCreated(goCtx context.Context, valAddr sdk.ValAddress) error
staking StakingHooks Must be called when a validator is created
func (StakingHooks) AfterValidatorRemoved ¶ added in v0.35.0
func (h StakingHooks) AfterValidatorRemoved(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
Must be called when a validator is deleted
func (StakingHooks) BeforeDelegationCreated ¶ added in v0.35.0
func (h StakingHooks) BeforeDelegationCreated(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Must be called when a delegation is created
func (StakingHooks) BeforeDelegationRemoved ¶ added in v0.35.0
func (h StakingHooks) BeforeDelegationRemoved(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Must be called when a delegation is removed
func (StakingHooks) BeforeDelegationSharesModified ¶ added in v0.35.0
func (h StakingHooks) BeforeDelegationSharesModified(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Must be called when a delegation's shares are modified
func (StakingHooks) BeforeValidatorModified ¶ added in v0.35.0
func (h StakingHooks) BeforeValidatorModified(goCtx context.Context, valAddr sdk.ValAddress) error
Must be called when a validator's state changes
func (StakingHooks) BeforeValidatorSlashed ¶ added in v0.35.0
func (h StakingHooks) BeforeValidatorSlashed(goCtx context.Context, valAddr sdk.ValAddress, fraction sdkmath.LegacyDec) error
Source Files ¶
- begin_blocker.go
- hooks_amm.go
- hooks_leveragelp.go
- hooks_perpetual.go
- hooks_stable_stake.go
- hooks_staking.go
- keeper.go
- msg_server.go
- msg_server_set_portfolio.go
- params.go
- portfolio.go
- query.go
- query_calculate_discount.go
- query_get_amm_price.go
- query_get_consolidated_price.go
- query_get_users_pool_data.go
- query_leverage_lp_total.go
- query_liquid_total.go
- query_locked_order.go
- query_params.go
- query_perpetual.go
- query_portfolio.go
- query_rewards_total.go
- query_staked.go
- query_staked_pool.go