Skip to content

Commit

Permalink
docs: auto generate NATSPEC docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 3, 2024
1 parent 386de2a commit 20799be
Show file tree
Hide file tree
Showing 109 changed files with 1,011 additions and 99 deletions.
6 changes: 6 additions & 0 deletions packages/contracts/docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
- [❱ dollar](src/dollar/README.md)
- [❱ access](src/dollar/access/README.md)
- [AccessControlInternal](src/dollar/access/AccessControlInternal.sol/abstract.AccessControlInternal.md)
- [❱ amo](src/dollar/amo/README.md)
- [AaveAmo](src/dollar/amo/AaveAmo.sol/contract.AaveAmo.md)
- [❱ core](src/dollar/core/README.md)
- [CreditNft](src/dollar/core/CreditNft.sol/contract.CreditNft.md)
- [ERC1155Ubiquity](src/dollar/core/ERC1155Ubiquity.sol/abstract.ERC1155Ubiquity.md)
- [ERC20Ubiquity](src/dollar/core/ERC20Ubiquity.sol/abstract.ERC20Ubiquity.md)
- [StakingShare](src/dollar/core/StakingShare.sol/contract.StakingShare.md)
- [UbiquityAmoMinter](src/dollar/core/UbiquityAmoMinter.sol/contract.UbiquityAmoMinter.md)
- [UbiquityCreditToken](src/dollar/core/UbiquityCreditToken.sol/contract.UbiquityCreditToken.md)
- [UbiquityDollarToken](src/dollar/core/UbiquityDollarToken.sol/contract.UbiquityDollarToken.md)
- [UbiquityGovernanceToken](src/dollar/core/UbiquityGovernanceToken.sol/contract.UbiquityGovernanceToken.md)
Expand All @@ -35,7 +38,9 @@
- [❱ interfaces](src/dollar/interfaces/README.md)
- [❱ utils](src/dollar/interfaces/utils/README.md)
- [ICollectableDust](src/dollar/interfaces/utils/ICollectableDust.sol/interface.ICollectableDust.md)
- [IAaveAmo](src/dollar/interfaces/IAaveAmo.sol/interface.IAaveAmo.md)
- [IAccessControl](src/dollar/interfaces/IAccessControl.sol/interface.IAccessControl.md)
- [IAmo](src/dollar/interfaces/IAmo.sol/interface.IAmo.md)
- [IBondingCurve](src/dollar/interfaces/IBondingCurve.sol/interface.IBondingCurve.md)
- [ICreditNft](src/dollar/interfaces/ICreditNft.sol/interface.ICreditNft.md)
- [ICreditNftManager](src/dollar/interfaces/ICreditNftManager.sol/interface.ICreditNftManager.md)
Expand All @@ -58,6 +63,7 @@
- [IStableSwap3Pool](src/dollar/interfaces/IStableSwap3Pool.sol/interface.IStableSwap3Pool.md)
- [IStaking](src/dollar/interfaces/IStaking.sol/interface.IStaking.md)
- [IStakingShare](src/dollar/interfaces/IStakingShare.sol/interface.IStakingShare.md)
- [IUbiquityAmoMinter](src/dollar/interfaces/IUbiquityAmoMinter.sol/interface.IUbiquityAmoMinter.md)
- [IUbiquityChef](src/dollar/interfaces/IUbiquityChef.sol/interface.IUbiquityChef.md)
- [IUbiquityDollarManager](src/dollar/interfaces/IUbiquityDollarManager.sol/interface.IUbiquityDollarManager.md)
- [IUbiquityDollarToken](src/dollar/interfaces/IUbiquityDollarToken.sol/interface.IUbiquityDollarToken.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Diamond
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/c8e4c35e03024dbea12740d3dfedc8e8a0bad6a8/src/dollar/Diamond.sol)
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/386de2abb8d1171ab47c0b149dede7c48631259f/src/dollar/Diamond.sol)

