@aztec/ethereum 3.0.0-canary.a9708bd → 3.0.0-devnet.2

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 (144) hide show
  1. package/dest/client.d.ts +1 -1
  2. package/dest/client.d.ts.map +1 -1
  3. package/dest/config.d.ts +11 -6
  4. package/dest/config.d.ts.map +1 -1
  5. package/dest/config.js +124 -64
  6. package/dest/contracts/empire_base.d.ts +1 -1
  7. package/dest/contracts/empire_base.d.ts.map +1 -1
  8. package/dest/contracts/empire_slashing_proposer.d.ts +2 -2
  9. package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -1
  10. package/dest/contracts/empire_slashing_proposer.js +1 -1
  11. package/dest/contracts/fee_asset_handler.d.ts +3 -3
  12. package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
  13. package/dest/contracts/governance.js +7 -3
  14. package/dest/contracts/governance_proposer.d.ts +1 -2
  15. package/dest/contracts/governance_proposer.d.ts.map +1 -1
  16. package/dest/contracts/governance_proposer.js +1 -2
  17. package/dest/contracts/multicall.d.ts +3 -5
  18. package/dest/contracts/multicall.d.ts.map +1 -1
  19. package/dest/contracts/multicall.js +6 -4
  20. package/dest/contracts/rollup.d.ts +39 -19
  21. package/dest/contracts/rollup.d.ts.map +1 -1
  22. package/dest/contracts/rollup.js +84 -88
  23. package/dest/contracts/slasher_contract.d.ts +10 -0
  24. package/dest/contracts/slasher_contract.d.ts.map +1 -1
  25. package/dest/contracts/slasher_contract.js +18 -0
  26. package/dest/contracts/tally_slashing_proposer.d.ts +22 -3
  27. package/dest/contracts/tally_slashing_proposer.d.ts.map +1 -1
  28. package/dest/contracts/tally_slashing_proposer.js +55 -5
  29. package/dest/deploy_l1_contracts.d.ts +22 -7
  30. package/dest/deploy_l1_contracts.d.ts.map +1 -1
  31. package/dest/deploy_l1_contracts.js +555 -362
  32. package/dest/index.d.ts +1 -1
  33. package/dest/index.d.ts.map +1 -1
  34. package/dest/index.js +1 -1
  35. package/dest/l1_artifacts.d.ts +8729 -6014
  36. package/dest/l1_artifacts.d.ts.map +1 -1
  37. package/dest/l1_artifacts.js +10 -5
  38. package/dest/l1_contract_addresses.d.ts +5 -1
  39. package/dest/l1_contract_addresses.d.ts.map +1 -1
  40. package/dest/l1_contract_addresses.js +16 -26
  41. package/dest/l1_reader.d.ts +1 -1
  42. package/dest/l1_reader.d.ts.map +1 -1
  43. package/dest/l1_reader.js +8 -8
  44. package/dest/l1_tx_utils/config.d.ts +59 -0
  45. package/dest/l1_tx_utils/config.d.ts.map +1 -0
  46. package/dest/l1_tx_utils/config.js +73 -0
  47. package/dest/l1_tx_utils/constants.d.ts +6 -0
  48. package/dest/l1_tx_utils/constants.d.ts.map +1 -0
  49. package/dest/l1_tx_utils/constants.js +14 -0
  50. package/dest/l1_tx_utils/factory.d.ts +24 -0
  51. package/dest/l1_tx_utils/factory.d.ts.map +1 -0
  52. package/dest/l1_tx_utils/factory.js +12 -0
  53. package/dest/l1_tx_utils/index.d.ts +10 -0
  54. package/dest/l1_tx_utils/index.d.ts.map +1 -0
  55. package/dest/l1_tx_utils/index.js +10 -0
  56. package/dest/l1_tx_utils/interfaces.d.ts +76 -0
  57. package/dest/l1_tx_utils/interfaces.d.ts.map +1 -0
  58. package/dest/l1_tx_utils/interfaces.js +4 -0
  59. package/dest/l1_tx_utils/l1_tx_utils.d.ts +95 -0
  60. package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -0
  61. package/dest/l1_tx_utils/l1_tx_utils.js +610 -0
  62. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +26 -0
  63. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +1 -0
  64. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +26 -0
  65. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +81 -0
  66. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -0
  67. package/dest/l1_tx_utils/readonly_l1_tx_utils.js +294 -0
  68. package/dest/l1_tx_utils/signer.d.ts +4 -0
  69. package/dest/l1_tx_utils/signer.d.ts.map +1 -0
  70. package/dest/l1_tx_utils/signer.js +16 -0
  71. package/dest/l1_tx_utils/types.d.ts +67 -0
  72. package/dest/l1_tx_utils/types.d.ts.map +1 -0
  73. package/dest/l1_tx_utils/types.js +26 -0
  74. package/dest/l1_tx_utils/utils.d.ts +4 -0
  75. package/dest/l1_tx_utils/utils.d.ts.map +1 -0
  76. package/dest/l1_tx_utils/utils.js +14 -0
  77. package/dest/publisher_manager.d.ts +7 -2
  78. package/dest/publisher_manager.d.ts.map +1 -1
  79. package/dest/publisher_manager.js +36 -8
  80. package/dest/queries.d.ts.map +1 -1
  81. package/dest/queries.js +11 -12
  82. package/dest/test/chain_monitor.d.ts +11 -0
  83. package/dest/test/chain_monitor.d.ts.map +1 -1
  84. package/dest/test/chain_monitor.js +81 -12
  85. package/dest/test/delayed_tx_utils.d.ts +2 -2
  86. package/dest/test/delayed_tx_utils.d.ts.map +1 -1
  87. package/dest/test/delayed_tx_utils.js +2 -2
  88. package/dest/test/eth_cheat_codes.d.ts +32 -6
  89. package/dest/test/eth_cheat_codes.d.ts.map +1 -1
  90. package/dest/test/eth_cheat_codes.js +115 -28
  91. package/dest/test/rollup_cheat_codes.d.ts +11 -9
  92. package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
  93. package/dest/test/rollup_cheat_codes.js +38 -6
  94. package/dest/test/upgrade_utils.d.ts.map +1 -1
  95. package/dest/test/upgrade_utils.js +3 -2
  96. package/dest/utils.d.ts.map +1 -1
  97. package/dest/utils.js +10 -161
  98. package/dest/zkPassportVerifierAddress.js +1 -1
  99. package/package.json +7 -7
  100. package/src/client.ts +1 -1
  101. package/src/config.ts +136 -68
  102. package/src/contracts/empire_base.ts +1 -1
  103. package/src/contracts/empire_slashing_proposer.ts +7 -3
  104. package/src/contracts/fee_asset_handler.ts +1 -1
  105. package/src/contracts/governance.ts +3 -3
  106. package/src/contracts/governance_proposer.ts +3 -4
  107. package/src/contracts/multicall.ts +12 -10
  108. package/src/contracts/rollup.ts +104 -106
  109. package/src/contracts/slasher_contract.ts +22 -0
  110. package/src/contracts/tally_slashing_proposer.ts +54 -6
  111. package/src/deploy_l1_contracts.ts +570 -328
  112. package/src/index.ts +1 -1
  113. package/src/l1_artifacts.ts +14 -6
  114. package/src/l1_contract_addresses.ts +17 -26
  115. package/src/l1_reader.ts +9 -9
  116. package/src/l1_tx_utils/README.md +177 -0
  117. package/src/l1_tx_utils/config.ts +140 -0
  118. package/src/l1_tx_utils/constants.ts +18 -0
  119. package/src/l1_tx_utils/factory.ts +64 -0
  120. package/src/l1_tx_utils/index.ts +12 -0
  121. package/src/l1_tx_utils/interfaces.ts +86 -0
  122. package/src/l1_tx_utils/l1_tx_utils.ts +718 -0
  123. package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +77 -0
  124. package/src/l1_tx_utils/readonly_l1_tx_utils.ts +372 -0
  125. package/src/l1_tx_utils/signer.ts +28 -0
  126. package/src/l1_tx_utils/types.ts +85 -0
  127. package/src/l1_tx_utils/utils.ts +16 -0
  128. package/src/publisher_manager.ts +51 -9
  129. package/src/queries.ts +13 -8
  130. package/src/test/chain_monitor.ts +89 -9
  131. package/src/test/delayed_tx_utils.ts +2 -2
  132. package/src/test/eth_cheat_codes.ts +142 -29
  133. package/src/test/rollup_cheat_codes.ts +54 -14
  134. package/src/test/upgrade_utils.ts +3 -2
  135. package/src/utils.ts +13 -185
  136. package/src/zkPassportVerifierAddress.ts +1 -1
  137. package/dest/l1_tx_utils.d.ts +0 -250
  138. package/dest/l1_tx_utils.d.ts.map +0 -1
  139. package/dest/l1_tx_utils.js +0 -826
  140. package/dest/l1_tx_utils_with_blobs.d.ts +0 -19
  141. package/dest/l1_tx_utils_with_blobs.d.ts.map +0 -1
  142. package/dest/l1_tx_utils_with_blobs.js +0 -85
  143. package/src/l1_tx_utils.ts +0 -1105
  144. package/src/l1_tx_utils_with_blobs.ts +0 -144
