@aztec/ethereum 3.0.0-nightly.20251126 → 3.0.0-nightly.20251128

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 (94) 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/config.d.ts +1 -1
  5. package/dest/config.d.ts.map +1 -1
  6. package/dest/constants.d.ts +1 -1
  7. package/dest/contracts/empire_base.d.ts +1 -1
  8. package/dest/contracts/empire_slashing_proposer.d.ts +1 -1
  9. package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -1
  10. package/dest/contracts/errors.d.ts +1 -1
  11. package/dest/contracts/errors.d.ts.map +1 -1
  12. package/dest/contracts/fee_asset_handler.d.ts +1 -1
  13. package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
  14. package/dest/contracts/fee_juice.d.ts +1 -1
  15. package/dest/contracts/fee_juice.d.ts.map +1 -1
  16. package/dest/contracts/governance.d.ts +16 -16
  17. package/dest/contracts/governance.d.ts.map +1 -1
  18. package/dest/contracts/governance_proposer.d.ts +1 -1
  19. package/dest/contracts/governance_proposer.d.ts.map +1 -1
  20. package/dest/contracts/gse.d.ts +1 -1
  21. package/dest/contracts/gse.d.ts.map +1 -1
  22. package/dest/contracts/inbox.d.ts +1 -1
  23. package/dest/contracts/inbox.d.ts.map +1 -1
  24. package/dest/contracts/index.d.ts +1 -1
  25. package/dest/contracts/multicall.d.ts +2 -2
  26. package/dest/contracts/multicall.d.ts.map +1 -1
  27. package/dest/contracts/registry.d.ts +1 -1
  28. package/dest/contracts/registry.d.ts.map +1 -1
  29. package/dest/contracts/rollup.d.ts +26 -25
  30. package/dest/contracts/rollup.d.ts.map +1 -1
  31. package/dest/contracts/rollup.js +12 -11
  32. package/dest/contracts/slasher_contract.d.ts +1 -1
  33. package/dest/contracts/slasher_contract.d.ts.map +1 -1
  34. package/dest/contracts/tally_slashing_proposer.d.ts +2 -2
  35. package/dest/contracts/tally_slashing_proposer.d.ts.map +1 -1
  36. package/dest/contracts/utils.d.ts +1 -1
  37. package/dest/deploy_l1_contracts.d.ts +453 -8
  38. package/dest/deploy_l1_contracts.d.ts.map +1 -1
  39. package/dest/eth-signer/eth-signer.d.ts +1 -1
  40. package/dest/eth-signer/index.d.ts +1 -1
  41. package/dest/index.d.ts +1 -1
  42. package/dest/l1_artifacts.d.ts +34 -35
  43. package/dest/l1_artifacts.d.ts.map +1 -1
  44. package/dest/l1_contract_addresses.d.ts +3 -3
  45. package/dest/l1_reader.d.ts +1 -1
  46. package/dest/l1_tx_utils/config.d.ts +1 -1
  47. package/dest/l1_tx_utils/config.d.ts.map +1 -1
  48. package/dest/l1_tx_utils/constants.d.ts +1 -1
  49. package/dest/l1_tx_utils/factory.d.ts +1 -1
  50. package/dest/l1_tx_utils/index.d.ts +1 -1
  51. package/dest/l1_tx_utils/interfaces.d.ts +1 -1
  52. package/dest/l1_tx_utils/l1_tx_utils.d.ts +1 -2
  53. package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
  54. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +1 -1
  55. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +1 -1
  56. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +16 -16
  57. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
  58. package/dest/l1_tx_utils/signer.d.ts +1 -1
  59. package/dest/l1_tx_utils/types.d.ts +1 -1
  60. package/dest/l1_tx_utils/types.d.ts.map +1 -1
  61. package/dest/l1_tx_utils/utils.d.ts +1 -1
  62. package/dest/l1_types.d.ts +1 -1
  63. package/dest/publisher_manager.d.ts +1 -1
  64. package/dest/publisher_manager.d.ts.map +1 -1
  65. package/dest/queries.d.ts +1 -1
  66. package/dest/test/chain_monitor.d.ts +4 -3
  67. package/dest/test/chain_monitor.d.ts.map +1 -1
  68. package/dest/test/chain_monitor.js +1 -1
  69. package/dest/test/delayed_tx_utils.d.ts +1 -1
  70. package/dest/test/delayed_tx_utils.d.ts.map +1 -1
  71. package/dest/test/eth_cheat_codes.d.ts +8 -12
  72. package/dest/test/eth_cheat_codes.d.ts.map +1 -1
  73. package/dest/test/eth_cheat_codes.js +8 -2
  74. package/dest/test/eth_cheat_codes_with_state.d.ts +1 -1
  75. package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -1
  76. package/dest/test/index.d.ts +1 -1
  77. package/dest/test/rollup_cheat_codes.d.ts +4 -3
  78. package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
  79. package/dest/test/rollup_cheat_codes.js +4 -4
  80. package/dest/test/start_anvil.d.ts +2 -1
  81. package/dest/test/start_anvil.d.ts.map +1 -1
  82. package/dest/test/start_anvil.js +2 -1
  83. package/dest/test/tx_delayer.d.ts +1 -1
  84. package/dest/test/upgrade_utils.d.ts +1 -1
  85. package/dest/types.d.ts +1 -1
  86. package/dest/utils.d.ts +1 -1
  87. package/dest/utils.d.ts.map +1 -1
  88. package/dest/zkPassportVerifierAddress.d.ts +1 -1
  89. package/package.json +10 -9
  90. package/src/contracts/rollup.ts +12 -11
  91. package/src/test/chain_monitor.ts +4 -3
  92. package/src/test/eth_cheat_codes.ts +7 -1
  93. package/src/test/rollup_cheat_codes.ts +5 -5
  94. package/src/test/start_anvil.ts +2 -0
