|
1 | 1 | import { task } from 'hardhat/config'; |
2 | 2 | import { checkVerification } from '../../helpers/etherscan-verification'; |
3 | | -import { ConfigNames } from '../../helpers/configuration'; |
| 3 | +import { ConfigNames, getEmergencyAdmin, loadPoolConfig } from '../../helpers/configuration'; |
4 | 4 | import { printContracts } from '../../helpers/misc-utils'; |
5 | 5 | import { usingTenderly } from '../../helpers/tenderly-utils'; |
6 | 6 | import { getLendingPoolConfiguratorProxy } from '../../helpers/contracts-getters'; |
@@ -40,22 +40,22 @@ task('aave:mainnet', 'Deploy development enviroment') |
40 | 40 | console.log('6. Initialize lending pool'); |
41 | 41 | await DRE.run('full:initialize-lending-pool', { pool: POOL_NAME }); |
42 | 42 |
|
43 | | - |
44 | 43 | console.log('7. Deploy UI helpers'); |
45 | 44 | await DRE.run('deploy-UiPoolDataProviderV2V3', { verify }); |
46 | 45 | await DRE.run('deploy-UiIncentiveDataProviderV2V3', { verify }); |
47 | 46 |
|
48 | | - const poolConfig = await getLendingPoolConfiguratorProxy(); |
49 | | - |
50 | | - console.log("Finished deployment, unpausing protocol"); |
51 | | - await poolConfig.setPoolPause(false); |
52 | | - |
| 47 | + const poolConfig = loadPoolConfig(POOL_NAME); |
| 48 | + const emergencyAdmin = await DRE.ethers.getSigner(await getEmergencyAdmin(poolConfig)); |
| 49 | + const poolConfigurator = await getLendingPoolConfiguratorProxy(); |
| 50 | + await poolConfigurator.connect(emergencyAdmin).setPoolPause(false); |
| 51 | + console.log('Finished deployment, unpaused protocol'); |
| 52 | + |
53 | 53 | if (verify) { |
54 | 54 | printContracts(); |
55 | | - console.log('7. Veryfing contracts'); |
| 55 | + console.log('8. Veryfing contracts'); |
56 | 56 | await DRE.run('verify:general', { all: true, pool: POOL_NAME }); |
57 | 57 |
|
58 | | - console.log('8. Veryfing aTokens and debtTokens'); |
| 58 | + console.log('9. Veryfing aTokens and debtTokens'); |
59 | 59 | await DRE.run('verify:tokens', { pool: POOL_NAME }); |
60 | 60 | } |
61 | 61 |
|
|
0 commit comments