Relayer Network Interface
Documentation on various functions on the Relayer token contract

delegate(address delegatee) (public)

Delegates votes from msg.sender to delegatee

delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) (public)

Delegates votes from signatory to delegatee

getCurrentVotes(address account) → uint256 (external)

Gets the current votes balance for account

getPriorVotes(address account, uint256 blockNumber) → uint256 (public)

Determines the prior number of votes for an account as of a block number.
Block number must be a finalized block or else this function will revert to prevent misinformation.

_delegate(address delegator, address delegatee) (internal)

_moveDelegates(address srcRep, address dstRep, uint256 amount) (internal)

_writeCheckpoint(address delegatee, uint32 nCheckpoints, uint256 oldVotes, uint256 newVotes) (internal)

safe32(uint256 n, string errorMessage) → uint32 (internal)

addCreditETH(address job) (external)

Add ETH credit to a job to be paid out for work.

addCredit(address credit, address job, uint256 amount) (external)

Add credit to a job to be paid out for work.

approveLiquidity(address liquidity) (external)

Approve a liquidity pair for being accepted in the future.

revokeLiquidity(address liquidity) (external)

Revoke a liquidity pair from being accepted in the future.

pairs() → address[] (external)

Displays all accepted liquidity pairs.

addLiquidityToJob(address liquidity, address job, uint256 amount) (external)

Allows liquidity providers to submit jobs.

applyCreditToJob(address provider, address liquidity, address job) (external)

Applies the credit provided in addLiquidityToJob to the job.

unbondLiquidityFromJob(address liquidity, address job, uint256 amount) (external)

Unbonds liquidity for a pending keeper job.

removeLiquidityFromJob(address liquidity, address job) (external)

Allows liquidity providers to remove liquidity.

mint(uint256 amount) (external)

Allows governance to mint new tokens to the treasury.

burn(uint256 amount) (external)

Burns owned tokens.

_mint(address dst, uint256 amount) (internal)

_burn(address dst, uint256 amount) (internal)

workReceipt(address keeper, uint256 amount) (external)

Implemented by jobs to show that a Relayer performed work.

receipt(address credit, address keeper, uint256 amount) (external)

Implemented by jobs to show that a Relayer performed work.

receiptETH(address keeper, uint256 amount) (external)

Implemented by jobs to show that a Relayer performed work.

_bond(address bonding, address _from, uint256 _amount) (internal)

_unbond(address bonding, address _from, uint256 _amount) (internal)

addJob(address job) (external)

Allows governance to add new job systems.

getJobs() → address[] (external)

Full listing of all jobs ever added.

removeJob(address job) (external)

Allows governance to remove a job from the system.

setKeep3rHelper(contract Keep3rHelper _kprh) (external)

Allows governance to change the Keep3rHelper for max spend.

setGovernance(address _governance) (external)

Allows governance to change governance (for future upgradability).

acceptGovernance() (external)

Allows pendingGovernance to accept their role as governance (protection pattern).

isKeeper(address keeper) → bool (external)

Confirms if the current Relayer is registered. This can be used for general (non-critical) functions.

isMinKeeper(address keeper, uint256 minBond, uint256 earned, uint256 age) → bool (external)

Confirms if the current Relayer is registered and has a minimum bond. Should be used for protected functions.

isBondedKeeper(address keeper, address bond, uint256 minBond, uint256 earned, uint256 age) → bool (external)

Confirms if the current Relayer is registered and has a minimum bond. Should be used for protected functions.

bond(address bonding, uint256 amount) (external)

Begins the bonding process for a new Relayer.

getKeepers() → address[] (external)

Gets full list of Relayers in the system.

activate(address bonding) (external)

Allows a Relayer to activate/register themselves after bonding.

unbond(address bonding, uint256 amount) (external)

Begins the unbonding process to stop being a Relayer.

withdraw(address bonding) (external)

Withdraws funds after unbonding has finished.

down(address keeper) (external)

Slash a Relayer for downtime.

dispute(address keeper) → uint256 (external)

Allows governance to create a dispute for a given Relayer.

slash(address bonded, address keeper, uint256 amount) (public)

Allows governance to slash a Relayer based on a dispute.

revoke(address keeper) (external)

Blacklists a Relayer from participating in the network.

resolve(address keeper) (external)

Allows governance to resolve a dispute on a Relayer.

allowance(address account, address spender) → uint256 (external)

Gets the number of tokens spender is approved to spend on behalf of account

approve(address spender, uint256 amount) → bool (public)

Approves spender to transfer up to amount from src
This will overwrite the approval amount for spender and is subject to issues noted here.

permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) (external)

Triggers an approval from owner to spend.

balanceOf(address account) → uint256 (external)

Gets the number of tokens held by the account

transfer(address dst, uint256 amount) → bool (public)

Transfers amount tokens from msg.sender to dst

transferFrom(address src, address dst, uint256 amount) → bool (external)

Transfers amount tokens from src to dst

_transferTokens(address src, address dst, uint256 amount) (internal)

_getChainId() → uint256 (internal)

DelegateChanged(address delegator, address fromDelegate, address toDelegate)

An event that's emitted when an account changes its delegate.

DelegateVotesChanged(address delegate, uint256 previousBalance, uint256 newBalance)

An event that's emitted when a delegate account's vote balance changes.

Transfer(address from, address to, uint256 amount)

The standard EIP-20 transfer event.

Approval(address owner, address spender, uint256 amount)

The standard EIP-20 approval event.

