mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
fix: merged with master
This commit is contained in:
commit
701c0793ce
37
.github/workflows/node.js.yml
vendored
Normal file
37
.github/workflows/node.js.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [14.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Test
|
||||||
|
run: npm run ci:test
|
||||||
|
# - name: Coverage
|
||||||
|
# run: npm run coverage
|
||||||
|
# - uses: codecov/codecov-action@v1
|
||||||
|
# with:
|
||||||
|
# fail_ci_if_error: true
|
|
@ -1,3 +1,5 @@
|
||||||
|
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
|
||||||
|
[![Build pass](https://github.com/AAVE/protocol-v2/actions/workflows/node.js.yml/badge.svg)](https://github.com/aave/protocol-v2/actions/workflows/node.js.yml)
|
||||||
```
|
```
|
||||||
.///. .///. //. .// `/////////////-
|
.///. .///. //. .// `/////////////-
|
||||||
`++:++` .++:++` :++` `++: `++:......---.`
|
`++:++` .++:++` :++` `++: `++:......---.`
|
||||||
|
@ -53,8 +55,8 @@ import {ILendingPool} from "@aave/protocol-v2/contracts/interfaces/ILendingPool.
|
||||||
|
|
||||||
contract Misc {
|
contract Misc {
|
||||||
|
|
||||||
function deposit(address pool, address token, address user, uint256 amount) {
|
function deposit(address pool, address token, address user, uint256 amount) public {
|
||||||
ILendingPool(pool).deposit(token, amount, user, '0');
|
ILendingPool(pool).deposit(token, amount, user, 0);
|
||||||
{...}
|
{...}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -99,4 +99,9 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {
|
||||||
* @dev Returns the address of the incentives controller contract
|
* @dev Returns the address of the incentives controller contract
|
||||||
**/
|
**/
|
||||||
function getIncentivesController() external view returns (IAaveIncentivesController);
|
function getIncentivesController() external view returns (IAaveIncentivesController);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dev Returns the address of the underlying asset of this aToken (E.g. WETH for aWETH)
|
||||||
|
**/
|
||||||
|
function UNDERLYING_ASSET_ADDRESS() external view returns (address);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ import {PercentageMath} from '../libraries/math/PercentageMath.sol';
|
||||||
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
|
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
|
||||||
import {ILendingRateOracle} from '../../interfaces/ILendingRateOracle.sol';
|
import {ILendingRateOracle} from '../../interfaces/ILendingRateOracle.sol';
|
||||||
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
|
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
|
||||||
import 'hardhat/console.sol';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title DefaultReserveInterestRateStrategy contract
|
* @title DefaultReserveInterestRateStrategy contract
|
||||||
|
|
|
@ -273,7 +273,7 @@ contract AToken is
|
||||||
/**
|
/**
|
||||||
* @dev Returns the address of the underlying asset of this aToken (E.g. WETH for aWETH)
|
* @dev Returns the address of the underlying asset of this aToken (E.g. WETH for aWETH)
|
||||||
**/
|
**/
|
||||||
function UNDERLYING_ASSET_ADDRESS() public view returns (address) {
|
function UNDERLYING_ASSET_ADDRESS() public override view returns (address) {
|
||||||
return _underlyingAsset;
|
return _underlyingAsset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ import 'temp-hardhat-etherscan';
|
||||||
import 'hardhat-gas-reporter';
|
import 'hardhat-gas-reporter';
|
||||||
import 'hardhat-typechain';
|
import 'hardhat-typechain';
|
||||||
import '@tenderly/hardhat-tenderly';
|
import '@tenderly/hardhat-tenderly';
|
||||||
|
import 'solidity-coverage';
|
||||||
|
|
||||||
const SKIP_LOAD = process.env.SKIP_LOAD === 'true';
|
const SKIP_LOAD = process.env.SKIP_LOAD === 'true';
|
||||||
const DEFAULT_BLOCK_GAS_LIMIT = 12450000;
|
const DEFAULT_BLOCK_GAS_LIMIT = 12450000;
|
||||||
|
@ -99,7 +100,7 @@ const buidlerConfig: HardhatUserConfig = {
|
||||||
mumbai: getCommonNetworkConfig(ePolygonNetwork.mumbai, 80001),
|
mumbai: getCommonNetworkConfig(ePolygonNetwork.mumbai, 80001),
|
||||||
xdai: getCommonNetworkConfig(eXDaiNetwork.xdai, 100),
|
xdai: getCommonNetworkConfig(eXDaiNetwork.xdai, 100),
|
||||||
hardhat: {
|
hardhat: {
|
||||||
hardfork: 'istanbul',
|
hardfork: 'berlin',
|
||||||
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
|
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
|
||||||
gas: DEFAULT_BLOCK_GAS_LIMIT,
|
gas: DEFAULT_BLOCK_GAS_LIMIT,
|
||||||
gasPrice: 8000000000,
|
gasPrice: 8000000000,
|
||||||
|
@ -113,7 +114,7 @@ const buidlerConfig: HardhatUserConfig = {
|
||||||
forking: mainnetFork,
|
forking: mainnetFork,
|
||||||
},
|
},
|
||||||
buidlerevm_docker: {
|
buidlerevm_docker: {
|
||||||
hardfork: 'istanbul',
|
hardfork: 'berlin',
|
||||||
blockGasLimit: 9500000,
|
blockGasLimit: 9500000,
|
||||||
gas: 9500000,
|
gas: 9500000,
|
||||||
gasPrice: 8000000000,
|
gasPrice: 8000000000,
|
||||||
|
|
3433
package-lock.json
generated
3433
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -11,7 +11,7 @@
|
||||||
"hardhat": "hardhat",
|
"hardhat": "hardhat",
|
||||||
"hardhat:kovan": "hardhat --network kovan",
|
"hardhat:kovan": "hardhat --network kovan",
|
||||||
"hardhat:tenderly-main": "hardhat --network tenderlyMain",
|
"hardhat:tenderly-main": "hardhat --network tenderlyMain",
|
||||||
"hardhat:ropsten": "hardhat--network ropsten",
|
"hardhat:ropsten": "hardhat --network ropsten",
|
||||||
"hardhat:main": "hardhat --network main",
|
"hardhat:main": "hardhat --network main",
|
||||||
"hardhat:docker": "hardhat --network hardhatevm_docker",
|
"hardhat:docker": "hardhat --network hardhatevm_docker",
|
||||||
"hardhat:mumbai": "hardhat --network mumbai",
|
"hardhat:mumbai": "hardhat --network mumbai",
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
"ethereumjs-util": "7.0.2",
|
"ethereumjs-util": "7.0.2",
|
||||||
"ethers": "^5.0.19",
|
"ethers": "^5.0.19",
|
||||||
"globby": "^11.0.1",
|
"globby": "^11.0.1",
|
||||||
"hardhat": "^2.0.8",
|
"hardhat": "^2.2.0",
|
||||||
"hardhat-gas-reporter": "^1.0.0",
|
"hardhat-gas-reporter": "^1.0.0",
|
||||||
"hardhat-typechain": "^0.3.3",
|
"hardhat-typechain": "^0.3.3",
|
||||||
"husky": "^4.2.5",
|
"husky": "^4.2.5",
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"prettier-plugin-solidity": "^1.0.0-alpha.53",
|
"prettier-plugin-solidity": "^1.0.0-alpha.53",
|
||||||
"pretty-quick": "^2.0.1",
|
"pretty-quick": "^2.0.1",
|
||||||
"solidity-coverage": "0.7.10",
|
"solidity-coverage": "^0.7.16",
|
||||||
"temp-hardhat-etherscan": "^2.0.2",
|
"temp-hardhat-etherscan": "^2.0.2",
|
||||||
"ts-generator": "^0.1.1",
|
"ts-generator": "^0.1.1",
|
||||||
"ts-node": "^8.10.2",
|
"ts-node": "^8.10.2",
|
||||||
|
|
|
@ -82,12 +82,12 @@ WRONG RESERVE ASSET SETUP:
|
||||||
const rates = await deployDefaultReserveInterestRateStrategy(
|
const rates = await deployDefaultReserveInterestRateStrategy(
|
||||||
[
|
[
|
||||||
addressProvider.address,
|
addressProvider.address,
|
||||||
strategyParams.optimalUtilizationRate,
|
strategyParams.strategy.optimalUtilizationRate,
|
||||||
strategyParams.baseVariableBorrowRate,
|
strategyParams.strategy.baseVariableBorrowRate,
|
||||||
strategyParams.variableRateSlope1,
|
strategyParams.strategy.variableRateSlope1,
|
||||||
strategyParams.variableRateSlope2,
|
strategyParams.strategy.variableRateSlope2,
|
||||||
strategyParams.stableRateSlope1,
|
strategyParams.strategy.stableRateSlope1,
|
||||||
strategyParams.stableRateSlope2,
|
strategyParams.strategy.stableRateSlope2,
|
||||||
],
|
],
|
||||||
verify
|
verify
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { ConfigNames } from '../../helpers/configuration';
|
||||||
import { printContracts } from '../../helpers/misc-utils';
|
import { printContracts } from '../../helpers/misc-utils';
|
||||||
|
|
||||||
task('aave:dev', 'Deploy development enviroment')
|
task('aave:dev', 'Deploy development enviroment')
|
||||||
.addOptionalParam('verify', 'Verify contracts at Etherscan')
|
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||||
.setAction(async ({ verify }, localBRE) => {
|
.setAction(async ({ verify }, localBRE) => {
|
||||||
const POOL_NAME = ConfigNames.Aave;
|
const POOL_NAME = ConfigNames.Aave;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user