Hooks
Other modules may register operations to execute when a certain event has occurred within staking. These events can be registered to execute either right Before or After the staking event (as per the hook name). The following hooks can registered with staking:
AfterValidatorCreated(Context, ValAddress) errorcalled when a validator is created
BeforeValidatorModified(Context, ValAddress) errorcalled when a validator's state is changed
AfterValidatorRemoved(Context, ConsAddress, ValAddress) errorcalled when a validator is deleted
AfterValidatorBonded(Context, ConsAddress, ValAddress) errorcalled when a validator is bonded
AfterValidatorBeginUnbonding(Context, ConsAddress, ValAddress) errorcalled when a validator begins unbonding
BeforeDelegationCreated(Context, AccAddress, ValAddress) errorcalled when a delegation is created
BeforeDelegationSharesModified(Context, AccAddress, ValAddress) errorcalled when a delegation's shares are modified
AfterDelegationModified(Context, AccAddress, ValAddress) errorcalled when a delegation is created or modified
BeforeDelegationRemoved(Context, AccAddress, ValAddress) errorcalled when a delegation is removed
Last updated