SubmitJob(address job, address provider, uint256 block, uint256 credit)

Submits a job.

ApplyCredit(address job, address provider, uint256 block, uint256 credit)

Applies credit to a job.

RemoveJob(address job, address provider, uint256 block, uint256 credit)

Removes credit for a job.

UnbondJob(address job, address provider, uint256 block, uint256 credit)

Unbond credit for a job.

JobAdded(address job, uint256 block, address governance)

Added a job.

JobRemoved(address job, uint256 block, address governance)

Removed a job.

KeeperWorked(address credit, address job, address keeper, uint256 block)

Worked a job.

KeeperBonding(address keeper, uint256 block, uint256 active, uint256 bond)

Relayer bonding.

KeeperBonded(address keeper, uint256 block, uint256 activated, uint256 bond)

Relayer bonded.

KeeperUnbonding(address keeper, uint256 block, uint256 deactive, uint256 bond)

Relayer unbonding.

KeeperUnbound(address keeper, uint256 block, uint256 deactivated, uint256 bond)

Relayer unbound.

KeeperSlashed(address keeper, address slasher, uint256 block, uint256 slash)

Relayer slashed.

KeeperDispute(address keeper, uint256 block)

Relayer disputed.

KeeperResolved(address keeper, uint256 block)

Relayer resolved.

AddCredit(address credit, address job, address creditor, uint256 block, uint256 amount)

Last modified 11mo ago
Copy link
Contents
delegate(address delegatee) (public)
delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) (public)
getCurrentVotes(address account) → uint256 (external)
getPriorVotes(address account, uint256 blockNumber) → uint256 (public)
_delegate(address delegator, address delegatee) (internal)
_moveDelegates(address srcRep, address dstRep, uint256 amount) (internal)
_writeCheckpoint(address delegatee, uint32 nCheckpoints, uint256 oldVotes, uint256 newVotes) (internal)
safe32(uint256 n, string errorMessage) → uint32 (internal)
addCreditETH(address job) (external)
addCredit(address credit, address job, uint256 amount) (external)
approveLiquidity(address liquidity) (external)
revokeLiquidity(address liquidity) (external)
pairs() → address[] (external)
addLiquidityToJob(address liquidity, address job, uint256 amount) (external)
applyCreditToJob(address provider, address liquidity, address job) (external)
unbondLiquidityFromJob(address liquidity, address job, uint256 amount) (external)
removeLiquidityFromJob(address liquidity, address job) (external)
mint(uint256 amount) (external)
burn(uint256 amount) (external)
_mint(address dst, uint256 amount) (internal)
_burn(address dst, uint256 amount) (internal)
workReceipt(address keeper, uint256 amount) (external)
receipt(address credit, address keeper, uint256 amount) (external)
receiptETH(address keeper, uint256 amount) (external)
_bond(address bonding, address _from, uint256 _amount) (internal)
_unbond(address bonding, address _from, uint256 _amount) (internal)
addJob(address job) (external)
getJobs() → address[] (external)
removeJob(address job) (external)
setKeep3rHelper(contract Keep3rHelper _kprh) (external)
setGovernance(address _governance) (external)
acceptGovernance() (external)
isKeeper(address keeper) → bool (external)
isMinKeeper(address keeper, uint256 minBond, uint256 earned, uint256 age) → bool (external)
isBondedKeeper(address keeper, address bond, uint256 minBond, uint256 earned, uint256 age) → bool (external)
bond(address bonding, uint256 amount) (external)
getKeepers() → address[] (external)
activate(address bonding) (external)
unbond(address bonding, uint256 amount) (external)
withdraw(address bonding) (external)
down(address keeper) (external)
dispute(address keeper) → uint256 (external)
slash(address bonded, address keeper, uint256 amount) (public)
revoke(address keeper) (external)
resolve(address keeper) (external)
allowance(address account, address spender) → uint256 (external)
approve(address spender, uint256 amount) → bool (public)
permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) (external)
balanceOf(address account) → uint256 (external)
transfer(address dst, uint256 amount) → bool (public)
transferFrom(address src, address dst, uint256 amount) → bool (external)
_transferTokens(address src, address dst, uint256 amount) (internal)
_getChainId() → uint256 (internal)
DelegateChanged(address delegator, address fromDelegate, address toDelegate)
DelegateVotesChanged(address delegate, uint256 previousBalance, uint256 newBalance)
Transfer(address from, address to, uint256 amount)
Approval(address owner, address spender, uint256 amount)
SubmitJob(address job, address provider, uint256 block, uint256 credit)
ApplyCredit(address job, address provider, uint256 block, uint256 credit)
RemoveJob(address job, address provider, uint256 block, uint256 credit)
UnbondJob(address job, address provider, uint256 block, uint256 credit)
JobAdded(address job, uint256 block, address governance)
JobRemoved(address job, uint256 block, address governance)
KeeperWorked(address credit, address job, address keeper, uint256 block)
KeeperBonding(address keeper, uint256 block, uint256 active, uint256 bond)
KeeperBonded(address keeper, uint256 block, uint256 activated, uint256 bond)
KeeperUnbonding(address keeper, uint256 block, uint256 deactive, uint256 bond)
KeeperUnbound(address keeper, uint256 block, uint256 deactivated, uint256 bond)
KeeperSlashed(address keeper, address slasher, uint256 block, uint256 slash)
KeeperDispute(address keeper, uint256 block)
KeeperResolved(address keeper, uint256 block)
AddCredit(address credit, address job, address creditor, uint256 block, uint256 amount)