package/dest/client.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { Logger } from '@aztec/foundation/log';
2
2
  import { type Chain, type HDAccount, type LocalAccount, type PrivateKeyAccount } from 'viem';
3
3
  import type { ExtendedViemWalletClient, ViemPublicClient } from './types.js';
4
4
  type Config = {
5
- /** The RPC Url of the ethereum host. */
5
+ /** List of URLs of Ethereum RPC nodes that services will connect to (comma separated). */
6
6
  l1RpcUrls: string[];
7
7
  /** The chain ID of the ethereum host. */
8
8
  l1ChainId: number;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAMvB,MAAM,MAAM,CAAC;AAKd,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE7E,KAAK,MAAM,GAAG;IACZ,wCAAwC;IACxC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,YAAY,EAAE,MAAM,IAAI,oBAAoB,EAAE,CAAC;AAI/C,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAOhE;AAED,0FAA0F;AAC1F,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAIpG;AAyBD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EAAE,EACjB,+BAA+B,EAAE,MAAM,GAAG,SAAS,GAAG,iBAAiB,GAAG,YAAY,EACtF,KAAK,GAAE,KAAe,EACtB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,YAAY,CAAC,EAAE,MAAM,GACpB,wBAAwB,CAgB1B"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAMvB,MAAM,MAAM,CAAC;AAKd,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE7E,KAAK,MAAM,GAAG;IACZ,0FAA0F;IAC1F,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,YAAY,EAAE,MAAM,IAAI,oBAAoB,EAAE,CAAC;AAI/C,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAOhE;AAED,0FAA0F;AAC1F,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAIpG;AAyBD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EAAE,EACjB,+BAA+B,EAAE,MAAM,GAAG,SAAS,GAAG,iBAAiB,GAAG,YAAY,EACtF,KAAK,GAAE,KAAe,EACtB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,YAAY,CAAC,EAAE,MAAM,GACpB,wBAAwB,CAgB1B"}
package/dest/config.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type ConfigMappingsType, type NetworkNames } from '@aztec/foundation/config';
2
2
  import { EthAddress } from '@aztec/foundation/eth-address';
