IKeeperRegistry.sol
Methods
changeBondAmount(uint256)
function changeBondAmount(uint256 amount) external nonpayable
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
Name | Type | Description |
---|---|---|
amount | uint256 | new bondAmount. |
changeMaxKeepers(uint16)
function changeMaxKeepers(uint16 newNumKeepers) external nonpayable
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
Name | Type | Description |
---|---|---|
newNumKeepers | uint16 | undefined |
checkLicense(address)
function checkLicense(address targetAddress) external view returns (uint256)
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
Name | Type | Description |
---|---|---|
targetAddress | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
currentNumKeepers()
function currentNumKeepers() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
denounce(address,uint256)
function denounce(address targetKeeper, uint256 amount) external nonpayable
slashes a keeper, removing their permissions and forfeiting their bond.
Parameters
Name | Type | Description |
---|---|---|
targetKeeper | address | keeper to denounce |
amount | uint256 | amount of bondCoin to slash |
initialize(address,uint256,uint256,uint256)
function initialize(address coinAddress, uint256 keeperTransferDelay, uint256 maxKeepers, uint256 bondSize) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
coinAddress | address | the address of the ERC20 which will be used for bonds; intended to be Steer token. |
keeperTransferDelay | uint256 | the 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. |
maxKeepers | uint256 | undefined |
bondSize | uint256 | undefined |
join(uint256,uint256)
function join(uint256 licenseNumber, uint256 amount) external nonpayable
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
Name | Type | Description |
---|---|---|
licenseNumber | uint256 | undefined |
amount | uint256 | Amount of bondCoin to be deposited. |
joiningForOwner(address[])
function joiningForOwner(address[] joiners) external nonpayable
setup utility function for owner to add initial keepers. Addresses must each be unique and not hold any bondToken.
Parameters
Name | Type | Description |
---|---|---|
joiners | address[] | array of addresses to become keepers. note that this function will pull bondToken from the owner equal to bondAmount * numJoiners. |
leave()
function leave() external nonpayable
maxNumKeepers()
function maxNumKeepers() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
queueToLeave()
function queueToLeave() external nonpayable
withdrawFreeCoin(uint256,address)
function withdrawFreeCoin(uint256 amount, address targetAddress) external nonpayable
withdraws slashed tokens from the vault and sends them to targetAddress.
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | amount of bondCoin to withdraw |
targetAddress | address | address receiving the tokens |
Events
LeaveQueued
event LeaveQueued(address indexed keeper, uint256 leaveTimestamp)
Parameters
Name | Type | Description |
---|---|---|
keeper indexed | address | undefined |
leaveTimestamp | uint256 | undefined |
PermissionChanged
event PermissionChanged(address indexed _subject, enum IKeeperRegistry.permissionType indexed _permissionType)
Parameters
Name | Type | Description |
---|---|---|
_subject indexed | address | undefined |
_permissionType indexed | enum IKeeperRegistry.permissionType | undefined |