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

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 (240) hide show
  1. package/dest/account.d.ts +1 -1
  2. package/dest/chain.d.ts +1 -1
  3. package/dest/client.d.ts +25 -3
  4. package/dest/client.d.ts.map +1 -1
  5. package/dest/client.js +60 -4
  6. package/dest/config.d.ts +48 -73
  7. package/dest/config.d.ts.map +1 -1
  8. package/dest/config.js +120 -386
  9. package/dest/constants.d.ts +1 -1
  10. package/dest/contracts/chain_state_override.d.ts +78 -0
  11. package/dest/contracts/chain_state_override.d.ts.map +1 -0
  12. package/dest/contracts/chain_state_override.js +137 -0
  13. package/dest/contracts/empire_base.d.ts +7 -5
  14. package/dest/contracts/empire_base.d.ts.map +1 -1
  15. package/dest/contracts/empire_base.js +1 -1
  16. package/dest/contracts/errors.d.ts +1 -1
  17. package/dest/contracts/errors.d.ts.map +1 -1
  18. package/dest/contracts/fee_asset_handler.d.ts +6 -5
  19. package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
  20. package/dest/contracts/fee_asset_handler.js +11 -9
  21. package/dest/contracts/fee_asset_price_oracle.d.ts +105 -0
  22. package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -0
  23. package/dest/contracts/fee_asset_price_oracle.js +656 -0
  24. package/dest/contracts/fee_juice.d.ts +1 -1
  25. package/dest/contracts/fee_juice.d.ts.map +1 -1
  26. package/dest/contracts/governance.d.ts +113 -36
  27. package/dest/contracts/governance.d.ts.map +1 -1
  28. package/dest/contracts/governance.js +207 -16
  29. package/dest/contracts/governance_proposer.d.ts +38 -4
  30. package/dest/contracts/governance_proposer.d.ts.map +1 -1
  31. package/dest/contracts/governance_proposer.js +455 -12
  32. package/dest/contracts/gse.d.ts +4 -2
  33. package/dest/contracts/gse.d.ts.map +1 -1
  34. package/dest/contracts/gse.js +2 -2
  35. package/dest/contracts/inbox.d.ts +24 -3
  36. package/dest/contracts/inbox.d.ts.map +1 -1
  37. package/dest/contracts/inbox.js +42 -2
  38. package/dest/contracts/index.d.ts +6 -3
  39. package/dest/contracts/index.d.ts.map +1 -1
  40. package/dest/contracts/index.js +5 -2
  41. package/dest/contracts/log.d.ts +13 -0
  42. package/dest/contracts/log.d.ts.map +1 -0
  43. package/dest/contracts/log.js +1 -0
  44. package/dest/contracts/multicall.d.ts +130 -13
  45. package/dest/contracts/multicall.d.ts.map +1 -1
  46. package/dest/contracts/multicall.js +203 -93
  47. package/dest/contracts/outbox.d.ts +64 -0
  48. package/dest/contracts/outbox.d.ts.map +1 -0
  49. package/dest/contracts/outbox.js +113 -0
  50. package/dest/contracts/registry.d.ts +3 -1
  51. package/dest/contracts/registry.d.ts.map +1 -1
  52. package/dest/contracts/registry.js +30 -1
  53. package/dest/contracts/rollup.d.ts +5591 -131
  54. package/dest/contracts/rollup.d.ts.map +1 -1
  55. package/dest/contracts/rollup.js +1125 -232
  56. package/dest/contracts/slasher_contract.d.ts +1 -1
  57. package/dest/contracts/slasher_contract.d.ts.map +1 -1
  58. package/dest/contracts/{tally_slashing_proposer.d.ts → slashing_proposer.d.ts} +11 -10
  59. package/dest/contracts/slashing_proposer.d.ts.map +1 -0
  60. package/dest/contracts/{tally_slashing_proposer.js → slashing_proposer.js} +21 -16
  61. package/dest/contracts/utils.d.ts +1 -1
  62. package/dest/deploy_aztec_l1_contracts.d.ts +267 -0
  63. package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
  64. package/dest/deploy_aztec_l1_contracts.js +417 -0
  65. package/dest/deploy_l1_contract.d.ts +68 -0
  66. package/dest/deploy_l1_contract.d.ts.map +1 -0
  67. package/dest/deploy_l1_contract.js +312 -0
  68. package/dest/eth-signer/eth-signer.d.ts +1 -1
  69. package/dest/eth-signer/index.d.ts +1 -1
  70. package/dest/forwarder_proxy.d.ts +32 -0
  71. package/dest/forwarder_proxy.d.ts.map +1 -0
  72. package/dest/forwarder_proxy.js +93 -0
  73. package/dest/l1_artifacts.d.ts +21007 -16779
  74. package/dest/l1_artifacts.d.ts.map +1 -1
  75. package/dest/l1_artifacts.js +9 -24
  76. package/dest/l1_contract_addresses.d.ts +61 -65
  77. package/dest/l1_contract_addresses.d.ts.map +1 -1
  78. package/dest/l1_contract_addresses.js +99 -80
  79. package/dest/l1_reader.d.ts +7 -5
  80. package/dest/l1_reader.d.ts.map +1 -1
  81. package/dest/l1_reader.js +15 -7
  82. package/dest/l1_tx_utils/config.d.ts +11 -5
  83. package/dest/l1_tx_utils/config.d.ts.map +1 -1
  84. package/dest/l1_tx_utils/config.js +46 -10
  85. package/dest/l1_tx_utils/constants.d.ts +8 -2
  86. package/dest/l1_tx_utils/constants.d.ts.map +1 -1
  87. package/dest/l1_tx_utils/constants.js +27 -2
  88. package/dest/l1_tx_utils/factory.d.ts +18 -10
  89. package/dest/l1_tx_utils/factory.d.ts.map +1 -1
  90. package/dest/l1_tx_utils/factory.js +17 -7
  91. package/dest/l1_tx_utils/fee-strategies/index.d.ts +10 -0
  92. package/dest/l1_tx_utils/fee-strategies/index.d.ts.map +1 -0
  93. package/dest/l1_tx_utils/fee-strategies/index.js +12 -0
  94. package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts +8 -0
  95. package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts.map +1 -0
  96. package/dest/l1_tx_utils/fee-strategies/p75_competitive.js +129 -0
  97. package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts +23 -0
  98. package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts.map +1 -0
  99. package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.js +191 -0
  100. package/dest/l1_tx_utils/fee-strategies/types.d.ts +51 -0
  101. package/dest/l1_tx_utils/fee-strategies/types.d.ts.map +1 -0
  102. package/dest/l1_tx_utils/fee-strategies/types.js +3 -0
  103. package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +41 -0
  104. package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -0
  105. package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +42 -0
  106. package/dest/l1_tx_utils/index-blobs.d.ts +3 -0
  107. package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -0
  108. package/dest/l1_tx_utils/index-blobs.js +2 -0
  109. package/dest/l1_tx_utils/index.d.ts +4 -1
  110. package/dest/l1_tx_utils/index.d.ts.map +1 -1
  111. package/dest/l1_tx_utils/index.js +3 -0
  112. package/dest/l1_tx_utils/interfaces.d.ts +2 -2
  113. package/dest/l1_tx_utils/interfaces.d.ts.map +1 -1
  114. package/dest/l1_tx_utils/l1_fee_analyzer.d.ts +252 -0
  115. package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -0
  116. package/dest/l1_tx_utils/l1_fee_analyzer.js +568 -0
  117. package/dest/l1_tx_utils/l1_tx_utils.d.ts +26 -8
  118. package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
  119. package/dest/l1_tx_utils/l1_tx_utils.js +202 -92
  120. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +19 -30
  121. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
  122. package/dest/l1_tx_utils/readonly_l1_tx_utils.js +65 -168
  123. package/dest/l1_tx_utils/signer.d.ts +1 -1
  124. package/dest/l1_tx_utils/tx_delayer.d.ts +58 -0
  125. package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -0
  126. package/dest/{test → l1_tx_utils}/tx_delayer.js +70 -39
  127. package/dest/l1_tx_utils/types.d.ts +27 -1
  128. package/dest/l1_tx_utils/types.d.ts.map +1 -1
  129. package/dest/l1_tx_utils/types.js +10 -0
  130. package/dest/l1_tx_utils/utils.d.ts +1 -1
  131. package/dest/l1_types.d.ts +1 -1
  132. package/dest/publisher_manager.d.ts +34 -7
  133. package/dest/publisher_manager.d.ts.map +1 -1
  134. package/dest/publisher_manager.js +119 -8
  135. package/dest/queries.d.ts +14 -3
  136. package/dest/queries.d.ts.map +1 -1
  137. package/dest/queries.js +84 -9
  138. package/dest/test/blob_kzg_warmup.d.ts +19 -0
  139. package/dest/test/blob_kzg_warmup.d.ts.map +1 -0
  140. package/dest/test/blob_kzg_warmup.js +64 -0
  141. package/dest/test/chain_monitor.d.ts +80 -26
  142. package/dest/test/chain_monitor.d.ts.map +1 -1
  143. package/dest/test/chain_monitor.js +137 -39
  144. package/dest/test/eth_cheat_codes.d.ts +47 -8
  145. package/dest/test/eth_cheat_codes.d.ts.map +1 -1
  146. package/dest/test/eth_cheat_codes.js +100 -44
  147. package/dest/test/eth_cheat_codes_with_state.d.ts +1 -1
  148. package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -1
  149. package/dest/test/index.d.ts +2 -3
  150. package/dest/test/index.d.ts.map +1 -1
  151. package/dest/test/index.js +1 -2
  152. package/dest/test/rollup_cheat_codes.d.ts +75 -14
  153. package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
  154. package/dest/test/rollup_cheat_codes.js +145 -42
  155. package/dest/test/start_anvil.d.ts +25 -2
  156. package/dest/test/start_anvil.d.ts.map +1 -1
  157. package/dest/test/start_anvil.js +143 -28
  158. package/dest/test/upgrade_utils.d.ts +1 -1
  159. package/dest/test/upgrade_utils.js +2 -2
  160. package/dest/types.d.ts +57 -2
  161. package/dest/types.d.ts.map +1 -1
  162. package/dest/utils.d.ts +24 -4
  163. package/dest/utils.d.ts.map +1 -1
  164. package/dest/utils.js +112 -16
  165. package/dest/zkPassportVerifierAddress.d.ts +1 -1
  166. package/package.json +34 -17
  167. package/src/client.ts +66 -2
  168. package/src/config.ts +162 -470
  169. package/src/contracts/README.md +157 -0
  170. package/src/contracts/chain_state_override.ts +200 -0
  171. package/src/contracts/empire_base.ts +6 -5
  172. package/src/contracts/fee_asset_handler.ts +10 -7
  173. package/src/contracts/fee_asset_price_oracle.ts +285 -0
  174. package/src/contracts/governance.ts +279 -13
  175. package/src/contracts/governance_proposer.ts +74 -7
  176. package/src/contracts/gse.ts +7 -2
  177. package/src/contracts/inbox.ts +64 -4
  178. package/src/contracts/index.ts +5 -2
  179. package/src/contracts/log.ts +13 -0
  180. package/src/contracts/multicall.ts +247 -103
  181. package/src/contracts/outbox.ts +132 -0
  182. package/src/contracts/registry.ts +31 -1
  183. package/src/contracts/rollup.ts +830 -194
  184. package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +26 -21
  185. package/src/deploy_aztec_l1_contracts.ts +652 -0
  186. package/src/deploy_l1_contract.ts +362 -0
  187. package/src/forwarder_proxy.ts +108 -0
  188. package/src/l1_artifacts.ts +12 -35
  189. package/src/l1_contract_addresses.ts +120 -92
  190. package/src/l1_reader.ts +25 -10
  191. package/src/l1_tx_utils/config.ts +55 -14
  192. package/src/l1_tx_utils/constants.ts +13 -2
  193. package/src/l1_tx_utils/factory.ts +31 -31
  194. package/src/l1_tx_utils/fee-strategies/index.ts +22 -0
  195. package/src/l1_tx_utils/fee-strategies/p75_competitive.ts +163 -0
  196. package/src/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.ts +245 -0
  197. package/src/l1_tx_utils/fee-strategies/types.ts +56 -0
  198. package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +108 -0
  199. package/src/l1_tx_utils/index-blobs.ts +2 -0
  200. package/src/l1_tx_utils/index.ts +3 -0
  201. package/src/l1_tx_utils/interfaces.ts +1 -1
  202. package/src/l1_tx_utils/l1_fee_analyzer.ts +875 -0
  203. package/src/l1_tx_utils/l1_tx_utils.ts +194 -72
  204. package/src/l1_tx_utils/readonly_l1_tx_utils.ts +79 -214
  205. package/src/{test → l1_tx_utils}/tx_delayer.ts +97 -58
  206. package/src/l1_tx_utils/types.ts +32 -0
  207. package/src/publisher_manager.ts +145 -12
  208. package/src/queries.ts +93 -10
  209. package/src/test/blob_kzg_warmup.ts +65 -0
  210. package/src/test/chain_monitor.ts +198 -51
  211. package/src/test/eth_cheat_codes.ts +91 -48
  212. package/src/test/index.ts +1 -2
  213. package/src/test/rollup_cheat_codes.ts +174 -45
  214. package/src/test/start_anvil.ts +179 -27
  215. package/src/test/upgrade_utils.ts +2 -2
  216. package/src/types.ts +62 -0
  217. package/src/utils.ts +128 -19
  218. package/dest/contracts/empire_slashing_proposer.d.ts +0 -65
  219. package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
  220. package/dest/contracts/empire_slashing_proposer.js +0 -194
  221. package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
  222. package/dest/deploy_l1_contracts.d.ts +0 -226
  223. package/dest/deploy_l1_contracts.d.ts.map +0 -1
  224. package/dest/deploy_l1_contracts.js +0 -1473
  225. package/dest/index.d.ts +0 -18
  226. package/dest/index.d.ts.map +0 -1
  227. package/dest/index.js +0 -17
  228. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +0 -26
  229. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +0 -1
  230. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +0 -26
  231. package/dest/test/delayed_tx_utils.d.ts +0 -13
  232. package/dest/test/delayed_tx_utils.d.ts.map +0 -1
  233. package/dest/test/delayed_tx_utils.js +0 -28
  234. package/dest/test/tx_delayer.d.ts +0 -36
  235. package/dest/test/tx_delayer.d.ts.map +0 -1
  236. package/src/contracts/empire_slashing_proposer.ts +0 -259
  237. package/src/deploy_l1_contracts.ts +0 -1849
  238. package/src/index.ts +0 -17
  239. package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +0 -77
  240. package/src/test/delayed_tx_utils.ts +0 -52
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,18 +1,21 @@
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
 
