From dc0d02157280fe102a3959044036a59b9f332ecc Mon Sep 17 00:00:00 2001 From: The3D Date: Fri, 16 Oct 2020 13:49:45 +0200 Subject: [PATCH 1/4] removed the oracles deployment task --- tasks/migrations/aave.full.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tasks/migrations/aave.full.ts b/tasks/migrations/aave.full.ts index 460829b6..fb119103 100644 --- a/tasks/migrations/aave.full.ts +++ b/tasks/migrations/aave.full.ts @@ -24,10 +24,7 @@ task('aave:full', 'Deploy development enviroment') console.log('2. Deploy lending pool'); await localBRE.run('full:deploy-lending-pool', {verify}); - console.log('3. Deploy oracles'); - await localBRE.run('full:deploy-oracles', {verify, pool: POOL_NAME}); - - console.log('4. Initialize lending pool'); + console.log('3. Initialize lending pool'); await localBRE.run('full:initialize-lending-pool', {verify, pool: POOL_NAME}); console.log('\nFinished migrations'); From 765acdb540d826aa80c7530662308090792a8dc0 Mon Sep 17 00:00:00 2001 From: emilio Date: Mon, 19 Oct 2020 10:31:53 +0200 Subject: [PATCH 2/4] Fixed WBTC address --- config/aave.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/aave.ts b/config/aave.ts index 1f4295be..3c8923c2 100644 --- a/config/aave.ts +++ b/config/aave.ts @@ -270,7 +270,7 @@ export const AaveConfig: IAaveConfiguration = { MKR: '0x61e4CAE3DA7FD189e52a4879C7B8067D7C2Cc0FA', LINK: '0xAD5ce863aE3E4E9394Ab43d4ba0D80f419F61789', KNC: '0x3F80c39c0b96A0945f9F0E9f55d8A8891c5671A8', - WBTC: '0x3b92f58feD223E2cB1bCe4c286BD97e42f2A12EA', + WBTC: '0xD1B98B6607330172f1D991521145A22BCe793277', MANA: '0x738Dc6380157429e957d223e6333Dc385c85Fec7', ZRX: '0xD0d76886cF8D952ca26177EB7CfDf83bad08C00C', SNX: '0x7FDb81B0b8a010dd4FFc57C3fecbf145BA8Bd947', From bb234fbc7c358173da9296fc6ad393cd38f123f1 Mon Sep 17 00:00:00 2001 From: emilio Date: Mon, 19 Oct 2020 10:55:45 +0200 Subject: [PATCH 3/4] fixed #72 --- contracts/interfaces/ILendingPool.sol | 6 ++---- deployed-contracts.json | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/contracts/interfaces/ILendingPool.sol b/contracts/interfaces/ILendingPool.sol index 3b496fb4..8396d35f 100644 --- a/contracts/interfaces/ILendingPool.sol +++ b/contracts/interfaces/ILendingPool.sol @@ -121,21 +121,19 @@ interface ILendingPool { /** * @dev emitted when a borrower is liquidated * @param collateral the address of the collateral being liquidated - * @param reserve the address of the reserve + * @param principal the address of the reserve * @param user the address of the user being liquidated * @param purchaseAmount the total amount liquidated * @param liquidatedCollateralAmount the amount of collateral being liquidated - * @param accruedBorrowInterest the amount of interest accrued by the borrower since the last action * @param liquidator the address of the liquidator * @param receiveAToken true if the liquidator wants to receive aTokens, false otherwise **/ event LiquidationCall( address indexed collateral, - address indexed reserve, + address indexed principal, address indexed user, uint256 purchaseAmount, uint256 liquidatedCollateralAmount, - uint256 accruedBorrowInterest, address liquidator, bool receiveAToken ); diff --git a/deployed-contracts.json b/deployed-contracts.json index 7840c6ba..f0208be5 100644 --- a/deployed-contracts.json +++ b/deployed-contracts.json @@ -231,7 +231,7 @@ }, "WalletBalanceProvider": { "buidlerevm": { - "address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4", + "address": "0xC6bA6049F86d528698B5924B8fC2FE7289D38578", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { @@ -620,7 +620,7 @@ }, "MockAToken": { "buidlerevm": { - "address": "0x392E5355a0e88Bd394F717227c752670fb3a8020", + "address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { @@ -648,7 +648,7 @@ }, "MockStableDebtToken": { "buidlerevm": { - "address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460", + "address": "0xEBAB67ee3ef604D5c250A53b4b8fcbBC6ec3007C", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { @@ -662,7 +662,7 @@ }, "MockVariableDebtToken": { "buidlerevm": { - "address": "0xEBAB67ee3ef604D5c250A53b4b8fcbBC6ec3007C", + "address": "0xBE36BE5680244Ae1A6F983E4A6f6E1c142cdAbe3", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { @@ -684,5 +684,15 @@ "localhost": { "address": "0xBEF0d4b9c089a5883741fC14cbA352055f35DDA2" } + }, + "MockFlashRepayAdapter": { + "buidlerevm": { + "address": "0xDf73fC454FA018051D4a1509e63D11530A59DE10" + } + }, + "MockFlashLiquiditySwapAdapter": { + "buidlerevm": { + "address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4" + } } } From 7ddf18b823fcdb37f9c3688cf097d31e5f78d3e1 Mon Sep 17 00:00:00 2001 From: The3D Date: Tue, 20 Oct 2020 12:19:07 +0200 Subject: [PATCH 4/4] Updated migration scripts to add custom proxy price providers --- config/commons.ts | 7 +++++ deployed-contracts.json | 32 ++++++++++++++++++----- helpers/types.ts | 1 + package.json | 2 +- tasks/full/1_address_provider_registry.ts | 7 +++++ 5 files changed, 42 insertions(+), 7 deletions(-) diff --git a/config/commons.ts b/config/commons.ts index 83c9c25c..71c60c66 100644 --- a/config/commons.ts +++ b/config/commons.ts @@ -258,4 +258,11 @@ export const CommonsConfig: ICommonConfiguration = { [eEthereumNetwork.ropsten]: '', [eEthereumNetwork.main]: '', }, + ProxyPriceProvider: { + [eEthereumNetwork.coverage]: '', + [eEthereumNetwork.buidlerevm]: '', + [eEthereumNetwork.kovan]: '0x276C4793F2EE3D5Bf18C5b879529dD4270BA4814', + [eEthereumNetwork.ropsten]: '', + [eEthereumNetwork.main]: '', + }, }; diff --git a/deployed-contracts.json b/deployed-contracts.json index f0208be5..033a9c6c 100644 --- a/deployed-contracts.json +++ b/deployed-contracts.json @@ -27,8 +27,8 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "kovan": { - "address": "0x20e080B395341B3b617E893c281c7E999C942276", - "deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F" + "address": "0xd7e3C4b2CE495066dE1923c268D68A844bD7Ae13", + "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" } }, "LendingPoolAddressesProviderRegistry": { @@ -45,8 +45,8 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "kovan": { - "address": "0x00219a2958f758122106Bb8A801AFc1B70897663", - "deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F" + "address": "0x83c7A0E78e8eee2108a87d7a6770f22BAcb68b5A", + "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" } }, "FeeProvider": { @@ -76,7 +76,7 @@ "address": "0x65e0Cd5B8904A02f2e00BC6f58bf881998D54BDe" }, "kovan": { - "address": "0x50C9d3aD9399c1EEf6DDeadF8e57fF69994F552e" + "address": "0x1339f3c1FfF00D0FD8946187fdC61F0ef0fFe786" } }, "LendingPoolDataProvider": { @@ -92,7 +92,7 @@ "address": "0x5d12dDe3286D94E0d85F9D3B01B7099cfA0aBCf1" }, "kovan": { - "address": "0x6d1e69bB0578699dd955Eefbf23aAC65c0DA5cE7" + "address": "0xB43CCfF1148bb5ab2104E2ee68A7c30cDEBb9A9C" } }, "PriceOracle": { @@ -171,6 +171,10 @@ "coverage": { "address": "0x626FdE749F9d499d3777320CAf29484B624ab84a", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" + }, + "kovan": { + "address": "0xc4e3d83AEd3D3c60Cf4b238F634014cE103F6fa1", + "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" } }, "LendingPoolLiquidationManager": { @@ -574,6 +578,10 @@ }, "coverage": { "address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4" + }, + "kovan": { + "address": "0xE4566ce19626826360f4faD941418e2849fC3685", + "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" } }, "StableDebtToken": { @@ -588,6 +596,10 @@ "coverage": { "address": "0xB660Fdd109a95718cB9d20E3A89EE6cE342aDcB6", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" + }, + "kovan": { + "address": "0x0043967C1Cf13c4Ff3Bc38109054D5a97C147B4A", + "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" } }, "VariableDebtToken": { @@ -602,6 +614,10 @@ "coverage": { "address": "0x830bceA96E56DBC1F8578f75fBaC0AF16B32A07d", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" + }, + "kovan": { + "address": "0xdF75B68c75c30D177f4Dbd47cBcb5E2E4f3cf8F9", + "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" } }, "AToken": { @@ -616,6 +632,10 @@ "coverage": { "address": "0xA0AB1cB92A4AF81f84dCd258155B5c25D247b54E", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" + }, + "kovan": { + "address": "0x1A23ADa7218e0a66b7368E12E379Ea88d7a68a27", + "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" } }, "MockAToken": { diff --git a/helpers/types.ts b/helpers/types.ts index 0b5e4a33..26644896 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -344,6 +344,7 @@ export interface ICommonConfiguration { ReserveAssets: iParamsPerNetwork>; ReservesConfig: iMultiPoolsAssets; ATokenDomainSeparator: iParamsPerNetwork; + ProxyPriceProvider: iParamsPerNetwork; } export interface IAaveConfiguration extends ICommonConfiguration { diff --git a/package.json b/package.json index abce7ae4..1c0bfb5b 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "aave:evm:dev:migration": "buidler aave:dev", "aave:evm:full:migration": "buidler aave:full", "aave:kovan:dev:migration": "npm run buidler:kovan -- aave:dev --verify", - "aave:kovan:full:migration": "npm run buidler:kovan -- aave:full --verify", + "aave:kovan:full:migration": "npm run buidler:kovan -- aave:full", "aave:ropsten:dev:migration": "npm run buidler:ropsten -- aave:dev --verify", "aave:ropsten:full:migration": "npm run buidler:ropsten -- aave:full --verify", "aave:main:dev:migration": "npm run buidler:main -- aave:dev --verify", diff --git a/tasks/full/1_address_provider_registry.ts b/tasks/full/1_address_provider_registry.ts index ef579579..85ead901 100644 --- a/tasks/full/1_address_provider_registry.ts +++ b/tasks/full/1_address_provider_registry.ts @@ -37,4 +37,11 @@ task( ProviderId ) ); + + //register the proxy price provider on the addressesProvider + const proxyProvider = getParamPerNetwork(poolConfig.ProxyPriceProvider, network); + + if (proxyProvider && proxyProvider !== '') { + await waitForTx(await addressesProvider.setPriceOracle(proxyProvider)); + } });