@aztec/ethereum 2.1.0-rc.20 → 2.1.0-rc.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/deploy_l1_contracts.d.ts +2 -1
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +230 -196
- package/dest/l1_artifacts.d.ts +260 -176
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/zkPassportVerifierAddress.js +1 -1
- package/package.json +5 -5
- package/src/deploy_l1_contracts.ts +207 -139
- package/src/zkPassportVerifierAddress.ts +1 -1
|
@@ -129,8 +129,9 @@ export declare const deploySharedContracts: (l1Client: ExtendedViemWalletClient,
|
|
|
129
129
|
* @param registryAddress - The address of the registry.
|
|
130
130
|
* @param logger - The logger.
|
|
131
131
|
* @param txUtilsConfig - The L1 tx utils config.
|
|
132
|
+
* @param createVerificationJson - Optional path to write verification data for forge verify.
|
|
132
133
|
*/
|
|
133
|
-
export declare const deployRollupForUpgrade: (extendedClient: ExtendedViemWalletClient, args: Omit<DeployL1ContractsArgs, "governanceProposerQuorum" | "governanceProposerRoundSize" | "ejectionThreshold" | "activationThreshold">, registryAddress: EthAddress, logger: Logger, txUtilsConfig: L1TxUtilsConfig) => Promise<{
|
|
134
|
+
export declare const deployRollupForUpgrade: (extendedClient: ExtendedViemWalletClient, args: Omit<DeployL1ContractsArgs, "governanceProposerQuorum" | "governanceProposerRoundSize" | "ejectionThreshold" | "activationThreshold">, registryAddress: EthAddress, logger: Logger, txUtilsConfig: L1TxUtilsConfig, createVerificationJson?: string | false) => Promise<{
|
|
134
135
|
rollup: RollupContract;
|
|
135
136
|
slashFactoryAddress: EthAddress;
|
|
136
137
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../src/deploy_l1_contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAwB,MAAM,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AAC;IAClB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACjC,GACL,OAAO,CAAC;IACT,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,GAAG,GAAG,SAAS,CAAC;IACxB,iBAAiB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAC/C,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAsJD;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,CAAC,GAAG,GAAG,SAAS,OAAO,EAAE,CAAC,EACrC,QAAQ,EAAE,GAAG,EACb,IAAI,EAAE,SAAS,OAAO,EAAE,EACxB,IAAI,EAAE,GAAG;;;;EAeV"}
|
|
@@ -130,6 +130,7 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
|
|
|
130
130
|
]);
|
|
131
131
|
stakingAssetAddress = deployedStaking.address;
|
|
132
132
|
logger.verbose(`Deployed Staking Asset at ${stakingAssetAddress}`);
|
|
133
|
+
await deployer.waitForDeployments();
|
|
133
134
|
}
|
|
134
135
|
const gseAddress = (await deployer.deploy(GSEArtifact, [
|
|
135
136
|
l1Client.account.address,
|
|
@@ -194,7 +195,7 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
|
|
|
194
195
|
}
|
|
195
196
|
const coinIssuerAddress = (await deployer.deploy(CoinIssuerArtifact, [
|
|
196
197
|
feeAssetAddress.toString(),
|
|
197
|
-
|
|
198
|
+
2n * 10n ** 17n,
|
|
198
199
|
l1Client.account.address
|
|
199
200
|
])).address;
|
|
200
201
|
logger.verbose(`Deployed CoinIssuer at ${coinIssuerAddress}`);
|
|
@@ -332,6 +333,224 @@ const getZkPassportVerifierAddress = async (deployer, args)=>{
|
|
|
332
333
|
scope
|
|
333
334
|
];
|
|
334
335
|
};
|
|
336
|
+
/**
|
|
337
|
+
* Generates verification records for a deployed rollup and its associated contracts (Inbox, Outbox, Slasher, etc).
|
|
338
|
+
* @param rollup - The deployed rollup contract.
|
|
339
|
+
* @param deployer - The L1 deployer instance.
|
|
340
|
+
* @param args - The deployment arguments used for the rollup.
|
|
341
|
+
* @param addresses - The L1 contract addresses.
|
|
342
|
+
* @param extendedClient - The extended viem wallet client.
|
|
343
|
+
* @param logger - The logger.
|
|
344
|
+
*/ async function generateRollupVerificationRecords(rollup, deployer, args, addresses, extendedClient, logger) {
|
|
345
|
+
try {
|
|
346
|
+
// Add Inbox / Outbox verification records (constructor args are created inside RollupCore)
|
|
347
|
+
const rollupAddr = rollup.address;
|
|
348
|
+
const rollupAddresses = await rollup.getRollupAddresses();
|
|
349
|
+
const inboxAddr = rollupAddresses.inboxAddress.toString();
|
|
350
|
+
const outboxAddr = rollupAddresses.outboxAddress.toString();
|
|
351
|
+
const feeAsset = rollupAddresses.feeJuiceAddress.toString();
|
|
352
|
+
const version = await rollup.getVersion();
|
|
353
|
+
const inboxCtor = encodeAbiParameters([
|
|
354
|
+
{
|
|
355
|
+
type: 'address'
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
type: 'address'
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
type: 'uint256'
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
type: 'uint256'
|
|
365
|
+
}
|
|
366
|
+
], [
|
|
367
|
+
rollupAddr,
|
|
368
|
+
feeAsset,
|
|
369
|
+
version,
|
|
370
|
+
BigInt(L1_TO_L2_MSG_SUBTREE_HEIGHT)
|
|
371
|
+
]);
|
|
372
|
+
const outboxCtor = encodeAbiParameters([
|
|
373
|
+
{
|
|
374
|
+
type: 'address'
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
type: 'uint256'
|
|
378
|
+
}
|
|
379
|
+
], [
|
|
380
|
+
rollupAddr,
|
|
381
|
+
version
|
|
382
|
+
]);
|
|
383
|
+
deployer.verificationRecords.push({
|
|
384
|
+
name: 'Inbox',
|
|
385
|
+
address: inboxAddr,
|
|
386
|
+
constructorArgsHex: inboxCtor,
|
|
387
|
+
libraries: []
|
|
388
|
+
}, {
|
|
389
|
+
name: 'Outbox',
|
|
390
|
+
address: outboxAddr,
|
|
391
|
+
constructorArgsHex: outboxCtor,
|
|
392
|
+
libraries: []
|
|
393
|
+
});
|
|
394
|
+
// Include Slasher and SlashingProposer (if deployed) in verification data
|
|
395
|
+
try {
|
|
396
|
+
const slasherAddrHex = await rollup.getSlasherAddress();
|
|
397
|
+
const slasherAddr = EthAddress.fromString(slasherAddrHex);
|
|
398
|
+
if (!slasherAddr.isZero()) {
|
|
399
|
+
// Slasher constructor: (address _vetoer, address _governance)
|
|
400
|
+
const slasherCtor = encodeAbiParameters([
|
|
401
|
+
{
|
|
402
|
+
type: 'address'
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
type: 'address'
|
|
406
|
+
}
|
|
407
|
+
], [
|
|
408
|
+
args.slashingVetoer.toString(),
|
|
409
|
+
extendedClient.account.address
|
|
410
|
+
]);
|
|
411
|
+
deployer.verificationRecords.push({
|
|
412
|
+
name: 'Slasher',
|
|
413
|
+
address: slasherAddr.toString(),
|
|
414
|
+
constructorArgsHex: slasherCtor,
|
|
415
|
+
libraries: []
|
|
416
|
+
});
|
|
417
|
+
// Proposer address is stored in Slasher.PROPOSER()
|
|
418
|
+
const proposerAddr = (await rollup.getSlashingProposerAddress()).toString();
|
|
419
|
+
// Compute constructor args matching deployment path in RollupCore
|
|
420
|
+
const computedRoundSize = BigInt(args.slashingRoundSizeInEpochs * args.aztecEpochDuration);
|
|
421
|
+
const computedQuorum = BigInt(args.slashingQuorum ?? args.slashingRoundSizeInEpochs * args.aztecEpochDuration / 2 + 1);
|
|
422
|
+
const lifetimeInRounds = BigInt(args.slashingLifetimeInRounds);
|
|
423
|
+
const executionDelayInRounds = BigInt(args.slashingExecutionDelayInRounds);
|
|
424
|
+
if (args.slasherFlavor === 'tally') {
|
|
425
|
+
const slashAmounts = [
|
|
426
|
+
args.slashAmountSmall,
|
|
427
|
+
args.slashAmountMedium,
|
|
428
|
+
args.slashAmountLarge
|
|
429
|
+
];
|
|
430
|
+
const committeeSize = BigInt(args.aztecTargetCommitteeSize);
|
|
431
|
+
const epochDuration = BigInt(args.aztecEpochDuration);
|
|
432
|
+
const slashOffsetInRounds = BigInt(args.slashingOffsetInRounds);
|
|
433
|
+
const proposerCtor = encodeAbiParameters([
|
|
434
|
+
{
|
|
435
|
+
type: 'address'
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
type: 'address'
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
type: 'uint256'
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
type: 'uint256'
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
type: 'uint256'
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
type: 'uint256'
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
type: 'uint256[3]'
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
type: 'uint256'
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
type: 'uint256'
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
type: 'uint256'
|
|
463
|
+
}
|
|
464
|
+
], [
|
|
465
|
+
rollup.address,
|
|
466
|
+
slasherAddr.toString(),
|
|
467
|
+
computedQuorum,
|
|
468
|
+
computedRoundSize,
|
|
469
|
+
lifetimeInRounds,
|
|
470
|
+
executionDelayInRounds,
|
|
471
|
+
slashAmounts,
|
|
472
|
+
committeeSize,
|
|
473
|
+
epochDuration,
|
|
474
|
+
slashOffsetInRounds
|
|
475
|
+
]);
|
|
476
|
+
deployer.verificationRecords.push({
|
|
477
|
+
name: 'TallySlashingProposer',
|
|
478
|
+
address: proposerAddr,
|
|
479
|
+
constructorArgsHex: proposerCtor,
|
|
480
|
+
libraries: []
|
|
481
|
+
});
|
|
482
|
+
} else if (args.slasherFlavor === 'empire') {
|
|
483
|
+
const proposerCtor = encodeAbiParameters([
|
|
484
|
+
{
|
|
485
|
+
type: 'address'
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
type: 'address'
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
type: 'uint256'
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
type: 'uint256'
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
type: 'uint256'
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
type: 'uint256'
|
|
501
|
+
}
|
|
502
|
+
], [
|
|
503
|
+
rollup.address,
|
|
504
|
+
slasherAddr.toString(),
|
|
505
|
+
computedQuorum,
|
|
506
|
+
computedRoundSize,
|
|
507
|
+
lifetimeInRounds,
|
|
508
|
+
executionDelayInRounds
|
|
509
|
+
]);
|
|
510
|
+
deployer.verificationRecords.push({
|
|
511
|
+
name: 'EmpireSlashingProposer',
|
|
512
|
+
address: proposerAddr,
|
|
513
|
+
constructorArgsHex: proposerCtor,
|
|
514
|
+
libraries: []
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
} catch (e) {
|
|
519
|
+
logger.warn(`Failed to add Slasher/Proposer verification records: ${String(e)}`);
|
|
520
|
+
}
|
|
521
|
+
} catch (e) {
|
|
522
|
+
throw new Error(`Failed to generate rollup verification records: ${String(e)}`);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Writes verification records to a JSON file for later forge verify.
|
|
527
|
+
* @param deployer - The L1 deployer containing verification records.
|
|
528
|
+
* @param outputDirectory - The directory to write the verification file to.
|
|
529
|
+
* @param chainId - The chain ID.
|
|
530
|
+
* @param filenameSuffix - Optional suffix for the filename (e.g., 'upgrade').
|
|
531
|
+
* @param logger - The logger.
|
|
532
|
+
*/ async function writeVerificationJson(deployer, outputDirectory, chainId, filenameSuffix = '', logger) {
|
|
533
|
+
try {
|
|
534
|
+
const date = new Date();
|
|
535
|
+
const formattedDate = date.toISOString().slice(2, 19).replace(/[-T:]/g, '');
|
|
536
|
+
// Ensure the verification output directory exists
|
|
537
|
+
await mkdir(outputDirectory, {
|
|
538
|
+
recursive: true
|
|
539
|
+
});
|
|
540
|
+
const suffix = filenameSuffix ? `-${filenameSuffix}` : '';
|
|
541
|
+
const verificationOutputPath = `${outputDirectory}/l1-verify${suffix}-${chainId}-${formattedDate.slice(0, 6)}-${formattedDate.slice(6)}.json`;
|
|
542
|
+
const networkName = getActiveNetworkName();
|
|
543
|
+
const verificationData = {
|
|
544
|
+
chainId: chainId,
|
|
545
|
+
network: networkName,
|
|
546
|
+
records: deployer.verificationRecords
|
|
547
|
+
};
|
|
548
|
+
await writeFile(verificationOutputPath, JSON.stringify(verificationData, null, 2));
|
|
549
|
+
logger.info(`Wrote L1 verification data to ${verificationOutputPath}`);
|
|
550
|
+
} catch (e) {
|
|
551
|
+
logger.warn(`Failed to write L1 verification data file: ${String(e)}`);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
335
554
|
/**
|
|
336
555
|
* Deploys a new rollup, using the existing canonical version to derive certain values (addresses of assets etc).
|
|
337
556
|
* @param clients - The L1 clients.
|
|
@@ -339,11 +558,17 @@ const getZkPassportVerifierAddress = async (deployer, args)=>{
|
|
|
339
558
|
* @param registryAddress - The address of the registry.
|
|
340
559
|
* @param logger - The logger.
|
|
341
560
|
* @param txUtilsConfig - The L1 tx utils config.
|
|
342
|
-
|
|
343
|
-
|
|
561
|
+
* @param createVerificationJson - Optional path to write verification data for forge verify.
|
|
562
|
+
*/ export const deployRollupForUpgrade = async (extendedClient, args, registryAddress, logger, txUtilsConfig, createVerificationJson = false)=>{
|
|
563
|
+
const deployer = new L1Deployer(extendedClient, args.salt, undefined, args.acceleratedTestDeployments, logger, txUtilsConfig, !!createVerificationJson);
|
|
344
564
|
const addresses = await RegistryContract.collectAddresses(extendedClient, registryAddress, 'canonical');
|
|
345
565
|
const { rollup, slashFactoryAddress } = await deployRollup(extendedClient, deployer, args, addresses, logger);
|
|
346
566
|
await deployer.waitForDeployments();
|
|
567
|
+
// Write verification data (constructor args + linked libraries) to file for later forge verify
|
|
568
|
+
if (createVerificationJson) {
|
|
569
|
+
await generateRollupVerificationRecords(rollup, deployer, args, addresses, extendedClient, logger);
|
|
570
|
+
await writeVerificationJson(deployer, createVerificationJson, extendedClient.chain.id, 'upgrade', logger);
|
|
571
|
+
}
|
|
347
572
|
return {
|
|
348
573
|
rollup,
|
|
349
574
|
slashFactoryAddress
|
|
@@ -899,199 +1124,8 @@ export const cheat_initializeFeeAssetHandler = async (extendedClient, deployer,
|
|
|
899
1124
|
logger.info(`Aztec L1 contracts initialized`, l1Contracts);
|
|
900
1125
|
// Write verification data (constructor args + linked libraries) to file for later forge verify
|
|
901
1126
|
if (createVerificationJson) {
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
const rollupAddr = l1Contracts.rollupAddress.toString();
|
|
905
|
-
const inboxAddr = l1Contracts.inboxAddress.toString();
|
|
906
|
-
const outboxAddr = l1Contracts.outboxAddress.toString();
|
|
907
|
-
const feeAsset = l1Contracts.feeJuiceAddress.toString();
|
|
908
|
-
const version = await rollup.getVersion();
|
|
909
|
-
const inboxCtor = encodeAbiParameters([
|
|
910
|
-
{
|
|
911
|
-
type: 'address'
|
|
912
|
-
},
|
|
913
|
-
{
|
|
914
|
-
type: 'address'
|
|
915
|
-
},
|
|
916
|
-
{
|
|
917
|
-
type: 'uint256'
|
|
918
|
-
},
|
|
919
|
-
{
|
|
920
|
-
type: 'uint256'
|
|
921
|
-
}
|
|
922
|
-
], [
|
|
923
|
-
rollupAddr,
|
|
924
|
-
feeAsset,
|
|
925
|
-
version,
|
|
926
|
-
BigInt(L1_TO_L2_MSG_SUBTREE_HEIGHT)
|
|
927
|
-
]);
|
|
928
|
-
const outboxCtor = encodeAbiParameters([
|
|
929
|
-
{
|
|
930
|
-
type: 'address'
|
|
931
|
-
},
|
|
932
|
-
{
|
|
933
|
-
type: 'uint256'
|
|
934
|
-
}
|
|
935
|
-
], [
|
|
936
|
-
rollupAddr,
|
|
937
|
-
version
|
|
938
|
-
]);
|
|
939
|
-
deployer.verificationRecords.push({
|
|
940
|
-
name: 'Inbox',
|
|
941
|
-
address: inboxAddr,
|
|
942
|
-
constructorArgsHex: inboxCtor,
|
|
943
|
-
libraries: []
|
|
944
|
-
}, {
|
|
945
|
-
name: 'Outbox',
|
|
946
|
-
address: outboxAddr,
|
|
947
|
-
constructorArgsHex: outboxCtor,
|
|
948
|
-
libraries: []
|
|
949
|
-
});
|
|
950
|
-
// Include Slasher and SlashingProposer (if deployed) in verification data
|
|
951
|
-
try {
|
|
952
|
-
const slasherAddrHex = await rollup.getSlasherAddress();
|
|
953
|
-
const slasherAddr = EthAddress.fromString(slasherAddrHex);
|
|
954
|
-
if (!slasherAddr.isZero()) {
|
|
955
|
-
// Slasher constructor: (address _vetoer, address _governance)
|
|
956
|
-
const slasherCtor = encodeAbiParameters([
|
|
957
|
-
{
|
|
958
|
-
type: 'address'
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
type: 'address'
|
|
962
|
-
}
|
|
963
|
-
], [
|
|
964
|
-
args.slashingVetoer.toString(),
|
|
965
|
-
l1Client.account.address
|
|
966
|
-
]);
|
|
967
|
-
deployer.verificationRecords.push({
|
|
968
|
-
name: 'Slasher',
|
|
969
|
-
address: slasherAddr.toString(),
|
|
970
|
-
constructorArgsHex: slasherCtor,
|
|
971
|
-
libraries: []
|
|
972
|
-
});
|
|
973
|
-
// Proposer address is stored in Slasher.PROPOSER()
|
|
974
|
-
const proposerAddr = (await rollup.getSlashingProposerAddress()).toString();
|
|
975
|
-
// Compute constructor args matching deployment path in RollupCore
|
|
976
|
-
const computedRoundSize = BigInt(args.slashingRoundSizeInEpochs * args.aztecEpochDuration);
|
|
977
|
-
const computedQuorum = BigInt(args.slashingQuorum ?? args.slashingRoundSizeInEpochs * args.aztecEpochDuration / 2 + 1);
|
|
978
|
-
const lifetimeInRounds = BigInt(args.slashingLifetimeInRounds);
|
|
979
|
-
const executionDelayInRounds = BigInt(args.slashingExecutionDelayInRounds);
|
|
980
|
-
if (args.slasherFlavor === 'tally') {
|
|
981
|
-
const slashAmounts = [
|
|
982
|
-
args.slashAmountSmall,
|
|
983
|
-
args.slashAmountMedium,
|
|
984
|
-
args.slashAmountLarge
|
|
985
|
-
];
|
|
986
|
-
const committeeSize = BigInt(args.aztecTargetCommitteeSize);
|
|
987
|
-
const epochDuration = BigInt(args.aztecEpochDuration);
|
|
988
|
-
const slashOffsetInRounds = BigInt(args.slashingOffsetInRounds);
|
|
989
|
-
const proposerCtor = encodeAbiParameters([
|
|
990
|
-
{
|
|
991
|
-
type: 'address'
|
|
992
|
-
},
|
|
993
|
-
{
|
|
994
|
-
type: 'address'
|
|
995
|
-
},
|
|
996
|
-
{
|
|
997
|
-
type: 'uint256'
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
type: 'uint256'
|
|
1001
|
-
},
|
|
1002
|
-
{
|
|
1003
|
-
type: 'uint256'
|
|
1004
|
-
},
|
|
1005
|
-
{
|
|
1006
|
-
type: 'uint256'
|
|
1007
|
-
},
|
|
1008
|
-
{
|
|
1009
|
-
type: 'uint256[3]'
|
|
1010
|
-
},
|
|
1011
|
-
{
|
|
1012
|
-
type: 'uint256'
|
|
1013
|
-
},
|
|
1014
|
-
{
|
|
1015
|
-
type: 'uint256'
|
|
1016
|
-
},
|
|
1017
|
-
{
|
|
1018
|
-
type: 'uint256'
|
|
1019
|
-
}
|
|
1020
|
-
], [
|
|
1021
|
-
rollup.address,
|
|
1022
|
-
slasherAddr.toString(),
|
|
1023
|
-
computedQuorum,
|
|
1024
|
-
computedRoundSize,
|
|
1025
|
-
lifetimeInRounds,
|
|
1026
|
-
executionDelayInRounds,
|
|
1027
|
-
slashAmounts,
|
|
1028
|
-
committeeSize,
|
|
1029
|
-
epochDuration,
|
|
1030
|
-
slashOffsetInRounds
|
|
1031
|
-
]);
|
|
1032
|
-
deployer.verificationRecords.push({
|
|
1033
|
-
name: 'TallySlashingProposer',
|
|
1034
|
-
address: proposerAddr,
|
|
1035
|
-
constructorArgsHex: proposerCtor,
|
|
1036
|
-
libraries: []
|
|
1037
|
-
});
|
|
1038
|
-
} else if (args.slasherFlavor === 'empire') {
|
|
1039
|
-
const proposerCtor = encodeAbiParameters([
|
|
1040
|
-
{
|
|
1041
|
-
type: 'address'
|
|
1042
|
-
},
|
|
1043
|
-
{
|
|
1044
|
-
type: 'address'
|
|
1045
|
-
},
|
|
1046
|
-
{
|
|
1047
|
-
type: 'uint256'
|
|
1048
|
-
},
|
|
1049
|
-
{
|
|
1050
|
-
type: 'uint256'
|
|
1051
|
-
},
|
|
1052
|
-
{
|
|
1053
|
-
type: 'uint256'
|
|
1054
|
-
},
|
|
1055
|
-
{
|
|
1056
|
-
type: 'uint256'
|
|
1057
|
-
}
|
|
1058
|
-
], [
|
|
1059
|
-
rollup.address,
|
|
1060
|
-
slasherAddr.toString(),
|
|
1061
|
-
computedQuorum,
|
|
1062
|
-
computedRoundSize,
|
|
1063
|
-
lifetimeInRounds,
|
|
1064
|
-
executionDelayInRounds
|
|
1065
|
-
]);
|
|
1066
|
-
deployer.verificationRecords.push({
|
|
1067
|
-
name: 'EmpireSlashingProposer',
|
|
1068
|
-
address: proposerAddr,
|
|
1069
|
-
constructorArgsHex: proposerCtor,
|
|
1070
|
-
libraries: []
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
} catch (e) {
|
|
1075
|
-
logger.warn(`Failed to add Slasher/Proposer verification records: ${String(e)}`);
|
|
1076
|
-
}
|
|
1077
|
-
const date = new Date();
|
|
1078
|
-
const formattedDate = date.toISOString().slice(2, 19).replace(/[-T:]/g, '');
|
|
1079
|
-
// Ensure the verification output directory exists
|
|
1080
|
-
await mkdir(createVerificationJson, {
|
|
1081
|
-
recursive: true
|
|
1082
|
-
});
|
|
1083
|
-
const verificationOutputPath = `${createVerificationJson}/l1-verify-${chain.id}-${formattedDate.slice(0, 6)}-${formattedDate.slice(6)}.json`;
|
|
1084
|
-
const networkName = getActiveNetworkName();
|
|
1085
|
-
const verificationData = {
|
|
1086
|
-
chainId: chain.id,
|
|
1087
|
-
network: networkName,
|
|
1088
|
-
records: deployer.verificationRecords
|
|
1089
|
-
};
|
|
1090
|
-
await writeFile(verificationOutputPath, JSON.stringify(verificationData, null, 2));
|
|
1091
|
-
logger.info(`Wrote L1 verification data to ${verificationOutputPath}`);
|
|
1092
|
-
} catch (e) {
|
|
1093
|
-
logger.warn(`Failed to write L1 verification data file: ${String(e)}`);
|
|
1094
|
-
}
|
|
1127
|
+
await generateRollupVerificationRecords(rollup, deployer, args, l1Contracts, l1Client, logger);
|
|
1128
|
+
await writeVerificationJson(deployer, createVerificationJson, chain.id, '', logger);
|
|
1095
1129
|
}
|
|
1096
1130
|
if (isAnvilTestChain(chain.id)) {
|
|
1097
1131
|
// @note We make a time jump PAST the very first slot to not have to deal with the edge case of the first slot.
|