@@ -16,9 +16,9 @@ async function getGatewayContract(
1616 useInternalAddress : boolean ,
1717 envVarPrivateKeyName : string ,
1818) {
19- // Get the pauser wallet
20- const pauserPrivateKey = getRequiredEnvVar ( envVarPrivateKeyName ) ;
21- const pauser = new Wallet ( pauserPrivateKey ) . connect ( ethers . provider ) ;
19+ // Get the account ( pauser for pausing OR deployer for unpausing) wallet
20+ const accountPrivateKey = getRequiredEnvVar ( envVarPrivateKeyName ) ;
21+ const account = new Wallet ( accountPrivateKey ) . connect ( ethers . provider ) ;
2222
2323 // Get contract factories
2424 if ( useInternalAddress ) {
@@ -38,7 +38,7 @@ async function getGatewayContract(
3838 // Get the proxy address
3939 const proxyAddress = getRequiredEnvVar ( addressEnvVarName ) ;
4040
41- const contract = await ethers . getContractAt ( name , proxyAddress , pauser ) ;
41+ const contract = await ethers . getContractAt ( name , proxyAddress , account ) ;
4242
4343 return { contract, proxyAddress } ;
4444}
@@ -57,7 +57,8 @@ async function pauseSingleContract(name: string, ethers: HardhatEthersHelpers, u
5757// Helper function to unpause a contract
5858async function unpauseSingleContract ( name : string , ethers : HardhatEthersHelpers , useInternalAddress : boolean ) {
5959 // Get the contract and its address
60- const { contract, proxyAddress } = await getGatewayContract ( name , ethers , useInternalAddress , "DEPLOYER_PRIVATE_KEY" ) ; // NOTE: this task won't work once ownership will be transferred from initial deployer to the multisig
60+ // NOTE: this task won't work once ownership will be transferred from initial deployer to the multisig
61+ const { contract, proxyAddress } = await getGatewayContract ( name , ethers , useInternalAddress , "DEPLOYER_PRIVATE_KEY" ) ;
6162
6263 // Unpause the contract
6364 await contract . unpause ( ) ;
@@ -163,11 +164,12 @@ task("task:unpauseAllGatewayContracts")
163164 const name = "GatewayConfig" ;
164165
165166 // Get the GatewayConfig contract and its address
167+ // NOTE: this task won't work once ownership will be transferred from initial deployer to the multisig
166168 const { contract, proxyAddress } = await getGatewayContract (
167169 name ,
168170 hre . ethers ,
169171 useInternalProxyAddress ,
170- "DEPLOYER_PRIVATE_KEY" , // NOTE: this task won't work once ownership will be transferred from initial deployer to the multisig
172+ "DEPLOYER_PRIVATE_KEY" ,
171173 ) ;
172174
173175 // Unpause all the Gateway contracts
0 commit comments