From fa1f1349b77950cee672273227e6089872af7c16 Mon Sep 17 00:00:00 2001 From: kartojal Date: Wed, 6 Oct 2021 14:29:26 +0200 Subject: [PATCH] fix: load the EmergencyAdmin before pausing the pool at 2_lending_pool.ts deployment script --- tasks/full/2_lending_pool.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tasks/full/2_lending_pool.ts b/tasks/full/2_lending_pool.ts index e67dcaed..fdc86e74 100644 --- a/tasks/full/2_lending_pool.ts +++ b/tasks/full/2_lending_pool.ts @@ -15,7 +15,12 @@ import { getLendingPoolConfiguratorProxy, } from '../../helpers/contracts-getters'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { loadPoolConfig, ConfigNames } from '../../helpers/configuration'; +import { + loadPoolConfig, + ConfigNames, + getGenesisPoolAdmin, + getEmergencyAdmin, +} from '../../helpers/configuration'; task('full:deploy-lending-pool', 'Deploy lending pool for dev enviroment') .addFlag('verify', 'Verify contracts at Etherscan') @@ -70,9 +75,9 @@ task('full:deploy-lending-pool', 'Deploy lending pool for dev enviroment') eContractid.LendingPoolConfigurator, lendingPoolConfiguratorProxy.address ); - + const admin = await DRE.ethers.getSigner(await getEmergencyAdmin(poolConfig)); // Pause market during deployment - await waitForTx(await lendingPoolConfiguratorProxy.setPoolPause(true)); + await waitForTx(await lendingPoolConfiguratorProxy.connect(admin).setPoolPause(true)); // Deploy deployment helpers await deployStableAndVariableTokensHelper(