2021-03-15 10:52:57 +00:00
|
|
|
import { formatEther } from 'ethers/lib/utils';
|
2020-11-30 18:25:06 +00:00
|
|
|
import { task } from 'hardhat/config';
|
|
|
|
import { deployLendingPoolAddressesProviderRegistry } from '../../helpers/contracts-deployments';
|
2021-03-15 10:52:57 +00:00
|
|
|
import { getFirstSigner } from '../../helpers/contracts-getters';
|
2020-11-30 18:25:06 +00:00
|
|
|
|
|
|
|
task('full:deploy-address-provider-registry', 'Deploy address provider registry')
|
|
|
|
.addFlag('verify', 'Verify contracts at Etherscan')
|
|
|
|
.setAction(async ({ verify }, DRE) => {
|
|
|
|
await DRE.run('set-DRE');
|
2021-03-15 10:52:57 +00:00
|
|
|
const signer = await getFirstSigner();
|
|
|
|
console.log('Signer', await signer.getAddress());
|
|
|
|
console.log('Balance', formatEther(await signer.getBalance()));
|
2020-11-30 18:25:06 +00:00
|
|
|
|
|
|
|
const contract = await deployLendingPoolAddressesProviderRegistry(verify);
|
|
|
|
console.log('Registry Address:', contract.address);
|
|
|
|
});
|