updated aave v3 addr, added flashloan fee in events, changed solidity version

This commit is contained in:
bhavik-m 2022-03-11 01:40:00 +05:30
parent c04011e8ba
commit ca187d5fe5
12 changed files with 42 additions and 46 deletions

View File

@ -1,4 +1,4 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
contract Events {
@ -7,6 +7,7 @@ contract Events {
address[] ctokens,
string[] supplyIds,
string[] borrowIds,
uint256[] flashLoanFees,
uint256[] supplyAmts,
uint256[] borrowAmts
);

View File

@ -1,9 +1,8 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
import { DSMath } from "../../../common/math.sol";
import { Basic } from "../../../common/basic.sol";
import { TokenInterface, AccountInterface } from "../../../common/interfaces.sol";
import { AaveInterface, AaveLendingPoolProviderInterface, AaveDataProviderInterface } from "./interface.sol";
import { AaveInterface, AavePoolProviderInterface, AaveDataProviderInterface } from "./interface.sol";
import "./events.sol";
import "./interface.sol";
@ -14,18 +13,16 @@ abstract contract Helper is DSMath, Basic {
uint16 internal constant referalCode = 3228;
/**
* @dev Aave Lending Pool Provider
* @dev Aave Pool Provider
*/
AaveLendingPoolProviderInterface internal constant aaveProvider =
AaveLendingPoolProviderInterface(
0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5 // v2 address TODO: need to update this
);
AavePoolProviderInterface internal constant aaveProvider =
AavePoolProviderInterface(0x7013523049CeC8b06F594edb8c5fb7F232c0Df7C);
/**
* @dev Aave Protocol Data Provider
*/
AaveDataProviderInterface internal constant aaveData =
AaveDataProviderInterface(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d); // TODO: need to update this
AaveDataProviderInterface(0x44C7324E9d84D6534DD6f292Cc08f1816e45Ff6e);
function getIsColl(address token, address user)
internal

View File

@ -1,7 +1,7 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
interface AaveInterface {
function deposit(
function supply(
address _asset,
uint256 _amount,
address _onBehalfOf,
@ -56,7 +56,7 @@ interface ATokenInterface {
function allowance(address, address) external returns (uint256);
}
interface AaveLendingPoolProviderInterface {
interface AavePoolProviderInterface {
function getPool() external view returns (address);
}

View File

@ -1,4 +1,4 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
/**
* @title Aave v3 import connector .

View File

@ -1,4 +1,4 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
contract Events {
@ -7,6 +7,7 @@ contract Events {
address[] ctokens,
string[] supplyIds,
string[] borrowIds,
uint256[] flashLoanFees,
uint256[] supplyAmts,
uint256[] borrowAmts
);

View File

@ -1,9 +1,9 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
import { DSMath } from "../../../common/math.sol";
import { Basic } from "../../../common/basic.sol";
import { TokenInterface, AccountInterface } from "../../../common/interfaces.sol";
import { AaveInterface, AaveLendingPoolProviderInterface, AaveDataProviderInterface } from "./interface.sol";
import { AaveInterface, AavePoolProviderInterface, AaveDataProviderInterface } from "./interface.sol";
import "./events.sol";
import "./interface.sol";
@ -16,16 +16,14 @@ abstract contract Helper is DSMath, Basic {
/**
* @dev Aave Lending Pool Provider
*/
AaveLendingPoolProviderInterface internal constant aaveProvider =
AaveLendingPoolProviderInterface(
0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5 // v2 address TODO: need to update this
);
AavePoolProviderInterface internal constant aaveProvider =
AavePoolProviderInterface(0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5);
/**
* @dev Aave Protocol Data Provider
*/
AaveDataProviderInterface internal constant aaveData =
AaveDataProviderInterface(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d); // TODO: need to update this
AaveDataProviderInterface(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d);
function getIsColl(address token, address user)
internal

View File

@ -1,11 +1,11 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
interface AaveInterface {
function deposit(
address _asset,
uint256 _amount,
address _onBehalfOf,
uint16 _referralCode
function supply(
address asset,
uint256 amount,
address onBehalfOf,
uint16 referralCode
) external;
function withdraw(
@ -56,7 +56,7 @@ interface ATokenInterface {
function allowance(address, address) external returns (uint256);
}
interface AaveLendingPoolProviderInterface {
interface AavePoolProviderInterface {
function getPool() external view returns (address);
}

View File

@ -1,4 +1,4 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
/**
* @title Aave v3 import connector .

View File

@ -1,4 +1,4 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
contract Events {
@ -7,6 +7,7 @@ contract Events {
address[] ctokens,
string[] supplyIds,
string[] borrowIds,
uint256[] flashLoanFees,
uint256[] supplyAmts,
uint256[] borrowAmts
);

View File

@ -1,9 +1,9 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
import { DSMath } from "../../../common/math.sol";
import { Basic } from "../../../common/basic.sol";
import { TokenInterface, AccountInterface } from "../../../common/interfaces.sol";
import { AaveInterface, AaveLendingPoolProviderInterface, AaveDataProviderInterface } from "./interface.sol";
import { AaveInterface, AavePoolProviderInterface, AaveDataProviderInterface } from "./interface.sol";
import "./events.sol";
import "./interface.sol";
@ -16,16 +16,14 @@ abstract contract Helper is DSMath, Basic {
/**
* @dev Aave Lending Pool Provider
*/
AaveLendingPoolProviderInterface internal constant aaveProvider =
AaveLendingPoolProviderInterface(
0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5 // v2 address TODO: need to update this
);
AavePoolProviderInterface internal constant aaveProvider =
AavePoolProviderInterface(0x7013523049CeC8b06F594edb8c5fb7F232c0Df7C);
/**
* @dev Aave Protocol Data Provider
*/
AaveDataProviderInterface internal constant aaveData =
AaveDataProviderInterface(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d); // TODO: need to update this
AaveDataProviderInterface(0x44C7324E9d84D6534DD6f292Cc08f1816e45Ff6e);
function getIsColl(address token, address user)
internal

View File

@ -1,11 +1,11 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
interface AaveInterface {
function deposit(
address _asset,
uint256 _amount,
address _onBehalfOf,
uint16 _referralCode
function supply(
address asset,
uint256 amount,
address onBehalfOf,
uint16 referralCode
) external;
function withdraw(
@ -56,7 +56,7 @@ interface ATokenInterface {
function allowance(address, address) external returns (uint256);
}
interface AaveLendingPoolProviderInterface {
interface AavePoolProviderInterface {
function getPool() external view returns (address);
}

View File

@ -1,4 +1,4 @@
pragma solidity ^0.8.6;
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
/**
* @title Aave v3 import connector .