@@ -6,7 +6,8 @@ import { createLogger } from '@aztec/foundation/log';
6
6
  import { pluralize } from '@aztec/foundation/string';
7
7
  import type { DateProvider, TestDateProvider } from '@aztec/foundation/timer';
8
8
 
9
- import { type Hex, type Transaction, createPublicClient, fallback, hexToNumber, http } from 'viem';
9
+ import { type Chain, type Hex, type Transaction, createPublicClient, fallback, hexToNumber, http } from 'viem';
10
+ import { foundry } from 'viem/chains';
10
11
 
11
12
  import type { ViemPublicClient } from '../types.js';
12
13
 
@@ -28,9 +29,14 @@ export class EthCheatCodes {
28
29
  * The logger to use for the eth cheatcodes
29
30
  */
30
31
  public logger = createLogger('ethereum:cheat_codes'),
32
+ /**
33
+ * The chain configuration provided to Anvil
34
+ */
35
+ public chain: Chain = foundry,
31
36
  ) {
32
37
  this.publicClient = createPublicClient({
33
38
  transport: fallback(this.rpcUrls.map(url => http(url))),
39
+ chain: chain,
34
40
  });
35
41
  }
36
42
 
@@ -1,5 +1,6 @@
1
1
  import { RollupContract, type ViemPublicClient } from '@aztec/ethereum';
2
2
  import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
3
+ import { EpochNumber } from '@aztec/foundation/branded-types';
3
4
  import { EthAddress } from '@aztec/foundation/eth-address';
4
5
  import { createLogger } from '@aztec/foundation/log';
5
6
  import type { DateProvider } from '@aztec/foundation/timer';
@@ -14,7 +15,6 @@ import {
14
15
  hexToBigInt,
15
16
  http,
16
17
  } from 'viem';
17
- import { foundry } from 'viem/chains';
18
18
 
19
19
  import { EthCheatCodes } from './eth_cheat_codes.js';
20
20
 
@@ -30,7 +30,7 @@ export class RollupCheatCodes {
30
30
  addresses: Pick<L1ContractAddresses, 'rollupAddress'>,
31
31
  ) {
32
32
  this.client = createPublicClient({
33
- chain: foundry,
33
+ chain: ethCheatCodes.chain,
34
34
  transport: fallback(ethCheatCodes.rpcUrls.map(url => http(url))),
35
35
  });
36
36
  this.rollup = getContract({
@@ -56,9 +56,9 @@ export class RollupCheatCodes {
56
56
  }
57
57
 
58
58
  /** Returns the current epoch */
59
- public async getEpoch() {
59
+ public async getEpoch(): Promise<EpochNumber> {
60
60
  const slotNumber = await this.getSlot();
61
- return await this.rollup.read.getEpochAtSlot([slotNumber]);
61
+ return EpochNumber.fromBigInt(await this.rollup.read.getEpochAtSlot([slotNumber]));
62
62
  }
63
63
 
64
64
  /**
@@ -112,7 +112,7 @@ export class RollupCheatCodes {
112
112
  * @param opts - Options
113
113
  */
114
114
  public async advanceToEpoch(
115
- epoch: bigint | number,
115
+ epoch: EpochNumber | bigint | number,
116
116
  opts: {
117
117
  /** Offset in seconds */
118
118
  offset?: number;
@@ -15,6 +15,7 @@ export async function startAnvil(
15
15
  log?: boolean;
16
16
  captureMethodCalls?: boolean;
17
17
  accounts?: number;
18
+ chainId?: number;
18
19
  } = {},
19
20
  ): Promise<{ anvil: Anvil; methodCalls?: string[]; rpcUrl: string; stop: () => Promise<void> }> {
20
21
  const anvilBinary = resolve(dirname(fileURLToPath(import.meta.url)), '../../', 'scripts/anvil_kill_wrapper.sh');
@@ -35,6 +36,7 @@ export async function startAnvil(
35
36
  stopTimeout: 1000,
36
37
  accounts: opts.accounts ?? 20,
37
38
  gasLimit: 45_000_000n,
39
+ chainId: opts.chainId ?? 31337,
38
40
  });
39
41
 
40
42
  // Listen to the anvil output to get the port.