From 3a66f184e3b5f2d4ea15c209e8ef7b1f9564a0df Mon Sep 17 00:00:00 2001 From: zugdev Date: Thu, 19 Sep 2024 13:12:22 -0300 Subject: [PATCH] chore: comments --- packages/contracts/src/dollar/amo/AaveAmo.sol | 12 +++---- .../src/dollar/core/UbiquityAmoMinter.sol | 32 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/contracts/src/dollar/amo/AaveAmo.sol b/packages/contracts/src/dollar/amo/AaveAmo.sol index a66e2e05c..68896c2fa 100644 --- a/packages/contracts/src/dollar/amo/AaveAmo.sol +++ b/packages/contracts/src/dollar/amo/AaveAmo.sol @@ -11,13 +11,13 @@ import {IRewardsController} from "@aavev3-periphery/contracts/rewards/interfaces /** * @title AaveAmo - * @notice Amo to interact with Aave V3 and manage rewards and borrowing mechanisms. - * @notice Can receive collateral from Ubiquity Amo minter and interact with Aave's V3 pool. + * @notice AMO to interact with Aave V3 and manage rewards and borrowing mechanisms. + * @notice Can receive collateral from UbiquityAmoMinter and interact with Aave's V3 pool. */ contract AaveAmo is Ownable { using SafeERC20 for ERC20; - /// @notice Ubiquity Amo minter instance + /// @notice UbiquityAmoMinter instance UbiquityAmoMinter public amoMinter; /// @notice Aave V3 pool instance @@ -180,7 +180,7 @@ contract AaveAmo is Ownable { /* ========== RESTRICTED GOVERNANCE FUNCTIONS ========== */ /** - * @notice Returns collateral back to the Amo minter + * @notice Returns collateral back to the AMO minter * @param collateralAmount Amount of collateral to return */ function returnCollateralToMinter( @@ -200,8 +200,8 @@ contract AaveAmo is Ownable { } /** - * @notice Sets the Amo minter address - * @param _amoMinterAddress New address of the Amo minter + * @notice Sets the AMO minter address + * @param _amoMinterAddress New address of the AMO minter */ function setAmoMinter(address _amoMinterAddress) external onlyOwner { amoMinter = UbiquityAmoMinter(_amoMinterAddress); diff --git a/packages/contracts/src/dollar/core/UbiquityAmoMinter.sol b/packages/contracts/src/dollar/core/UbiquityAmoMinter.sol index f60d5e903..9f37a044e 100644 --- a/packages/contracts/src/dollar/core/UbiquityAmoMinter.sol +++ b/packages/contracts/src/dollar/core/UbiquityAmoMinter.sol @@ -8,14 +8,14 @@ import {IUbiquityPool} from "../interfaces/IUbiquityPool.sol"; /** * @title UbiquityAmoMinter - * @notice Contract responsible for managing collateral borrowing from Ubiquity's Pool for Amo. - * @notice Allows owner to move Dollar collateral to Amos, enabling yield generation. + * @notice Contract responsible for managing collateral borrowing from Ubiquity's Pool to AMOs. + * @notice Allows owner to move Dollar collateral to AMOs, enabling yield generation. * @notice It keeps track of borrowed collateral balances per Amo and the total borrowed sum. */ contract UbiquityAmoMinter is Ownable { using SafeERC20 for ERC20; - /// @notice Collateral token used by the Amo minter + /// @notice Collateral token used by the AMO minter ERC20 public immutable collateralToken; /// @notice Ubiquity pool interface @@ -27,13 +27,13 @@ contract UbiquityAmoMinter is Ownable { uint256 public immutable missingDecimals; int256 public collateralBorrowCap = int256(100_000e18); - /// @notice Mapping for tracking borrowed collateral balances per Amo + /// @notice Mapping for tracking borrowed collateral balances per AMO mapping(address => int256) public collateralBorrowedBalances; /// @notice Sum of all collateral borrowed across Amos int256 public collateralTotalBorrowedBalance = 0; - /// @notice Mapping to track active Amos + /// @notice Mapping to track active AMOs mapping(address => bool) public Amos; /* ========== CONSTRUCTOR ========== */ @@ -73,27 +73,27 @@ contract UbiquityAmoMinter is Ownable { /* ========== MODIFIERS ========== */ /** - * @notice Ensures the caller is a valid Amo - * @param amoAddress Address of the Amo to check + * @notice Ensures the caller is a valid AMO + * @param amoAddress Address of the AMO to check */ modifier validAmo(address amoAddress) { require(Amos[amoAddress], "Invalid Amo"); _; } - /* ========== Amo MANAGEMENT FUNCTIONS ========== */ + /* ========== AMO MANAGEMENT FUNCTIONS ========== */ /** - * @notice Enables an Amo - * @param amo Address of the Amo to enable + * @notice Enables an AMO + * @param amo Address of the AMO to enable */ function enableAmo(address amo) external onlyOwner { Amos[amo] = true; } /** - * @notice Disables an Amo - * @param amo Address of the Amo to disable + * @notice Disables an AMO + * @param amo Address of the AMO to disable */ function disableAmo(address amo) external onlyOwner { Amos[amo] = false; @@ -102,8 +102,8 @@ contract UbiquityAmoMinter is Ownable { /* ========== COLLATERAL FUNCTIONS ========== */ /** - * @notice Transfers collateral to the specified Amo - * @param destinationAmo Address of the Amo to receive collateral + * @notice Transfers collateral to the specified AMO + * @param destinationAmo Address of the AMO to receive collateral * @param collateralAmount Amount of collateral to transfer */ function giveCollateralToAmo( @@ -129,14 +129,14 @@ contract UbiquityAmoMinter is Ownable { // Borrow collateral from the pool pool.amoMinterBorrow(collateralAmount); - // Transfer collateral to the Amo + // Transfer collateral to the AMO collateralToken.safeTransfer(destinationAmo, collateralAmount); emit CollateralGivenToAmo(destinationAmo, collateralAmount); } /** - * @notice Receives collateral back from an Amo + * @notice Receives collateral back from an AMO * @param collateralAmount Amount of collateral being returned */ function receiveCollateralFromAmo(