Skip to main content

RunnerRegistry.sol

Methods

bond(uint256)

Solidity

function bond(uint256 _amount) external nonpayable
Details

Used to bond as a runner

Parameters

NameTypeDescription
_amountuint256is the amount of tokens that will be locked as bond amount.

bondAmount()

Solidity

function bondAmount() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

bondToken()

Solidity

function bondToken() external view returns (contract IERC20)

Returns

NameTypeDescription
_0contract IERC20undefined

freeCoin()

Solidity

function freeCoin() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

initialize(address,uint256,address)

Solidity

function initialize(address _keeperRegistry, uint256 _bondAmount, address _bondToken) external nonpayable

Parameters

NameTypeDescription
_keeperRegistryaddressundefined
_bondAmountuint256undefined
_bondTokenaddressundefined

isRunner(address)

Solidity

function isRunner(address _runner) external view returns (bool)
Details

Check whether an address is runner or not.

Parameters

NameTypeDescription
_runneraddressis the address that needs to be checked.

Returns

NameTypeDescription
_0boolTrue if address is a runner ,if not returns false.

keeperRegistry()

Solidity

function keeperRegistry() external view returns (contract KeeperRegistry)

Returns

NameTypeDescription
_0contract KeeperRegistryundefined

owner()

Solidity

function owner() external view returns (address)
Details

Returns the address of the current owner.

Returns

NameTypeDescription
_0addressundefined

renounceOwnership()

Solidity

function renounceOwnership() external nonpayable
Details

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

runners(address)

Solidity

function runners(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

slash(address,uint256)

Solidity

function slash(address _runner, uint256 _amount) external nonpayable
Details

Used to slash runners if they do a bad/malicious job. Only keepers can slash runners.

Parameters

NameTypeDescription
_runneraddressis the address of the runner who should be slashed.
_amountuint256is the amount which should be slashed from the runner's bond amount.

transferOwnership(address)

Solidity

function transferOwnership(address newOwner) external nonpayable
Details

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressundefined

unbond(uint256)

Solidity

function unbond(uint256 _amount) external nonpayable
Details

Used to unbond as a runner and get the bonded tokens back.

Parameters

NameTypeDescription
_amountuint256is the amount of tokens that will be unlocked from bond amount.

upgradeTo(address)

Solidity

function upgradeTo(address newImplementation) external nonpayable
Details

Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined

upgradeToAndCall(address,bytes)

Solidity

function upgradeToAndCall(address newImplementation, bytes data) external payable
Details

Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined
databytesundefined

withdrawFreeCoin(uint256)

Solidity

function withdrawFreeCoin(uint256 _amount) external nonpayable
Details

Used to withdraw the tokens that were slashed from runners doing a bad/malicious job. Can only be called by the owner of this contract.

Parameters

NameTypeDescription
_amountuint256is the amount of tokens that needs to be withdrawn.

Events

AdminChanged

Solidity

event AdminChanged(address previousAdmin, address newAdmin)

Parameters

NameTypeDescription
previousAdminaddressundefined
newAdminaddressundefined

BeaconUpgraded

Solidity

event BeaconUpgraded(address indexed beacon)

Parameters

NameTypeDescription
beacon indexedaddressundefined

OwnershipTransferred

Solidity

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined

RunnerAmountChanged

Solidity

event RunnerAmountChanged(address indexed runner, int256 amount)

Parameters

NameTypeDescription
runner indexedaddressundefined
amountint256undefined

Upgraded

Solidity

event Upgraded(address indexed implementation)

Parameters

NameTypeDescription
implementation indexedaddressundefined