Skip to content

fix: support deploy of ui helpers in fork mode #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tasks/deployments/deploy-UiIncentiveDataProviderV2V3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ task(
const uiIncentiveDataProviderV2V3 = await deployUiIncentiveDataProviderV2V3(verify);

console.log('UiIncentiveDataProviderV2V3 deployed at:', uiIncentiveDataProviderV2V3.address);
console.log(`\tFinished UiIncentiveDataProviderV2V3 deployment`);
});
17 changes: 7 additions & 10 deletions tasks/deployments/deploy-UiPoolDataProviderV2V3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,25 @@ task(`deploy-${eContractid.UiPoolDataProviderV2V3}`, `Deploys the UiPoolDataProv
.addFlag('verify', 'Verify UiPoolDataProviderV2V3 contract via Etherscan API.')
.setAction(async ({ verify }, localBRE) => {
await localBRE.run('set-DRE');
const network = process.env.FORK ? process.env.FORK : localBRE.network.name;

if (!localBRE.network.config.chainId) {
throw new Error('INVALID_CHAIN_ID');
}

console.log(
`\n- UiPoolDataProviderV2V3 price aggregator: ${
chainlinkAggregatorProxy[localBRE.network.name]
}`
`\n- UiPoolDataProviderV2V3 price aggregator: ${chainlinkAggregatorProxy[network]}`
);
console.log(
`\n- UiPoolDataProviderV2V3 eth/usd price aggregator: ${
chainlinkAggregatorProxy[localBRE.network.name]
}`
`\n- UiPoolDataProviderV2V3 eth/usd price aggregator: ${chainlinkAggregatorProxy[network]}`
);
console.log(`\n- UiPoolDataProviderV2V3 deployment`);

const UiPoolDataProviderV2V3 = await deployUiPoolDataProviderV2V3(
chainlinkAggregatorProxy[localBRE.network.name],
chainlinkEthUsdAggregatorProxy[localBRE.network.name],
chainlinkAggregatorProxy[network],
chainlinkEthUsdAggregatorProxy[network],
verify
);

console.log('UiPoolDataProviderV2 deployed at:', UiPoolDataProviderV2V3.address);
console.log(`\tFinished UiPoolDataProvider deployment`);
console.log('UiPoolDataProviderV2V3 deployed at:', UiPoolDataProviderV2V3.address);
});
8 changes: 0 additions & 8 deletions tasks/full/6-initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,12 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.')

await deployWalletBalancerProvider(verify);

const uiPoolDataProvider = await deployUiPoolDataProviderV2(
chainlinkAggregatorProxy[localBRE.network.name],
chainlinkEthUsdAggregatorProxy[localBRE.network.name],
verify
);
console.log('UiPoolDataProvider deployed at:', uiPoolDataProvider.address);

const lendingPoolAddress = await addressesProvider.getLendingPool();

let gateWay = getParamPerNetwork(WethGateway, network);
if (!notFalsyOrZeroAddress(gateWay)) {
gateWay = (await getWETHGateway()).address;
}
console.log('GATEWAY', gateWay);
await authorizeWETHGateway(gateWay, lendingPoolAddress);
} catch (err) {
console.error(err);
Expand Down
4 changes: 4 additions & 0 deletions tasks/migrations/aave.mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ task('aave:mainnet', 'Deploy development enviroment')
console.log('6. Initialize lending pool');
await DRE.run('full:initialize-lending-pool', { pool: POOL_NAME });

console.log('7. Deploy UI helpers');
await DRE.run('deploy-UiPoolDataProviderV2V3', { verify });
await DRE.run('deploy-UiIncentiveDataProviderV2V3', { verify });

if (verify) {
printContracts();
console.log('7. Veryfing contracts');
Expand Down