2020-05-29 16:45:37 +00:00
|
|
|
// SPDX-License-Identifier: agpl-3.0
|
2020-11-20 10:45:20 +00:00
|
|
|
pragma solidity 0.6.12;
|
2020-05-29 16:45:37 +00:00
|
|
|
|
2020-10-15 13:25:27 +00:00
|
|
|
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
|
|
|
|
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
|
2020-11-27 14:15:05 +00:00
|
|
|
import {SafeERC20} from '../../dependencies/openzeppelin/contracts/SafeERC20.sol';
|
2020-08-20 10:44:51 +00:00
|
|
|
import {IFlashLoanReceiver} from '../interfaces/IFlashLoanReceiver.sol';
|
|
|
|
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
|
2020-11-27 14:15:05 +00:00
|
|
|
import {ILendingPool} from '../../interfaces/ILendingPool.sol';
|
2020-05-29 16:45:37 +00:00
|
|
|
|
|
|
|
abstract contract FlashLoanReceiverBase is IFlashLoanReceiver {
|
2020-08-12 17:36:58 +00:00
|
|
|
using SafeERC20 for IERC20;
|
2020-07-13 08:54:08 +00:00
|
|
|
using SafeMath for uint256;
|
2020-05-29 16:45:37 +00:00
|
|
|
|
2020-11-30 11:02:34 +00:00
|
|
|
ILendingPoolAddressesProvider public immutable override ADDRESSES_PROVIDER;
|
|
|
|
ILendingPool public immutable override LENDING_POOL;
|
2020-05-29 16:45:37 +00:00
|
|
|
|
2020-08-21 14:03:01 +00:00
|
|
|
constructor(ILendingPoolAddressesProvider provider) public {
|
2020-11-30 11:02:34 +00:00
|
|
|
ADDRESSES_PROVIDER = provider;
|
|
|
|
LENDING_POOL = ILendingPool(provider.getLendingPool());
|
2020-11-27 14:15:05 +00:00
|
|
|
}
|
2020-06-02 14:16:22 +00:00
|
|
|
}
|