@aztec/ethereum 0.0.1-commit.b655e406 → 0.0.1-commit.c7c42ec

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.
Files changed (184) hide show
  1. package/dest/account.d.ts +1 -1
  2. package/dest/chain.d.ts +1 -1
  3. package/dest/client.d.ts +1 -1
  4. package/dest/client.js +6 -2
  5. package/dest/config.d.ts +11 -44
  6. package/dest/config.d.ts.map +1 -1
  7. package/dest/config.js +20 -332
  8. package/dest/constants.d.ts +1 -1
  9. package/dest/contracts/empire_base.d.ts +7 -5
  10. package/dest/contracts/empire_base.d.ts.map +1 -1
  11. package/dest/contracts/empire_base.js +1 -1
  12. package/dest/contracts/empire_slashing_proposer.d.ts +6 -4
  13. package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -1
  14. package/dest/contracts/empire_slashing_proposer.js +17 -2
  15. package/dest/contracts/errors.d.ts +1 -1
  16. package/dest/contracts/errors.d.ts.map +1 -1
  17. package/dest/contracts/fee_asset_handler.d.ts +1 -1
  18. package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
  19. package/dest/contracts/fee_juice.d.ts +1 -1
  20. package/dest/contracts/fee_juice.d.ts.map +1 -1
  21. package/dest/contracts/governance.d.ts +16 -16
  22. package/dest/contracts/governance.d.ts.map +1 -1
  23. package/dest/contracts/governance_proposer.d.ts +6 -4
  24. package/dest/contracts/governance_proposer.d.ts.map +1 -1
  25. package/dest/contracts/governance_proposer.js +17 -2
  26. package/dest/contracts/gse.d.ts +1 -1
  27. package/dest/contracts/gse.d.ts.map +1 -1
  28. package/dest/contracts/inbox.d.ts +7 -3
  29. package/dest/contracts/inbox.d.ts.map +1 -1
  30. package/dest/contracts/inbox.js +4 -0
  31. package/dest/contracts/index.d.ts +1 -1
  32. package/dest/contracts/multicall.d.ts +2 -2
  33. package/dest/contracts/multicall.d.ts.map +1 -1
  34. package/dest/contracts/registry.d.ts +1 -1
  35. package/dest/contracts/registry.d.ts.map +1 -1
  36. package/dest/contracts/rollup.d.ts +71 -64
  37. package/dest/contracts/rollup.d.ts.map +1 -1
  38. package/dest/contracts/rollup.js +90 -67
  39. package/dest/contracts/slasher_contract.d.ts +1 -1
  40. package/dest/contracts/slasher_contract.d.ts.map +1 -1
  41. package/dest/contracts/tally_slashing_proposer.d.ts +9 -7
  42. package/dest/contracts/tally_slashing_proposer.d.ts.map +1 -1
  43. package/dest/contracts/tally_slashing_proposer.js +4 -4
  44. package/dest/contracts/utils.d.ts +1 -1
  45. package/dest/deploy_aztec_l1_contracts.d.ts +247 -0
  46. package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
  47. package/dest/deploy_aztec_l1_contracts.js +336 -0
  48. package/dest/deploy_l1_contract.d.ts +68 -0
  49. package/dest/deploy_l1_contract.d.ts.map +1 -0
  50. package/dest/deploy_l1_contract.js +312 -0
  51. package/dest/eth-signer/eth-signer.d.ts +1 -1
  52. package/dest/eth-signer/index.d.ts +1 -1
  53. package/dest/forwarder_proxy.d.ts +32 -0
  54. package/dest/forwarder_proxy.d.ts.map +1 -0
  55. package/dest/forwarder_proxy.js +93 -0
  56. package/dest/l1_artifacts.d.ts +2078 -880
  57. package/dest/l1_artifacts.d.ts.map +1 -1
  58. package/dest/l1_contract_addresses.d.ts +3 -3
  59. package/dest/l1_contract_addresses.d.ts.map +1 -1
  60. package/dest/l1_contract_addresses.js +3 -3
  61. package/dest/l1_reader.d.ts +3 -1
  62. package/dest/l1_reader.d.ts.map +1 -1
  63. package/dest/l1_reader.js +6 -0
  64. package/dest/l1_tx_utils/config.d.ts +5 -5
  65. package/dest/l1_tx_utils/config.d.ts.map +1 -1
  66. package/dest/l1_tx_utils/config.js +30 -7
  67. package/dest/l1_tx_utils/constants.d.ts +7 -1
  68. package/dest/l1_tx_utils/constants.d.ts.map +1 -1
  69. package/dest/l1_tx_utils/constants.js +25 -0
  70. package/dest/l1_tx_utils/factory.d.ts +1 -1
  71. package/dest/l1_tx_utils/fee-strategies/index.d.ts +9 -0
  72. package/dest/l1_tx_utils/fee-strategies/index.d.ts.map +1 -0
  73. package/dest/l1_tx_utils/fee-strategies/index.js +11 -0
  74. package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts +18 -0
  75. package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts.map +1 -0
  76. package/dest/l1_tx_utils/fee-strategies/p75_competitive.js +111 -0
  77. package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts +32 -0
  78. package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts.map +1 -0
  79. package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.js +173 -0
  80. package/dest/l1_tx_utils/fee-strategies/types.d.ts +64 -0
  81. package/dest/l1_tx_utils/fee-strategies/types.d.ts.map +1 -0
  82. package/dest/l1_tx_utils/fee-strategies/types.js +24 -0
  83. package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +41 -0
  84. package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -0
  85. package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +48 -0
  86. package/dest/l1_tx_utils/index-blobs.d.ts +3 -0
  87. package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -0
  88. package/dest/l1_tx_utils/index-blobs.js +2 -0
  89. package/dest/l1_tx_utils/index.d.ts +3 -1
  90. package/dest/l1_tx_utils/index.d.ts.map +1 -1
  91. package/dest/l1_tx_utils/index.js +2 -0
  92. package/dest/l1_tx_utils/interfaces.d.ts +2 -2
  93. package/dest/l1_tx_utils/interfaces.d.ts.map +1 -1
  94. package/dest/l1_tx_utils/l1_fee_analyzer.d.ts +233 -0
  95. package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -0
  96. package/dest/l1_tx_utils/l1_fee_analyzer.js +506 -0
  97. package/dest/l1_tx_utils/l1_tx_utils.d.ts +1 -2
  98. package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
  99. package/dest/l1_tx_utils/l1_tx_utils.js +17 -4
  100. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +1 -1
  101. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +1 -1
  102. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +19 -26
  103. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
  104. package/dest/l1_tx_utils/readonly_l1_tx_utils.js +70 -141
  105. package/dest/l1_tx_utils/signer.d.ts +1 -1
  106. package/dest/l1_tx_utils/types.d.ts +1 -1
  107. package/dest/l1_tx_utils/types.d.ts.map +1 -1
  108. package/dest/l1_tx_utils/utils.d.ts +1 -1
  109. package/dest/l1_types.d.ts +1 -1
  110. package/dest/publisher_manager.d.ts +1 -1
  111. package/dest/publisher_manager.d.ts.map +1 -1
  112. package/dest/queries.d.ts +1 -1
  113. package/dest/queries.d.ts.map +1 -1
  114. package/dest/queries.js +10 -3
  115. package/dest/test/chain_monitor.d.ts +27 -24
  116. package/dest/test/chain_monitor.d.ts.map +1 -1
  117. package/dest/test/chain_monitor.js +32 -34
  118. package/dest/test/delayed_tx_utils.d.ts +1 -1
  119. package/dest/test/delayed_tx_utils.d.ts.map +1 -1
  120. package/dest/test/eth_cheat_codes.d.ts +8 -12
  121. package/dest/test/eth_cheat_codes.d.ts.map +1 -1
  122. package/dest/test/eth_cheat_codes.js +11 -3
  123. package/dest/test/eth_cheat_codes_with_state.d.ts +1 -1
  124. package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -1
  125. package/dest/test/index.d.ts +1 -1
  126. package/dest/test/rollup_cheat_codes.d.ts +14 -13
  127. package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
  128. package/dest/test/rollup_cheat_codes.js +46 -39
  129. package/dest/test/start_anvil.d.ts +4 -1
  130. package/dest/test/start_anvil.d.ts.map +1 -1
  131. package/dest/test/start_anvil.js +2 -1
  132. package/dest/test/tx_delayer.d.ts +1 -1
  133. package/dest/test/tx_delayer.d.ts.map +1 -1
  134. package/dest/test/tx_delayer.js +4 -3
  135. package/dest/test/upgrade_utils.d.ts +1 -1
  136. package/dest/types.d.ts +57 -2
  137. package/dest/types.d.ts.map +1 -1
  138. package/dest/utils.d.ts +15 -3
  139. package/dest/utils.d.ts.map +1 -1
  140. package/dest/utils.js +18 -0
  141. package/dest/zkPassportVerifierAddress.d.ts +1 -1
  142. package/package.json +33 -14
  143. package/src/client.ts +2 -2
  144. package/src/config.ts +24 -412
  145. package/src/contracts/empire_base.ts +6 -5
  146. package/src/contracts/empire_slashing_proposer.ts +16 -5
  147. package/src/contracts/governance_proposer.ts +16 -5
  148. package/src/contracts/inbox.ts +7 -2
  149. package/src/contracts/rollup.ts +99 -82
  150. package/src/contracts/tally_slashing_proposer.ts +11 -8
  151. package/src/deploy_aztec_l1_contracts.ts +557 -0
  152. package/src/deploy_l1_contract.ts +362 -0
  153. package/src/forwarder_proxy.ts +108 -0
  154. package/src/l1_contract_addresses.ts +22 -20
  155. package/src/l1_reader.ts +8 -0
  156. package/src/l1_tx_utils/config.ts +32 -11
  157. package/src/l1_tx_utils/constants.ts +11 -0
  158. package/src/l1_tx_utils/fee-strategies/index.ts +22 -0
  159. package/src/l1_tx_utils/fee-strategies/p75_competitive.ts +159 -0
  160. package/src/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.ts +241 -0
  161. package/src/l1_tx_utils/fee-strategies/types.ts +88 -0
  162. package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +119 -0
  163. package/src/l1_tx_utils/index-blobs.ts +2 -0
  164. package/src/l1_tx_utils/index.ts +2 -0
  165. package/src/l1_tx_utils/interfaces.ts +1 -1
  166. package/src/l1_tx_utils/l1_fee_analyzer.ts +804 -0
  167. package/src/l1_tx_utils/l1_tx_utils.ts +24 -4
  168. package/src/l1_tx_utils/readonly_l1_tx_utils.ts +78 -179
  169. package/src/queries.ts +12 -3
  170. package/src/test/chain_monitor.ts +50 -48
  171. package/src/test/eth_cheat_codes.ts +9 -3
  172. package/src/test/rollup_cheat_codes.ts +45 -43
  173. package/src/test/start_anvil.ts +4 -0
  174. package/src/test/tx_delayer.ts +5 -3
  175. package/src/types.ts +62 -0
  176. package/src/utils.ts +30 -1
  177. package/dest/deploy_l1_contracts.d.ts +0 -226
  178. package/dest/deploy_l1_contracts.d.ts.map +0 -1
  179. package/dest/deploy_l1_contracts.js +0 -1473
  180. package/dest/index.d.ts +0 -18
  181. package/dest/index.d.ts.map +0 -1
  182. package/dest/index.js +0 -17
  183. package/src/deploy_l1_contracts.ts +0 -1849
  184. package/src/index.ts +0 -17