Contract that implements diamond proxy pattern

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DiamondArgs
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/c8e4c35e03024dbea12740d3dfedc8e8a0bad6a8/src/dollar/Diamond.sol)
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/386de2abb8d1171ab47c0b149dede7c48631259f/src/dollar/Diamond.sol)

Struct used for `Diamond` constructor args

Expand Down
1 change: 1 addition & 0 deletions packages/contracts/docs/src/src/dollar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Contents
- [access](/src/dollar/access)
- [amo](/src/dollar/amo)
- [core](/src/dollar/core)
- [facets](/src/dollar/facets)
- [interfaces](/src/dollar/interfaces)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# AccessControlInternal
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/c8e4c35e03024dbea12740d3dfedc8e8a0bad6a8/src/dollar/access/AccessControlInternal.sol)
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/386de2abb8d1171ab47c0b149dede7c48631259f/src/dollar/access/AccessControlInternal.sol)

Role-based access control system

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
# AaveAmo
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/386de2abb8d1171ab47c0b149dede7c48631259f/src/dollar/amo/AaveAmo.sol)

**Inherits:**
[IAmo](/src/dollar/interfaces/IAmo.sol/interface.IAmo.md), Ownable

AMO to interact with Aave V3: supply and manage rewards.

Can receive collateral from UbiquityAmoMinter and interact with Aave's V3 pool.


## State Variables
### amoMinter
UbiquityAmoMinter instance


```solidity
UbiquityAmoMinter public amoMinter;
```


### aavePool
Aave V3 pool instance


```solidity
IPool public immutable aavePool;
```


### aaveRewardsController
Aave rewards controller


```solidity
IRewardsController public immutable aaveRewardsController;
```


## Functions
### constructor

Initializes the contract with necessary parameters


```solidity
constructor(address _ownerAddress, address _amoMinterAddress, address _aavePool, address _aaveRewardsController);
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`_ownerAddress`|`address`|Address of the contract owner|
|`_amoMinterAddress`|`address`|Address of the Ubiquity Amo minter|
|`_aavePool`|`address`|Address of the Aave pool|
|`_aaveRewardsController`|`address`|Address of the Aave rewards controller|


### aaveDepositCollateral

Deposits collateral to Aave pool


```solidity
function aaveDepositCollateral(address collateralAddress, uint256 amount) public onlyOwner;
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`collateralAddress`|`address`|Address of the collateral ERC20|
|`amount`|`uint256`|Amount of collateral to deposit|


### aaveWithdrawCollateral

Withdraws collateral from Aave pool


```solidity
function aaveWithdrawCollateral(address collateralAddress, uint256 aTokenAmount) public onlyOwner;
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`collateralAddress`|`address`|Address of the collateral ERC20|
|`aTokenAmount`|`uint256`|Amount of collateral to withdraw|


### claimAllRewards

Claims all rewards available from the list of assets provided, will fail if balance on asset is zero


```solidity
function claimAllRewards(address[] memory assets) external;
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`assets`|`address[]`|Array of aTokens/sTokens/vTokens addresses to claim rewards from|


### returnCollateralToMinter

Returns collateral back to the AMO minter


```solidity
function returnCollateralToMinter(uint256 collateralAmount) public override onlyOwner;
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`collateralAmount`|`uint256`|Amount of collateral to return, pass 0 to return all collateral|


### setAmoMinter

Sets the AMO minter address


```solidity
function setAmoMinter(address _amoMinterAddress) external override onlyOwner;
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`_amoMinterAddress`|`address`|New address of the AMO minter|


### recoverERC20

Recovers any ERC20 tokens held by the contract


```solidity
function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner;
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`tokenAddress`|`address`|Address of the token to recover|
|`tokenAmount`|`uint256`|Amount of tokens to recover|


### execute

Executes arbitrary calls from this contract


```solidity
function execute(address _to, uint256 _value, bytes calldata _data) external onlyOwner returns (bool, bytes memory);
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`_to`|`address`|Address to call|
|`_value`|`uint256`|Value to send|
|`_data`|`bytes`|Data to execute|

