Versions in this module Expand all Collapse all v3 v3.0.0 Dec 9, 2024 Changes in this version + func AccountsBalancesInvariants(k *Keeper) sdk.Invariant + func AllowedOperatorsExistInvariant(k *Keeper) sdk.Invariant + func NewMsgServer(keeper *Keeper) types.MsgServer + func OperatorDelegationToOperatorDelegationResponse(ctx context.Context, k *Keeper, delegation types.Delegation) (types.DelegationResponse, error) + func OperatorsDelegatorsSharesInvariant(k *Keeper) sdk.Invariant + func OperatorsJoinedServicesExistInvariant(k *Keeper) sdk.Invariant + func PoolDelegationToPoolDelegationResponse(ctx context.Context, k *Keeper, delegation types.Delegation) (types.DelegationResponse, error) + func PoolsDelegatorsSharesInvariant(k *Keeper) sdk.Invariant + func PositiveOperatorsDelegationsInvariant(k *Keeper) sdk.Invariant + func PositivePoolsDelegationsInvariant(k *Keeper) sdk.Invariant + func PositiveServicesDelegationsInvariant(k *Keeper) sdk.Invariant + func RegisterInvariants(ir sdk.InvariantRegistry, k *Keeper) + func ServiceDelegationToServiceDelegationResponse(ctx context.Context, k *Keeper, delegation types.Delegation) (types.DelegationResponse, error) + func ServicesDelegatorsSharesInvariant(k *Keeper) sdk.Invariant + type Keeper struct + func NewKeeper(cdc codec.Codec, storeService corestoretypes.KVStoreService, ...) *Keeper + func (k *Keeper) AddOperatorToServiceAllowList(ctx context.Context, serviceID uint32, operatorID uint32) error + func (k *Keeper) AddOperatorTokensAndShares(ctx context.Context, operator operatorstypes.Operator, tokensToAdd sdk.Coins) (operatorOut operatorstypes.Operator, addedShares sdk.DecCoins, err error) + func (k *Keeper) AddPoolToServiceSecuringPools(ctx context.Context, serviceID uint32, poolID uint32) error + func (k *Keeper) AddPoolTokensAndShares(ctx context.Context, pool poolstypes.Pool, tokensToAdd sdk.Coin) (poolOut poolstypes.Pool, addedShares sdk.DecCoin, err error) + func (k *Keeper) AddServiceToOperatorJoinedServices(ctx context.Context, operatorID uint32, serviceID uint32) error + func (k *Keeper) AddServiceTokensAndShares(ctx context.Context, service servicestypes.Service, tokensToAdd sdk.Coins) (serviceOut servicestypes.Service, addedShares sdk.DecCoins, err error) + func (k *Keeper) AfterOperatorDelegationModified(ctx context.Context, operatorID uint32, delegator string) error + func (k *Keeper) AfterPoolDelegationModified(ctx context.Context, poolID uint32, delegator string) error + func (k *Keeper) AfterServiceDelegationModified(ctx context.Context, serviceID uint32, delegator string) error + func (k *Keeper) AfterUnbondingInitiated(ctx context.Context, unbondingDelegationID uint64) error + func (k *Keeper) AfterUserPreferencesModified(ctx context.Context, userAddress string, ...) error + func (k *Keeper) BeforeOperatorDelegationCreated(ctx context.Context, operatorID uint32, delegator string) error + func (k *Keeper) BeforeOperatorDelegationRemoved(ctx context.Context, operatorID uint32, delegator string) error + func (k *Keeper) BeforeOperatorDelegationSharesModified(ctx context.Context, operatorID uint32, delegator string) error + func (k *Keeper) BeforePoolDelegationCreated(ctx context.Context, poolID uint32, delegator string) error + func (k *Keeper) BeforePoolDelegationRemoved(ctx context.Context, poolID uint32, delegator string) error + func (k *Keeper) BeforePoolDelegationSharesModified(ctx context.Context, poolID uint32, delegator string) error + func (k *Keeper) BeforeServiceDelegationCreated(ctx context.Context, serviceID uint32, delegator string) error + func (k *Keeper) BeforeServiceDelegationRemoved(ctx context.Context, serviceID uint32, delegator string) error + func (k *Keeper) BeforeServiceDelegationSharesModified(ctx context.Context, serviceID uint32, delegator string) error + func (k *Keeper) CanOperatorValidateService(ctx context.Context, serviceID uint32, operatorID uint32) (bool, error) + func (k *Keeper) CompleteMatureUnbondingDelegations(ctx sdk.Context) error + func (k *Keeper) CompleteUnbonding(ctx context.Context, data types.DTData) (sdk.Coins, error) + func (k *Keeper) DelegateToOperator(ctx context.Context, operatorID uint32, amount sdk.Coins, delegator string) (sdk.DecCoins, error) + func (k *Keeper) DelegateToPool(ctx context.Context, amount sdk.Coin, delegator string) (sdk.DecCoins, error) + func (k *Keeper) DelegateToService(ctx context.Context, serviceID uint32, amount sdk.Coins, delegator string) (sdk.DecCoins, error) + func (k *Keeper) DeleteUnbondingIndex(ctx context.Context, id uint64) error + func (k *Keeper) DequeueAllMatureUBDQueue(ctx context.Context, currTime time.Time) (matureUnbonds []types.DTData, err error) + func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState + func (k *Keeper) GetAllDelegations(ctx context.Context) ([]types.Delegation, error) + func (k *Keeper) GetAllOperatorDelegations(ctx context.Context) ([]types.Delegation, error) + func (k *Keeper) GetAllOperatorUnbondingDelegations(ctx context.Context) ([]types.UnbondingDelegation, error) + func (k *Keeper) GetAllOperatorsJoinedServices(ctx context.Context) ([]types.OperatorJoinedServices, error) + func (k *Keeper) GetAllPoolDelegations(ctx context.Context) ([]types.Delegation, error) + func (k *Keeper) GetAllPoolUnbondingDelegations(ctx context.Context) ([]types.UnbondingDelegation, error) + func (k *Keeper) GetAllServiceAllowedOperators(ctx context.Context, serviceID uint32) ([]uint32, error) + func (k *Keeper) GetAllServiceDelegations(ctx context.Context) ([]types.Delegation, error) + func (k *Keeper) GetAllServiceSecuringPools(ctx context.Context, serviceID uint32) ([]uint32, error) + func (k *Keeper) GetAllServiceUnbondingDelegations(ctx context.Context) ([]types.UnbondingDelegation, error) + func (k *Keeper) GetAllServicesAllowedOperators(ctx context.Context) ([]types.ServiceAllowedOperators, error) + func (k *Keeper) GetAllServicesSecuringPools(ctx context.Context) ([]types.ServiceSecuringPools, error) + func (k *Keeper) GetAllUnbondingDelegations(ctx context.Context) ([]types.UnbondingDelegation, error) + func (k *Keeper) GetAllUserOperatorUnbondingDelegations(ctx context.Context, userAddress string) []types.UnbondingDelegation + func (k *Keeper) GetAllUserPoolUnbondingDelegations(ctx context.Context, userAddress string) []types.UnbondingDelegation + func (k *Keeper) GetAllUserRestakedCoins(ctx context.Context, userAddress string) (sdk.DecCoins, error) + func (k *Keeper) GetAllUserServiceUnbondingDelegations(ctx context.Context, userAddress string) []types.UnbondingDelegation + func (k *Keeper) GetAllUserUnbondingDelegations(ctx context.Context, userAddress string) []types.UnbondingDelegation + func (k *Keeper) GetDelegationForTarget(ctx context.Context, target types.DelegationTarget, delegator string) (types.Delegation, bool, error) + func (k *Keeper) GetDelegationTargetFromDelegation(ctx context.Context, delegation types.Delegation) (types.DelegationTarget, bool, error) + func (k *Keeper) GetOperatorDelegation(ctx context.Context, operatorID uint32, userAddress string) (types.Delegation, bool, error) + func (k *Keeper) GetOperatorUnbondingDelegation(ctx context.Context, operatorID uint32, delegatorAddress string) (types.UnbondingDelegation, bool, error) + func (k *Keeper) GetParams(ctx context.Context) (p types.Params, err error) + func (k *Keeper) GetPoolDelegation(ctx context.Context, poolID uint32, userAddress string) (types.Delegation, bool, error) + func (k *Keeper) GetPoolUnbondingDelegation(ctx context.Context, poolID uint32, delegator string) (types.UnbondingDelegation, bool, error) + func (k *Keeper) GetRestakableDenoms(ctx context.Context) ([]string, error) + func (k *Keeper) GetServiceDelegation(ctx context.Context, serviceID uint32, userAddress string) (types.Delegation, bool, error) + func (k *Keeper) GetServiceUnbondingDelegation(ctx context.Context, serviceID uint32, delegator string) (types.UnbondingDelegation, bool, error) + func (k *Keeper) GetUBDQueueTimeSlice(ctx context.Context, timestamp time.Time) (dvPairs []types.DTData, err error) + func (k *Keeper) GetUnbondingDelegation(ctx context.Context, delegatorAddress string, ubdType types.DelegationType, ...) (types.UnbondingDelegation, bool, error) + func (k *Keeper) GetUserPreferences(ctx context.Context, userAddress string) (types.UserPreferences, error) + func (k *Keeper) GetUserPreferencesEntries(ctx context.Context) ([]types.UserPreferencesEntry, error) + func (k *Keeper) GetUserTrustedServicesIDs(ctx context.Context, userAddress string) ([]uint32, error) + func (k *Keeper) HasOperatorJoinedService(ctx context.Context, operatorID uint32, serviceID uint32) (bool, error) + func (k *Keeper) IncrementUnbondingID(ctx context.Context) (unbondingID uint64, err error) + func (k *Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) error + func (k *Keeper) InsertUBDQueue(ctx context.Context, ubd types.UnbondingDelegation, completionTime time.Time) error + func (k *Keeper) IsDenomRestakable(ctx context.Context, denom string) (bool, error) + func (k *Keeper) IsOperatorInServiceAllowList(ctx context.Context, serviceID uint32, operatorID uint32) (bool, error) + func (k *Keeper) IsPoolInServiceSecuringPools(ctx context.Context, serviceID uint32, poolID uint32) (bool, error) + func (k *Keeper) IsServiceOperatorsAllowListConfigured(ctx context.Context, serviceID uint32) (bool, error) + func (k *Keeper) IsServiceSecuredByPool(ctx context.Context, serviceID uint32, poolID uint32) (bool, error) + func (k *Keeper) IsServiceSecuringPoolsConfigured(ctx context.Context, serviceID uint32) (bool, error) + func (k *Keeper) IterateAllOperatorDelegations(ctx context.Context, cb func(del types.Delegation) (stop bool, err error)) error + func (k *Keeper) IterateAllOperatorsJoinedServices(ctx context.Context, ...) error + func (k *Keeper) IterateAllPoolDelegations(ctx context.Context, cb func(del types.Delegation) (stop bool, err error)) error + func (k *Keeper) IterateAllServiceDelegations(ctx context.Context, cb func(del types.Delegation) (stop bool, err error)) error + func (k *Keeper) IterateAllServicesAllowedOperators(ctx context.Context, ...) error + func (k *Keeper) IterateServiceDelegations(ctx context.Context, serviceID uint32, ...) error + func (k *Keeper) IterateUserDelegations(ctx context.Context, userAddress string, ...) error + func (k *Keeper) IterateUserOperatorDelegations(ctx context.Context, userAddress string, ...) error + func (k *Keeper) IterateUserPoolDelegations(ctx context.Context, userAddress string, ...) error + func (k *Keeper) IterateUserServiceDelegations(ctx context.Context, userAddress string, ...) error + func (k *Keeper) Logger(ctx context.Context) log.Logger + func (k *Keeper) OperatorsHooks() operatorstypes.OperatorsHooks + func (k *Keeper) PerformDelegation(ctx context.Context, data types.DelegationData) (sdk.DecCoins, error) + func (k *Keeper) PerformUndelegation(ctx context.Context, data types.UndelegationData) (time.Time, error) + func (k *Keeper) RemoveDelegation(ctx context.Context, delegation types.Delegation) error + func (k *Keeper) RemoveOperatorDelegation(ctx context.Context, delegation types.Delegation) error + func (k *Keeper) RemoveOperatorFromServiceAllowList(ctx context.Context, serviceID uint32, operatorID uint32) error + func (k *Keeper) RemovePoolDelegation(ctx context.Context, delegation types.Delegation) error + func (k *Keeper) RemovePoolFromServiceSecuringPools(ctx context.Context, serviceID uint32, poolID uint32) error + func (k *Keeper) RemoveServiceDelegation(ctx context.Context, delegation types.Delegation) error + func (k *Keeper) RemoveServiceFromOperatorJoinedServices(ctx context.Context, operatorID uint32, serviceID uint32) error + func (k *Keeper) RemoveTargetTokensAndShares(ctx context.Context, data types.UndelegationData) (sdk.Coins, error) + func (k *Keeper) RemoveUnbondingDelegation(ctx context.Context, ubd types.UnbondingDelegation) error + func (k *Keeper) ServiceAllowedOperatorsIterator(ctx context.Context, serviceID uint32) (collections.KeySetIterator[collections.Pair[uint32, uint32]], error) + func (k *Keeper) ServiceSecuringPoolsIterator(ctx context.Context, serviceID uint32) (collections.KeySetIterator[collections.Pair[uint32, uint32]], error) + func (k *Keeper) ServicesHooks() servicestypes.ServicesHooks + func (k *Keeper) SetDelegation(ctx context.Context, delegation types.Delegation) error + func (k *Keeper) SetHooks(rs types.RestakingHooks) *Keeper + func (k *Keeper) SetParams(ctx context.Context, params types.Params) error + func (k *Keeper) SetRestakableDenoms(ctx context.Context, denoms []string) error + func (k *Keeper) SetRestakeRestriction(restriction types.RestakeRestrictionFn) + func (k *Keeper) SetUBDQueueTimeSlice(ctx context.Context, timestamp time.Time, keys []types.DTData) error + func (k *Keeper) SetUnbondingDelegation(ctx context.Context, ud types.UnbondingDelegation) ([]byte, error) + func (k *Keeper) SetUnbondingDelegationByUnbondingID(ctx context.Context, ubd types.UnbondingDelegation, ubdKey []byte, id uint64) error + func (k *Keeper) SetUnbondingDelegationEntry(ctx context.Context, data types.UndelegationData, creationHeight int64, ...) (types.UnbondingDelegation, error) + func (k *Keeper) SetUserPreferences(ctx context.Context, userAddress string, preferences types.UserPreferences) error + func (k *Keeper) UBDQueueIterator(ctx context.Context, endTime time.Time) (storetypes.Iterator, error) + func (k *Keeper) Unbond(ctx context.Context, data types.UndelegationData) (amount sdk.Coins, err error) + func (k *Keeper) UnbondRestakedAssets(ctx context.Context, user sdk.AccAddress, amount sdk.Coins) (time.Time, error) + func (k *Keeper) UnbondingTime(ctx context.Context) (time.Duration, error) + func (k *Keeper) UndelegateFromOperator(ctx context.Context, operatorID uint32, amount sdk.Coins, delegator string) (time.Time, error) + func (k *Keeper) UndelegateFromPool(ctx context.Context, amount sdk.Coin, delegator string) (time.Time, error) + func (k *Keeper) UndelegateFromService(ctx context.Context, serviceID uint32, amount sdk.Coins, delegator string) (time.Time, error) + func (k *Keeper) ValidateRestake(ctx context.Context, restakerAddress string, restakedAmount sdk.Coins, ...) error + func (k *Keeper) ValidateUnbondAmount(ctx context.Context, delAddr string, target types.DelegationTarget, ...) (shares sdk.DecCoins, err error) + type OperatorsHooks struct + func (o *OperatorsHooks) AfterOperatorInactivatingCompleted(ctx context.Context, operatorID uint32) error + func (o *OperatorsHooks) AfterOperatorInactivatingStarted(ctx context.Context, operatorID uint32) error + func (o *OperatorsHooks) AfterOperatorReactivated(ctx context.Context, operatorID uint32) error + func (o *OperatorsHooks) AfterOperatorRegistered(ctx context.Context, operatorID uint32) error + func (o *OperatorsHooks) BeforeOperatorDeleted(ctx context.Context, operatorID uint32) error + type Querier struct + func NewQuerier(keeper *Keeper) Querier + func (k Querier) DelegatorOperator(ctx context.Context, req *types.QueryDelegatorOperatorRequest) (*types.QueryDelegatorOperatorResponse, error) + func (k Querier) DelegatorOperatorDelegations(ctx context.Context, req *types.QueryDelegatorOperatorDelegationsRequest) (*types.QueryDelegatorOperatorDelegationsResponse, error) + func (k Querier) DelegatorOperatorUnbondingDelegations(ctx context.Context, ...) (*types.QueryDelegatorOperatorUnbondingDelegationsResponse, error) + func (k Querier) DelegatorOperators(ctx context.Context, req *types.QueryDelegatorOperatorsRequest) (*types.QueryDelegatorOperatorsResponse, error) + func (k Querier) DelegatorPool(ctx context.Context, req *types.QueryDelegatorPoolRequest) (*types.QueryDelegatorPoolResponse, error) + func (k Querier) DelegatorPoolDelegations(ctx context.Context, req *types.QueryDelegatorPoolDelegationsRequest) (*types.QueryDelegatorPoolDelegationsResponse, error) + func (k Querier) DelegatorPoolUnbondingDelegations(ctx context.Context, req *types.QueryDelegatorPoolUnbondingDelegationsRequest) (*types.QueryDelegatorPoolUnbondingDelegationsResponse, error) + func (k Querier) DelegatorPools(ctx context.Context, req *types.QueryDelegatorPoolsRequest) (*types.QueryDelegatorPoolsResponse, error) + func (k Querier) DelegatorService(ctx context.Context, req *types.QueryDelegatorServiceRequest) (*types.QueryDelegatorServiceResponse, error) + func (k Querier) DelegatorServiceDelegations(ctx context.Context, req *types.QueryDelegatorServiceDelegationsRequest) (*types.QueryDelegatorServiceDelegationsResponse, error) + func (k Querier) DelegatorServiceUnbondingDelegations(ctx context.Context, ...) (*types.QueryDelegatorServiceUnbondingDelegationsResponse, error) + func (k Querier) DelegatorServices(ctx context.Context, req *types.QueryDelegatorServicesRequest) (*types.QueryDelegatorServicesResponse, error) + func (k Querier) OperatorDelegation(ctx context.Context, req *types.QueryOperatorDelegationRequest) (*types.QueryOperatorDelegationResponse, error) + func (k Querier) OperatorDelegations(ctx context.Context, req *types.QueryOperatorDelegationsRequest) (*types.QueryOperatorDelegationsResponse, error) + func (k Querier) OperatorJoinedServices(ctx context.Context, req *types.QueryOperatorJoinedServicesRequest) (*types.QueryOperatorJoinedServicesResponse, error) + func (k Querier) OperatorUnbondingDelegation(ctx context.Context, req *types.QueryOperatorUnbondingDelegationRequest) (*types.QueryOperatorUnbondingDelegationResponse, error) + func (k Querier) OperatorUnbondingDelegations(ctx context.Context, req *types.QueryOperatorUnbondingDelegationsRequest) (*types.QueryOperatorUnbondingDelegationsResponse, error) + func (k Querier) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) + func (k Querier) PoolDelegation(ctx context.Context, req *types.QueryPoolDelegationRequest) (*types.QueryPoolDelegationResponse, error) + func (k Querier) PoolDelegations(ctx context.Context, req *types.QueryPoolDelegationsRequest) (*types.QueryPoolDelegationsResponse, error) + func (k Querier) PoolUnbondingDelegation(ctx context.Context, req *types.QueryPoolUnbondingDelegationRequest) (*types.QueryPoolUnbondingDelegationResponse, error) + func (k Querier) PoolUnbondingDelegations(ctx context.Context, req *types.QueryPoolUnbondingDelegationsRequest) (*types.QueryPoolUnbondingDelegationsResponse, error) + func (k Querier) ServiceAllowedOperators(ctx context.Context, req *types.QueryServiceAllowedOperatorsRequest) (*types.QueryServiceAllowedOperatorsResponse, error) + func (k Querier) ServiceDelegation(ctx context.Context, req *types.QueryServiceDelegationRequest) (*types.QueryServiceDelegationResponse, error) + func (k Querier) ServiceDelegations(ctx context.Context, req *types.QueryServiceDelegationsRequest) (*types.QueryServiceDelegationsResponse, error) + func (k Querier) ServiceOperators(ctx context.Context, req *types.QueryServiceOperatorsRequest) (*types.QueryServiceOperatorsResponse, error) + func (k Querier) ServiceSecuringPools(ctx context.Context, req *types.QueryServiceSecuringPoolsRequest) (*types.QueryServiceSecuringPoolsResponse, error) + func (k Querier) ServiceUnbondingDelegation(ctx context.Context, req *types.QueryServiceUnbondingDelegationRequest) (*types.QueryServiceUnbondingDelegationResponse, error) + func (k Querier) ServiceUnbondingDelegations(ctx context.Context, req *types.QueryServiceUnbondingDelegationsRequest) (*types.QueryServiceUnbondingDelegationsResponse, error) + func (k Querier) UserPreferences(ctx context.Context, req *types.QueryUserPreferencesRequest) (*types.QueryUserPreferencesResponse, error) + type ServicesHooks struct + func (h *ServicesHooks) AfterServiceAccreditationModified(ctx context.Context, serviceID uint32) error + func (h *ServicesHooks) AfterServiceActivated(ctx context.Context, serviceID uint32) error + func (h *ServicesHooks) AfterServiceCreated(ctx context.Context, serviceID uint32) error + func (h *ServicesHooks) AfterServiceDeactivated(ctx context.Context, serviceID uint32) error + func (h *ServicesHooks) BeforeServiceDeleted(ctx context.Context, serviceID uint32) error v3.0.0-ceers Dec 18, 2024 Other modules containing this package github.com/milkyway-labs/milkyway github.com/milkyway-labs/milkyway/v2 github.com/milkyway-labs/milkyway/v6