3
- import { type L1TxUtilsConfig } from './l1_tx_utils.js';
3
+ import { type L1TxUtilsConfig } from './l1_tx_utils/index.js';
4
4
  export type GenesisStateConfig = {
5
5
  /** Whether to populate the genesis state with initial fee juice for the test accounts */
6
6
  testAccounts: boolean;
@@ -16,12 +16,16 @@ export type L1ContractsConfig = {
16
16
  aztecEpochDuration: number;
17
17
  /** The target validator committee size. */
18
18
  aztecTargetCommitteeSize: number;
19
+ /** The number of epochs to lag behind the current epoch for validator selection. */
20
+ lagInEpochs: number;
19
21
  /** The number of epochs after an epoch ends that proofs are still accepted. */
20
22
  aztecProofSubmissionEpochs: number;
21
23
  /** The deposit amount for a validator */
22
24
  activationThreshold: bigint;
23
25
  /** The minimum stake for a validator. */
24
26
  ejectionThreshold: bigint;
27
+ /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
28
+ localEjectionThreshold: bigint;
25
29
  /** The slashing quorum, i.e. how many slots must signal for the same payload in a round for it to be submittable to the Slasher (defaults to slashRoundSize / 2 + 1) */
26
30
  slashingQuorum?: number;
27
31
  /** The slashing round size, i.e. how many epochs are in a slashing round */
@@ -34,6 +38,8 @@ export type L1ContractsConfig = {
34
38
  slashingVetoer: EthAddress;
35
39
  /** How many slashing rounds back we slash (ie when slashing in round N, we slash for offenses committed during epochs of round N-offset) */
36
40
  slashingOffsetInRounds: number;
41
+ /** How long slashing can be disabled for in seconds when vetoer disables it */
42
+ slashingDisableDuration: number;
37
43
  /** Type of slasher proposer */
38
44
  slasherFlavor: 'empire' | 'tally' | 'none';
39
45
  /** Minimum amount that can be slashed in tally slashing */
@@ -58,9 +64,11 @@ export declare const DefaultL1ContractsConfig: {
58
64
  aztecSlotDuration: number;
59
65
  aztecEpochDuration: number;
60
66
  aztecTargetCommitteeSize: number;
67
+ lagInEpochs: number;
61
68
  aztecProofSubmissionEpochs: number;
62
69
  activationThreshold: bigint;
63
70
  ejectionThreshold: bigint;
71
+ localEjectionThreshold: bigint;
64
72
  slashAmountSmall: bigint;
65
73
  slashAmountMedium: bigint;
66
74
  slashAmountLarge: bigint;
@@ -74,6 +82,7 @@ export declare const DefaultL1ContractsConfig: {
74
82
  exitDelaySeconds: number;
75
83
  slasherFlavor: "tally";
76
84
  slashingOffsetInRounds: number;
85
+ slashingDisableDuration: number;
77
86
  };
78
87
  export declare const getGovernanceConfiguration: (networkName: NetworkNames) => {
79
88
  proposeConfig: {
@@ -88,17 +97,13 @@ export declare const getGovernanceConfiguration: (networkName: NetworkNames) =>
88
97
  requiredYeaMargin: bigint;
89
98
  minimumVotes: bigint;
90
99
  };
91
- export declare const getGSEConfiguration: (networkName: NetworkNames) => {
92
- activationThreshold: bigint;
93
- ejectionThreshold: bigint;
94
- };
95
100
  export declare const getRewardConfig: (networkName: NetworkNames) => {
96
101
  sequencerBps: number;
97
102
  rewardDistributor: `0x${string}`;
98
103
  booster: `0x${string}`;
99
104
  blockReward: bigint;
100
105
  };
101
- export declare const getRewardBoostConfig: (networkName: NetworkNames) => {
106
+ export declare const getRewardBoostConfig: () => {
102
107
  increment: number;
103
108
  maxScore: number;
104
109
  a: number;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAOlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,KAAK,eAAe,EAA2B,MAAM,kBAAkB,CAAC;AAEjF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,yFAAyF;IACzF,YAAY,EAAE,OAAO,CAAC;IACtB,yFAAyF;IACzF,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,yCAAyC;IACzC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uFAAuF;IACvF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wCAAwC;IACxC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2CA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EAAE,kBAAkB,CAAC,iBAAiB,CAkI3E,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBAAkB,CAAC,kBAAkB,CAW7E,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,iBAAiB,CAE/D;AAED,wBAAgB,4BAA4B,IAAI,kBAAkB,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,eAAe,CAAC,GAAG,IAAI,CAmH3F"}
package/dest/config.js CHANGED
@@ -1,17 +1,19 @@
1
1
  import { bigintConfigHelper, booleanConfigHelper, enumConfigHelper, getConfigFromMappings, numberConfigHelper, optionalNumberConfigHelper } from '@aztec/foundation/config';
2
2
  import { EthAddress } from '@aztec/foundation/eth-address';
3
- import { l1TxUtilsConfigMappings } from './l1_tx_utils.js';
3
+ import { l1TxUtilsConfigMappings } from './l1_tx_utils/index.js';
4
4
  export const DefaultL1ContractsConfig = {
5
5
  ethereumSlotDuration: 12,
6
6
  aztecSlotDuration: 36,
7
7
  aztecEpochDuration: 32,
8
8
  aztecTargetCommitteeSize: 48,
9
+ lagInEpochs: 2,
9
10
  aztecProofSubmissionEpochs: 1,
10
- activationThreshold: BigInt(100e18),
11
- ejectionThreshold: BigInt(50e18),
12
- slashAmountSmall: BigInt(10e18),
13
- slashAmountMedium: BigInt(20e18),
14
- slashAmountLarge: BigInt(50e18),
11
+ activationThreshold: 100n * 10n ** 18n,
12
+ ejectionThreshold: 50n * 10n ** 18n,
13
+ localEjectionThreshold: 98n * 10n ** 18n,
14
+ slashAmountSmall: 10n * 10n ** 18n,
15
+ slashAmountMedium: 20n * 10n ** 18n,
16
+ slashAmountLarge: 50n * 10n ** 18n,
15
17
  slashingRoundSizeInEpochs: 4,
16
18
  slashingLifetimeInRounds: 5,
17
19
  slashingExecutionDelayInRounds: 0,
@@ -21,7 +23,8 @@ export const DefaultL1ContractsConfig = {
21
23
  provingCostPerMana: BigInt(100),
22
24
  exitDelaySeconds: 2 * 24 * 60 * 60,
23
25
  slasherFlavor: 'tally',
24
- slashingOffsetInRounds: 2
26
+ slashingOffsetInRounds: 2,
27
+ slashingDisableDuration: 5 * 24 * 60 * 60
25
28
  };
26
29
  const LocalGovernanceConfiguration = {
27
30
  proposeConfig: {
@@ -36,79 +39,95 @@ const LocalGovernanceConfiguration = {
36
39
  requiredYeaMargin: 4n * 10n ** 16n,
37
40
  minimumVotes: 400n * 10n ** 18n
38
41
  };
39
- const TestnetGovernanceConfiguration = {
42
+ const StagingPublicGovernanceConfiguration = {
40
43
  proposeConfig: {
41
- lockDelay: 60n * 60n * 24n,
44
+ lockDelay: 60n * 60n * 24n * 30n,
42
45
  lockAmount: DefaultL1ContractsConfig.activationThreshold * 100n
43
46
  },
44
47
  votingDelay: 60n,
45
48
  votingDuration: 60n * 60n,
46
- executionDelay: 60n * 60n * 24n,
49
+ executionDelay: 60n,
47
50
  gracePeriod: 60n * 60n * 24n * 7n,
48
51
  quorum: 3n * 10n ** 17n,
49
52
  requiredYeaMargin: 4n * 10n ** 16n,
50
53
  minimumVotes: DefaultL1ContractsConfig.ejectionThreshold * 200n
51
54
  };
52
- export const getGovernanceConfiguration = (networkName)=>{
53
- if (networkName === 'alpha-testnet' || networkName === 'testnet') {
54
- return TestnetGovernanceConfiguration;
55
- }
56
- return LocalGovernanceConfiguration;
57
- };
58
- const TestnetGSEConfiguration = {
59
- activationThreshold: BigInt(100e18),
60
- ejectionThreshold: BigInt(50e18)
55
+ const TestnetGovernanceConfiguration = {
56
+ proposeConfig: {
57
+ lockDelay: 10n * 365n * 24n * 60n * 60n,
58
+ lockAmount: 1250n * 200_000n * 10n ** 18n
59
+ },
60
+ votingDelay: 12n * 60n * 60n,
61
+ votingDuration: 1n * 24n * 60n * 60n,
62
+ executionDelay: 12n * 60n * 60n,
63
+ gracePeriod: 1n * 24n * 60n * 60n,
64
+ quorum: 2n * 10n ** 17n,
65
+ requiredYeaMargin: 1n * 10n ** 17n,
66
+ minimumVotes: 1250n * 200_000n * 10n ** 18n
61
67
  };
62
- const LocalGSEConfiguration = {
63
- activationThreshold: BigInt(100e18),
64
- ejectionThreshold: BigInt(50e18)
68
+ const StagingIgnitionGovernanceConfiguration = {
69
+ proposeConfig: {
70
+ lockDelay: 10n * 365n * 24n * 60n * 60n,
71
+ lockAmount: 1250n * 200_000n * 10n ** 18n
72
+ },
73
+ votingDelay: 7n * 24n * 60n * 60n,
74
+ votingDuration: 7n * 24n * 60n * 60n,
75
+ executionDelay: 30n * 24n * 60n * 60n,
76
+ gracePeriod: 7n * 24n * 60n * 60n,
77
+ quorum: 2n * 10n ** 17n,
78
+ requiredYeaMargin: 1n * 10n ** 17n,
79
+ minimumVotes: 1250n * 200_000n * 10n ** 18n
65
80
  };
66
- export const getGSEConfiguration = (networkName)=>{
67
- if (networkName === 'alpha-testnet' || networkName === 'testnet') {
68
- return TestnetGSEConfiguration;
81
+ export const getGovernanceConfiguration = (networkName)=>{
82
+ switch(networkName){
83
+ case 'local':
84
+ return LocalGovernanceConfiguration;
85
+ case 'next-net':
86
+ return LocalGovernanceConfiguration;
87
+ case 'devnet':
88
+ return LocalGovernanceConfiguration;
89
+ case 'staging-public':
90
+ return StagingPublicGovernanceConfiguration;
91
+ case 'testnet':
92
+ return TestnetGovernanceConfiguration;
93
+ case 'staging-ignition':
94
+ return StagingIgnitionGovernanceConfiguration;
95
+ default:
96
+ throw new Error(`Unrecognized network name: ${networkName}`);
69
97
  }
70
- return LocalGSEConfiguration;
71
98
  };
72
99
  // Making a default config here as we are only using it thought the deployment
73
100
  // and do not expect to be using different setups, so having environment variables
74
101
  // for it seems overkill
75
- const LocalRewardConfig = {
76
- sequencerBps: 5000,
77
- rewardDistributor: EthAddress.ZERO.toString(),
78
- booster: EthAddress.ZERO.toString(),
79
- blockReward: BigInt(50e18)
80
- };
81
- const TestnetRewardConfig = {
82
- sequencerBps: 5000,
102
+ const DefaultRewardConfig = {
103
+ sequencerBps: 8000,
83
104
  rewardDistributor: EthAddress.ZERO.toString(),
84
105
  booster: EthAddress.ZERO.toString(),
85
- blockReward: BigInt(50e18)
106
+ blockReward: 500n * 10n ** 18n
86
107
  };
87
108
  export const getRewardConfig = (networkName)=>{
88
- if (networkName === 'alpha-testnet' || networkName === 'testnet') {
89
- return TestnetRewardConfig;
109
+ switch(networkName){
110
+ case 'local':
111
+ case 'devnet':
112
+ case 'next-net':
113
+ case 'staging-public':
114
+ case 'testnet':
115
+ case 'staging-ignition':
116
+ return DefaultRewardConfig;
117
+ default:
118
+ throw new Error(`Unrecognized network name: ${networkName}`);
90
119
  }
91
- return LocalRewardConfig;
92
- };
93
- const LocalRewardBoostConfig = {
94
- increment: 200000,
95
- maxScore: 5000000,
96
- a: 5000,
97
- k: 1000000,
98
- minimum: 100000
99
120
  };
100
- const TestnetRewardBoostConfig = {
101
- increment: 125000,
102
- maxScore: 15000000,
103
- a: 1000,
104
- k: 1000000,
105
- minimum: 100000
106
- };
107
- export const getRewardBoostConfig = (networkName)=>{
108
- if (networkName === 'alpha-testnet' || networkName === 'testnet') {
109
- return TestnetRewardBoostConfig;
110
- }
111
- return LocalRewardBoostConfig;
121
+ export const getRewardBoostConfig = ()=>{
122
+ // The reward configuration is specified with a precision of 1e5, and we use the same across
123
+ // all networks.
124
+ return {
125
+ increment: 125000,
126
+ maxScore: 15000000,
127
+ a: 1000,
128
+ k: 1000000,
129
+ minimum: 100000
130
+ };
112
131
  };
113
132
  // Similar to the above, no need for environment variables for this.
114
133
  const LocalEntryQueueConfig = {
@@ -118,18 +137,44 @@ const LocalEntryQueueConfig = {
118
137
  normalFlushSizeQuotient: 2n,
119
138
  maxQueueFlushSize: 48n
120
139
  };
140
+ const StagingPublicEntryQueueConfig = {
141
+ bootstrapValidatorSetSize: 48n,
142
+ bootstrapFlushSize: 48n,
143
+ normalFlushSizeMin: 1n,
144
+ normalFlushSizeQuotient: 2475n,
145
+ maxQueueFlushSize: 32n
146
+ };
121
147
  const TestnetEntryQueueConfig = {
122
148
  bootstrapValidatorSetSize: 750n,
123
- bootstrapFlushSize: 75n,
124
- normalFlushSizeMin: 1n,
149
+ bootstrapFlushSize: 32n,
150
+ normalFlushSizeMin: 32n,
125
151
  normalFlushSizeQuotient: 2475n,
126
152
  maxQueueFlushSize: 32n
127
153
  };
154
+ const StagingIgnitionEntryQueueConfig = {
155
+ bootstrapValidatorSetSize: 48n,
156
+ bootstrapFlushSize: 48n,
157
+ normalFlushSizeMin: 1n,
158
+ normalFlushSizeQuotient: 2048n,
159
+ maxQueueFlushSize: 24n
160
+ };
128
161
  export const getEntryQueueConfig = (networkName)=>{
129
- if (networkName === 'alpha-testnet' || networkName === 'testnet') {
130
- return TestnetEntryQueueConfig;
162
+ switch(networkName){
163
+ case 'local':
164
+ return LocalEntryQueueConfig;
165
+ case 'next-net':
166
+ return LocalEntryQueueConfig;
167
+ case 'devnet':
168
+ return LocalEntryQueueConfig;
169
+ case 'staging-public':
170
+ return StagingPublicEntryQueueConfig;
171
+ case 'testnet':
172
+ return TestnetEntryQueueConfig;
173
+ case 'staging-ignition':
174
+ return StagingIgnitionEntryQueueConfig;
175
+ default:
176
+ throw new Error(`Unrecognized network name: ${networkName}`);
131
177
  }
132
- return LocalEntryQueueConfig;
133
178
  };
134
179
  export const l1ContractsConfigMappings = {
135
180
  ethereumSlotDuration: {
@@ -152,6 +197,11 @@ export const l1ContractsConfigMappings = {
152
197
  description: 'The target validator committee size.',
153
198
  ...numberConfigHelper(DefaultL1ContractsConfig.aztecTargetCommitteeSize)
154
199
  },
200
+ lagInEpochs: {
201
+ env: 'AZTEC_LAG_IN_EPOCHS',
202
+ description: 'The number of epochs to lag behind the current epoch for validator selection.',
203
+ ...numberConfigHelper(DefaultL1ContractsConfig.lagInEpochs)
204
+ },
155
205
  aztecProofSubmissionEpochs: {
156
206
  env: 'AZTEC_PROOF_SUBMISSION_EPOCHS',
157
207
  description: 'The number of epochs after an epoch ends that proofs are still accepted.',
@@ -167,6 +217,11 @@ export const l1ContractsConfigMappings = {
167
217
  description: 'The minimum stake for a validator.',
168
218
  ...bigintConfigHelper(DefaultL1ContractsConfig.ejectionThreshold)
169
219
  },
220
+ localEjectionThreshold: {
221
+ env: 'AZTEC_LOCAL_EJECTION_THRESHOLD',
222
+ description: 'The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup',
223
+ ...bigintConfigHelper(DefaultL1ContractsConfig.localEjectionThreshold)
224
+ },
170
225
  slashingOffsetInRounds: {
171
226
  env: 'AZTEC_SLASHING_OFFSET_IN_ROUNDS',
172
227
  description: 'How many slashing rounds back we slash (ie when slashing in round N, we slash for offenses committed during epochs of round N-offset)',
@@ -222,6 +277,11 @@ export const l1ContractsConfigMappings = {
222
277
  parseEnv: (val)=>EthAddress.fromString(val),
223
278
  defaultValue: DefaultL1ContractsConfig.slashingVetoer
224
279
  },
280
+ slashingDisableDuration: {
281
+ env: 'AZTEC_SLASHING_DISABLE_DURATION',
282
+ description: 'How long slashing can be disabled for in seconds when vetoer disables it',
283
+ ...numberConfigHelper(DefaultL1ContractsConfig.slashingDisableDuration)
284
+ },
225
285
  governanceProposerQuorum: {
226
286
  env: 'AZTEC_GOVERNANCE_PROPOSER_QUORUM',
227
287
  description: 'The governance proposing quorum',
@@ -285,12 +345,12 @@ export function getGenesisStateConfigEnvVars() {
285
345
  errors.push(`aztecSlotDuration (${config.aztecSlotDuration}) must be a multiple of ethereumSlotDuration (${config.ethereumSlotDuration})`);
286
346
  }
287
347
  // EmpireBase constructor validations for governance/slashing proposers
288
- // From: require(QUORUM_SIZE > ROUND_SIZE / 2, Errors.GovernanceProposer__InvalidQuorumAndRoundSize(QUORUM_SIZE, ROUND_SIZE));
348
+ // From: require(QUORUM_SIZE > ROUND_SIZE / 2, Errors.EmpireBase__InvalidQuorumAndRoundSize(QUORUM_SIZE, ROUND_SIZE));
289
349
  const { governanceProposerQuorum, governanceProposerRoundSize } = config;
290
350
  if (governanceProposerQuorum !== undefined && governanceProposerQuorum <= Math.floor(governanceProposerRoundSize / 2)) {
291
351
  errors.push(`governanceProposerQuorum (${governanceProposerQuorum}) must be greater than half of governanceProposerRoundSize (${Math.floor(governanceProposerRoundSize / 2)})`);
292
352
  }
293
- // From: require(QUORUM_SIZE <= ROUND_SIZE, Errors.GovernanceProposer__QuorumCannotBeLargerThanRoundSize(QUORUM_SIZE, ROUND_SIZE));
353
+ // From: require(QUORUM_SIZE <= ROUND_SIZE, Errors.EmpireBase__QuorumCannotBeLargerThanRoundSize(QUORUM_SIZE, ROUND_SIZE));
294
354
  if (governanceProposerQuorum !== undefined && governanceProposerQuorum > governanceProposerRoundSize) {
295
355
  errors.push(`governanceProposerQuorum (${governanceProposerQuorum}) cannot be larger than governanceProposerRoundSize (${governanceProposerRoundSize})`);
296
356
  }
@@ -1,7 +1,7 @@
1
1
  import type { EthAddress } from '@aztec/foundation/eth-address';
2
2
  import { Signature } from '@aztec/foundation/eth-signature';
3
3
  import { type Hex, type TypedDataDefinition } from 'viem';
4
- import type { L1TxRequest } from '../l1_tx_utils.js';
4
+ import type { L1TxRequest } from '../l1_tx_utils/index.js';
5
5
  export interface IEmpireBase {
6
6
  get address(): EthAddress;
7
7
  getRoundInfo(rollupAddress: Hex, round: bigint): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"empire_base.d.ts","sourceRoot":"","sources":["../../src/contracts/empire_base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAG5D,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,mBAAmB,EAAsB,MAAM,MAAM,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,IAAI,OAAO,IAAI,UAAU,CAAC;IAC1B,YAAY,CACV,aAAa,EAAE,GAAG,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,cA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IAAI,OAAO,IAAI,UAAU,CAAC;IAC1B,YAAY,CACV,aAAa,EAAE,GAAG,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,sBAAsB,EAAE,GAAG,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACvF,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,mBAAmB,CAAC,OAAO,EAAE,GAAG,GAAG,WAAW,CAAC;IAC/C,gCAAgC,CAC9B,OAAO,EAAE,GAAG,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,GAAG,EAClB,MAAM,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,GACjD,OAAO,CAAC,WAAW,CAAC,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,GAAG,CAM9C;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,iBAM3E;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,EAClD,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,GAAG,EACb,iBAAiB,EAAE,GAAG,EACtB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,SAAS,CAAC,CA8BpB"}
@@ -1,7 +1,7 @@
1
1
  import { EthAddress } from '@aztec/foundation/eth-address';
2
2
  import EventEmitter from 'events';
3
3
  import { type Hex, type Log, type TypedDataDefinition } from 'viem';
4
- import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils.js';
4
+ import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
5
5
  import type { ViemClient } from '../types.js';
6
6
  import { type IEmpireBase } from './empire_base.js';
7
7
  export declare class ProposalAlreadyExecutedError extends Error {
@@ -12,7 +12,7 @@ export declare class EmpireSlashingProposerContract extends EventEmitter impleme
12
12
  private readonly logger;
13
13
  private readonly proposer;
14
14
  readonly type: "empire";
15
- constructor(client: ViemClient, address: Hex);
15
+ constructor(client: ViemClient, address: Hex | EthAddress);
16
16
  get address(): EthAddress;
17
17
  getQuorumSize(): Promise<bigint>;
18
18
  getRoundSize(): Promise<bigint>;
@@ -1 +1 @@
1
- {"version":3,"file":"empire_slashing_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/empire_slashing_proposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAGL,KAAK,GAAG,EACR,KAAK,GAAG,EACR,KAAK,mBAAmB,EAGzB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,KAAK,WAAW,EAA8D,MAAM,kBAAkB,CAAC;AAEhH,qBAAa,4BAA6B,SAAQ,KAAK;gBACzC,KAAK,EAAE,MAAM;CAG1B;AAED,qBAAa,8BAA+B,SAAQ,YAAa,YAAW,WAAW;aAOnE,MAAM,EAAE,UAAU;IANpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+D;IACtF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsE;IAE/F,SAAgB,IAAI,EAAG,QAAQ,CAAU;gBAGvB,MAAM,EAAE,UAAU,EAClC,OAAO,EAAE,GAAG;IAMd,IAAW,OAAO,eAEjB;IAEM,aAAa;IAIb,YAAY;IAIZ,mBAAmB;IAInB,yBAAyB;IAIzB,eAAe;IAIf,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,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AC,OAAO,CAAC;IAe3E,YAAY,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,UAAU,CAAC,OAAO,OAAO,CAAC,yBAAyB,CAAC;CAiDxD"}
@@ -19,7 +19,7 @@ export class EmpireSlashingProposerContract extends EventEmitter {
19
19
  constructor(client, address){
20
20
  super(), this.client = client, this.logger = createLogger('ethereum:contracts:empire_slashing_proposer'), this.type = 'empire';
21
21
  this.proposer = getContract({
22
- address,
22
+ address: typeof address === 'string' ? address : address.toString(),
23
23
  abi: EmpireSlashingProposerAbi,
24
24
  client
25
25
  });
@@ -1,6 +1,6 @@
1
1
  import { EthAddress } from '@aztec/foundation/eth-address';
2
2
  import { type Hex } from 'viem';
3
- import type { L1TxUtils } from '../l1_tx_utils.js';
3
+ import type { L1TxUtils } from '../l1_tx_utils/index.js';
4
4
  export declare class FeeAssetHandlerContract {
5
5
  readonly txUtils: L1TxUtils;
6
6
  address: EthAddress;
@@ -9,11 +9,11 @@ export declare class FeeAssetHandlerContract {
9
9
  getMintAmount(): Promise<bigint>;
10
10
  mint(recipient: Hex | EthAddress): Promise<{
11
11
  receipt: import("viem").TransactionReceipt;
12
- gasPrice: import("../l1_tx_utils.js").GasPrice;
12
+ state: import("../l1_tx_utils/types.js").L1TxState;
13
13
  }>;
14
14
  setMintAmount(amount: bigint): Promise<{
15
15
  receipt: import("viem").TransactionReceipt;
16
- gasPrice: import("../l1_tx_utils.js").GasPrice;
16
+ state: import("../l1_tx_utils/types.js").L1TxState;
17
17
  }>;
18
18
  }
19
19
  //# sourceMappingURL=fee_asset_handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fee_asset_handler.d.ts","sourceRoot":"","sources":["../../src/contracts/fee_asset_handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAAE,KAAK,GAAG,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,uBAAuB;aAKhB,OAAO,EAAE,SAAS;IAJ7B,OAAO,EAAE,UAAU,CAAC;gBAGzB,OAAO,EAAE,GAAG,GAAG,UAAU,EACT,OAAO,EAAE,SAAS;IAQvB,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC;IASrC,aAAa;IASb,IAAI,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU;;;;IAchC,aAAa,CAAC,MAAM,EAAE,MAAM;;;;CAUpC"}
1
+ {"version":3,"file":"fee_asset_handler.d.ts","sourceRoot":"","sources":["../../src/contracts/fee_asset_handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAAE,KAAK,GAAG,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,qBAAa,uBAAuB;aAKhB,OAAO,EAAE,SAAS;IAJ7B,OAAO,EAAE,UAAU,CAAC;gBAGzB,OAAO,EAAE,GAAG,GAAG,UAAU,EACT,OAAO,EAAE,SAAS;IAQvB,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC;IASrC,aAAa;IASb,IAAI,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU;;;;IAchC,aAAa,CAAC,MAAM,EAAE,MAAM;;;;CAUpC"}
@@ -2,7 +2,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
2
2
  import { sleep } from '@aztec/foundation/sleep';
3
3
  import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
4
4
  import { encodeFunctionData, getContract, parseEventLogs } from 'viem';
5
- import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils.js';
5
+ import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils/index.js';
6
6
  import { isExtendedClient } from '../types.js';
7
7
  // NOTE: Must be kept in sync with DataStructures.ProposalState in l1-contracts
8
8
  export var ProposalState = /*#__PURE__*/ function(ProposalState) {
@@ -156,7 +156,9 @@ export class GovernanceContract extends ReadOnlyGovernanceContract {
156
156
  ]);
157
157
  }
158
158
  async vote({ proposalId, voteAmount, inFavor, retries = 10, logger }) {
159
- const l1TxUtils = createL1TxUtilsFromViemWallet(this.client, logger);
159
+ const l1TxUtils = createL1TxUtilsFromViemWallet(this.client, {
160
+ logger
161
+ });
160
162
  const retryDelaySeconds = 12;
161
163
  voteAmount = voteAmount ?? await this.getPower();
162
164
  let success = false;
@@ -203,7 +205,9 @@ export class GovernanceContract extends ReadOnlyGovernanceContract {
203
205
  logger.info(`Proposal [${proposalId}] has summedBallot nay [${proposal.summedBallot.nay}]`);
204
206
  }
205
207
  async executeProposal({ proposalId, retries = 10, logger }) {
206
- const l1TxUtils = createL1TxUtilsFromViemWallet(this.client, logger);
208
+ const l1TxUtils = createL1TxUtilsFromViemWallet(this.client, {
209
+ logger
210
+ });
207
211
  const retryDelaySeconds = 12;
208
212
  let success = false;
209
213
  for(let i = 0; i < retries; i++){
@@ -1,6 +1,6 @@
1
1
  import { EthAddress } from '@aztec/foundation/eth-address';
2
2
  import { type Hex, type TransactionReceipt, type TypedDataDefinition } from 'viem';
3
- import type { GasPrice, L1TxRequest, L1TxUtils } from '../l1_tx_utils.js';
3
+ import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
4
4
  import type { ViemClient } from '../types.js';
5
5
  import { type IEmpireBase } from './empire_base.js';
6
6
  export declare class GovernanceProposerContract implements IEmpireBase {
@@ -24,7 +24,6 @@ export declare class GovernanceProposerContract implements IEmpireBase {
24
24
  createSignalRequestWithSignature(payload: Hex, slot: bigint, chainId: number, signerAddress: Hex, signer: (msg: TypedDataDefinition) => Promise<Hex>): Promise<L1TxRequest>;
25
25
  submitRoundWinner(round: bigint, l1TxUtils: L1TxUtils): Promise<{
26
26
  receipt: TransactionReceipt;
27
- gasPrice: GasPrice;
28
27
  proposalId: bigint;
29
28
  }>;
30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MAAM,GACZ,OAAO,CAAC;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,sBAAsB,EAAE,GAAG,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IAI/E,iBAAiB,CAAC,aAAa,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAInF,mBAAmB,CAAC,OAAO,EAAE,GAAG,GAAG,WAAW;IAOxC,gCAAgC,CAC3C,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,GAAG,EAClB,MAAM,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,GACjD,OAAO,CAAC,WAAW,CAAC;IAeV,iBAAiB,CAC5B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC;QACT,OAAO,EAAE,kBAAkB,CAAC;QAC5B,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CAYH"}
@@ -74,7 +74,7 @@ export class GovernanceProposerContract {
74
74
  };
75
75
  }
76
76
  async submitRoundWinner(round, l1TxUtils) {
77
- const { receipt, gasPrice } = await l1TxUtils.sendAndMonitorTransaction({
77
+ const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
78
78
  to: this.address.toString(),
79
79
  data: encodeFunctionData({
80
80
  abi: this.proposer.abi,
@@ -87,7 +87,6 @@ export class GovernanceProposerContract {
87
87
  const proposalId = extractProposalIdFromLogs(receipt.logs);
88
88
  return {
89
89
  receipt,
90
- gasPrice,
91
90
  proposalId
92
91
  };
93
92
  }
@@ -1,20 +1,18 @@
1
1
  import type { Logger } from '@aztec/foundation/log';
2
2
  import { type Hex } from 'viem';
3
- import type { L1BlobInputs, L1GasConfig, L1TxRequest, L1TxUtils } from '../l1_tx_utils.js';
3
+ import type { L1BlobInputs, L1TxConfig, L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
4
4
  import type { ExtendedViemWalletClient } from '../types.js';
5
5
  import { FormattedViemError } from '../utils.js';
6
6
  export declare const MULTI_CALL_3_ADDRESS: "0xcA11bde05977b3631167028862bE2a173976CA11";
7
7
  export declare class Multicall3 {
8
- static forward(requests: L1TxRequest[], l1TxUtils: L1TxUtils, gasConfig: L1GasConfig | undefined, blobConfig: L1BlobInputs | undefined, rollupAddress: Hex, logger: Logger, opts?: {
8
+ static forward(requests: L1TxRequest[], l1TxUtils: L1TxUtils, gasConfig: L1TxConfig | undefined, blobConfig: L1BlobInputs | undefined, rollupAddress: Hex, logger: Logger, opts?: {
9
9
  revertOnFailure?: boolean;
10
10
  }): Promise<FormattedViemError | {
11
11
  receipt: import("viem").TransactionReceipt;
12
- gasPrice: import("../l1_tx_utils.js").GasPrice;
13
- stats: import("../l1_tx_utils.js").TransactionStats | undefined;
12
+ stats: import("../l1_tx_utils/types.js").TransactionStats | undefined;
14
13
  errorMsg?: undefined;
15
14
  } | {
16
15
  receipt: import("viem").TransactionReceipt;
17
- gasPrice: import("../l1_tx_utils.js").GasPrice;
18
16
  errorMsg: string | undefined;
19
17
  stats?: undefined;
20
18
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"multicall.d.ts","sourceRoot":"","sources":["../../src/contracts/multicall.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAqC,KAAK,GAAG,EAAqC,MAAM,MAAM,CAAC;AAEtG,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAmB,MAAM,aAAa,CAAC;AAGlE,eAAO,MAAM,oBAAoB,EAAG,4CAAqD,CAAC;AAE1F,qBAAa,UAAU;WACR,OAAO,CAClB,QAAQ,EAAE,WAAW,EAAE,EACvB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,WAAW,GAAG,SAAS,EAClC,UAAU,EAAE,YAAY,GAAG,SAAS,EACpC,aAAa,EAAE,GAAG,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,GAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAO;;;;;;;;;;;CAmG3C;AAED,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,iBA+BxF"}
1
+ {"version":3,"file":"multicall.d.ts","sourceRoot":"","sources":["../../src/contracts/multicall.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAqC,KAAK,GAAG,EAAqC,MAAM,MAAM,CAAC;AAEtG,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAmB,MAAM,aAAa,CAAC;AAGlE,eAAO,MAAM,oBAAoB,EAAG,4CAAqD,CAAC;AAE1F,qBAAa,UAAU;WACR,OAAO,CAClB,QAAQ,EAAE,WAAW,EAAE,EACvB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,UAAU,GAAG,SAAS,EACjC,UAAU,EAAE,YAAY,GAAG,SAAS,EACpC,aAAa,EAAE,GAAG,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,GAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAO;;;;;;;;;CAoG3C;AAED,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,iBA+BxF"}
@@ -1,4 +1,5 @@
1
1
  import { toHex as toPaddedHex } from '@aztec/foundation/bigint-buffer';
2
+ import { TimeoutError } from '@aztec/foundation/error';
2
3
  import { encodeFunctionData, multicall3Abi } from 'viem';
3
4
  import { FormattedViemError, formatViemError } from '../utils.js';
4
5
  import { RollupContract } from './rollup.js';
@@ -20,7 +21,7 @@ export class Multicall3 {
20
21
  };
21
22
  const encodedForwarderData = encodeFunctionData(forwarderFunctionData);
22
23
  try {
23
- const { receipt, gasPrice } = await l1TxUtils.sendAndMonitorTransaction({
24
+ const { receipt, state } = await l1TxUtils.sendAndMonitorTransaction({
24
25
  to: MULTI_CALL_3_ADDRESS,
25
26
  data: encodedForwarderData
26
27
  }, gasConfig, blobConfig);
@@ -28,7 +29,6 @@ export class Multicall3 {
28
29
  const stats = await l1TxUtils.getTransactionStats(receipt.transactionHash);
29
30
  return {
30
31
  receipt,
31
- gasPrice,
32
32
  stats
33
33
  };
34
34
  } else {
@@ -41,7 +41,7 @@ export class Multicall3 {
41
41
  };
42
42
  let errorMsg;
43
43
  if (blobConfig) {
44
- const maxFeePerBlobGas = blobConfig.maxFeePerBlobGas ?? gasPrice.maxFeePerBlobGas;
44
+ const maxFeePerBlobGas = blobConfig.maxFeePerBlobGas ?? state.gasPrice.maxFeePerBlobGas;
45
45
  if (maxFeePerBlobGas === undefined) {
46
46
  errorMsg = 'maxFeePerBlobGas is required to get the error message';
47
47
  } else {
@@ -68,11 +68,13 @@ export class Multicall3 {
68
68
  }
69
69
  return {
70
70
  receipt,
71
- gasPrice,
72
71
  errorMsg
73
72
  };
74
73
  }
75
74
  } catch (err) {
75
+ if (err instanceof TimeoutError) {
76
+ throw err;
77
+ }
76
78
  for (const request of requests){
77
79
  logger.debug('Simulating request', {
78
80
  request