Documentation ¶
Index ¶
- 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
- type DistributionInfo
- type 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
- 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
- type RestakingHooks
- 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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶
AllInvariants runs all invariants of the module
func CanWithdrawInvariant ¶
CanWithdrawInvariant checks that current rewards can be completely withdrawn
func ModuleAccountInvariant ¶
ModuleAccountInvariant checks that the coins held by the global rewards pool is consistent with the sum of outstanding rewards
func NewMsgServer ¶
func NewQueryServer ¶
func NewQueryServer(k *Keeper) types.QueryServer
func NonNegativeOutstandingInvariant ¶
NonNegativeOutstandingInvariant checks that outstanding unwithdrawn fees are never negative
func ReferenceCountInvariant ¶
ReferenceCountInvariant checks that the number of historical rewards records is correct
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k *Keeper)
RegisterInvariants registers all module invariants
Types ¶
type DelegationTarget ¶
type DelegationTarget struct { restakingtypes.DelegationTarget DelegationType restakingtypes.DelegationType DelegatorStartingInfos collections.Map[collections.Pair[uint32, sdk.AccAddress], types.DelegatorStartingInfo] HistoricalRewards collections.Map[collections.Pair[uint32, uint64], types.HistoricalRewards] CurrentRewards collections.Map[uint32, types.CurrentRewards] OutstandingRewards collections.Map[uint32, types.OutstandingRewards] }
DelegationTarget is a wrapper around the delegation target that holds the delegation type and collection references for the target's type.
type DistributionInfo ¶
type DistributionInfo struct { DelegationTarget DelegationTarget DelegationsValue math.LegacyDec }
DistributionInfo stores information about a delegation target and its delegation value.
type Keeper ¶
type Keeper struct { Schema collections.Schema Params collections.Item[types.Params] NextRewardsPlanID collections.Item[uint64] RewardsPlans collections.Map[uint64, types.RewardsPlan] LastRewardsAllocationTime collections.Item[gogotypes.Timestamp] DelegatorWithdrawAddrs collections.Map[sdk.AccAddress, sdk.AccAddress] PoolDelegatorStartingInfos collections.Map[collections.Pair[uint32, sdk.AccAddress], types.DelegatorStartingInfo] PoolHistoricalRewards collections.Map[collections.Pair[uint32, uint64], types.HistoricalRewards] PoolCurrentRewards collections.Map[uint32, types.CurrentRewards] PoolOutstandingRewards collections.Map[uint32, types.OutstandingRewards] PoolServiceTotalDelegatorShares collections.Map[collections.Pair[uint32, uint32], types.PoolServiceTotalDelegatorShares] OperatorAccumulatedCommissions collections.Map[uint32, types.AccumulatedCommission] OperatorDelegatorStartingInfos collections.Map[collections.Pair[uint32, sdk.AccAddress], types.DelegatorStartingInfo] OperatorHistoricalRewards collections.Map[collections.Pair[uint32, uint64], types.HistoricalRewards] OperatorCurrentRewards collections.Map[uint32, types.CurrentRewards] OperatorOutstandingRewards collections.Map[uint32, types.OutstandingRewards] ServiceDelegatorStartingInfos collections.Map[collections.Pair[uint32, sdk.AccAddress], types.DelegatorStartingInfo] ServiceHistoricalRewards collections.Map[collections.Pair[uint32, uint64], types.HistoricalRewards] ServiceCurrentRewards collections.Map[uint32, types.CurrentRewards] ServiceOutstandingRewards collections.Map[uint32, types.OutstandingRewards] // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeService corestoretypes.KVStoreService, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, communityPoolKeeper types.CommunityPoolKeeper, oracleKeeper types.OracleKeeper, poolsKeeper types.PoolsKeeper, operatorsKeeper types.OperatorsKeeper, servicesKeeper types.ServicesKeeper, restakingKeeper types.RestakingKeeper, assetsKeeper types.AssetsKeeper, authority string, ) *Keeper
func (*Keeper) AfterDelegationModified ¶
func (k *Keeper) AfterDelegationModified(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32, delegator string) error
AfterDelegationModified is called after a delegation to a target is modified
func (*Keeper) AfterDelegationTargetCreated ¶
func (k *Keeper) AfterDelegationTargetCreated(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32) error
AfterDelegationTargetCreated is called after a delegation target is created
func (*Keeper) AfterServiceAccreditationModified ¶
AfterServiceAccreditationModified implements servicestypes.ServicesHooks
func (*Keeper) AfterUserPreferencesModified ¶
func (k *Keeper) AfterUserPreferencesModified( ctx context.Context, userAddress string, oldPreferences, newPreferences restakingtypes.UserPreferences, ) error
AfterUserPreferencesModified is called after a user's trust in a service is updated. It updates the total delegator shares for the service in all pools where the user has a delegation.
func (*Keeper) AfterUserTrustedServiceUpdated ¶
func (k *Keeper) AfterUserTrustedServiceUpdated( ctx context.Context, userAddress string, serviceID uint32, trusted bool, ) error
AfterUserTrustedServiceUpdated is called after a user's trust in a service is updated. AfterUserTrustedServiceUpdated updates the total delegator shares for the service in all pools where the user has a delegation.
func (*Keeper) AllocateRewards ¶
AllocateRewards allocates restaking rewards to different entities based on active rewards plans. AllocateRewards skips rewards distribution when there's no last rewards allocation time set. In that case, AllocateRewards simply set the current block time as new last rewards allocation time.
func (*Keeper) AllocateRewardsByPlan ¶
func (k *Keeper) AllocateRewardsByPlan( ctx context.Context, plan types.RewardsPlan, timeSinceLastAllocation time.Duration, pools []poolstypes.Pool, operators []operatorstypes.Operator, restakableDenoms []string, ) error
AllocateRewardsByPlan allocates rewards by a specific rewards plan.
func (*Keeper) BeforeDelegationCreated ¶
func (k *Keeper) BeforeDelegationCreated(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32) error
BeforeDelegationCreated is called before a delegation to a target is created
func (*Keeper) BeforeDelegationSharesModified ¶
func (k *Keeper) BeforeDelegationSharesModified(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32, delegator string) error
BeforeDelegationSharesModified is called before a delegation to a target is modified
func (*Keeper) BeforeDelegationTargetRemoved ¶
func (k *Keeper) BeforeDelegationTargetRemoved(ctx context.Context, delType restakingtypes.DelegationType, targetID uint32) error
BeforeDelegationTargetRemoved is called before a delegation target is removed
func (*Keeper) BeginBlocker ¶
BeginBlocker is called every block and is used to terminate ended rewards plans and allocate restaking rewards for the previous block.
func (*Keeper) CalculateDelegationRewards ¶
func (k *Keeper) CalculateDelegationRewards( ctx context.Context, target DelegationTarget, del restakingtypes.Delegation, endingPeriod uint64, ) (rewards types.DecPools, err error)
CalculateDelegationRewards calculates the total rewards accrued by a delegation between the starting period and the current block height
func (*Keeper) CreateRewardsPlan ¶
func (k *Keeper) CreateRewardsPlan( ctx context.Context, description string, serviceID uint32, amt sdk.Coins, startTime, endTime time.Time, poolsDistribution types.Distribution, operatorsDistribution types.Distribution, usersDistribution types.UsersDistribution, ) (types.RewardsPlan, error)
func (*Keeper) DecrementPoolServiceTotalDelegatorShares ¶
func (k *Keeper) DecrementPoolServiceTotalDelegatorShares( ctx context.Context, poolID, serviceID uint32, shares sdk.DecCoins, ) error
DecrementPoolServiceTotalDelegatorShares decrements the total delegator shares for a pool-service pair.
func (*Keeper) DeleteAllPoolServiceTotalDelegatorSharesByService ¶
func (k *Keeper) DeleteAllPoolServiceTotalDelegatorSharesByService(ctx context.Context, serviceID uint32) error
DeleteAllPoolServiceTotalDelegatorSharesByService deletes all total delegator shares for a pool.
func (*Keeper) DeleteHistoricalRewards ¶
func (k *Keeper) DeleteHistoricalRewards(ctx context.Context, target DelegationTarget) error
DeleteHistoricalRewards deletes all historical rewards for a target
func (*Keeper) DeleteOperatorAccumulatedCommission ¶
DeleteOperatorAccumulatedCommission deletes the accumulated commission for an operator.
func (*Keeper) DeletePoolServiceTotalDelegatorShares ¶
func (k *Keeper) DeletePoolServiceTotalDelegatorShares(ctx context.Context, poolID, serviceID uint32) error
DeletePoolServiceTotalDelegatorShares deletes the total delegator shares for a pool-service pair.
func (*Keeper) EditRewardsPlan ¶
func (k *Keeper) EditRewardsPlan( ctx context.Context, planID uint64, newDescription string, newAmountPerDay sdk.Coins, newStartTime, newEndTime time.Time, newPoolsDistribution types.Distribution, newOperatorsDistribution types.Distribution, newUsersDistribution types.UsersDistribution, ) error
EditRewardsPlan edits an existing rewards plan.
func (*Keeper) ExportGenesis ¶
ExportGenesis returns the GenesisState associated with the given context
func (*Keeper) GetAssetAndPrice ¶
func (*Keeper) GetAuthority ¶
GetAuthority returns the module's authority.
func (*Keeper) GetCoinValue ¶
func (*Keeper) GetCoinsValue ¶
func (*Keeper) GetDelegationRewards ¶
func (k *Keeper) GetDelegationRewards( ctx context.Context, delAddr sdk.AccAddress, delType restakingtypes.DelegationType, targetID uint32, ) (types.DecPools, error)
GetDelegationRewards returns the rewards for a delegation
func (*Keeper) GetDelegationTarget ¶
func (k *Keeper) GetDelegationTarget( ctx context.Context, delType restakingtypes.DelegationType, targetID uint32, ) (DelegationTarget, error)
GetDelegationTarget returns the wrapped delegation target for the given delegation type and target ID.
func (*Keeper) GetDelegatorWithdrawAddr ¶
func (k *Keeper) GetDelegatorWithdrawAddr(ctx context.Context, delegator sdk.AccAddress) (sdk.AccAddress, error)
GetDelegatorWithdrawAddr returns the delegator's withdraw address if set, otherwise the delegator address is returned.
func (*Keeper) GetLastRewardsAllocationTime ¶
GetLastRewardsAllocationTime returns the last time rewards were allocated. If there's no last rewards allocation time set yet, nil is returned.
func (*Keeper) GetOperatorAccumulatedCommission ¶
func (k *Keeper) GetOperatorAccumulatedCommission(ctx context.Context, operatorID uint32) (commission types.AccumulatedCommission, err error)
GetOperatorAccumulatedCommission returns the accumulated commission for an operator.
func (*Keeper) GetOperatorDelegationRewards ¶
func (k *Keeper) GetOperatorDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, operatorID uint32) (types.DecPools, error)
GetOperatorDelegationRewards returns the rewards for an operator delegation
func (*Keeper) GetOperatorWithdrawAddr ¶
func (k *Keeper) GetOperatorWithdrawAddr(ctx context.Context, operator operatorstypes.Operator) (sdk.AccAddress, error)
GetOperatorWithdrawAddr returns the outstanding rewards coins for an operator
func (*Keeper) GetOutstandingRewardsCoins ¶
func (k *Keeper) GetOutstandingRewardsCoins(ctx context.Context, target DelegationTarget) (types.DecPools, error)
GetOutstandingRewardsCoins returns the outstanding rewards coins for a target
func (*Keeper) GetPoolDelegationRewards ¶
func (k *Keeper) GetPoolDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, poolID uint32) (types.DecPools, error)
GetPoolDelegationRewards returns the rewards for a pool delegation
func (*Keeper) GetPoolServiceTotalDelegatorShares ¶
func (k *Keeper) GetPoolServiceTotalDelegatorShares(ctx context.Context, poolID, serviceID uint32) (sdk.DecCoins, error)
GetPoolServiceTotalDelegatorShares returns the total delegator shares for a pool-service pair.
func (*Keeper) GetRewardsPlan ¶
GetRewardsPlan returns a rewards plan by ID.
func (*Keeper) GetServiceDelegationRewards ¶
func (k *Keeper) GetServiceDelegationRewards( ctx context.Context, delAddr sdk.AccAddress, serviceID uint32, ) (types.DecPools, error)
GetServiceDelegationRewards returns the rewards for a service delegation
func (*Keeper) IncrementDelegationTargetPeriod ¶
func (k *Keeper) IncrementDelegationTargetPeriod(ctx context.Context, target DelegationTarget) (uint64, error)
IncrementDelegationTargetPeriod increments the period, returning the period that just ended
func (*Keeper) IncrementPoolServiceTotalDelegatorShares ¶
func (k *Keeper) IncrementPoolServiceTotalDelegatorShares( ctx context.Context, poolID, serviceID uint32, shares sdk.DecCoins, ) error
IncrementPoolServiceTotalDelegatorShares increments the total delegator shares for a pool-service pair.
func (*Keeper) InitGenesis ¶
InitGenesis initializes the state from a GenesisState
func (*Keeper) OperatorsHooks ¶
func (k *Keeper) OperatorsHooks() OperatorsHooks
func (*Keeper) PoolsHooks ¶
func (k *Keeper) PoolsHooks() PoolsHooks
func (*Keeper) RestakingHooks ¶
func (k *Keeper) RestakingHooks() RestakingHooks
func (*Keeper) ServicesHooks ¶
func (k *Keeper) ServicesHooks() ServicesHooks
func (*Keeper) SetLastRewardsAllocationTime ¶
SetLastRewardsAllocationTime sets the last time rewards were allocated.
func (*Keeper) SetPoolServiceTotalDelegatorShares ¶
func (k *Keeper) SetPoolServiceTotalDelegatorShares(ctx context.Context, poolID, serviceID uint32, shares sdk.DecCoins) error
SetPoolServiceTotalDelegatorShares sets the total delegator shares for a pool-service pair.
func (*Keeper) SetWithdrawAddress ¶
SetWithdrawAddress sets a new address that will receive the rewards upon withdrawal
func (*Keeper) TerminateEndedRewardsPlans ¶
TerminateEndedRewardsPlans terminates all rewards plans that have ended.
func (*Keeper) WithdrawDelegationRewards ¶
func (k *Keeper) WithdrawDelegationRewards( ctx context.Context, delAddr sdk.AccAddress, target DelegationTarget, ) (types.Pools, error)
WithdrawDelegationRewards withdraws the rewards from the delegation and reinitializes it
type OperatorsHooks ¶
type OperatorsHooks struct {
// contains filtered or unexported fields
}
func (OperatorsHooks) AfterOperatorInactivatingCompleted ¶
func (h OperatorsHooks) AfterOperatorInactivatingCompleted(context.Context, uint32) error
AfterOperatorInactivatingCompleted implements operatorstypes.OperatorsHooks
func (OperatorsHooks) AfterOperatorInactivatingStarted ¶
func (h OperatorsHooks) AfterOperatorInactivatingStarted(context.Context, uint32) error
AfterOperatorInactivatingStarted implements operatorstypes.OperatorsHooks
func (OperatorsHooks) AfterOperatorReactivated ¶
func (h OperatorsHooks) AfterOperatorReactivated(context.Context, uint32) error
AfterOperatorReactivated implements operatorstypes.OperatorsHooks
func (OperatorsHooks) AfterOperatorRegistered ¶
func (h OperatorsHooks) AfterOperatorRegistered(ctx context.Context, operatorID uint32) error
AfterOperatorRegistered implements operatorstypes.OperatorsHooks
func (OperatorsHooks) BeforeOperatorDeleted ¶
func (h OperatorsHooks) BeforeOperatorDeleted(ctx context.Context, operatorID uint32) error
BeforeOperatorDeleted implements operatorstypes.OperatorsHooks
type PoolsHooks ¶
type PoolsHooks struct {
// contains filtered or unexported fields
}
func (PoolsHooks) AfterPoolCreated ¶
func (h PoolsHooks) AfterPoolCreated(ctx context.Context, poolID uint32) error
AfterPoolCreated implements poolstypes.PoolsHooks
type RestakingHooks ¶
type RestakingHooks struct {
// contains filtered or unexported fields
}
func (RestakingHooks) AfterOperatorDelegationModified ¶
func (h RestakingHooks) AfterOperatorDelegationModified(ctx context.Context, operatorID uint32, delegator string) error
AfterOperatorDelegationModified implements restakingtypes.RestakingHooks
func (RestakingHooks) AfterPoolDelegationModified ¶
func (h RestakingHooks) AfterPoolDelegationModified(ctx context.Context, poolID uint32, delegator string) error
AfterPoolDelegationModified implements restakingtypes.RestakingHooks
func (RestakingHooks) AfterServiceDelegationModified ¶
func (h RestakingHooks) AfterServiceDelegationModified(ctx context.Context, serviceID uint32, delegator string) error
AfterServiceDelegationModified implements restakingtypes.RestakingHooks
func (RestakingHooks) AfterUnbondingInitiated ¶
func (h RestakingHooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error
AfterUnbondingInitiated implements restakingtypes.RestakingHooks
func (RestakingHooks) AfterUserPreferencesModified ¶
func (h RestakingHooks) AfterUserPreferencesModified(ctx context.Context, userAddress string, oldPreferences, newPreferences restakingtypes.UserPreferences) error
AfterUserPreferencesModified implements restakingtypes.RestakingHooks
func (RestakingHooks) BeforeOperatorDelegationCreated ¶
func (h RestakingHooks) BeforeOperatorDelegationCreated(ctx context.Context, operatorID uint32, _ string) error
BeforeOperatorDelegationCreated implements restakingtypes.RestakingHooks
func (RestakingHooks) BeforeOperatorDelegationRemoved ¶
func (h RestakingHooks) BeforeOperatorDelegationRemoved(_ context.Context, _ uint32, _ string) error
BeforeOperatorDelegationRemoved implements restakingtypes.RestakingHooks
func (RestakingHooks) BeforeOperatorDelegationSharesModified ¶
func (h RestakingHooks) BeforeOperatorDelegationSharesModified(ctx context.Context, operatorID uint32, delegator string) error
BeforeOperatorDelegationSharesModified implements restakingtypes.RestakingHooks
func (RestakingHooks) BeforePoolDelegationCreated ¶
func (h RestakingHooks) BeforePoolDelegationCreated(ctx context.Context, poolID uint32, _ string) error
BeforePoolDelegationCreated implements restakingtypes.RestakingHooks
func (RestakingHooks) BeforePoolDelegationRemoved ¶
BeforePoolDelegationRemoved implements restakingtypes.RestakingHooks
func (RestakingHooks) BeforePoolDelegationSharesModified ¶
func (h RestakingHooks) BeforePoolDelegationSharesModified(ctx context.Context, poolID uint32, delegator string) error
BeforePoolDelegationSharesModified implements restakingtypes.RestakingHooks
func (RestakingHooks) BeforeServiceDelegationCreated ¶
func (h RestakingHooks) BeforeServiceDelegationCreated(ctx context.Context, serviceID uint32, _ string) error
BeforeServiceDelegationCreated implements restakingtypes.RestakingHooks
func (RestakingHooks) BeforeServiceDelegationRemoved ¶
BeforeServiceDelegationRemoved implements restakingtypes.RestakingHooks
func (RestakingHooks) BeforeServiceDelegationSharesModified ¶
func (h RestakingHooks) BeforeServiceDelegationSharesModified(ctx context.Context, serviceID uint32, delegator string) error
BeforeServiceDelegationSharesModified implements restakingtypes.RestakingHooks
type ServicesHooks ¶
type ServicesHooks struct {
// contains filtered or unexported fields
}
func (ServicesHooks) AfterServiceAccreditationModified ¶
func (h ServicesHooks) AfterServiceAccreditationModified(ctx context.Context, serviceID uint32) error
AfterServiceAccreditationModified implements servicestypes.ServicesHooks
func (ServicesHooks) AfterServiceActivated ¶
func (h ServicesHooks) AfterServiceActivated(context.Context, uint32) error
AfterServiceActivated implements servicestypes.ServicesHooks
func (ServicesHooks) AfterServiceCreated ¶
func (h ServicesHooks) AfterServiceCreated(ctx context.Context, serviceID uint32) error
AfterServiceCreated implements servicestypes.ServicesHooks
func (ServicesHooks) AfterServiceDeactivated ¶
func (h ServicesHooks) AfterServiceDeactivated(context.Context, uint32) error
AfterServiceDeactivated implements servicestypes.ServicesHooks
func (ServicesHooks) BeforeServiceDeleted ¶
func (h ServicesHooks) BeforeServiceDeleted(ctx context.Context, serviceID uint32) error
BeforeServiceDeleted implements servicestypes.ServicesHooks