@@ -1,5 +1,7 @@
1
- import { RollupContract, type ViemPublicClient } from '@aztec/ethereum';
1
+ import { RollupContract } from '@aztec/ethereum/contracts';
2
2
  import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
3
+ import type { ViemPublicClient } from '@aztec/ethereum/types';
4
+ import { CheckpointNumber, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
3
5
  import { EthAddress } from '@aztec/foundation/eth-address';
4
6
  import { createLogger } from '@aztec/foundation/log';
5
7
  import type { DateProvider } from '@aztec/foundation/timer';
@@ -14,7 +16,6 @@ import {
14
16
  hexToBigInt,
15
17
  http,
16
18
  } from 'viem';
17
- import { foundry } from 'viem/chains';
18
19
 
19
20
  import { EthCheatCodes } from './eth_cheat_codes.js';
20
21
 
@@ -30,8 +31,8 @@ export class RollupCheatCodes {
30
31
  addresses: Pick<L1ContractAddresses, 'rollupAddress'>,
31
32
  ) {
32
33
  this.client = createPublicClient({
33
- chain: foundry,
34
- transport: fallback(ethCheatCodes.rpcUrls.map(url => http(url))),
34
+ chain: ethCheatCodes.chain,
35
+ transport: fallback(ethCheatCodes.rpcUrls.map(url => http(url, { batch: false }))),
35
36
  });
36
37
  this.rollup = getContract({
37
38
  abi: RollupAbi,
@@ -50,15 +51,15 @@ export class RollupCheatCodes {
50
51
  }
51
52
 
52
53
  /** Returns the current slot */
53
- public async getSlot() {
54
+ public async getSlot(): Promise<SlotNumber> {
54
55
  const ts = BigInt((await this.client.getBlock()).timestamp);
55
- return await this.rollup.read.getSlotAt([ts]);
56
+ return SlotNumber.fromBigInt(await this.rollup.read.getSlotAt([ts]));
56
57
  }
57
58
 
58
59
  /** Returns the current epoch */
59
- public async getEpoch() {
60
+ public async getEpoch(): Promise<EpochNumber> {
60
61
  const slotNumber = await this.getSlot();
61
- return await this.rollup.read.getEpochAtSlot([slotNumber]);
62
+ return EpochNumber.fromBigInt(await this.rollup.read.getEpochAtSlot([BigInt(slotNumber)]));
62
63
  }
63
64
 
64
65
  /**
@@ -66,13 +67,13 @@ export class RollupCheatCodes {
66
67
  * @returns The pending and proven chain tips
67
68
  */
68
69
  public async getTips(): Promise<{
69
- /** The pending chain tip */ pending: bigint;
70
- /** The proven chain tip */ proven: bigint;
70
+ /** The pending chain tip */ pending: CheckpointNumber;
71
+ /** The proven chain tip */ proven: CheckpointNumber;
71
72
  }> {
72
- const res = await this.rollup.read.getTips();
73
+ const { pending, proven } = await this.rollup.read.getTips();
73
74
  return {
74
- pending: res.pendingBlockNumber,
75
- proven: res.provenBlockNumber,
75
+ pending: CheckpointNumber.fromBigInt(pending),
76
+ proven: CheckpointNumber.fromBigInt(proven),
76
77
  };
77
78
  }
78
79
 
@@ -81,16 +82,16 @@ export class RollupCheatCodes {
81
82
  */
82
83
  public async debugRollup() {
83
84
  const rollup = new RollupContract(this.client, this.rollup.address);
84
- const pendingNum = await rollup.getBlockNumber();
85
- const provenNum = await rollup.getProvenBlockNumber();
85
+ const pendingNum = await rollup.getCheckpointNumber();
86
+ const provenNum = await rollup.getProvenCheckpointNumber();
86
87
  const validators = await rollup.getAttesters();
87
88
  const committee = await rollup.getCurrentEpochCommittee();
88
89
  const archive = await rollup.archive();
89
90
  const slot = await this.getSlot();
90
91
  const epochNum = await rollup.getEpochNumberForSlotNumber(slot);
91
92
 
92
- this.logger.info(`Pending block num: ${pendingNum}`);
93
- this.logger.info(`Proven block num: ${provenNum}`);
93
+ this.logger.info(`Pending checkpoint num: ${pendingNum}`);
94
+ this.logger.info(`Proven checkpoint num: ${provenNum}`);
94
95
  this.logger.info(`Validators: ${validators.map(v => v.toString()).join(', ')}`);
95
96
  this.logger.info(`Committee: ${committee?.map(v => v.toString()).join(', ')}`);
96
97
  this.logger.info(`Archive: ${archive}`);
@@ -101,13 +102,13 @@ export class RollupCheatCodes {
101
102
  /** Fetches the epoch and slot duration config from the rollup contract */
102
103
  public async getConfig(): Promise<{
103
104
  /** Epoch duration */ epochDuration: bigint;
104
- /** Slot duration */ slotDuration: bigint;
105
+ /** Slot duration */ slotDuration: number;
105
106
  }> {
106
107
  const [epochDuration, slotDuration] = await Promise.all([
107
108
  this.rollup.read.getEpochDuration(),
108
109
  this.rollup.read.getSlotDuration(),
109
110
  ]);
110
- return { epochDuration, slotDuration };
111
+ return { epochDuration, slotDuration: Number(slotDuration) };
111
112
  }
112
113
 
113
114
  /**
@@ -116,18 +117,18 @@ export class RollupCheatCodes {
116
117
  * @param opts - Options
117
118
  */
118
119
  public async advanceToEpoch(
119
- epoch: bigint | number,
120
+ epoch: EpochNumber,
120
121
  opts: {
121
122
  /** Offset in seconds */
122
123
  offset?: number;
123
124
  } = {},
124
125
  ) {
125
126
  const { epochDuration: slotsInEpoch } = await this.getConfig();
126
- const timestamp =
127
- (await this.rollup.read.getTimestampForSlot([BigInt(epoch) * slotsInEpoch])) + BigInt(opts.offset ?? 0);
127
+ const slotNumber = SlotNumber(epoch * Number(slotsInEpoch));
128
+ const timestamp = (await this.rollup.read.getTimestampForSlot([BigInt(slotNumber)])) + BigInt(opts.offset ?? 0);
128
129
  try {
129
130
  await this.ethCheatCodes.warp(Number(timestamp), { ...opts, silent: true, resetBlockInterval: true });
130
- this.logger.warn(`Warped to epoch ${epoch}`);
131
+ this.logger.warn(`Warped to epoch ${epoch}`, { offset: opts.offset, timestamp });
131
132
  } catch (err) {
132
133
  this.logger.warn(`Warp to epoch ${epoch} failed: ${err}`);
133
134
  }
@@ -138,8 +139,8 @@ export class RollupCheatCodes {
138
139
  public async advanceToNextEpoch() {
139
140
  const slot = await this.getSlot();
140
141
  const { epochDuration, slotDuration } = await this.getConfig();
141
- const slotsUntilNextEpoch = epochDuration - (slot % epochDuration) + 1n;
142
- const timeToNextEpoch = slotsUntilNextEpoch * slotDuration;
142
+ const slotsUntilNextEpoch = epochDuration - (BigInt(slot) % epochDuration) + 1n;
143
+ const timeToNextEpoch = slotsUntilNextEpoch * BigInt(slotDuration);
143
144
  const l1Timestamp = BigInt((await this.client.getBlock()).timestamp);
144
145
  await this.ethCheatCodes.warp(Number(l1Timestamp + timeToNextEpoch), {
145
146
  silent: true,
@@ -151,10 +152,11 @@ export class RollupCheatCodes {
151
152
  /** Warps time in L1 until the beginning of the next slot. */
152
153
  public async advanceToNextSlot() {
153
154
  const currentSlot = await this.getSlot();
154
- const timestamp = await this.rollup.read.getTimestampForSlot([currentSlot + 1n]);
155
+ const nextSlot = SlotNumber(currentSlot + 1);
156
+ const timestamp = await this.rollup.read.getTimestampForSlot([BigInt(nextSlot)]);
155
157
  await this.ethCheatCodes.warp(Number(timestamp), { silent: true, resetBlockInterval: true });
156
- this.logger.warn(`Advanced to slot ${currentSlot + 1n}`);
157
- return [timestamp, currentSlot + 1n];
158
+ this.logger.warn(`Advanced to slot ${nextSlot}`);
159
+ return [timestamp, nextSlot];
158
160
  }
159
161
 
160
162
  /**
@@ -163,42 +165,42 @@ export class RollupCheatCodes {
163
165
  */
164
166
  public async advanceSlots(howMany: number) {
165
167
  const l1Timestamp = (await this.client.getBlock()).timestamp;
166
- const slotDuration = await this.rollup.read.getSlotDuration();
167
- const timeToWarp = BigInt(howMany) * slotDuration;
168
+ const slotDuration = Number(await this.rollup.read.getSlotDuration());
169
+ const timeToWarp = BigInt(howMany) * BigInt(slotDuration);
168
170
  await this.ethCheatCodes.warp(l1Timestamp + timeToWarp, { silent: true, resetBlockInterval: true });
169
171
  const [slot, epoch] = await Promise.all([this.getSlot(), this.getEpoch()]);
170
172
  this.logger.warn(`Advanced ${howMany} slots up to slot ${slot} in epoch ${epoch}`);
171
173
  }
172
174
 
173
175
  /**
174
- * Marks the specified block (or latest if none) as proven
175
- * @param maybeBlockNumber - The block number to mark as proven (defaults to latest pending)
176
+ * Marks the specified checkpoint (or latest if none) as proven
177
+ * @param maybeCheckpointNumber - The checkpoint number to mark as proven (defaults to latest pending)
176
178
  */
177
- public markAsProven(maybeBlockNumber?: number | bigint) {
179
+ public markAsProven(maybeCheckpointNumber?: number | bigint) {
178
180
  return this.ethCheatCodes.execWithPausedAnvil(async () => {
179
181
  const tipsBefore = await this.getTips();
180
182
  const { pending, proven } = tipsBefore;
181
183
 
182
- let blockNumber = maybeBlockNumber;
183
- if (blockNumber === undefined || blockNumber > pending) {
184
- blockNumber = pending;
184
+ let checkpointNumber = maybeCheckpointNumber;
185
+ if (checkpointNumber === undefined || checkpointNumber > pending) {
186
+ checkpointNumber = pending;
185
187
  }
186
- if (blockNumber <= proven) {
187
- this.logger.debug(`Block ${blockNumber} is already proven`);
188
+ if (checkpointNumber <= proven) {
189
+ this.logger.debug(`Checkpoint ${checkpointNumber} is already proven`);
188
190
  return;
189
191
  }
190
192
 
191
193
  // @note @LHerskind this is heavily dependent on the storage layout and size of values
192
194
  // The rollupStore is a struct and if the size of elements or the struct changes, this can break
193
- const provenBlockNumberSlot = hexToBigInt(RollupContract.stfStorageSlot);
195
+ const provenCheckpointNumberSlot = hexToBigInt(RollupContract.stfStorageSlot);
194
196
 
195
197
  // Need to pack it as a single 32 byte word
196
- const newValue = (BigInt(tipsBefore.pending) << 128n) | BigInt(blockNumber);
197
- await this.ethCheatCodes.store(EthAddress.fromString(this.rollup.address), provenBlockNumberSlot, newValue);
198
+ const newValue = (BigInt(tipsBefore.pending) << 128n) | BigInt(checkpointNumber);
199
+ await this.ethCheatCodes.store(EthAddress.fromString(this.rollup.address), provenCheckpointNumberSlot, newValue);
198
200
 
199
201
  const tipsAfter = await this.getTips();
200
202
  if (tipsAfter.pending < tipsAfter.proven) {
201
- throw new Error('Overwrote pending tip to a block in the past');
203
+ throw new Error('Overwrote pending tip to a checkpoint in the past');
202
204
  }
203
205
 
204
206
  this.logger.info(
@@ -209,7 +211,7 @@ export class RollupCheatCodes {
209
211
 
210
212
  /**
211
213
  * Overrides the inProgress field of the Inbox contract state
212
- * @param howMuch - How many blocks to move it forward
214
+ * @param howMuch - How many checkpoints to move it forward
213
215
  */
214
216
  public advanceInboxInProgress(howMuch: number | bigint): Promise<bigint> {
215
217
  return this.ethCheatCodes.execWithPausedAnvil(async () => {
@@ -15,6 +15,9 @@ export async function startAnvil(
15
15
  log?: boolean;
16
16
  captureMethodCalls?: boolean;
17
17
  accounts?: number;
18
+ chainId?: number;
19
+ /** The hardfork to use - note: @viem/anvil types are out of date but 'cancun' and 'latest' work */
20
+ hardfork?: string;
18
21
  } = {},
19
22
  ): Promise<{ anvil: Anvil; methodCalls?: string[]; rpcUrl: string; stop: () => Promise<void> }> {
20
23
  const anvilBinary = resolve(dirname(fileURLToPath(import.meta.url)), '../../', 'scripts/anvil_kill_wrapper.sh');
@@ -35,6 +38,7 @@ export async function startAnvil(
35
38
  stopTimeout: 1000,
36
39
  accounts: opts.accounts ?? 20,
37
40
  gasLimit: 45_000_000n,
41
+ chainId: opts.chainId ?? 31337,
38
42
  });
39
43
 
40
44
  // Listen to the anvil output to get the port.
@@ -18,6 +18,8 @@ import {
18
18
 
19
19
  import { type ViemClient, isExtendedClient } from '../types.js';
20
20
 
21
+ const MAX_WAIT_TIME_SECONDS = 180;
22
+
21
23
  export function waitUntilBlock<T extends Client>(
22
24
  client: T,
23
25
  blockNumber: number | bigint,
@@ -36,7 +38,7 @@ export function waitUntilBlock<T extends Client>(
36
38
  return currentBlockNumber >= BigInt(blockNumber);
37
39
  },
38
40
  `Wait until L1 block ${blockNumber}`,
39
- timeout ?? 120,
41
+ timeout ?? MAX_WAIT_TIME_SECONDS,
40
42
  0.1,
41
43
  );
42
44
  }
@@ -66,7 +68,7 @@ export function waitUntilL1Timestamp<T extends Client>(
66
68
  return currentTs >= BigInt(timestamp);
67
69
  },
68
70
  `Wait until L1 timestamp ${timestamp}`,
69
- timeout ?? 120,
71
+ timeout ?? MAX_WAIT_TIME_SECONDS,
70
72
  0.1,
71
73
  );
72
74
  }
@@ -230,7 +232,7 @@ export function withDelayer<T extends ViemClient>(
230
232
  return Promise.resolve(txHash!);
231
233
  } else {
232
234
  const txHash = await client.sendRawTransaction(...args);
233
- logger.verbose(`Sent tx immediately ${txHash}`);
235
+ logger.debug(`Sent tx immediately ${txHash}`);
234
236
  delayer.sentTxHashes.push(txHash);
235
237
  return txHash;
236
238
  }
package/src/types.ts CHANGED
@@ -5,6 +5,7 @@ import type {
5
5
  Client,
6
6
  FallbackTransport,
7
7
  GetContractReturnType,
8
+ Hex,
8
9
  HttpTransport,
9
10
  PublicActions,
10
11
  PublicClient,
@@ -16,6 +17,67 @@ import type {
16
17
  /** Type for a viem public client */
17
18
  export type ViemPublicClient = PublicClient<FallbackTransport<HttpTransport[]>, Chain>;
18
19
 
20
+ export type PublicRpcDebugSchema = [
21
+ {
22
+ Method: 'debug_traceTransaction';
23
+ Parameters: [txHash: `0x${string}`, options: { tracer: 'callTracer' }];
24
+ ReturnType: DebugCallTrace;
25
+ },
26
+ {
27
+ Method: 'trace_transaction';
28
+ Parameters: [txHash: `0x${string}`];
29
+ ReturnType: TraceTransactionResponse[];
30
+ },
31
+ ];
32
+
33
+ /** Return type for a debug_traceTransaction call */
34
+ export type DebugCallTrace = {
35
+ from: Hex;
36
+ to?: Hex;
37
+ type: string;
38
+ input?: Hex;
39
+ output?: Hex;
40
+ gas?: Hex;
41
+ gasUsed?: Hex;
42
+ value?: Hex;
43
+ error?: string;
44
+ calls?: DebugCallTrace[];
45
+ };
46
+
47
+ /** Action object for a trace_transaction call */
48
+ export type TraceAction = {
49
+ from: Hex;
50
+ to?: Hex;
51
+ callType: string;
52
+ gas?: Hex;
53
+ input?: Hex;
54
+ value?: Hex;
55
+ };
56
+
57
+ /** Result object for a trace_transaction call */
58
+ export type TraceResult = {
59
+ gasUsed?: Hex;
60
+ output?: Hex;
61
+ };
62
+
63
+ /** Return type for a single trace in trace_transaction response */
64
+ export type TraceTransactionResponse = {
65
+ action: TraceAction;
66
+ result?: TraceResult;
67
+ error?: string;
68
+ subtraces: number;
69
+ traceAddress: number[];
70
+ type: string;
71
+ };
72
+
73
+ /** Type for a viem public client with support for debug methods */
74
+ export type ViemPublicDebugClient = PublicClient<
75
+ FallbackTransport<HttpTransport[]>,
76
+ Chain,
77
+ undefined,
78
+ [...PublicRpcSchema, ...PublicRpcDebugSchema]
79
+ >;
80
+
19
81
  export type ExtendedViemWalletClient = Client<
20
82
  FallbackTransport<readonly HttpTransport[]>,
21
83
  Chain,
package/src/utils.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Fr } from '@aztec/foundation/fields';
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import type { Logger } from '@aztec/foundation/log';
3
3
  import { ErrorsAbi } from '@aztec/l1-artifacts/ErrorsAbi';
4
4
 
@@ -8,6 +8,7 @@ import {
8
8
  type ContractEventName,
9
9
  ContractFunctionRevertedError,
10
10
  type DecodeEventLogReturnType,
11
+ type FormattedTransaction,
11
12
  type Hex,
12
13
  type Log,
13
14
  decodeErrorResult,
@@ -233,3 +234,31 @@ export function tryGetCustomErrorName(err: any) {
233
234
  return undefined;
234
235
  }
235
236
  }
237
+
238
+ /**
239
+ * Type guard to check if a transaction is a blob transaction (EIP-4844).
240
+ * Blob transactions have maxFeePerBlobGas and blobVersionedHashes fields.
241
+ */
242
+ export function isBlobTransaction(tx: FormattedTransaction): tx is FormattedTransaction & {
243
+ maxFeePerBlobGas: bigint;
244
+ blobVersionedHashes: readonly Hex[];
245
+ } {
246
+ return (
247
+ 'maxFeePerBlobGas' in tx &&
248
+ tx.maxFeePerBlobGas !== undefined &&
249
+ 'blobVersionedHashes' in tx &&
250
+ tx.blobVersionedHashes !== undefined
251
+ );
252
+ }
253
+
254
+ /**
255
+ * Calculates a percentile from an array of bigints
256
+ */
257
+ export function calculatePercentile(values: bigint[], percentile: number): bigint {
258
+ if (values.length === 0) {
259
+ return 0n;
260
+ }
261
+ const sorted = [...values].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
262
+ const index = Math.ceil((sorted.length - 1) * (percentile / 100));
263
+ return sorted[index];
264
+ }
@@ -1,226 +0,0 @@
1
- import { SecretValue } from '@aztec/foundation/config';
2
- import { EthAddress } from '@aztec/foundation/eth-address';
3
- import type { Fr } from '@aztec/foundation/fields';
4
- import { type Logger } from '@aztec/foundation/log';
5
- import { DateProvider } from '@aztec/foundation/timer';
6
- import type { Abi, Narrow } from 'abitype';
7
- import { type Chain, type ContractConstructorArgs, type HDAccount, type Hex, type PrivateKeyAccount } from 'viem';
8
- import { type L1ContractsConfig } from './config.js';
9
- import { RollupContract } from './contracts/rollup.js';
10
- import type { L1ContractAddresses } from './l1_contract_addresses.js';
11
- import { type GasPrice, type L1TxConfig, type L1TxRequest, L1TxUtils, type L1TxUtilsConfig } from './l1_tx_utils/index.js';
12
- import type { ExtendedViemWalletClient } from './types.js';
13
- export declare const DEPLOYER_ADDRESS: Hex;
14
- export type Operator = {
15
- attester: EthAddress;
16
- withdrawer: EthAddress;
17
- bn254SecretKey: SecretValue<bigint>;
18
- };
19
- /**
20
- * Return type of the deployL1Contract function.
21
- */
22
- export type DeployL1ContractsReturnType = {
23
- /** Extended Wallet Client Type. */
24
- l1Client: ExtendedViemWalletClient;
25
- /** The currently deployed l1 contract addresses */
26
- l1ContractAddresses: L1ContractAddresses;
27
- /** Version of the current rollup contract. */
28
- rollupVersion: number;
29
- };
30
- export interface LinkReferences {
31
- [fileName: string]: {
32
- [contractName: string]: ReadonlyArray<{
33
- start: number;
34
- length: number;
35
- }>;
36
- };
37
- }
38
- export interface Libraries {
39
- linkReferences: LinkReferences;
40
- libraryCode: Record<string, ContractArtifacts>;
41
- }
42
- /**
43
- * Contract artifacts
44
- */
45
- export interface ContractArtifacts<TAbi extends Abi | readonly unknown[] = Abi> {
46
- /**
47
- * The contract name.
48
- */
49
- name: string;
50
- /**
51
- * The contract abi.
52
- */
53
- contractAbi: Narrow<TAbi>;
54
- /**
55
- * The contract bytecode
56
- */
57
- contractBytecode: Hex;
58
- /**
59
- * The contract libraries
60
- */
61
- libraries?: Libraries;
62
- }
63
- export type VerificationLibraryEntry = {
64
- file: string;
65
- contract: string;
66
- address: string;
67
- };
68
- export type VerificationRecord = {
69
- name: string;
70
- address: string;
71
- constructorArgsHex: Hex;
72
- libraries: VerificationLibraryEntry[];
73
- };
74
- export interface DeployL1ContractsArgs extends Omit<L1ContractsConfig, keyof L1TxUtilsConfig> {
75
- /** The vk tree root. */
76
- vkTreeRoot: Fr;
77
- /** The hash of the protocol contracts. */
78
- protocolContractsHash: Fr;
79
- /** The genesis root of the archive tree. */
80
- genesisArchiveRoot: Fr;
81
- /** The salt for CREATE2 deployment. */
82
- salt: number | undefined;
83
- /** The initial validators for the rollup contract. */
84
- initialValidators?: Operator[];
85
- /** Configuration for the L1 tx utils module. */
86
- l1TxConfig?: Partial<L1TxUtilsConfig>;
87
- /** Enable fast mode for deployments (fire and forget transactions) */
88
- acceleratedTestDeployments?: boolean;
89
- /** The initial balance of the fee juice portal. This is the amount of fee juice that is prefunded to accounts */
90
- feeJuicePortalInitialBalance?: bigint;
91
- /** Whether to deploy the real verifier or the mock verifier */
92
- realVerifier: boolean;
93
- /** The zk passport args */
94
- zkPassportArgs?: ZKPassportArgs;
95
- /** If provided, use this token for BOTH fee and staking assets (skip deployments) */
96
- existingTokenAddress?: EthAddress;
97
- }
98
- export interface ZKPassportArgs {
99
- /** Whether to use the mock zk passport verifier */
100
- mockZkPassportVerifier?: boolean;
101
- /** The domain of the zk passport (url) */
102
- zkPassportDomain?: string;
103
- /** The scope of the zk passport (personhood, etc) */
104
- zkPassportScope?: string;
105
- }
106
- /**
107
- * Validates that the provided address points to a contract that resembles an ERC20 token.
108
- * Checks for contract code and attempts common ERC20 view calls.
109
- * Throws an error if validation fails.
110
- */
111
- export declare function validateExistingErc20TokenAddress(l1Client: ExtendedViemWalletClient, tokenAddress: EthAddress, logger: Logger): Promise<void>;
112
- export declare const deploySharedContracts: (l1Client: ExtendedViemWalletClient, deployer: L1Deployer, args: DeployL1ContractsArgs, logger: Logger) => Promise<{
113
- feeAssetAddress: EthAddress;
114
- feeAssetHandlerAddress: EthAddress | undefined;
115
- stakingAssetAddress: EthAddress;
116
- stakingAssetHandlerAddress: EthAddress | undefined;
117
- zkPassportVerifierAddress: EthAddress | undefined;
118
- registryAddress: EthAddress;
119
- gseAddress: EthAddress;
120
- governanceAddress: EthAddress;
121
- governanceProposerAddress: EthAddress;
122
- coinIssuerAddress: EthAddress;
123
- rewardDistributorAddress: EthAddress;
124
- }>;
125
- /**
126
- * Deploys a new rollup, using the existing canonical version to derive certain values (addresses of assets etc).
127
- * @param clients - The L1 clients.
128
- * @param args - The deployment arguments.
129
- * @param registryAddress - The address of the registry.
130
- * @param logger - The logger.
131
- * @param txUtilsConfig - The L1 tx utils config.
132
- * @param createVerificationJson - Optional path to write verification data for forge verify.
133
- */
134
- export declare const deployRollupForUpgrade: (extendedClient: ExtendedViemWalletClient, args: Omit<DeployL1ContractsArgs, "governanceProposerQuorum" | "governanceProposerRoundSize" | "ejectionThreshold" | "activationThreshold">, registryAddress: EthAddress, logger: Logger, txUtilsConfig: L1TxUtilsConfig, createVerificationJson?: string | false) => Promise<{
135
- rollup: RollupContract;
136
- slashFactoryAddress: EthAddress;
137
- }>;
138
- export declare const deploySlashFactory: (deployer: L1Deployer, rollupAddress: Hex, logger: Logger) => Promise<EthAddress>;
139
- export declare const deployUpgradePayload: (deployer: L1Deployer, addresses: Pick<L1ContractAddresses, "registryAddress" | "rollupAddress">) => Promise<EthAddress>;
140
- /**
141
- * Deploys a new rollup contract, funds and initializes the fee juice portal, and initializes the validator set.
142
- */
143
- export declare const deployRollup: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, args: Omit<DeployL1ContractsArgs, "governanceProposerQuorum" | "governanceProposerRoundSize" | "ejectionThreshold" | "activationThreshold">, addresses: Pick<L1ContractAddresses, "feeJuiceAddress" | "registryAddress" | "rewardDistributorAddress" | "stakingAssetAddress" | "gseAddress" | "governanceAddress">, logger: Logger) => Promise<{
144
- rollup: RollupContract;
145
- slashFactoryAddress: EthAddress;
146
- }>;
147
- export declare const handoverToGovernance: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, registryAddress: EthAddress, gseAddress: EthAddress, coinIssuerAddress: EthAddress, feeAssetAddress: EthAddress, governanceAddress: EthAddress, logger: Logger, acceleratedTestDeployments: boolean | undefined, useExternalToken?: boolean) => Promise<{
148
- dateGatedRelayerAddress: EthAddress;
149
- }>;
150
- export declare const addMultipleValidators: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, gseAddress: Hex, rollupAddress: Hex, stakingAssetAddress: Hex, validators: Operator[], acceleratedTestDeployments: boolean | undefined, logger: Logger) => Promise<void>;
151
- /**
152
- * Initialize the fee asset handler and make it a minter on the fee asset.
153
- * @note This function will only be used for testing purposes.
154
- *
155
- * @param extendedClient - The L1 clients.
156
- * @param deployer - The L1 deployer.
157
- * @param feeAssetAddress - The address of the fee asset.
158
- * @param logger - The logger.
159
- */
160
- export declare const cheat_initializeFeeAssetHandler: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, feeAssetAddress: EthAddress, logger: Logger) => Promise<{
161
- feeAssetHandlerAddress: EthAddress;
162
- txHash: Hex;
163
- }>;
164
- /**
165
- * Deploys the aztec L1 contracts; Rollup & (optionally) Decoder Helper.
166
- * @param rpcUrls - List of URLs of the ETH RPC to use for deployment.
167
- * @param account - Private Key or HD Account that will deploy the contracts.
168
- * @param chain - The chain instance to deploy to.
169
- * @param logger - A logger object.
170
- * @param args - Arguments for initialization of L1 contracts
171
- * @returns A list of ETH addresses of the deployed contracts.
172
- */
173
- export declare const deployL1Contracts: (rpcUrls: string[], account: HDAccount | PrivateKeyAccount, chain: Chain, logger: Logger, args: DeployL1ContractsArgs, txUtilsConfig?: L1TxUtilsConfig, createVerificationJson?: string | false) => Promise<DeployL1ContractsReturnType>;
174
- export declare class L1Deployer {
175
- readonly client: ExtendedViemWalletClient;
176
- private acceleratedTestDeployments;
177
- private logger;
178
- private txUtilsConfig?;
179
- private createVerificationJson;
180
- private salt;
181
- private txHashes;
182
- readonly l1TxUtils: L1TxUtils;
183
- readonly verificationRecords: VerificationRecord[];
184
- constructor(client: ExtendedViemWalletClient, maybeSalt: number | undefined, dateProvider?: DateProvider, acceleratedTestDeployments?: boolean, logger?: Logger, txUtilsConfig?: L1TxUtilsConfig | undefined, createVerificationJson?: boolean);
185
- deploy<const TAbi extends Abi>(params: ContractArtifacts<TAbi>, args?: ContractConstructorArgs<TAbi>, opts?: {
186
- gasLimit?: bigint;
187
- }): Promise<{
188
- address: EthAddress;
189
- existed: boolean;
190
- }>;
191
- waitForDeployments(): Promise<void>;
192
- sendTransaction(tx: L1TxRequest, options?: L1TxConfig): Promise<{
193
- txHash: Hex;
194
- gasLimit: bigint;
195
- gasPrice: GasPrice;
196
- }>;
197
- }
198
- /**
199
- * Helper function to deploy ETH contracts.
200
- * @param walletClient - A viem WalletClient.
201
- * @param publicClient - A viem PublicClient.
202
- * @param abi - The ETH contract's ABI (as abitype's Abi).
203
- * @param bytecode - The ETH contract's bytecode.
204
- * @param args - Constructor arguments for the contract.
205
- * @param salt - Optional salt for CREATE2 deployment (does not wait for deployment tx to be mined if set, does not send tx if contract already exists).
206
- * @returns The ETH address the contract was deployed to.
207
- */
208
- export declare function deployL1Contract(extendedClient: ExtendedViemWalletClient, abi: Narrow<Abi | readonly unknown[]>, bytecode: Hex, args?: readonly unknown[], opts?: {
209
- salt?: Hex;
210
- libraries?: Libraries;
211
- logger?: Logger;
212
- l1TxUtils?: L1TxUtils;
213
- gasLimit?: bigint;
214
- acceleratedTestDeployments?: boolean;
215
- }): Promise<{
216
- address: EthAddress;
217
- txHash: Hex | undefined;
218
- deployedLibraries?: VerificationLibraryEntry[];
219
- existed: boolean;
220
- }>;
221
- export declare function getExpectedAddress(abi: Narrow<Abi | readonly unknown[]>, bytecode: Hex, args: readonly unknown[], salt: Hex): {
222
- address: `0x${string}`;
223
- paddedSalt: `0x${string}`;
224
- calldata: `0x${string}`;
225
- };
226
- //# sourceMappingURL=deploy_l1_contracts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../src/deploy_l1_contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAwB,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAG3C,OAAO,EACL,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,iBAAiB,EAUvB,MAAM,MAAM,CAAC;AAKd,OAAO,EACL,KAAK,iBAAiB,EAMvB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAAE,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAmB7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,SAAS,EACT,KAAK,eAAe,EAGrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAI3D,eAAO,MAAM,gBAAgB,EAAE,GAAkD,CAAC;AAElF,MAAM,MAAM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