Skip to content

Commit

Permalink
fix: Add minimal comments to PoolBaseLogic and PoolHelperLogic
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Aug 2, 2021
1 parent dee8fe5 commit 68e077b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
17 changes: 8 additions & 9 deletions contracts/protocol/libraries/logic/PoolBaseLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,29 @@ pragma solidity 0.8.6;

import {IStableDebtToken} from '../../../interfaces/IStableDebtToken.sol';
import {IVariableDebtToken} from '../../../interfaces/IVariableDebtToken.sol';

import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';
import {IAToken} from '../../../interfaces/IAToken.sol';

import {SafeERC20} from '../../../dependencies/openzeppelin/contracts/SafeERC20.sol';

import {ValidationLogic} from './ValidationLogic.sol';
import {ReserveLogic} from './ReserveLogic.sol';

import {Helpers} from '../helpers/Helpers.sol';

import {UserConfiguration} from './../configuration/UserConfiguration.sol';

import {DataTypes} from '../types/DataTypes.sol';

import {ValidationLogic} from './ValidationLogic.sol';
import {ReserveLogic} from './ReserveLogic.sol';
import {WadRayMath} from '../math/WadRayMath.sol';

/**
* @title PoolBaseLogic library
* @author Aave
* @notice Implements the base logic for the POOL
*/
library PoolBaseLogic {
using ReserveLogic for DataTypes.ReserveCache;
using ReserveLogic for DataTypes.ReserveData;
using SafeERC20 for IERC20;
using UserConfiguration for DataTypes.UserConfigurationMap;
using WadRayMath for uint256;

// See `IPool` for descriptions
event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);
event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);
event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);
Expand Down
12 changes: 8 additions & 4 deletions contracts/protocol/libraries/logic/PoolHelperLogic.sol
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.6;

import {IStableDebtToken} from '../../../interfaces/IStableDebtToken.sol';
import {IVariableDebtToken} from '../../../interfaces/IVariableDebtToken.sol';
import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';
import {SafeERC20} from '../../../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {Helpers} from '../helpers/Helpers.sol';
import {ValidationLogic} from './ValidationLogic.sol';
import {ReserveLogic} from './ReserveLogic.sol';
import {DataTypes} from './../types/DataTypes.sol';

import {IStableDebtToken} from '../../../interfaces/IStableDebtToken.sol';
import {IVariableDebtToken} from '../../../interfaces/IVariableDebtToken.sol';

import {UserConfiguration} from './../configuration/UserConfiguration.sol';

/**
* @title PoolHelperLogic library
* @author Aave
* @notice Implements the helper logic for the POOL
*/
library PoolHelperLogic {
using ReserveLogic for DataTypes.ReserveCache;
using ReserveLogic for DataTypes.ReserveData;
using UserConfiguration for DataTypes.UserConfigurationMap;
using SafeERC20 for IERC20;

// See `IPool` for descriptions
event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);
event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);
event RebalanceStableBorrowRate(address indexed reserve, address indexed user);
Expand Down

0 comments on commit 68e077b

Please sign in to comment.