Skip to content

Commit

Permalink
start working on making pool upgradeable
Browse files Browse the repository at this point in the history
  • Loading branch information
adelowo committed May 11, 2024
1 parent 4801257 commit 8fabe33
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Pool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ pragma solidity >=0.8.23;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "forge-std/console.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import "./interfaces/Configuration.sol";
import "./interfaces/Vault.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import {ReentrancyGuardUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
import {PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";

event Deposit(address indexed from, address indexed token, uint256 amount);
event Withdraw(address indexed from, address indexed token, uint256 amount);
event Forward(address indexed from, address indexed recipient, address indexed token, uint256 amount);

contract Pool is Ownable(msg.sender), ReentrancyGuard, Pausable {
contract Pool is Initializable, OwnableUpgradeable , ReentrancyGuardUpgradeable, PausableUpgradeable {

using Math for uint256;

Expand Down Expand Up @@ -54,10 +57,7 @@ contract Pool is Ownable(msg.sender), ReentrancyGuard, Pausable {

Configuration _config;


constructor(uint256 _feePercentage, address _aavePool,
address _configuration,
address _nativeGateway) {
function initialize(uint256 _feePercentage, address _aavePool, address _configuration, address _nativeGateway) initializer public {

require(address(_aavePool) != address(0), "Aave pool vault cannot be a zero address");
require(address(_configuration) != address(0), "Configurator address cannot be a zero address");
Expand Down

0 comments on commit 8fabe33

Please sign in to comment.