Skip to main content

NodeRegistry

Git Source

Inherits: Locker, Votes

Title: NodeRegistry

Node operator registry. Operators post YELLOW tokens as a mandatory functional security deposit to operate clearnode infrastructure. Extends OZ Votes to provide collateral-weight accounting for protocol parameter administration by active node operators. Auto-self-delegates on first lock so collateral weight is immediately active.

Collateral weight units are granted on lock and removed on unlock/relock via hooks.

Functions

constructor

constructor(address asset_, uint256 unlockPeriod_) Locker(asset_, unlockPeriod_) EIP712(NAME, VERSION);

_afterLock

function _afterLock(address target, uint256 amount) internal override;

_afterUnlock

function _afterUnlock(address account, uint256 balance) internal override;

_afterRelock

function _afterRelock(address account, uint256 balance) internal override;

_getVotingUnits

Returns the locked collateral as weight units for the OZ Votes system.

function _getVotingUnits(address account) internal view override returns (uint256);