link staking contracts
OperatorStakingPool: Node Operator LST Balances
The OperatorStakingPool tracks node operator LST balances for the purpose of differentiating from community LST balances. Node operators are required to stake their LSTs into this contract.
View Functions
Section titled âView FunctionsâReturns the address of the liquid staking token supported by this pool
function lst() external view returns (address)Return Values
Section titled âReturn Valuesâ| Name | Type | Description |
|---|---|---|
| lst | address | address of LST |
depositLimit
Section titled âdepositLimitâReturns the max amount of deposits per operator
function depositLimit() external view returns (uint256)Return Values
Section titled âReturn Valuesâ| Name | Type | Description |
|---|---|---|
| depositLimit | uint256 | max amount of deposits per operator |
getOperators
Section titled âgetOperatorsâReturns a list of all operators
function getOperators() external view returns (address[])Return Values
Section titled âReturn Valuesâ| Name | Type | Description |
|---|---|---|
| operators | address[] | list of operators |
getOperatorPrincipal
Section titled âgetOperatorPrincipalâReturns an operatorâs principal staked balance
function getOperatorPrincipal(address _operator) public view returns (uint256)Parameters
Section titled âParametersâ| Name | Type | Description |
|---|---|---|
| _operator | address | address of operator |
Return Values
Section titled âReturn Valuesâ| Name | Type | Description |
|---|---|---|
| operatorPrincipal | uint256 | operator principal staked amount |
getOperatorStaked
Section titled âgetOperatorStakedâReturns an operatorâs total staked balance
function getOperatorStaked(address _operator) public view returns (uint256)Parameters
Section titled âParametersâ| Name | Type | Description |
|---|---|---|
| _operator | address | address of operator |
Return Values
Section titled âReturn Valuesâ| Name | Type | Description |
|---|---|---|
| operatorStaked | uint256 | operator staked amount |
getTotalPrincipal
Section titled âgetTotalPrincipalâReturns the total principal staked amount
function getTotalPrincipal() external view returns (uint256)Return Values
Section titled âReturn Valuesâ| Name | Type | Description |
|---|---|---|
| totalPrincipal | uint256 | total principal staked amount |
getTotalStaked
Section titled âgetTotalStakedâReturns the total staked amount
function getTotalStaked() external view returns (uint256)Return Values
Section titled âReturn Valuesâ| Name | Type | Description |
|---|---|---|
| totalStaked | uint256 | total staked amount |
isOperator
Section titled âisOperatorâReturns whether an account is an operator
function isOperator(address _account) public view returns (bool)Return Values
Section titled âReturn Valuesâ| Name | Type | Description |
|---|---|---|
| isOperator | bool | true if account is operator, false otherwise |
Write Functions
Section titled âWrite FunctionsâonTokenTransfer
Section titled âonTokenTransferâERC677 implementation to receive deposits
function onTokenTransfer(address _sender, uint256 _value, bytes) externalParameters
Section titled âParametersâ| Name | Type | Description |
|---|---|---|
| _sender | address | address of sender |
| _value | uint256 | amount of tokens to deposit |
| bytes |
withdraw
Section titled âwithdrawâWithdraws tokens
function withdraw(uint256 _amount) externalParameters
Section titled âParametersâ| Name | Type | Description |
|---|---|---|
| _amount | uint256 | amount to withdraw |
addOperators
Section titled âaddOperatorsâAdds new operators
function addOperators(address[] _operators) externalParameters
Section titled âParametersâ| Name | Type | Description |
|---|---|---|
| _operators | address[] | list of operators to add |
removeOperators
Section titled âremoveOperatorsâRemoves existing operators
function removeOperators(address[] _operators) externalParameters
Section titled âParametersâ| Name | Type | Description |
|---|---|---|
| _operators | address[] | list of operators to remove |
setDepositLimit
Section titled âsetDepositLimitâSets the max amount of deposits per operator
function setDepositLimit(uint256 _depositLimit) externalParameters
Section titled âParametersâ| Name | Type | Description |
|---|---|---|
| _depositLimit | uint256 | max amount of deposits per operator |