Skip to content

Instantly share code, notes, and snippets.

@Mobey-eth
Created January 20, 2023 10:59
Show Gist options
  • Save Mobey-eth/bb6f1c0f7d0fbfcc3b4111c62c9a46d8 to your computer and use it in GitHub Desktop.
Save Mobey-eth/bb6f1c0f7d0fbfcc3b4111c62c9a46d8 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.17;
import {IFlashLoanReceiver, ILendingPoolAddressesProvider, ILendingPool, IERC20 } from "./Interfaces.sol";
import { SafeERC20, SafeMath } from "./Libraries.sol";
abstract contract FlashLoanReceiverBase is IFlashLoanReceiver {
using SafeERC20 for IERC20;
using SafeMath for uint256;
ILendingPoolAddressesProvider internal ADDRESSES_PROVIDER;
ILendingPool internal LENDING_POOL;
constructor(ILendingPoolAddressesProvider provider) {
ADDRESSES_PROVIDER = provider;
LENDING_POOL = ILendingPool(provider.getLendingPool());
}
receive() external payable {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment