Skip to content

Commit f907950

Browse files
committed
fix: support deploy of ui helpers in fork mode
1 parent 637cd80 commit f907950

File tree

4 files changed

+11
-19
lines changed

4 files changed

+11
-19
lines changed

tasks/deployments/deploy-UiIncentiveDataProviderV2V3.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ task(
1717
const uiIncentiveDataProviderV2V3 = await deployUiIncentiveDataProviderV2V3(verify);
1818

1919
console.log('UiIncentiveDataProviderV2V3 deployed at:', uiIncentiveDataProviderV2V3.address);
20-
console.log(`\tFinished UiIncentiveDataProviderV2V3 deployment`);
2120
});

tasks/deployments/deploy-UiPoolDataProviderV2V3.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,25 @@ task(`deploy-${eContractid.UiPoolDataProviderV2V3}`, `Deploys the UiPoolDataProv
77
.addFlag('verify', 'Verify UiPoolDataProviderV2V3 contract via Etherscan API.')
88
.setAction(async ({ verify }, localBRE) => {
99
await localBRE.run('set-DRE');
10+
const network = process.env.FORK ? process.env.FORK : localBRE.network.name;
11+
1012
if (!localBRE.network.config.chainId) {
1113
throw new Error('INVALID_CHAIN_ID');
1214
}
1315

1416
console.log(
15-
`\n- UiPoolDataProviderV2V3 price aggregator: ${
16-
chainlinkAggregatorProxy[localBRE.network.name]
17-
}`
17+
`\n- UiPoolDataProviderV2V3 price aggregator: ${chainlinkAggregatorProxy[network]}`
1818
);
1919
console.log(
20-
`\n- UiPoolDataProviderV2V3 eth/usd price aggregator: ${
21-
chainlinkAggregatorProxy[localBRE.network.name]
22-
}`
20+
`\n- UiPoolDataProviderV2V3 eth/usd price aggregator: ${chainlinkAggregatorProxy[network]}`
2321
);
2422
console.log(`\n- UiPoolDataProviderV2V3 deployment`);
2523

2624
const UiPoolDataProviderV2V3 = await deployUiPoolDataProviderV2V3(
27-
chainlinkAggregatorProxy[localBRE.network.name],
28-
chainlinkEthUsdAggregatorProxy[localBRE.network.name],
25+
chainlinkAggregatorProxy[network],
26+
chainlinkEthUsdAggregatorProxy[network],
2927
verify
3028
);
3129

32-
console.log('UiPoolDataProviderV2 deployed at:', UiPoolDataProviderV2V3.address);
33-
console.log(`\tFinished UiPoolDataProvider deployment`);
30+
console.log('UiPoolDataProviderV2V3 deployed at:', UiPoolDataProviderV2V3.address);
3431
});

tasks/full/6-initialize.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,12 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.')
100100

101101
await deployWalletBalancerProvider(verify);
102102

103-
const uiPoolDataProvider = await deployUiPoolDataProviderV2(
104-
chainlinkAggregatorProxy[localBRE.network.name],
105-
chainlinkEthUsdAggregatorProxy[localBRE.network.name],
106-
verify
107-
);
108-
console.log('UiPoolDataProvider deployed at:', uiPoolDataProvider.address);
109-
110103
const lendingPoolAddress = await addressesProvider.getLendingPool();
111104

112105
let gateWay = getParamPerNetwork(WethGateway, network);
113106
if (!notFalsyOrZeroAddress(gateWay)) {
114107
gateWay = (await getWETHGateway()).address;
115108
}
116-
console.log('GATEWAY', gateWay);
117109
await authorizeWETHGateway(gateWay, lendingPoolAddress);
118110
} catch (err) {
119111
console.error(err);

tasks/migrations/aave.mainnet.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ task('aave:mainnet', 'Deploy development enviroment')
3636
console.log('6. Initialize lending pool');
3737
await DRE.run('full:initialize-lending-pool', { pool: POOL_NAME });
3838

39+
console.log('7. Deploy UI helpers');
40+
await DRE.run('deploy-UiPoolDataProviderV2V3', { verify });
41+
await DRE.run('deploy-UiIncentiveDataProviderV2V3', { verify });
42+
3943
if (verify) {
4044
printContracts();
4145
console.log('7. Veryfing contracts');

0 commit comments

Comments
 (0)