aave-protocol-v2/tasks/migrations/aave.full.ts
2020-08-26 12:38:52 +02:00

39 lines
1.3 KiB
TypeScript

import {task} from '@nomiclabs/buidler/config';
import {checkVerification} from '../../helpers/etherscan-verification';
import {ConfigNames} from '../../helpers/configuration';
task('aave:full', 'Deploy development enviroment')
.addOptionalParam('verify', 'Verify contracts at Etherscan')
.setAction(async ({verify}, localBRE) => {
await localBRE.run('set-bre');
// Prevent loss of gas verifying all the needed ENVs for Etherscan verification
if (verify) {
checkVerification();
}
await localBRE.run('set-bre');
// Prevent loss of gas verifying all the needed ENVs for Etherscan verification
if (verify) {
checkVerification();
}
console.log('Migration started\n');
console.log('1. Deploy address provider');
await localBRE.run('full:deploy-address-provider', {verify, pool: ConfigNames.Aave});
/*
console.log('3. Deploy lending pool');
await localBRE.run('deploy-lending-pool', {verify});
console.log('4. Deploy oracles');
await localBRE.run('deploy-oracles', {verify, pool: ConfigNames.Aave});
console.log('5. Initialize lending pool');
await localBRE.run('initialize-lending-pool', {verify});
// console.log('\nFinished migration');
*/
console.log('TODO: Pending to migrate');
});