Skip to content

Commit

Permalink
chore: update doc files
Browse files Browse the repository at this point in the history
  • Loading branch information
skhomuti committed Dec 2, 2024
1 parent 01334d6 commit 7db03d8
Show file tree
Hide file tree
Showing 88 changed files with 2,820 additions and 1,146 deletions.
2 changes: 2 additions & 0 deletions docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ More on CSM in the [docs](https://docs.lido.fi/staking-modules/csm/intro).

- Install [Just](https://github.com/casey/just)

> Some Linux distributions (like Arch Linux) might require additional install of [netcat (nc)](https://en.wikipedia.org/wiki/Netcat). The preferred version is OpenBSD.
- Install project dependencies

```bash
Expand Down
29 changes: 15 additions & 14 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- [ICSBondLock](src/interfaces/ICSBondLock.sol/interface.ICSBondLock.md)
- [ICSEarlyAdoption](src/interfaces/ICSEarlyAdoption.sol/interface.ICSEarlyAdoption.md)
- [ICSFeeDistributor](src/interfaces/ICSFeeDistributor.sol/interface.ICSFeeDistributor.md)
- [ICSFeeOracle](src/interfaces/ICSFeeOracle.sol/interface.ICSFeeOracle.md)
- [NodeOperator](src/interfaces/ICSModule.sol/struct.NodeOperator.md)
- [NodeOperatorManagementProperties](src/interfaces/ICSModule.sol/struct.NodeOperatorManagementProperties.md)
- [ICSModule](src/interfaces/ICSModule.sol/interface.ICSModule.md)
Expand Down Expand Up @@ -50,30 +51,30 @@
- [AssetRecovererLib](src/lib/AssetRecovererLib.sol/library.AssetRecovererLib.md)
- [GIndex](src/lib/GIndex.sol/type.GIndex.md)
- [IndexOutOfRange](src/lib/GIndex.sol/error.IndexOutOfRange.md)
- [pow](src/lib/GIndex.sol/function.pow.md)
- [pack](src/lib/GIndex.sol/function.pack.md)
- [isRoot](src/lib/GIndex.sol/function.isRoot.md)
- [index](src/lib/GIndex.sol/function.index.md)
- [shr](src/lib/GIndex.sol/function.shr.md)
- [fls](src/lib/GIndex.sol/function.fls.md)
- [isParentOf](src/lib/GIndex.sol/function.isParentOf.md)
- [shr](src/lib/GIndex.sol/function.shr.md)
- [index](src/lib/GIndex.sol/function.index.md)
- [shl](src/lib/GIndex.sol/function.shl.md)
- [width](src/lib/GIndex.sol/function.width.md)
- [isRoot](src/lib/GIndex.sol/function.isRoot.md)
- [concat](src/lib/GIndex.sol/function.concat.md)
- [pack](src/lib/GIndex.sol/function.pack.md)
- [unwrap](src/lib/GIndex.sol/function.unwrap.md)
- [concat](src/lib/GIndex.sol/function.concat.md)
- [pow](src/lib/GIndex.sol/function.pow.md)
- [width](src/lib/GIndex.sol/function.width.md)
- [shl](src/lib/GIndex.sol/function.shl.md)
- [INOAddresses](src/lib/NOAddresses.sol/interface.INOAddresses.md)
- [NOAddresses](src/lib/NOAddresses.sol/library.NOAddresses.md)
- [Batch](src/lib/QueueLib.sol/type.Batch.md)
- [IQueueLib](src/lib/QueueLib.sol/interface.IQueueLib.md)
- [QueueLib](src/lib/QueueLib.sol/library.QueueLib.md)
- [setKeys](src/lib/QueueLib.sol/function.setKeys.md)
- [keys](src/lib/QueueLib.sol/function.keys.md)
- [setNext](src/lib/QueueLib.sol/function.setNext.md)
- [isNil](src/lib/QueueLib.sol/function.isNil.md)
- [setNext](src/lib/QueueLib.sol/function.setNext.md)
- [createBatch](src/lib/QueueLib.sol/function.createBatch.md)
- [keys](src/lib/QueueLib.sol/function.keys.md)
- [noId](src/lib/QueueLib.sol/function.noId.md)
- [unwrap](src/lib/QueueLib.sol/function.unwrap.md)
- [createBatch](src/lib/QueueLib.sol/function.createBatch.md)
- [next](src/lib/QueueLib.sol/function.next.md)
- [setKeys](src/lib/QueueLib.sol/function.setKeys.md)
- [SSZ](src/lib/SSZ.sol/library.SSZ.md)
- [SigningKeys](src/lib/SigningKeys.sol/library.SigningKeys.md)
- [TransientUintUintMap](src/lib/TransientUintUintMapLib.sol/type.TransientUintUintMap.md)
Expand All @@ -82,9 +83,9 @@
- [Withdrawal](src/lib/Types.sol/struct.Withdrawal.md)
- [Validator](src/lib/Types.sol/struct.Validator.md)
- [BeaconBlockHeader](src/lib/Types.sol/struct.BeaconBlockHeader.md)
- [gt](src/lib/Types.sol/function.gt.md)
- [unwrap](src/lib/Types.sol/function.unwrap.md)
- [lt](src/lib/Types.sol/function.lt.md)
- [unwrap](src/lib/Types.sol/function.unwrap.md)
- [gt](src/lib/Types.sol/function.gt.md)
- [UnstructuredStorage](src/lib/UnstructuredStorage.sol/library.UnstructuredStorage.md)
- [ValidatorCountsReport](src/lib/ValidatorCountsReport.sol/library.ValidatorCountsReport.md)
- [CSAccounting](src/CSAccounting.sol/contract.CSAccounting.md)
Expand Down
95 changes: 13 additions & 82 deletions docs/src/src/CSAccounting.sol/contract.CSAccounting.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CSAccounting

[Git Source](https://github.com/lidofinance/community-staking-module/blob/ed13582ed87bf90a004e225eef6ca845b31d396d/src/CSAccounting.sol)
[Git Source](https://github.com/lidofinance/community-staking-module/blob/0b0bb7587ba6d1013df8c40d056611687a557a0a/src/CSAccounting.sol)

**Inherits:**
[ICSAccounting](/src/interfaces/ICSAccounting.sol/interface.ICSAccounting.md), [CSBondCore](/src/abstract/CSBondCore.sol/abstract.CSBondCore.md), [CSBondCurve](/src/abstract/CSBondCurve.sol/abstract.CSBondCurve.md), [CSBondLock](/src/abstract/CSBondLock.sol/abstract.CSBondLock.md), [PausableUntil](/src/lib/utils/PausableUntil.sol/contract.PausableUntil.md), AccessControlEnumerableUpgradeable, [AssetRecoverer](/src/abstract/AssetRecoverer.sol/abstract.AssetRecoverer.md)
Expand Down Expand Up @@ -142,8 +142,6 @@ Pause reward claims and deposits for `duration` seconds

_Must be called together with `CSModule.pauseFor`_

_Passing MAX_UINT_256 as `duration` pauses indefinitely_

```solidity
function pauseFor(uint256 duration) external onlyRole(PAUSE_ROLE);
```
Expand Down Expand Up @@ -337,9 +335,6 @@ Claim full reward (fee + bond) in stETH for the given Node Operator with desirab

_Called by CSM exclusively_

_It's impossible to use single-leaf proof via this method, so this case should be treated carefully by
off-chain tooling, e.g. to make sure a tree has at least 2 leafs._

```solidity
function claimRewardsStETH(
uint256 nodeOperatorId,
Expand Down Expand Up @@ -367,9 +362,6 @@ Claim full reward (fee + bond) in wstETH for the given Node Operator available f

_Called by CSM exclusively_

_It's impossible to use single-leaf proof via this method, so this case should be treated carefully by
off-chain tooling, e.g. to make sure a tree has at least 2 leafs._

```solidity
function claimRewardsWstETH(
uint256 nodeOperatorId,
Expand Down Expand Up @@ -397,11 +389,6 @@ Request full reward (fee + bond) in Withdrawal NFT (unstETH) for the given Node

_Reverts if amount isn't between `MIN_STETH_WITHDRAWAL_AMOUNT` and `MAX_STETH_WITHDRAWAL_AMOUNT`_

_Called by CSM exclusively_

_It's impossible to use single-leaf proof via this method, so this case should be treated carefully by
off-chain tooling, e.g. to make sure a tree has at least 2 leafs._

```solidity
function claimRewardsUnstETH(
uint256 nodeOperatorId,
Expand Down Expand Up @@ -460,6 +447,8 @@ function releaseLockedBondETH(uint256 nodeOperatorId, uint256 amount) external o

Compensate locked bond ETH for the given Node Operator

_Called by CSM exclusively_

```solidity
function compensateLockedBondETH(uint256 nodeOperatorId) external payable onlyCSM;
```
Expand Down Expand Up @@ -544,18 +533,18 @@ function pullFeeRewards(

### recoverERC20

Recover ERC20 tokens from the contract
_Allows sender to recover ERC20 tokens held by the contract_

```solidity
function recoverERC20(address token, uint256 amount) external override;
```

**Parameters**

| Name | Type | Description |
| -------- | --------- | ------------------------------------- |
| `token` | `address` | Address of the ERC20 token to recover |
| `amount` | `uint256` | Amount of the ERC20 token to recover |
| Name | Type | Description |
| -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token` | `address` | The address of the ERC20 token to recover |
| `amount` | `uint256` | The amount of the ERC20 token to recover Emits an ERC20Recovered event upon success Optionally, the inheriting contract can override this function to add additional restrictions |

### recoverStETHShares

Expand Down Expand Up @@ -717,7 +706,7 @@ function getBondAmountByKeysCountWstETH(

### getBondAmountByKeysCountWstETH

Get the bond amount in wstETH required for the `keysCount` keys using the custom bond curve
Get the bond amount in wstETH required for the `keysCount` keys using the default bond curve

```solidity
function getBondAmountByKeysCountWstETH(
Expand All @@ -728,10 +717,10 @@ function getBondAmountByKeysCountWstETH(

**Parameters**

| Name | Type | Description |
| ----------- | ----------- | ---------------------------------------------------------------------------------------------------------- |
| `keysCount` | `uint256` | Keys count to calculate the required bond amount |
| `curve` | `BondCurve` | Bond curve definition. Use CSBondCurve.getBondCurve(id) method to get the definition for the exiting curve |
| Name | Type | Description |
| ----------- | ----------- | ------------------------------------------------ |
| `keysCount` | `uint256` | Keys count to calculate the required bond amount |
| `curve` | `BondCurve` | |

**Returns**

Expand Down Expand Up @@ -813,61 +802,3 @@ function _onlyExistingNodeOperator(uint256 nodeOperatorId) internal view;
```solidity
function _setChargePenaltyRecipient(address _chargePenaltyRecipient) private;
```

## Events

### BondLockCompensated

```solidity
event BondLockCompensated(uint256 indexed nodeOperatorId, uint256 amount);
```

### ChargePenaltyRecipientSet

```solidity
event ChargePenaltyRecipientSet(address chargePenaltyRecipient);
```

## Errors

### SenderIsNotCSM

```solidity
error SenderIsNotCSM();
```

### ZeroModuleAddress

```solidity
error ZeroModuleAddress();
```

### ZeroAdminAddress

```solidity
error ZeroAdminAddress();
```

### ZeroFeeDistributorAddress

```solidity
error ZeroFeeDistributorAddress();
```

### ZeroChargePenaltyRecipientAddress

```solidity
error ZeroChargePenaltyRecipientAddress();
```

### NodeOperatorDoesNotExist

```solidity
error NodeOperatorDoesNotExist();
```

### ElRewardsVaultReceiveFailed

```solidity
error ElRewardsVaultReceiveFailed();
```
48 changes: 1 addition & 47 deletions docs/src/src/CSEarlyAdoption.sol/contract.CSEarlyAdoption.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CSEarlyAdoption

[Git Source](https://github.com/lidofinance/community-staking-module/blob/ed13582ed87bf90a004e225eef6ca845b31d396d/src/CSEarlyAdoption.sol)
[Git Source](https://github.com/lidofinance/community-staking-module/blob/0b0bb7587ba6d1013df8c40d056611687a557a0a/src/CSEarlyAdoption.sol)

**Inherits:**
[ICSEarlyAdoption](/src/interfaces/ICSEarlyAdoption.sol/interface.ICSEarlyAdoption.md)
Expand Down Expand Up @@ -124,49 +124,3 @@ function hashLeaf(address member) public pure returns (bytes32);
| Name | Type | Description |
| -------- | --------- | ---------------- |
| `<none>` | `bytes32` | Hash of the leaf |

## Events

### Consumed

```solidity
event Consumed(address indexed member);
```

## Errors

### InvalidProof

```solidity
error InvalidProof();
```

### AlreadyConsumed

```solidity
error AlreadyConsumed();
```

### InvalidTreeRoot

```solidity
error InvalidTreeRoot();
```

### InvalidCurveId

```solidity
error InvalidCurveId();
```

### ZeroModuleAddress

```solidity
error ZeroModuleAddress();
```

### SenderIsNotModule

```solidity
error SenderIsNotModule();
```
Loading

0 comments on commit 7db03d8

Please sign in to comment.