Versions in this module Expand all Collapse all v7 v7.0.0 Dec 19, 2024 Changes in this version + func AllInvariants(k *Keeper) sdk.Invariant + func CanWithdrawInvariant(k *Keeper) sdk.Invariant + func ModuleAccountInvariant(k *Keeper) sdk.Invariant + func NewMsgServer(k *Keeper) types.MsgServer + func NewQueryServer(k *Keeper) types.QueryServer + func NonNegativeOutstandingInvariant(k *Keeper) sdk.Invariant + func ReferenceCountInvariant(k *Keeper) sdk.Invariant + func RegisterInvariants(ir sdk.InvariantRegistry, k *Keeper) + type DelegationTarget struct + CurrentRewards collections.Map[uint32, types.CurrentRewards] + DelegationType restakingtypes.DelegationType + DelegatorStartingInfos collections.Map[collections.Pair[uint32, sdk.AccAddress], types.DelegatorStartingInfo] + HistoricalRewards collections.Map[collections.Pair[uint32, uint64], types.HistoricalRewards] + OutstandingRewards collections.Map[uint32, types.OutstandingRewards] + type DistributionInfo struct + DelegationTarget DelegationTarget + DelegationsValue math.LegacyDec + type Keeper struct + DelegatorWithdrawAddrs collections.Map[sdk.AccAddress, sdk.AccAddress] + LastRewardsAllocationTime collections.Item[gogotypes.Timestamp] + NextRewardsPlanID collections.Item[uint64] + OperatorAccumulatedCommissions collections.Map[uint32, types.AccumulatedCommission] + OperatorCurrentRewards collections.Map[uint32, types.CurrentRewards] + OperatorDelegatorStartingInfos collections.Map[collections.Pair[uint32, sdk.AccAddress], types.DelegatorStartingInfo] + OperatorHistoricalRewards collections.Map[collections.Pair[uint32, uint64], types.HistoricalRewards] + OperatorOutstandingRewards collections.Map[uint32, types.OutstandingRewards] + Params collections.Item[types.Params] + PoolCurrentRewards collections.Map[uint32, types.CurrentRewards] + PoolDelegatorStartingInfos collections.Map[collections.Pair[uint32, sdk.AccAddress], types.DelegatorStartingInfo] + PoolHistoricalRewards collections.Map[collections.Pair[uint32, uint64], types.HistoricalRewards] + PoolOutstandingRewards collections.Map[uint32, types.OutstandingRewards] + PoolServiceTotalDelegatorShares collections.Map[collections.Pair[uint32, uint32], types.PoolServiceTotalDelegatorShares] + RewardsPlans collections.Map[uint64, types.RewardsPlan] + Schema collections.Schema + ServiceCurrentRewards collections.Map[uint32, types.CurrentRewards] + ServiceDelegatorStartingInfos collections.Map[collections.Pair[uint32, sdk.AccAddress], types.DelegatorStartingInfo] + ServiceHistoricalRewards collections.Map[collections.Pair[uint32, uint64], types.HistoricalRewards] + ServiceOutstandingRewards collections.Map[uint32, types.OutstandingRewards] + func NewKeeper(cdc codec.Codec, storeService corestoretypes.KVStoreService, ...) *Keeper + func (k *Keeper) AfterDelegationModified(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32, ...) error + func (k *Keeper) AfterDelegationTargetCreated(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32) error + func (k *Keeper) AfterServiceAccreditationModified(ctx context.Context, serviceID uint32) error + func (k *Keeper) AfterUserPreferencesModified(ctx context.Context, userAddress string, ...) error + func (k *Keeper) AfterUserTrustedServiceUpdated(ctx context.Context, userAddress string, serviceID uint32, trusted bool) error + func (k *Keeper) AllocateRewards(ctx context.Context) error + func (k *Keeper) AllocateRewardsByPlan(ctx context.Context, plan types.RewardsPlan, ...) error + func (k *Keeper) BeforeDelegationCreated(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32) error + func (k *Keeper) BeforeDelegationSharesModified(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32, ...) error + func (k *Keeper) BeforeDelegationTargetRemoved(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32) error + func (k *Keeper) BeginBlocker(ctx context.Context) error + func (k *Keeper) CalculateDelegationRewards(ctx context.Context, target DelegationTarget, del restakingtypes.Delegation, ...) (rewards types.DecPools, err error) + func (k *Keeper) CreateRewardsPlan(ctx context.Context, description string, serviceID uint32, amt sdk.Coins, ...) (types.RewardsPlan, error) + func (k *Keeper) DecrementPoolServiceTotalDelegatorShares(ctx context.Context, poolID, serviceID uint32, shares sdk.DecCoins) error + func (k *Keeper) DeleteAllPoolServiceTotalDelegatorSharesByService(ctx context.Context, serviceID uint32) error + func (k *Keeper) DeleteHistoricalRewards(ctx context.Context, target DelegationTarget) error + func (k *Keeper) DeleteOperatorAccumulatedCommission(ctx context.Context, operatorID uint32) error + func (k *Keeper) DeletePoolServiceTotalDelegatorShares(ctx context.Context, poolID, serviceID uint32) error + func (k *Keeper) EditRewardsPlan(ctx context.Context, planID uint64, newDescription string, ...) error + func (k *Keeper) ExportGenesis(ctx sdk.Context) (*types.GenesisState, error) + func (k *Keeper) GetAssetAndPrice(ctx context.Context, denom string) (assetstypes.Asset, math.LegacyDec, error) + func (k *Keeper) GetAuthority() string + func (k *Keeper) GetCoinValue(ctx context.Context, coin sdk.Coin) (math.LegacyDec, error) + func (k *Keeper) GetCoinsValue(ctx context.Context, coins sdk.Coins) (math.LegacyDec, error) + func (k *Keeper) GetDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, ...) (types.DecPools, error) + func (k *Keeper) GetDelegationTarget(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32) (DelegationTarget, error) + func (k *Keeper) GetDelegatorWithdrawAddr(ctx context.Context, delegator sdk.AccAddress) (sdk.AccAddress, error) + func (k *Keeper) GetLastRewardsAllocationTime(ctx context.Context) (*time.Time, error) + func (k *Keeper) GetOperatorAccumulatedCommission(ctx context.Context, operatorID uint32) (commission types.AccumulatedCommission, err error) + func (k *Keeper) GetOperatorDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, operatorID uint32) (types.DecPools, error) + func (k *Keeper) GetOperatorWithdrawAddr(ctx context.Context, operator operatorstypes.Operator) (sdk.AccAddress, error) + func (k *Keeper) GetOutstandingRewardsCoins(ctx context.Context, target DelegationTarget) (types.DecPools, error) + func (k *Keeper) GetParams(ctx context.Context) (p types.Params, err error) + func (k *Keeper) GetPoolDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, poolID uint32) (types.DecPools, error) + func (k *Keeper) GetPoolServiceTotalDelegatorShares(ctx context.Context, poolID, serviceID uint32) (sdk.DecCoins, error) + func (k *Keeper) GetRewardsPlan(ctx context.Context, planID uint64) (types.RewardsPlan, error) + func (k *Keeper) GetServiceDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, serviceID uint32) (types.DecPools, error) + func (k *Keeper) IncrementDelegationTargetPeriod(ctx context.Context, target DelegationTarget) (uint64, error) + func (k *Keeper) IncrementPoolServiceTotalDelegatorShares(ctx context.Context, poolID, serviceID uint32, shares sdk.DecCoins) error + func (k *Keeper) InitGenesis(ctx sdk.Context, state *types.GenesisState) error + func (k *Keeper) Logger(ctx context.Context) log.Logger + func (k *Keeper) OperatorsHooks() OperatorsHooks + func (k *Keeper) PoolsHooks() PoolsHooks + func (k *Keeper) RestakingHooks() RestakingHooks + func (k *Keeper) ServicesHooks() ServicesHooks + func (k *Keeper) SetLastRewardsAllocationTime(ctx context.Context, t time.Time) error + func (k *Keeper) SetParams(ctx context.Context, params types.Params) error + func (k *Keeper) SetPoolServiceTotalDelegatorShares(ctx context.Context, poolID, serviceID uint32, shares sdk.DecCoins) error + func (k *Keeper) SetWithdrawAddress(ctx context.Context, addr, withdrawAddr sdk.AccAddress) error + func (k *Keeper) TerminateEndedRewardsPlans(ctx context.Context) error + func (k *Keeper) WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, target DelegationTarget) (types.Pools, error) + func (k *Keeper) WithdrawOperatorCommission(ctx context.Context, operatorID uint32) (types.Pools, error) + type OperatorsHooks struct + func (h OperatorsHooks) AfterOperatorInactivatingCompleted(context.Context, uint32) error + func (h OperatorsHooks) AfterOperatorInactivatingStarted(context.Context, uint32) error + func (h OperatorsHooks) AfterOperatorReactivated(context.Context, uint32) error + func (h OperatorsHooks) AfterOperatorRegistered(ctx context.Context, operatorID uint32) error + func (h OperatorsHooks) BeforeOperatorDeleted(ctx context.Context, operatorID uint32) error + type PoolsHooks struct + func (h PoolsHooks) AfterPoolCreated(ctx context.Context, poolID uint32) error + type RestakingHooks struct + func (h RestakingHooks) AfterOperatorDelegationModified(ctx context.Context, operatorID uint32, delegator string) error + func (h RestakingHooks) AfterPoolDelegationModified(ctx context.Context, poolID uint32, delegator string) error + func (h RestakingHooks) AfterServiceDelegationModified(ctx context.Context, serviceID uint32, delegator string) error + func (h RestakingHooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error + func (h RestakingHooks) AfterUserPreferencesModified(ctx context.Context, userAddress string, ...) error + func (h RestakingHooks) BeforeOperatorDelegationCreated(ctx context.Context, operatorID uint32, _ string) error + func (h RestakingHooks) BeforeOperatorDelegationRemoved(_ context.Context, _ uint32, _ string) error + func (h RestakingHooks) BeforeOperatorDelegationSharesModified(ctx context.Context, operatorID uint32, delegator string) error + func (h RestakingHooks) BeforePoolDelegationCreated(ctx context.Context, poolID uint32, _ string) error + func (h RestakingHooks) BeforePoolDelegationRemoved(_ context.Context, _ uint32, _ string) error + func (h RestakingHooks) BeforePoolDelegationSharesModified(ctx context.Context, poolID uint32, delegator string) error + func (h RestakingHooks) BeforeServiceDelegationCreated(ctx context.Context, serviceID uint32, _ string) error + func (h RestakingHooks) BeforeServiceDelegationRemoved(_ context.Context, _ uint32, _ string) error + func (h RestakingHooks) BeforeServiceDelegationSharesModified(ctx context.Context, serviceID uint32, delegator string) error + type ServicesHooks struct + func (h ServicesHooks) AfterServiceAccreditationModified(ctx context.Context, serviceID uint32) error + func (h ServicesHooks) AfterServiceActivated(context.Context, uint32) error + func (h ServicesHooks) AfterServiceCreated(ctx context.Context, serviceID uint32) error + func (h ServicesHooks) AfterServiceDeactivated(context.Context, uint32) error + func (h ServicesHooks) BeforeServiceDeleted(ctx context.Context, serviceID uint32) error Other modules containing this package github.com/milkyway-labs/milkyway github.com/milkyway-labs/milkyway/v2 github.com/milkyway-labs/milkyway/v3 github.com/milkyway-labs/milkyway/v4 github.com/milkyway-labs/milkyway/v5 github.com/milkyway-labs/milkyway/v6