Hooks and helper functions
Herein hooks and helpers used in all implementations are described
Shared hooks
Declared, not implemented
//called before execution of a job
function _beforeExecute(
//job key
bytes32 jobKey_,
//executor keeper/slasher ID
uint256 actualKeeperId_,
//binary representation of the job to call
uint256 binJob_) internal view virtual {}
//called before initiating redemption of keeper stake
function _beforeInitiateRedeem(
//keeper ID
uint256 keeperId_) internal view virtual {}
//called after job execution succeeds
function _afterExecutionSucceeded(
//key of the executed job
bytes32 jobKey_,
//executor keeper/slasher ID
uint256 actualKeeperId_,
//binary representation of the executed job
uint256 binJob_) internal virtual {}
//called after job registration
function _afterRegisterJob(
//registered job key
bytes32 jobKey_) internal virtual {}
//called after depositing credits to a job (not job owner!)
function _afterDepositJobCredits(
//job key
bytes32 jobKey_) internal virtual {}
//called after withdrawing credits from a job (not job owner!)
function _afterWithdrawJobCredits(
//job key
bytes32 jobKey_) internal virtual {}Implemented
_afterExecutionReverted
Shared helpers
Getters
calculateCompensationPure
getKeeperWorkerAndStake
getConfig
getKeeper
getJob
getJobRaw
getJobKey
Miscellanea
_calculateDepositFee
_calculateCompensation
RanDAO-specific hooks
_afterExecutionReverted
_beforeExecute
_afterDepositJobCredits
_afterWithdrawJobCredits
_afterExecutionSucceeded
_beforeInitiateRedeem
_afterRegisterJob
RanDAO-specific helpers
Getters
getJobsAssignedToKeeper
getJobsAssignedToKeeperLength
getCurrentSlasherId
getActiveKeepersLength
getActiveKeepers
getSlasherIdByBlock
Miscellanea
checkCouldBeExecuted
getPseudoRandom
_checkBaseFee
_calculateCompensation
Last updated
Was this helpful?