@aztec/ethereum 2.0.3-rc.10 → 2.0.3-rc.12

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/config.js CHANGED
@@ -173,11 +173,11 @@ const TestnetEntryQueueConfig = {
173
173
  maxQueueFlushSize: 32n
174
174
  };
175
175
  const StagingIgnitionEntryQueueConfig = {
176
- bootstrapValidatorSetSize: 1250n,
177
- bootstrapFlushSize: 8n,
176
+ bootstrapValidatorSetSize: 24n,
177
+ bootstrapFlushSize: 24n,
178
178
  normalFlushSizeMin: 1n,
179
179
  normalFlushSizeQuotient: 2048n,
180
- maxQueueFlushSize: 8n
180
+ maxQueueFlushSize: 24n
181
181
  };
182
182
  export const getEntryQueueConfig = (networkName)=>{
183
183
  switch(networkName){
@@ -173,7 +173,10 @@ export declare class L1Deployer {
173
173
  constructor(client: ExtendedViemWalletClient, maybeSalt: number | undefined, dateProvider?: DateProvider, acceleratedTestDeployments?: boolean, logger?: Logger, txUtilsConfig?: L1TxUtilsConfig | undefined, createVerificationJson?: boolean);
174
174
  deploy<const TAbi extends Abi>(params: ContractArtifacts<TAbi>, args?: ContractConstructorArgs<TAbi>, opts?: {
175
175
  gasLimit?: bigint;
176
- }): Promise<EthAddress>;
176
+ }): Promise<{
177
+ address: EthAddress;
178
+ existed: boolean;
179
+ }>;
177
180
  waitForDeployments(): Promise<void>;
178
181
  sendTransaction(tx: L1TxRequest, options?: L1GasConfig): Promise<{
179
182
  txHash: Hex;
@@ -202,6 +205,7 @@ export declare function deployL1Contract(extendedClient: ExtendedViemWalletClien
202
205
  address: EthAddress;
203
206
  txHash: Hex | undefined;
204
207
  deployedLibraries?: VerificationLibraryEntry[];
208
+ existed: boolean;
205
209
  }>;
206
210
  export declare function getExpectedAddress(abi: Narrow<Abi | readonly unknown[]>, bytecode: Hex, args: readonly unknown[], salt: Hex): {
207
211
  address: `0x${string}`;
@@ -1 +1 @@
1
- {"version":3,"file":"deploy_l1_cont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AC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAkD/C,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAoBzC,eAAe,CACb,EAAE,EAAE,WAAW,EACf,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC;QAAE,MAAM,EAAE,GAAG,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAA;KAAE,CAAC;CAGlE;AAGD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,wBAAwB,EACxC,GAAG,EAAE,MAAM,CAAC,GAAG,GAAG,SAAS,OAAO,EAAE,CAAC,EACrC,QAAQ,EAAE,GAAG,EACb,IAAI,GAAE,SAAS,OAAO,EAAO,EAC7B,IAAI,GAAE;IACJ,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;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,CAkJD;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"}
@@ -24,32 +24,32 @@ const networkName = getActiveNetworkName();
24
24
  export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
25
25
  logger.info(`Deploying shared contracts for network configuration: ${networkName}`);
26
26
  const txHashes = [];
27
- const feeAssetAddress = await deployer.deploy(FeeAssetArtifact, [
27
+ const { address: feeAssetAddress } = await deployer.deploy(FeeAssetArtifact, [
28
28
  'FeeJuice',
29
29
  'FEE',
30
30
  l1Client.account.address
31
31
  ]);
32
32
  logger.verbose(`Deployed Fee Asset at ${feeAssetAddress}`);
33
- const stakingAssetAddress = await deployer.deploy(StakingAssetArtifact, [
33
+ const { address: stakingAssetAddress } = await deployer.deploy(StakingAssetArtifact, [
34
34
  'Staking',
35
35
  'STK',
36
36
  l1Client.account.address
37
37
  ]);
38
38
  logger.verbose(`Deployed Staking Asset at ${stakingAssetAddress}`);
39
39
  const gseConfiguration = getGSEConfiguration(networkName);
40
- const gseAddress = await deployer.deploy(GSEArtifact, [
40
+ const gseAddress = (await deployer.deploy(GSEArtifact, [
41
41
  l1Client.account.address,
42
42
  stakingAssetAddress.toString(),
43
43
  gseConfiguration.activationThreshold,
44
44
  gseConfiguration.ejectionThreshold
45
- ]);
45
+ ])).address;
46
46
  logger.verbose(`Deployed GSE at ${gseAddress}`);
47
- const registryAddress = await deployer.deploy(RegistryArtifact, [
47
+ const { address: registryAddress } = await deployer.deploy(RegistryArtifact, [
48
48
  l1Client.account.address,
49
49
  feeAssetAddress.toString()
50
50
  ]);
51
51
  logger.verbose(`Deployed Registry at ${registryAddress}`);
52
- const governanceProposerAddress = await deployer.deploy(GovernanceProposerArtifact, [
52
+ const { address: governanceProposerAddress } = await deployer.deploy(GovernanceProposerArtifact, [
53
53
  registryAddress.toString(),
54
54
  gseAddress.toString(),
55
55
  BigInt(args.governanceProposerQuorum ?? args.governanceProposerRoundSize / 2 + 1),
@@ -58,7 +58,7 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
58
58
  logger.verbose(`Deployed GovernanceProposer at ${governanceProposerAddress}`);
59
59
  // @note @LHerskind the assets are expected to be the same at some point, but for better
60
60
  // configurability they are different for now.
61
- const governanceAddress = await deployer.deploy(GovernanceArtifact, [
61
+ const { address: governanceAddress } = await deployer.deploy(GovernanceArtifact, [
62
62
  stakingAssetAddress.toString(),
63
63
  governanceProposerAddress.toString(),
64
64
  gseAddress.toString(),
@@ -98,11 +98,11 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
98
98
  logger.verbose(`Set governance on GSE in ${txHash}`);
99
99
  txHashes.push(txHash);
100
100
  }
101
- const coinIssuerAddress = await deployer.deploy(CoinIssuerArtifact, [
101
+ const coinIssuerAddress = (await deployer.deploy(CoinIssuerArtifact, [
102
102
  feeAssetAddress.toString(),
103
103
  1_000_000n * 10n ** 18n,
104
104
  l1Client.account.address
105
- ]);
105
+ ])).address;
106
106
  logger.verbose(`Deployed CoinIssuer at ${coinIssuerAddress}`);
107
107
  logger.verbose(`Waiting for deployments to complete`);
108
108
  await deployer.waitForDeployments();
@@ -112,11 +112,11 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
112
112
  let zkPassportVerifierAddress = undefined;
113
113
  // Only if not on mainnet will we deploy the handlers
114
114
  if (l1Client.chain.id !== 1) {
115
- /* -------------------------------------------------------------------------- */ /* CHEAT CODES START HERE */ /* -------------------------------------------------------------------------- */ feeAssetHandlerAddress = await deployer.deploy(FeeAssetHandlerArtifact, [
115
+ /* -------------------------------------------------------------------------- */ /* CHEAT CODES START HERE */ /* -------------------------------------------------------------------------- */ feeAssetHandlerAddress = (await deployer.deploy(FeeAssetHandlerArtifact, [
116
116
  l1Client.account.address,
117
117
  feeAssetAddress.toString(),
118
118
  BigInt(1000n * 10n ** 18n)
119
- ]);
119
+ ])).address;
120
120
  logger.verbose(`Deployed FeeAssetHandler at ${feeAssetHandlerAddress}`);
121
121
  // Only if we are "fresh" will we be adding as a minter, otherwise above will simply get same address
122
122
  if (needToSetGovernance) {
@@ -161,9 +161,9 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
161
161
  skipBindCheck: args.zkPassportArgs?.mockZkPassportVerifier ?? false,
162
162
  skipMerkleCheck: true
163
163
  };
164
- stakingAssetHandlerAddress = await deployer.deploy(StakingAssetHandlerArtifact, [
164
+ stakingAssetHandlerAddress = (await deployer.deploy(StakingAssetHandlerArtifact, [
165
165
  stakingAssetHandlerDeployArgs
166
- ]);
166
+ ])).address;
167
167
  logger.verbose(`Deployed StakingAssetHandler at ${stakingAssetHandlerAddress}`);
168
168
  const { txHash: stakingMinterTxHash } = await deployer.sendTransaction({
169
169
  to: stakingAssetAddress.toString(),
@@ -217,7 +217,7 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
217
217
  };
218
218
  const getZkPassportVerifierAddress = async (deployer, args)=>{
219
219
  if (args.zkPassportArgs?.mockZkPassportVerifier) {
220
- return await deployer.deploy(mockVerifiers.mockZkPassportVerifier);
220
+ return (await deployer.deploy(mockVerifiers.mockZkPassportVerifier)).address;
221
221
  }
222
222
  return ZK_PASSPORT_VERIFIER_ADDRESS;
223
223
  };
@@ -251,17 +251,17 @@ const getZkPassportVerifierAddress = async (deployer, args)=>{
251
251
  };
252
252
  };
253
253
  export const deploySlashFactory = async (deployer, rollupAddress, logger)=>{
254
- const slashFactoryAddress = await deployer.deploy(SlashFactoryArtifact, [
254
+ const slashFactoryAddress = (await deployer.deploy(SlashFactoryArtifact, [
255
255
  rollupAddress
256
- ]);
256
+ ])).address;
257
257
  logger.verbose(`Deployed SlashFactory at ${slashFactoryAddress}`);
258
258
  return slashFactoryAddress;
259
259
  };
260
260
  export const deployUpgradePayload = async (deployer, addresses)=>{
261
- const payloadAddress = await deployer.deploy(RegisterNewRollupVersionPayloadArtifact, [
261
+ const payloadAddress = (await deployer.deploy(RegisterNewRollupVersionPayloadArtifact, [
262
262
  addresses.registryAddress.toString(),
263
263
  addresses.rollupAddress.toString()
264
- ]);
264
+ ])).address;
265
265
  return payloadAddress;
266
266
  };
267
267
  function slasherFlavorToSolidityEnum(flavor) {
@@ -289,10 +289,10 @@ function slasherFlavorToSolidityEnum(flavor) {
289
289
  const txHashes = [];
290
290
  let epochProofVerifier = EthAddress.ZERO;
291
291
  if (args.realVerifier) {
292
- epochProofVerifier = await deployer.deploy(l1ArtifactsVerifiers.honkVerifier);
292
+ epochProofVerifier = (await deployer.deploy(l1ArtifactsVerifiers.honkVerifier)).address;
293
293
  logger.verbose(`Rollup will use the real verifier at ${epochProofVerifier}`);
294
294
  } else {
295
- epochProofVerifier = await deployer.deploy(mockVerifiers.mockVerifier);
295
+ epochProofVerifier = (await deployer.deploy(mockVerifiers.mockVerifier)).address;
296
296
  logger.verbose(`Rollup will use the mock verifier at ${epochProofVerifier}`);
297
297
  }
298
298
  const rewardConfig = {
@@ -345,10 +345,10 @@ function slasherFlavorToSolidityEnum(flavor) {
345
345
  genesisStateArgs,
346
346
  rollupConfigArgs
347
347
  ];
348
- const rollupAddress = await deployer.deploy(RollupArtifact, rollupArgs, {
348
+ const { address: rollupAddress, existed: rollupExisted } = await deployer.deploy(RollupArtifact, rollupArgs, {
349
349
  gasLimit: 15_000_000n
350
350
  });
351
- logger.verbose(`Deployed Rollup at ${rollupAddress}`, rollupConfigArgs);
351
+ logger.verbose(`Deployed Rollup at ${rollupAddress}, already existed: ${rollupExisted}`, rollupConfigArgs);
352
352
  const rollupContract = new RollupContract(extendedClient, rollupAddress);
353
353
  await deployer.waitForDeployments();
354
354
  logger.verbose(`All core contracts have been deployed`);
@@ -369,9 +369,9 @@ function slasherFlavorToSolidityEnum(flavor) {
369
369
  logger.verbose(`Funding fee juice portal with ${args.feeJuicePortalInitialBalance} fee juice in ${mintTxHash} (accelerated test deployments)`);
370
370
  txHashes.push(mintTxHash);
371
371
  }
372
- const slashFactoryAddress = await deployer.deploy(SlashFactoryArtifact, [
372
+ const slashFactoryAddress = (await deployer.deploy(SlashFactoryArtifact, [
373
373
  rollupAddress.toString()
374
- ]);
374
+ ])).address;
375
375
  logger.verbose(`Deployed SlashFactory at ${slashFactoryAddress}`);
376
376
  // We need to call a function on the registry to set the various contract addresses.
377
377
  const registryContract = getContract({
@@ -435,7 +435,11 @@ function slasherFlavorToSolidityEnum(flavor) {
435
435
  } else {
436
436
  logger.verbose(`Not the owner of the gse, skipping rollup addition`);
437
437
  }
438
- if (args.initialValidators && await gseContract.read.isRollupRegistered([
438
+ const activeAttestorCount = await rollupContract.getActiveAttesterCount();
439
+ const queuedAttestorCount = await rollupContract.getEntryQueueLength();
440
+ logger.info(`Rollup has ${activeAttestorCount} active attestors and ${queuedAttestorCount} queued attestors`);
441
+ const shouldAddValidators = activeAttestorCount === 0n && queuedAttestorCount === 0n;
442
+ if (args.initialValidators && shouldAddValidators && await gseContract.read.isRollupRegistered([
439
443
  rollupContract.address
440
444
  ])) {
441
445
  await addMultipleValidators(extendedClient, deployer, addresses.gseAddress.toString(), rollupAddress.toString(), addresses.stakingAssetAddress.toString(), args.initialValidators, args.acceleratedTestDeployments, logger);
@@ -598,10 +602,10 @@ export const handoverToGovernance = async (extendedClient, deployer, registryAdd
598
602
  }
599
603
  if (validators.length > 0) {
600
604
  const gseContract = new GSEContract(extendedClient, gseAddress);
601
- const multiAdder = await deployer.deploy(MultiAdderArtifact, [
605
+ const multiAdder = (await deployer.deploy(MultiAdderArtifact, [
602
606
  rollupAddress,
603
607
  deployer.client.account.address
604
- ]);
608
+ ])).address;
605
609
  const makeValidatorTuples = async (validator)=>{
606
610
  const registrationTuple = await gseContract.makeRegistrationTuple(validator.bn254SecretKey.getValue());
607
611
  return {
@@ -687,11 +691,11 @@ export const handoverToGovernance = async (extendedClient, deployer, registryAdd
687
691
  * @param logger - The logger.
688
692
  */ // eslint-disable-next-line camelcase
689
693
  export const cheat_initializeFeeAssetHandler = async (extendedClient, deployer, feeAssetAddress, logger)=>{
690
- const feeAssetHandlerAddress = await deployer.deploy(FeeAssetHandlerArtifact, [
694
+ const feeAssetHandlerAddress = (await deployer.deploy(FeeAssetHandlerArtifact, [
691
695
  extendedClient.account.address,
692
696
  feeAssetAddress.toString(),
693
697
  BigInt(1e18)
694
- ]);
698
+ ])).address;
695
699
  logger.verbose(`Deployed FeeAssetHandler at ${feeAssetHandlerAddress}`);
696
700
  const { txHash } = await deployer.sendTransaction({
697
701
  to: feeAssetAddress.toString(),
@@ -1022,7 +1026,7 @@ export class L1Deployer {
1022
1026
  args
1023
1027
  });
1024
1028
  try {
1025
- const { txHash, address, deployedLibraries } = await deployL1Contract(this.client, params.contractAbi, params.contractBytecode, args ?? [], {
1029
+ const { txHash, address, deployedLibraries, existed } = await deployL1Contract(this.client, params.contractAbi, params.contractBytecode, args ?? [], {
1026
1030
  salt: this.salt,
1027
1031
  libraries: params.libraries,
1028
1032
  logger: this.logger,
@@ -1053,7 +1057,10 @@ export class L1Deployer {
1053
1057
  libraries: deployedLibraries ?? []
1054
1058
  });
1055
1059
  }
1056
- return address;
1060
+ return {
1061
+ address,
1062
+ existed
1063
+ };
1057
1064
  } catch (error) {
1058
1065
  throw new Error(`Failed to deploy ${params.name}`, {
1059
1066
  cause: formatViemError(error)
@@ -1179,6 +1186,7 @@ export class L1Deployer {
1179
1186
  logger?.verbose(`Skipping waiting for linked libraries to be deployed ${acceleratedTestDeployments ? '(accelerated test deployments)' : ''}`);
1180
1187
  }
1181
1188
  }
1189
+ let existed = false;
1182
1190
  if (saltFromOpts) {
1183
1191
  logger?.info(`Deploying contract with salt ${saltFromOpts}`);
1184
1192
  const { address, paddedSalt: salt, calldata } = getExpectedAddress(abi, bytecode, args, saltFromOpts);
@@ -1221,6 +1229,7 @@ export class L1Deployer {
1221
1229
  logger?.verbose(`Deployed contract with salt ${salt} to address ${resultingAddress} in tx ${txHash}.`);
1222
1230
  } else {
1223
1231
  logger?.verbose(`Skipping existing deployment of contract with salt ${salt} to address ${resultingAddress}`);
1232
+ existed = true;
1224
1233
  }
1225
1234
  } else {
1226
1235
  const deployData = encodeDeployData({
@@ -1241,7 +1250,8 @@ export class L1Deployer {
1241
1250
  return {
1242
1251
  address: EthAddress.fromString(resultingAddress),
1243
1252
  txHash,
1244
- deployedLibraries
1253
+ deployedLibraries,
1254
+ existed
1245
1255
  };
1246
1256
  }
1247
1257
  export function getExpectedAddress(abi, bytecode, args, salt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/ethereum",
3
- "version": "2.0.3-rc.10",
3
+ "version": "2.0.3-rc.12",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -31,10 +31,10 @@
31
31
  "../package.common.json"
32
32
  ],
33
33
  "dependencies": {
34
- "@aztec/blob-lib": "2.0.3-rc.10",
35
- "@aztec/constants": "2.0.3-rc.10",
36
- "@aztec/foundation": "2.0.3-rc.10",
37
- "@aztec/l1-artifacts": "2.0.3-rc.10",
34
+ "@aztec/blob-lib": "2.0.3-rc.12",
35
+ "@aztec/constants": "2.0.3-rc.12",
36
+ "@aztec/foundation": "2.0.3-rc.12",
37
+ "@aztec/l1-artifacts": "2.0.3-rc.12",
38
38
  "@viem/anvil": "^0.0.10",
39
39
  "dotenv": "^16.0.3",
40
40
  "lodash.chunk": "^4.2.0",
package/src/config.ts CHANGED
@@ -258,11 +258,11 @@ const TestnetEntryQueueConfig = {
258
258
  };
259
259
 
260
260
  const StagingIgnitionEntryQueueConfig = {
261
- bootstrapValidatorSetSize: 1250n,
262
- bootstrapFlushSize: 8n,
261
+ bootstrapValidatorSetSize: 24n,
262
+ bootstrapFlushSize: 24n,
263
263
  normalFlushSizeMin: 1n,
264
264
  normalFlushSizeQuotient: 2048n,
265
- maxQueueFlushSize: 8n,
265
+ maxQueueFlushSize: 24n,
266
266
  };
267
267
 
268
268
  export const getEntryQueueConfig = (networkName: NetworkNames) => {
@@ -6,7 +6,7 @@ import type { Fr } from '@aztec/foundation/fields';
6
6
  import { jsonStringify } from '@aztec/foundation/json-rpc';
7
7
  import { type Logger, createLogger } from '@aztec/foundation/log';
8
8
  import { DateProvider } from '@aztec/foundation/timer';
9
- import type { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
9
+ import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
10
10
 
11
11
  import type { Abi, Narrow } from 'abitype';
12
12
  import { mkdir, writeFile } from 'fs/promises';
@@ -187,29 +187,39 @@ export const deploySharedContracts = async (
187
187
 
188
188
  const txHashes: Hex[] = [];
189
189
 
190
- const feeAssetAddress = await deployer.deploy(FeeAssetArtifact, ['FeeJuice', 'FEE', l1Client.account.address]);
190
+ const { address: feeAssetAddress } = await deployer.deploy(FeeAssetArtifact, [
191
+ 'FeeJuice',
192
+ 'FEE',
193
+ l1Client.account.address,
194
+ ]);
191
195
  logger.verbose(`Deployed Fee Asset at ${feeAssetAddress}`);
192
196
 
193
- const stakingAssetAddress = await deployer.deploy(StakingAssetArtifact, ['Staking', 'STK', l1Client.account.address]);
197
+ const { address: stakingAssetAddress } = await deployer.deploy(StakingAssetArtifact, [
198
+ 'Staking',
199
+ 'STK',
200
+ l1Client.account.address,
201
+ ]);
194
202
  logger.verbose(`Deployed Staking Asset at ${stakingAssetAddress}`);
195
203
 
196
204
  const gseConfiguration = getGSEConfiguration(networkName);
197
205
 
198
- const gseAddress = await deployer.deploy(GSEArtifact, [
199
- l1Client.account.address,
200
- stakingAssetAddress.toString(),
201
- gseConfiguration.activationThreshold,
202
- gseConfiguration.ejectionThreshold,
203
- ]);
206
+ const gseAddress = (
207
+ await deployer.deploy(GSEArtifact, [
208
+ l1Client.account.address,
209
+ stakingAssetAddress.toString(),
210
+ gseConfiguration.activationThreshold,
211
+ gseConfiguration.ejectionThreshold,
212
+ ])
213
+ ).address;
204
214
  logger.verbose(`Deployed GSE at ${gseAddress}`);
205
215
 
206
- const registryAddress = await deployer.deploy(RegistryArtifact, [
216
+ const { address: registryAddress } = await deployer.deploy(RegistryArtifact, [
207
217
  l1Client.account.address,
208
218
  feeAssetAddress.toString(),
209
219
  ]);
210
220
  logger.verbose(`Deployed Registry at ${registryAddress}`);
211
221
 
212
- const governanceProposerAddress = await deployer.deploy(GovernanceProposerArtifact, [
222
+ const { address: governanceProposerAddress } = await deployer.deploy(GovernanceProposerArtifact, [
213
223
  registryAddress.toString(),
214
224
  gseAddress.toString(),
215
225
  BigInt(args.governanceProposerQuorum ?? args.governanceProposerRoundSize / 2 + 1),
@@ -219,7 +229,7 @@ export const deploySharedContracts = async (
219
229
 
220
230
  // @note @LHerskind the assets are expected to be the same at some point, but for better
221
231
  // configurability they are different for now.
222
- const governanceAddress = await deployer.deploy(GovernanceArtifact, [
232
+ const { address: governanceAddress } = await deployer.deploy(GovernanceArtifact, [
223
233
  stakingAssetAddress.toString(),
224
234
  governanceProposerAddress.toString(),
225
235
  gseAddress.toString(),
@@ -261,11 +271,13 @@ export const deploySharedContracts = async (
261
271
  txHashes.push(txHash);
262
272
  }
263
273
 
264
- const coinIssuerAddress = await deployer.deploy(CoinIssuerArtifact, [
265
- feeAssetAddress.toString(),
266
- 1_000_000n * 10n ** 18n, // @todo #8084
267
- l1Client.account.address,
268
- ]);
274
+ const coinIssuerAddress = (
275
+ await deployer.deploy(CoinIssuerArtifact, [
276
+ feeAssetAddress.toString(),
277
+ 1_000_000n * 10n ** 18n, // @todo #8084
278
+ l1Client.account.address,
279
+ ])
280
+ ).address;
269
281
  logger.verbose(`Deployed CoinIssuer at ${coinIssuerAddress}`);
270
282
 
271
283
  logger.verbose(`Waiting for deployments to complete`);
@@ -283,11 +295,13 @@ export const deploySharedContracts = async (
283
295
  /* CHEAT CODES START HERE */
284
296
  /* -------------------------------------------------------------------------- */
285
297
 
286
- feeAssetHandlerAddress = await deployer.deploy(FeeAssetHandlerArtifact, [
287
- l1Client.account.address,
288
- feeAssetAddress.toString(),
289
- BigInt(1000n * 10n ** 18n),
290
- ]);
298
+ feeAssetHandlerAddress = (
299
+ await deployer.deploy(FeeAssetHandlerArtifact, [
300
+ l1Client.account.address,
301
+ feeAssetAddress.toString(),
302
+ BigInt(1000n * 10n ** 18n),
303
+ ])
304
+ ).address;
291
305
  logger.verbose(`Deployed FeeAssetHandler at ${feeAssetHandlerAddress}`);
292
306
 
293
307
  // Only if we are "fresh" will we be adding as a minter, otherwise above will simply get same address
@@ -329,7 +343,8 @@ export const deploySharedContracts = async (
329
343
  skipMerkleCheck: true, // skip merkle check - needed for testing without generating proofs
330
344
  } as const;
331
345
 
332
- stakingAssetHandlerAddress = await deployer.deploy(StakingAssetHandlerArtifact, [stakingAssetHandlerDeployArgs]);
346
+ stakingAssetHandlerAddress = (await deployer.deploy(StakingAssetHandlerArtifact, [stakingAssetHandlerDeployArgs]))
347
+ .address;
333
348
  logger.verbose(`Deployed StakingAssetHandler at ${stakingAssetHandlerAddress}`);
334
349
 
335
350
  const { txHash: stakingMinterTxHash } = await deployer.sendTransaction({
@@ -400,7 +415,7 @@ export const deploySharedContracts = async (
400
415
 
401
416
  const getZkPassportVerifierAddress = async (deployer: L1Deployer, args: DeployL1ContractsArgs): Promise<EthAddress> => {
402
417
  if (args.zkPassportArgs?.mockZkPassportVerifier) {
403
- return await deployer.deploy(mockVerifiers.mockZkPassportVerifier);
418
+ return (await deployer.deploy(mockVerifiers.mockZkPassportVerifier)).address;
404
419
  }
405
420
  return ZK_PASSPORT_VERIFIER_ADDRESS;
406
421
  };
@@ -453,7 +468,7 @@ export const deployRollupForUpgrade = async (
453
468
  };
454
469
 
455
470
  export const deploySlashFactory = async (deployer: L1Deployer, rollupAddress: Hex, logger: Logger) => {
456
- const slashFactoryAddress = await deployer.deploy(SlashFactoryArtifact, [rollupAddress]);
471
+ const slashFactoryAddress = (await deployer.deploy(SlashFactoryArtifact, [rollupAddress])).address;
457
472
  logger.verbose(`Deployed SlashFactory at ${slashFactoryAddress}`);
458
473
  return slashFactoryAddress;
459
474
  };
@@ -462,10 +477,12 @@ export const deployUpgradePayload = async (
462
477
  deployer: L1Deployer,
463
478
  addresses: Pick<L1ContractAddresses, 'registryAddress' | 'rollupAddress'>,
464
479
  ) => {
465
- const payloadAddress = await deployer.deploy(RegisterNewRollupVersionPayloadArtifact, [
466
- addresses.registryAddress.toString(),
467
- addresses.rollupAddress.toString(),
468
- ]);
480
+ const payloadAddress = (
481
+ await deployer.deploy(RegisterNewRollupVersionPayloadArtifact, [
482
+ addresses.registryAddress.toString(),
483
+ addresses.rollupAddress.toString(),
484
+ ])
485
+ ).address;
469
486
 
470
487
  return payloadAddress;
471
488
  };
@@ -517,10 +534,10 @@ export const deployRollup = async (
517
534
  let epochProofVerifier = EthAddress.ZERO;
518
535
 
519
536
  if (args.realVerifier) {
520
- epochProofVerifier = await deployer.deploy(l1ArtifactsVerifiers.honkVerifier);
537
+ epochProofVerifier = (await deployer.deploy(l1ArtifactsVerifiers.honkVerifier)).address;
521
538
  logger.verbose(`Rollup will use the real verifier at ${epochProofVerifier}`);
522
539
  } else {
523
- epochProofVerifier = await deployer.deploy(mockVerifiers.mockVerifier);
540
+ epochProofVerifier = (await deployer.deploy(mockVerifiers.mockVerifier)).address;
524
541
  logger.verbose(`Rollup will use the mock verifier at ${epochProofVerifier}`);
525
542
  }
526
543
 
@@ -579,8 +596,10 @@ export const deployRollup = async (
579
596
  rollupConfigArgs,
580
597
  ] as const;
581
598
 
582
- const rollupAddress = await deployer.deploy(RollupArtifact, rollupArgs, { gasLimit: 15_000_000n });
583
- logger.verbose(`Deployed Rollup at ${rollupAddress}`, rollupConfigArgs);
599
+ const { address: rollupAddress, existed: rollupExisted } = await deployer.deploy(RollupArtifact, rollupArgs, {
600
+ gasLimit: 15_000_000n,
601
+ });
602
+ logger.verbose(`Deployed Rollup at ${rollupAddress}, already existed: ${rollupExisted}`, rollupConfigArgs);
584
603
 
585
604
  const rollupContract = new RollupContract(extendedClient, rollupAddress);
586
605
 
@@ -605,7 +624,7 @@ export const deployRollup = async (
605
624
  txHashes.push(mintTxHash);
606
625
  }
607
626
 
608
- const slashFactoryAddress = await deployer.deploy(SlashFactoryArtifact, [rollupAddress.toString()]);
627
+ const slashFactoryAddress = (await deployer.deploy(SlashFactoryArtifact, [rollupAddress.toString()])).address;
609
628
  logger.verbose(`Deployed SlashFactory at ${slashFactoryAddress}`);
610
629
 
611
630
  // We need to call a function on the registry to set the various contract addresses.
@@ -667,7 +686,17 @@ export const deployRollup = async (
667
686
  logger.verbose(`Not the owner of the gse, skipping rollup addition`);
668
687
  }
669
688
 
670
- if (args.initialValidators && (await gseContract.read.isRollupRegistered([rollupContract.address]))) {
689
+ const activeAttestorCount = await rollupContract.getActiveAttesterCount();
690
+ const queuedAttestorCount = await rollupContract.getEntryQueueLength();
691
+ logger.info(`Rollup has ${activeAttestorCount} active attestors and ${queuedAttestorCount} queued attestors`);
692
+
693
+ const shouldAddValidators = activeAttestorCount === 0n && queuedAttestorCount === 0n;
694
+
695
+ if (
696
+ args.initialValidators &&
697
+ shouldAddValidators &&
698
+ (await gseContract.read.isRollupRegistered([rollupContract.address]))
699
+ ) {
671
700
  await addMultipleValidators(
672
701
  extendedClient,
673
702
  deployer,
@@ -879,7 +908,8 @@ export const addMultipleValidators = async (
879
908
 
880
909
  if (validators.length > 0) {
881
910
  const gseContract = new GSEContract(extendedClient, gseAddress);
882
- const multiAdder = await deployer.deploy(MultiAdderArtifact, [rollupAddress, deployer.client.account.address]);
911
+ const multiAdder = (await deployer.deploy(MultiAdderArtifact, [rollupAddress, deployer.client.account.address]))
912
+ .address;
883
913
 
884
914
  const makeValidatorTuples = async (validator: Operator) => {
885
915
  const registrationTuple = await gseContract.makeRegistrationTuple(validator.bn254SecretKey.getValue());
@@ -993,11 +1023,13 @@ export const cheat_initializeFeeAssetHandler = async (
993
1023
  feeAssetHandlerAddress: EthAddress;
994
1024
  txHash: Hex;
995
1025
  }> => {
996
- const feeAssetHandlerAddress = await deployer.deploy(FeeAssetHandlerArtifact, [
997
- extendedClient.account.address,
998
- feeAssetAddress.toString(),
999
- BigInt(1e18),
1000
- ]);
1026
+ const feeAssetHandlerAddress = (
1027
+ await deployer.deploy(FeeAssetHandlerArtifact, [
1028
+ extendedClient.account.address,
1029
+ feeAssetAddress.toString(),
1030
+ BigInt(1e18),
1031
+ ])
1032
+ ).address;
1001
1033
  logger.verbose(`Deployed FeeAssetHandler at ${feeAssetHandlerAddress}`);
1002
1034
 
1003
1035
  const { txHash } = await deployer.sendTransaction({
@@ -1328,10 +1360,10 @@ export class L1Deployer {
1328
1360
  params: ContractArtifacts<TAbi>,
1329
1361
  args?: ContractConstructorArgs<TAbi>,
1330
1362
  opts: { gasLimit?: bigint } = {},
1331
- ): Promise<EthAddress> {
1363
+ ): Promise<{ address: EthAddress; existed: boolean }> {
1332
1364
  this.logger.debug(`Deploying ${params.name} contract`, { args });
1333
1365
  try {
1334
- const { txHash, address, deployedLibraries } = await deployL1Contract(
1366
+ const { txHash, address, deployedLibraries, existed } = await deployL1Contract(
1335
1367
  this.client,
1336
1368
  params.contractAbi,
1337
1369
  params.contractBytecode,
@@ -1369,7 +1401,10 @@ export class L1Deployer {
1369
1401
  libraries: deployedLibraries ?? [],
1370
1402
  });
1371
1403
  }
1372
- return address;
1404
+ return {
1405
+ address,
1406
+ existed,
1407
+ };
1373
1408
  } catch (error) {
1374
1409
  throw new Error(`Failed to deploy ${params.name}`, { cause: formatViemError(error) });
1375
1410
  }
@@ -1427,7 +1462,12 @@ export async function deployL1Contract(
1427
1462
  gasLimit?: bigint;
1428
1463
  acceleratedTestDeployments?: boolean;
1429
1464
  } = {},
1430
- ): Promise<{ address: EthAddress; txHash: Hex | undefined; deployedLibraries?: VerificationLibraryEntry[] }> {
1465
+ ): Promise<{
1466
+ address: EthAddress;
1467
+ txHash: Hex | undefined;
1468
+ deployedLibraries?: VerificationLibraryEntry[];
1469
+ existed: boolean;
1470
+ }> {
1431
1471
  let txHash: Hex | undefined = undefined;
1432
1472
  let resultingAddress: Hex | null | undefined = undefined;
1433
1473
  const deployedLibraries: VerificationLibraryEntry[] = [];
@@ -1529,6 +1569,8 @@ export async function deployL1Contract(
1529
1569
  }
1530
1570
  }
1531
1571
 
1572
+ let existed = false;
1573
+
1532
1574
  if (saltFromOpts) {
1533
1575
  logger?.info(`Deploying contract with salt ${saltFromOpts}`);
1534
1576
  const { address, paddedSalt: salt, calldata } = getExpectedAddress(abi, bytecode, args, saltFromOpts);
@@ -1550,6 +1592,7 @@ export async function deployL1Contract(
1550
1592
  logger?.verbose(`Deployed contract with salt ${salt} to address ${resultingAddress} in tx ${txHash}.`);
1551
1593
  } else {
1552
1594
  logger?.verbose(`Skipping existing deployment of contract with salt ${salt} to address ${resultingAddress}`);
1595
+ existed = true;
1553
1596
  }
1554
1597
  } else {
1555
1598
  const deployData = encodeDeployData({ abi, bytecode, args });
@@ -1569,7 +1612,7 @@ export async function deployL1Contract(
1569
1612
  }
1570
1613
  }
1571
1614
 
1572
- return { address: EthAddress.fromString(resultingAddress!), txHash, deployedLibraries };
1615
+ return { address: EthAddress.fromString(resultingAddress!), txHash, deployedLibraries, existed };
1573
1616
  }
1574
1617
 
1575
1618
  export function getExpectedAddress(