dsa-polygon-migration/contracts/senders/aave-v2/helpers.sol
2021-04-01 15:32:46 +05:30

36 lines
1.2 KiB
Solidity

pragma solidity ^0.7.0;
import { DSMath } from "../../common/math.sol";
import { Stores } from "../../common/stores.sol";
import { AaveLendingPoolProviderInterface, AaveDataProviderInterface, StateSenderInterface } from "./interfaces.sol";
abstract contract Helpers is DSMath, Stores {
/**
* @dev Aave referal code
*/
uint16 constant internal referalCode = 3228;
address constant internal fundLocker = address(1); // Replace this
address constant internal polygonReceiver = address(2); // Replace this
/**
* @dev Aave Provider
*/
AaveLendingPoolProviderInterface constant internal aaveProvider = AaveLendingPoolProviderInterface(0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5);
/**
* @dev Aave Data Provider
*/
AaveDataProviderInterface constant internal aaveData = AaveDataProviderInterface(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d);
/**
* @dev Polygon State Sender
*/
StateSenderInterface constant internal stateSender = StateSenderInterface(0x28e4F3a7f651294B9564800b2D01f35189A5bFbE);
function getIsColl(address token, address user) internal view returns (bool isCol) {
(, , , , , , , , isCol) = aaveData.getUserReserveData(token, user);
}
}