**Returns**

|Name|Type|Description|
|----|----|-----------|
|`<none>`|`bool`|success, result Returns whether the call succeeded and the returned data|
|`<none>`|`bytes`||


## Events
### CollateralDeposited

```solidity
event CollateralDeposited(address indexed collateralAddress, uint256 amount);
```

### CollateralWithdrawn

```solidity
event CollateralWithdrawn(address indexed collateralAddress, uint256 amount);
```

### CollateralReturnedToMinter

```solidity
event CollateralReturnedToMinter(uint256 amount);
```

### RewardsClaimed

```solidity
event RewardsClaimed();
```

### AmoMinterSet

```solidity
event AmoMinterSet(address indexed newMinter);
```

### ERC20Recovered

```solidity
event ERC20Recovered(address tokenAddress, uint256 tokenAmount);
```

### ExecuteCalled

```solidity
event ExecuteCalled(address indexed to, uint256 value, bytes data);
```

4 changes: 4 additions & 0 deletions packages/contracts/docs/src/src/dollar/amo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@


# Contents
- [AaveAmo](AaveAmo.sol/contract.AaveAmo.md)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# CreditNft
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/c8e4c35e03024dbea12740d3dfedc8e8a0bad6a8/src/dollar/core/CreditNft.sol)
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/386de2abb8d1171ab47c0b149dede7c48631259f/src/dollar/core/CreditNft.sol)

**Inherits:**
[ERC1155Ubiquity](/src/dollar/core/ERC1155Ubiquity.sol/abstract.ERC1155Ubiquity.md), [ICreditNft](/src/dollar/interfaces/ICreditNft.sol/interface.ICreditNft.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ERC1155Ubiquity
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/c8e4c35e03024dbea12740d3dfedc8e8a0bad6a8/src/dollar/core/ERC1155Ubiquity.sol)
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/386de2abb8d1171ab47c0b149dede7c48631259f/src/dollar/core/ERC1155Ubiquity.sol)

**Inherits:**
Initializable, ERC1155BurnableUpgradeable, ERC1155PausableUpgradeable, UUPSUpgradeable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ERC20Ubiquity
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/c8e4c35e03024dbea12740d3dfedc8e8a0bad6a8/src/dollar/core/ERC20Ubiquity.sol)
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/386de2abb8d1171ab47c0b149dede7c48631259f/src/dollar/core/ERC20Ubiquity.sol)

**Inherits:**
Initializable, UUPSUpgradeable, ERC20Upgradeable, ERC20PermitUpgradeable, ERC20PausableUpgradeable
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/docs/src/src/dollar/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [ERC1155Ubiquity](ERC1155Ubiquity.sol/abstract.ERC1155Ubiquity.md)
- [ERC20Ubiquity](ERC20Ubiquity.sol/abstract.ERC20Ubiquity.md)
- [StakingShare](StakingShare.sol/contract.StakingShare.md)
- [UbiquityAmoMinter](UbiquityAmoMinter.sol/contract.UbiquityAmoMinter.md)
- [UbiquityCreditToken](UbiquityCreditToken.sol/contract.UbiquityCreditToken.md)
- [UbiquityDollarToken](UbiquityDollarToken.sol/contract.UbiquityDollarToken.md)
- [UbiquityGovernanceToken](UbiquityGovernanceToken.sol/contract.UbiquityGovernanceToken.md)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# StakingShare
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/c8e4c35e03024dbea12740d3dfedc8e8a0bad6a8/src/dollar/core/StakingShare.sol)
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/386de2abb8d1171ab47c0b149dede7c48631259f/src/dollar/core/StakingShare.sol)

**Inherits:**
[ERC1155Ubiquity](/src/dollar/core/ERC1155Ubiquity.sol/abstract.ERC1155Ubiquity.md), ERC1155URIStorageUpgradeable
Expand Down
Loading

0 comments on commit 20799be

Please sign in to comment.