5
5
  import {
6
6
  type Abi,
7
+ type AbiItem,
7
8
  BaseError,
8
9
  type ContractEventName,
9
10
  ContractFunctionRevertedError,
10
11
  type DecodeEventLogReturnType,
12
+ type FormattedTransaction,
11
13
  type Hex,
12
14
  type Log,
13
15
  decodeErrorResult,
14
16
  decodeEventLog,
15
17
  } from 'viem';
18
+ import { formatAbiItem, formatAbiParams } from 'viem/utils';
16
19
 
17
20
  export interface L2Claim {
18
21
  claimSecret: Fr;
@@ -24,8 +27,8 @@ export interface L2Claim {
24
27
  export class FormattedViemError extends Error {
25
28
  metaMessages?: any[];
26
29
 
27
- constructor(message: string, metaMessages?: any[]) {
28
- super(message);
30
+ constructor(message: string, metaMessages?: any[], options?: ErrorOptions) {
31
+ super(message, options);
29
32
  this.name = 'FormattedViemError';
30
33
  this.metaMessages = metaMessages;
31
34
  }
@@ -92,6 +95,57 @@ export function prettyLogViemErrorMsg(err: any) {
92
95
  return err?.message ?? err;
93
96
  }
94
97
 
98
+ export function mergeAbis(abis: Abi[]): Abi {
99
+ let merged: Abi = [];
100
+ const seen = new Set<string>();
101
+
102
+ for (const abi of abis) {
103
+ for (const item of abi) {
104
+ const key = getAbiItemKey(item);
105
+ if (!seen.has(key)) {
106
+ seen.add(key);
107
+ merged = [...merged, item];
108
+ }
109
+ }
110
+ }
111
+
112
+ return merged;
113
+ }
114
+
115
+ function getAbiItemKey(item: AbiItem): string {
116
+ if (item.type === 'function') {
117
+ const signature = formatAbiItem(item);
118
+ const outputs = formatAbiParams(item.outputs);
119
+ const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
120
+ return `function:${signature}:${outputs}:${stateMutability}`;
121
+ }
122
+
123
+ if (item.type === 'event') {
124
+ const signature = formatAbiItem(item);
125
+ const indexed = (item.inputs ?? []).map(input => ((input as { indexed?: boolean }).indexed ? '1' : '0')).join('');
126
+ const anonymous = item.anonymous ? 'anonymous' : 'not-anonymous';
127
+ return `event:${signature}:${indexed}:${anonymous}`;
128
+ }
129
+
130
+ if (item.type === 'error') {
131
+ const signature = formatAbiItem(item);
132
+ return `error:${signature}`;
133
+ }
134
+
135
+ if (item.type === 'constructor') {
136
+ const inputs = formatAbiParams(item.inputs);
137
+ const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
138
+ return `constructor::${inputs}:${stateMutability}`;
139
+ }
140
+
141
+ if (item.type === 'fallback' || item.type === 'receive') {
142
+ const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
143
+ return `${item.type}:::${stateMutability}`;
144
+ }
145
+
146
+ return 'unknown';
147
+ }
148
+
95
149
  function getNestedErrorData(error: unknown): string | undefined {
96
150
  // If nothing, bail
97
151
  if (!error) {
@@ -116,6 +170,21 @@ function getNestedErrorData(error: unknown): string | undefined {
116
170
  return undefined;
117
171
  }
118
172
 
173
+ /**
174
+ * Truncates an error message to a safe length for log renderers.
175
+ * LogExplorer can only render up to 2500 characters in its summary view.
176
+ * We cap at 2000 to leave room for decorating context added by callers.
177
+ */
178
+ function truncateErrorMessage(message: string): string {
179
+ const MAX = 2000;
180
+ const CHUNK = 950;
181
+ if (message.length <= MAX) {
182
+ return message;
183
+ }
184
+ const truncated = message.length - 2 * CHUNK;
185
+ return message.slice(0, CHUNK) + `...${truncated} characters truncated...` + message.slice(-CHUNK);
186
+ }
187
+
119
188
  /**
120
189
  * Formats a Viem error into a FormattedViemError instance.
121
190
  * @param error - The error to format.
@@ -128,6 +197,8 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
128
197
  return error;
129
198
  }
130
199
 
200
+ const originalError = error;
201
+
131
202
  // First try to decode as a custom error using the ABI
132
203
  try {
133
204
  const data = getNestedErrorData(error);
@@ -138,7 +209,9 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
138
209
  data: data as Hex,
139
210
  });
140
211
  if (decoded) {
141
- return new FormattedViemError(`${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`, error?.metaMessages);
212
+ return new FormattedViemError(`${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`, error?.metaMessages, {
213
+ cause: originalError,
214
+ });
142
215
  }
143
216
  }
144
217
 
@@ -155,7 +228,7 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
155
228
  revertError.metaMessages && revertError.metaMessages?.length > 1
156
229
  ? revertError.metaMessages[1].trimStart()
157
230
  : '';
158
- return new FormattedViemError(`${errorName}${args}`, error?.metaMessages);
231
+ return new FormattedViemError(`${errorName}${args}`, error?.metaMessages, { cause: originalError });
159
232
  }
160
233
  }
161
234
  } catch {
@@ -178,22 +251,12 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
178
251
 
179
252
  // If it's a regular Error instance, return it with its message
180
253
  if (error instanceof Error) {
181
- return new FormattedViemError(error.message, (error as any)?.metaMessages);
182
- }
183
-
184
- const body = String(error);
185
- const length = body.length;
186
- // LogExplorer can only render up to 2500 characters in it's summary view. Try to keep the whole message below this number
187
- // Limit the error to 2000 chacaters in order to allow code higher up to decorate this error with extra details (up to 500 characters)
188
- if (length > 2000) {
189
- const chunk = 950;
190
- const truncated = length - 2 * chunk;
191
- return new FormattedViemError(
192
- body.slice(0, chunk) + `...${truncated} characters truncated...` + body.slice(-1 * chunk),
193
- );
254
+ return new FormattedViemError(truncateErrorMessage(error.message), (error as any)?.metaMessages, {
255
+ cause: originalError,
256
+ });
194
257
  }
195
258
 
196
- return new FormattedViemError(body);
259
+ return new FormattedViemError(truncateErrorMessage(String(error)), undefined, { cause: originalError });
197
260
  }
198
261
 
199
262
  function stripAbis(obj: any) {
@@ -219,6 +282,24 @@ function stripAbis(obj: any) {
219
282
  });
220
283
  }
221
284
 
285
+ /**
286
+ * Best-effort decode of a raw revert payload (`0x...`) against an ABI.
287
+ * Returns a human-readable `ErrorName(arg1, arg2, ...)` string, or `undefined` if the selector
288
+ * is unknown or the payload is empty. Use to surface decoded error names alongside the raw
289
+ * payload in log lines for operators.
290
+ */
291
+ export function tryDecodeRevertReason(data: Hex | undefined, abi: Abi): string | undefined {
292
+ if (!data || data === '0x') {
293
+ return undefined;
294
+ }
295
+ try {
296
+ const decoded = decodeErrorResult({ abi, data });
297
+ return `${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`;
298
+ } catch {
299
+ return undefined;
300
+ }
301
+ }
302
+
222
303
  export function tryGetCustomErrorName(err: any) {
223
304
  try {
224
305
  // See https://viem.sh/docs/contract/simulateContract#handling-custom-errors
@@ -233,3 +314,31 @@ export function tryGetCustomErrorName(err: any) {
233
314
  return undefined;
234
315
  }
235
316
  }
317
+
318
+ /**
319
+ * Type guard to check if a transaction is a blob transaction (EIP-4844).
320
+ * Blob transactions have maxFeePerBlobGas and blobVersionedHashes fields.
321
+ */
322
+ export function isBlobTransaction(tx: FormattedTransaction): tx is FormattedTransaction & {
323
+ maxFeePerBlobGas: bigint;
324
+ blobVersionedHashes: readonly Hex[];
325
+ } {
326
+ return (
327
+ 'maxFeePerBlobGas' in tx &&
328
+ tx.maxFeePerBlobGas !== undefined &&
329
+ 'blobVersionedHashes' in tx &&
330
+ tx.blobVersionedHashes !== undefined
331
+ );
332
+ }
333
+
334
+ /**
335
+ * Calculates a percentile from an array of bigints
336
+ */
337
+ export function calculatePercentile(values: bigint[], percentile: number): bigint {
338
+ if (values.length === 0) {
339
+ return 0n;
340
+ }
341
+ const sorted = [...values].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
342
+ const index = Math.ceil((sorted.length - 1) * (percentile / 100));
343
+ return sorted[index];
344
+ }
@@ -1,65 +0,0 @@
1
- import { EthAddress } from '@aztec/foundation/eth-address';
2
- import EventEmitter from 'events';
3
- import { type Hex, type Log, type TypedDataDefinition } from 'viem';
4
- import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
5
- import type { ViemClient } from '../types.js';
6
- import { type IEmpireBase } from './empire_base.js';
7
- export declare class ProposalAlreadyExecutedError extends Error {
8
- constructor(round: bigint);
9
- }
10
- export declare class EmpireSlashingProposerContract extends EventEmitter implements IEmpireBase {
11
- readonly client: ViemClient;
12
- private readonly logger;
13
- private readonly proposer;
14
- readonly type: "empire";
15
- constructor(client: ViemClient, address: Hex | EthAddress);
16
- get address(): EthAddress;
17
- getQuorumSize(): Promise<bigint>;
18
- getRoundSize(): Promise<bigint>;
19
- getLifetimeInRounds(): Promise<bigint>;
20
- getExecutionDelayInRounds(): Promise<bigint>;
21
- getCurrentRound(): Promise<bigint>;
22
- computeRound(slot: bigint): Promise<bigint>;
23
- getInstance(): Promise<`0x${string}`>;
24
- getRoundInfo(rollupAddress: Hex, round: bigint): Promise<{
25
- lastSignalSlot: bigint;
26
- payloadWithMostSignals: Hex;
27
- executed: boolean;
28
- }>;
29
- getPayloadSignals(rollupAddress: Hex, round: bigint, payload: Hex): Promise<bigint>;
30
- createSignalRequest(payload: Hex): L1TxRequest;
31
- createSignalRequestWithSignature(payload: Hex, slot: bigint, chainId: number, signerAddress: Hex, signer: (msg: TypedDataDefinition) => Promise<Hex>): Promise<L1TxRequest>;
32
- listenToSubmittablePayloads(callback: (args: {
33
- payload: `0x${string}`;
34
- round: bigint;
35
- }) => unknown): import("viem").WatchContractEventReturnType;
36
- listenToPayloadSubmitted(callback: (args: {
37
- round: bigint;
38
- payload: `0x${string}`;
39
- }) => unknown): import("viem").WatchContractEventReturnType;
40
- listenToSignalCasted(callback: (args: {
41
- round: bigint;
42
- payload: `0x${string}`;
43
- signaler: `0x${string}`;
44
- }) => unknown): import("viem").WatchContractEventReturnType;
45
- /** Creates an L1TxRequest to submit the round winner for the given round. */
46
- buildExecuteRoundRequest(round: bigint): L1TxRequest;
47
- /** Tries to extract a PayloadSubmitted event from the given logs. */
48
- tryExtractPayloadSubmittedEvent(logs: Log[]): {
49
- eventName: "PayloadSubmitted";
50
- args: {
51
- payload: `0x${string}`;
52
- round: bigint;
53
- };
54
- } | undefined;
55
- /**
56
- * Wait for a round to be reached.
57
- *
58
- * @param round - The round to wait for.
59
- * @param pollingIntervalSeconds - The interval in seconds to poll for the round.
60
- * @returns True if the round was reached, false otherwise.
61
- */
62
- waitForRound(round: bigint, pollingIntervalSeconds?: number): Promise<boolean>;
63
- executeRound(txUtils: L1TxUtils, round: bigint | number): ReturnType<typeof txUtils.sendAndMonitorTransaction>;
64
- }
65
- //# sourceMappingURL=empire_slashing_proposer.d.ts.map
@@ -1 +0,0 @@
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,yBAAyB,CAAC;AACtE,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,GAAG,UAAU;IAU3B,IAAW,OAAO,eAEjB;IAEM,aAAa;IAIb,YAAY;IAIZ,mBAAmB;IAInB,yBAAyB;IAIzB,eAAe;IAIf,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI3C,WAAW;IAIL,YAAY,CACvB,aAAa,EAAE,GAAG,EAClB,KAAK,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AO,CAAC;IAe3E,YAAY,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,UAAU,CAAC,OAAO,OAAO,CAAC,yBAAyB,CAAC;CAiDxD"}
@@ -1,194 +0,0 @@
1
- import { EthAddress } from '@aztec/foundation/eth-address';
2
- import { createLogger } from '@aztec/foundation/log';
3
- import { retryUntil } from '@aztec/foundation/retry';
4
- import { EmpireSlashingProposerAbi } from '@aztec/l1-artifacts/EmpireSlashingProposerAbi';
5
- import EventEmitter from 'events';
6
- import { encodeFunctionData, getContract } from 'viem';
7
- import { FormattedViemError, tryExtractEvent } from '../utils.js';
8
- import { encodeSignal, encodeSignalWithSignature, signSignalWithSig } from './empire_base.js';
9
- export class ProposalAlreadyExecutedError extends Error {
10
- constructor(round){
11
- super(`Proposal already executed: ${round}`);
12
- }
13
- }
14
- export class EmpireSlashingProposerContract extends EventEmitter {
15
- client;
16
- logger;
17
- proposer;
18
- type;
19
- constructor(client, address){
20
- super(), this.client = client, this.logger = createLogger('ethereum:contracts:empire_slashing_proposer'), this.type = 'empire';
21
- this.proposer = getContract({
22
- address: typeof address === 'string' ? address : address.toString(),
23
- abi: EmpireSlashingProposerAbi,
24
- client
25
- });
26
- }
27
- get address() {
28
- return EthAddress.fromString(this.proposer.address);
29
- }
30
- getQuorumSize() {
31
- return this.proposer.read.QUORUM_SIZE();
32
- }
33
- getRoundSize() {
34
- return this.proposer.read.ROUND_SIZE();
35
- }
36
- getLifetimeInRounds() {
37
- return this.proposer.read.LIFETIME_IN_ROUNDS();
38
- }
39
- getExecutionDelayInRounds() {
40
- return this.proposer.read.EXECUTION_DELAY_IN_ROUNDS();
41
- }
42
- getCurrentRound() {
43
- return this.proposer.read.getCurrentRound();
44
- }
45
- computeRound(slot) {
46
- return this.proposer.read.computeRound([
47
- slot
48
- ]);
49
- }
50
- getInstance() {
51
- return this.proposer.read.getInstance();
52
- }
53
- async getRoundInfo(rollupAddress, round) {
54
- return await this.proposer.read.getRoundData([
55
- rollupAddress,
56
- round
57
- ]);
58
- }
59
- getPayloadSignals(rollupAddress, round, payload) {
60
- return this.proposer.read.signalCount([
61
- rollupAddress,
62
- round,
63
- payload
64
- ]);
65
- }
66
- createSignalRequest(payload) {
67
- return {
68
- to: this.address.toString(),
69
- data: encodeSignal(payload)
70
- };
71
- }
72
- async createSignalRequestWithSignature(payload, slot, chainId, signerAddress, signer) {
73
- const signature = await signSignalWithSig(signer, payload, slot, await this.getInstance(), this.address.toString(), chainId);
74
- return {
75
- to: this.address.toString(),
76
- data: encodeSignalWithSignature(payload, signature)
77
- };
78
- }
79
- listenToSubmittablePayloads(callback) {
80
- return this.proposer.watchEvent.PayloadSubmittable({}, {
81
- strict: true,
82
- onLogs: (logs)=>{
83
- for (const log of logs){
84
- const { payload, round } = log.args;
85
- if (payload && round) {
86
- callback({
87
- payload,
88
- round
89
- });
90
- }
91
- }
92
- }
93
- });
94
- }
95
- listenToPayloadSubmitted(callback) {
96
- return this.proposer.watchEvent.PayloadSubmitted({}, {
97
- onLogs: (logs)=>{
98
- for (const log of logs){
99
- const { payload, round } = log.args;
100
- if (round && payload) {
101
- callback({
102
- round,
103
- payload
104
- });
105
- }
106
- }
107
- }
108
- });
109
- }
110
- listenToSignalCasted(callback) {
111
- return this.proposer.watchEvent.SignalCast({}, {
112
- onLogs: (logs)=>{
113
- for (const log of logs){
114
- const { round, payload, signaler } = log.args;
115
- if (round && payload && signaler) {
116
- callback({
117
- round,
118
- payload,
119
- signaler
120
- });
121
- }
122
- }
123
- }
124
- });
125
- }
126
- /** Creates an L1TxRequest to submit the round winner for the given round. */ buildExecuteRoundRequest(round) {
127
- return {
128
- to: this.address.toString(),
129
- data: encodeFunctionData({
130
- abi: EmpireSlashingProposerAbi,
131
- functionName: 'submitRoundWinner',
132
- args: [
133
- round
134
- ]
135
- })
136
- };
137
- }
138
- /** Tries to extract a PayloadSubmitted event from the given logs. */ tryExtractPayloadSubmittedEvent(logs) {
139
- return tryExtractEvent(logs, this.address.toString(), EmpireSlashingProposerAbi, 'PayloadSubmitted');
140
- }
141
- /**
142
- * Wait for a round to be reached.
143
- *
144
- * @param round - The round to wait for.
145
- * @param pollingIntervalSeconds - The interval in seconds to poll for the round.
146
- * @returns True if the round was reached, false otherwise.
147
- */ waitForRound(round, pollingIntervalSeconds = 1) {
148
- return retryUntil(async ()=>{
149
- const currentRound = await this.proposer.read.getCurrentRound().catch((e)=>{
150
- this.logger.error('Error getting current round', e);
151
- return undefined;
152
- });
153
- return currentRound !== undefined && currentRound >= round;
154
- }, `Waiting for round ${round} to be reached`, 0, pollingIntervalSeconds).catch(()=>false);
155
- }
156
- async executeRound(txUtils, round) {
157
- if (typeof round === 'number') {
158
- round = BigInt(round);
159
- }
160
- const args = {
161
- abi: EmpireSlashingProposerAbi,
162
- functionName: 'submitRoundWinner',
163
- args: [
164
- round
165
- ]
166
- };
167
- const data = encodeFunctionData(args);
168
- const response = await txUtils.sendAndMonitorTransaction({
169
- to: this.address.toString(),
170
- data
171
- }, {
172
- // Gas estimation is way off for this, likely because we are creating the contract/selector to call
173
- // for the actual slashing dynamically.
174
- gasLimitBufferPercentage: 50
175
- }).catch((err)=>{
176
- if (err instanceof FormattedViemError && err.message.includes('ProposalAlreadyExecuted')) {
177
- throw new ProposalAlreadyExecutedError(round);
178
- }
179
- throw err;
180
- });
181
- if (response.receipt.status === 'reverted') {
182
- const error = await txUtils.tryGetErrorFromRevertedTx(data, {
183
- ...args,
184
- address: this.address.toString()
185
- }, undefined, []);
186
- if (error?.includes('ProposalAlreadyExecuted')) {
187
- throw new ProposalAlreadyExecutedError(round);
188
- }
189
- const errorMessage = `Failed to execute round ${round}, TxHash: ${response.receipt.transactionHash}, Error: ${error ?? 'Unknown error'}`;
190
- throw new Error(errorMessage);
191
- }
192
- return response;
193
- }
194
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"tally_slashing_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/tally_slashing_proposer.ts"],"names":[],"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