Skip to content

Commit 228c0bb

Browse files
committed
fix: use emergency admin for unpausing in prod deployment
1 parent 365b039 commit 228c0bb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tasks/migrations/aave.mainnet.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { task } from 'hardhat/config';
22
import { checkVerification } from '../../helpers/etherscan-verification';
3-
import { ConfigNames } from '../../helpers/configuration';
3+
import { ConfigNames, getEmergencyAdmin, loadPoolConfig } from '../../helpers/configuration';
44
import { printContracts } from '../../helpers/misc-utils';
55
import { usingTenderly } from '../../helpers/tenderly-utils';
66
import { getLendingPoolConfiguratorProxy } from '../../helpers/contracts-getters';
@@ -40,22 +40,22 @@ task('aave:mainnet', 'Deploy development enviroment')
4040
console.log('6. Initialize lending pool');
4141
await DRE.run('full:initialize-lending-pool', { pool: POOL_NAME });
4242

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

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+
5353
if (verify) {
5454
printContracts();
55-
console.log('7. Veryfing contracts');
55+
console.log('8. Veryfing contracts');
5656
await DRE.run('verify:general', { all: true, pool: POOL_NAME });
5757

58-
console.log('8. Veryfing aTokens and debtTokens');
58+
console.log('9. Veryfing aTokens and debtTokens');
5959
await DRE.run('verify:tokens', { pool: POOL_NAME });
6060
}
6161

0 commit comments

Comments
 (0)