aave-protocol-v2/tasks/full/4_data-provider.ts

20 lines
685 B
TypeScript
Raw Permalink Normal View History

import { task } from 'hardhat/config';
import { deployAaveProtocolDataProvider } from '../../helpers/contracts-deployments';
import { exit } from 'process';
import { getLendingPoolAddressesProvider } from '../../helpers/contracts-getters';
task('full:data-provider', 'Initialize lending pool configuration.')
.addFlag('verify', 'Verify contracts at Etherscan')
.setAction(async ({ verify }, localBRE) => {
try {
await localBRE.run('set-DRE');
const addressesProvider = await getLendingPoolAddressesProvider();
await deployAaveProtocolDataProvider(addressesProvider.address, verify);
} catch (err) {
console.error(err);
exit(1);
}
});