RunnerRegistry.sol
Methods
bond(uint256)
function bond(uint256 _amount) external nonpayable
Used to bond as a runner
Parameters
Name | Type | Description |
---|---|---|
_amount | uint256 | is the amount of tokens that will be locked as bond amount. |
bondAmount()
function bondAmount() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
bondToken()
function bondToken() external view returns (contract IERC20)
Returns
Name | Type | Description |
---|---|---|
_0 | contract IERC20 | undefined |
freeCoin()
function freeCoin() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
initialize(address,uint256,address)
function initialize(address _keeperRegistry, uint256 _bondAmount, address _bondToken) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
_keeperRegistry | address | undefined |
_bondAmount | uint256 | undefined |
_bondToken | address | undefined |
isRunner(address)
function isRunner(address _runner) external view returns (bool)
Check whether an address is runner or not.
Parameters
Name | Type | Description |
---|---|---|
_runner | address | is the address that needs to be checked. |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | True if address is a runner ,if not returns false. |
keeperRegistry()
function keeperRegistry() external view returns (contract KeeperRegistry)
Returns
Name | Type | Description |
---|---|---|
_0 | contract KeeperRegistry | undefined |
owner()
function owner() external view returns (address)
Returns the address of the current owner.
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
renounceOwnership()
function renounceOwnership() external nonpayable
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)
function runners(address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
slash(address,uint256)
function slash(address _runner, uint256 _amount) external nonpayable
Used to slash runners if they do a bad/malicious job. Only keepers can slash runners.
Parameters
Name | Type | Description |
---|---|---|
_runner | address | is the address of the runner who should be slashed. |
_amount | uint256 | is the amount which should be slashed from the runner's bond amount. |
transferOwnership(address)
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Parameters
Name | Type | Description |
---|---|---|
newOwner | address | undefined |
unbond(uint256)
function unbond(uint256 _amount) external nonpayable
Used to unbond as a runner and get the bonded tokens back.
Parameters
Name | Type | Description |
---|---|---|
_amount | uint256 | is the amount of tokens that will be unlocked from bond amount. |
upgradeTo(address)
function upgradeTo(address newImplementation) external nonpayable
Upgrade the implementation of the proxy to newImplementation
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
Name | Type | Description |
---|---|---|
newImplementation | address | undefined |
upgradeToAndCall(address,bytes)
function upgradeToAndCall(address newImplementation, bytes data) external payable
Upgrade the implementation of the proxy to newImplementation
, and subsequently execute the function call encoded in data
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
Name | Type | Description |
---|---|---|
newImplementation | address | undefined |
data | bytes | undefined |
withdrawFreeCoin(uint256)
function withdrawFreeCoin(uint256 _amount) external nonpayable
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
Name | Type | Description |
---|---|---|
_amount | uint256 | is the amount of tokens that needs to be withdrawn. |
Events
AdminChanged
event AdminChanged(address previousAdmin, address newAdmin)
Parameters
Name | Type | Description |
---|---|---|
previousAdmin | address | undefined |
newAdmin | address | undefined |
BeaconUpgraded
event BeaconUpgraded(address indexed beacon)
Parameters
Name | Type | Description |
---|---|---|
beacon indexed | address | undefined |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
Name | Type | Description |
---|---|---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
RunnerAmountChanged
event RunnerAmountChanged(address indexed runner, int256 amount)
Parameters
Name | Type | Description |
---|---|---|
runner indexed | address | undefined |
amount | int256 | undefined |
Upgraded
event Upgraded(address indexed implementation)
Parameters
Name | Type | Description |
---|---|---|
implementation indexed | address | undefined |