@aztec/constants 0.0.0-test.0 → 0.0.1-commit.001888fc

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/src/constants.ts CHANGED
@@ -1,5 +1,42 @@
1
+ import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+
4
+ // Re-export L2 block number constants with proper BlockNumber type
5
+ // Note: The generated constants are plain numbers, but we provide typed versions here
6
+ import {
7
+ GENESIS_BLOCK_HEADER_HASH as GENESIS_BLOCK_HEADER_HASH_BIGINT,
8
+ INITIAL_CHECKPOINT_NUMBER as INITIAL_CHECKPOINT_NUM_RAW,
9
+ INITIAL_L2_BLOCK_NUM as INITIAL_L2_BLOCK_NUM_RAW,
10
+ MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT,
11
+ MAX_PROCESSABLE_L2_GAS,
12
+ } from './constants.gen.js';
13
+
1
14
  // Typescript-land-only constants
2
- export const FEE_FUNDING_FOR_TESTER_ACCOUNT = BigInt(1_000e18);
15
+ export const SPONSORED_FPC_SALT = BigInt(0);
3
16
 
4
17
  // Autogenerated constants loaded from noir-land
18
+ // eslint-disable-next-line import-x/export
5
19
  export * from './constants.gen.js';
20
+
21
+ /** The initial L2 block number (typed as BlockNumber). This is the first block number in the Aztec L2 chain. */
22
+ // eslint-disable-next-line import-x/export
23
+ export const INITIAL_L2_BLOCK_NUM: BlockNumber = BlockNumber(INITIAL_L2_BLOCK_NUM_RAW);
24
+
25
+ /** The initial L2 checkpoint number (typed as CheckpointNumber). This is the first checkpoint number in the Aztec L2 chain. */
26
+ // eslint-disable-next-line import-x/export
27
+ export const INITIAL_CHECKPOINT_NUMBER: CheckpointNumber = CheckpointNumber(INITIAL_CHECKPOINT_NUM_RAW);
28
+
29
+ /** The block header hash for the genesis block 0. */
30
+ // eslint-disable-next-line import-x/export
31
+ export const GENESIS_BLOCK_HEADER_HASH = new Fr(GENESIS_BLOCK_HEADER_HASH_BIGINT);
32
+
33
+ // Override the default gas limits set in noir-protocol-circuit constants with saner ones
34
+ // Note that these values are not used in noir-land and are only for use in TypeScript code, so we can set them to whatever we want.
35
+ // eslint-disable-next-line import-x/export
36
+ export const DEFAULT_L2_GAS_LIMIT = MAX_PROCESSABLE_L2_GAS;
37
+ // eslint-disable-next-line import-x/export
38
+ export const DEFAULT_TEARDOWN_L2_GAS_LIMIT = DEFAULT_L2_GAS_LIMIT / 8;
39
+ // eslint-disable-next-line import-x/export
40
+ export const DEFAULT_DA_GAS_LIMIT = MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT / 4;
41
+ // eslint-disable-next-line import-x/export
42
+ export const DEFAULT_TEARDOWN_DA_GAS_LIMIT = DEFAULT_DA_GAS_LIMIT / 2;