@@ -7,9 +7,8 @@ import * as dotenv from 'dotenv';
77import { ethers , upgrades } from 'hardhat' ;
88import { logger } from '../../src/logger' ;
99import { AgglayerManager , AgglayerBridge } from '../../typechain-types' ;
10- import { genTimelockOperation , decodeScheduleData , decodeScheduleBatchData , genTimelockBatchOperation } from '../utils' ;
10+ import { genTimelockOperation , decodeScheduleBatchData , genTimelockBatchOperation } from '../utils' ;
1111import { checkParams , getProviderAdjustingMultiplierGas , getDeployerFromParameters } from '../../src/utils' ;
12- import { addInfoOutput } from '../../tools/utils' ;
1312import * as upgradeParameters from './upgrade_parameters.json' ;
1413
1514dotenv . config ( { path : path . resolve ( __dirname , '../../.env' ) } ) ;
@@ -64,6 +63,7 @@ async function main() {
6463 expect ( await upgrades . erc1967 . getAdminAddress ( globalExitRootV2Address as string ) ) . to . be . equal ( proxyAdmin . target ) ;
6564
6665 // Validate AgglayerGateway initialization parameters
66+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
6767 const signersToAdd = _validateAgglayerGatewayInitialization ( initializeAgglayerGateway ) ;
6868 const timelockAddress = await proxyAdmin . owner ( ) ;
6969
@@ -72,7 +72,7 @@ async function main() {
7272 const timelockContract = await timelockContractFactory . attach ( timelockAddress ) ;
7373
7474 // Determine timelock delay: use parameter if provided, otherwise use contract's min delay
75- const contractMinDelay = await timelockContract . getMinDelay ( ) ;
75+ const contractMinDelay = await ( timelockContract as any ) . getMinDelay ( ) ;
7676 const paramsMinDelay = upgradeParameters . timelockDelay ;
7777
7878 let timelockDelay ;
@@ -244,8 +244,10 @@ async function main() {
244244
245245 const aggchianFEPFactory = ( await ethers . getContractFactory ( 'AggchainFEP' , deployer ) ) as any ;
246246
247+ // eslint-disable-next-line no-restricted-syntax
247248 for ( const rollup of ALgatewayRollups ) {
248249 const aggchainFEPContract = await aggchianFEPFactory . attach ( rollup . rollupContract as string ) ;
250+ // eslint-disable-next-line eqeqeq
249251 if ( ( await aggchainFEPContract . AGGCHAIN_TYPE ( ) ) != 1n ) {
250252 throw new Error ( `Rollup ${ rollup . rollupID } is not an FEP rollup` ) ;
251253 }
@@ -324,7 +326,9 @@ async function main() {
324326 const computedNewRollupTypeECDSA = rollupTypeCount + 2n ;
325327
326328 // generate transaction to upgrade all FEP rollups to the new FEP implementation
329+ // eslint-disable-next-line no-restricted-syntax
327330 for ( const rollup of ALgatewayRollups ) {
331+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
328332 const isInitialized = await _isInitialized ( rollup . rollupContract , ethers ) ;
329333 const encodedData = isInitialized
330334 ? aggchianFEPFactory . interface . encodeFunctionData ( 'upgradeFromPreviousFEP' )
@@ -349,7 +353,9 @@ async function main() {
349353 }
350354
351355 // generate transaction to upgrade all PP rollups to the new ECDSAMultisig implementation
356+ // eslint-disable-next-line no-restricted-syntax
352357 for ( const rollup of PPRollups ) {
358+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
353359 const isInitialized = await _isInitialized ( rollup . rollupContract , ethers ) ;
354360 const encodedData = isInitialized
355361 ? aggchainECDSAFactory . interface . encodeFunctionData ( 'migrateFromLegacyConsensus' )
@@ -377,6 +383,7 @@ async function main() {
377383 const targets = [ ] ;
378384 const values = [ ] ;
379385 const datas = [ ] ;
386+ // eslint-disable-next-line no-restricted-syntax
380387 for ( const operation of timelockOperations ) {
381388 targets . push ( operation . target ) ;
382389 values . push ( operation . value ) ;
@@ -433,7 +440,7 @@ async function main() {
433440 ] ;
434441 const objectDecoded = await decodeScheduleBatchData ( scheduleData , contractFactories ) ;
435442 ( outputJson as any ) . decodedScheduleData = objectDecoded ;
436- } catch ( error ) {
443+ } catch ( error : any ) {
437444 logger . warn ( '⚠️ Could not decode schedule data:' , error . message ) ;
438445 ( outputJson as any ) . decodedScheduleData = { error : 'Failed to decode' , message : error . message } ;
439446 }
@@ -459,6 +466,7 @@ main().catch((e) => {
459466 process . exit ( 1 ) ;
460467} ) ;
461468
469+ // eslint-disable-next-line @typescript-eslint/naming-convention
462470function _validateAgglayerGatewayInitialization ( initializeAgglayerGateway : any ) : Array < { addr : string ; url : string } > {
463471 logger . info ( 'Validating AgglayerGateway initialization parameters...' ) ;
464472
@@ -526,9 +534,10 @@ function _validateAgglayerGatewayInitialization(initializeAgglayerGateway: any):
526534 return signersToAdd ;
527535}
528536
529- async function _isInitialized ( contractAddress : string , ethers : any ) : Promise < boolean > {
537+ // eslint-disable-next-line @typescript-eslint/naming-convention
538+ async function _isInitialized ( contractAddress : string , ethersLib : any ) : Promise < boolean > {
530539 // Read storage slot 0 which contains uint8 private _initialized (OpenZeppelin Initializable pattern)
531- const storageValue = await ethers . provider . getStorage ( contractAddress , 0 ) ;
540+ const storageValue = await ethersLib . provider . getStorage ( contractAddress , 0 ) ;
532541
533542 // The _initialized flag is a uint8 (1 byte) stored at the rightmost position in slot 0
534543 // Mask with 0xFF to extract only the last byte
0 commit comments