Skip to main content

IKeeperRegistry.sol

Methods

changeBondAmount(uint256)

Solidity

function changeBondAmount(uint256 amount) external nonpayable
Details

change bondAmount to a new value.implicitly changes keeper permissions. If the bondAmount is being increased, existing keepers will not be slashed or removed. note, they will still be able to vote until they are slashed.

Parameters

NameTypeDescription
amountuint256new bondAmount.

changeMaxKeepers(uint16)

Solidity

function changeMaxKeepers(uint16 newNumKeepers) external nonpayable
Details

change numKeepers to a new value. If numKeepers is being reduced, this will not remove any keepers, nor will it change orchestrator requirements. However, it will render keeper licenses > maxNumKeepers invalid and their votes will stop counting.

Parameters

NameTypeDescription
newNumKeepersuint16undefined

checkLicense(address)

Solidity

function checkLicense(address targetAddress) external view returns (uint256)
Details

returns true if the given address has the power to vote, false otherwise. The address has the power to vote if it is within the keeper array.

Parameters

NameTypeDescription
targetAddressaddressundefined

Returns

NameTypeDescription
_0uint256undefined

currentNumKeepers()

Solidity

function currentNumKeepers() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

denounce(address,uint256)

Solidity

function denounce(address targetKeeper, uint256 amount) external nonpayable
Details

slashes a keeper, removing their permissions and forfeiting their bond.

Parameters

NameTypeDescription
targetKeeperaddresskeeper to denounce
amountuint256amount of bondCoin to slash

initialize(address,uint256,uint256,uint256)

Solidity

function initialize(address coinAddress, uint256 keeperTransferDelay, uint256 maxKeepers, uint256 bondSize) external nonpayable

Parameters

NameTypeDescription
coinAddressaddressthe address of the ERC20 which will be used for bonds; intended to be Steer token.
keeperTransferDelayuint256the amount of time (in seconds) between when a keeper relinquishes their license and when they can withdraw their funds. Intended to be 2 weeks - 1 month.
maxKeepersuint256undefined
bondSizeuint256undefined

join(uint256,uint256)

Solidity

function join(uint256 licenseNumber, uint256 amount) external nonpayable
Details

this function has three uses: 1. If the caller is a keeper, they can increase their bondHeld by amount. 2. If the caller is not a keeper or former keeper, they can attempt to claim a keeper license and become a keeper. 3. If the caller is a former keeper, they can attempt to cancel their leave request, claim a keeper license, and become a keeper. In all 3 cases registry[msg.sender].bondHeld is increased by amount. In the latter 2, msg.sender's bondHeld after the transaction must be >= bondAmount.

Parameters

NameTypeDescription
licenseNumberuint256undefined
amountuint256Amount of bondCoin to be deposited.

joiningForOwner(address[])

Solidity

function joiningForOwner(address[] joiners) external nonpayable
Details

setup utility function for owner to add initial keepers. Addresses must each be unique and not hold any bondToken.

Parameters

NameTypeDescription
joinersaddress[]array of addresses to become keepers. note that this function will pull bondToken from the owner equal to bondAmount * numJoiners.

leave()

Solidity

function leave() external nonpayable

maxNumKeepers()

Solidity

function maxNumKeepers() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

queueToLeave()

Solidity

function queueToLeave() external nonpayable

withdrawFreeCoin(uint256,address)

Solidity

function withdrawFreeCoin(uint256 amount, address targetAddress) external nonpayable
Details

withdraws slashed tokens from the vault and sends them to targetAddress.

Parameters

NameTypeDescription
amountuint256amount of bondCoin to withdraw
targetAddressaddressaddress receiving the tokens

Events

LeaveQueued

Solidity

event LeaveQueued(address indexed keeper, uint256 leaveTimestamp)

Parameters

NameTypeDescription
keeper indexedaddressundefined
leaveTimestampuint256undefined

PermissionChanged

Solidity

event PermissionChanged(address indexed _subject, enum IKeeperRegistry.permissionType indexed _permissionType)

Parameters

NameTypeDescription
_subject indexedaddressundefined
_permissionType indexedenum IKeeperRegistry.permissionTypeundefined