@matterlabs/zksync-js 0.0.1 → 0.0.3

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 (103) hide show
  1. package/README.md +12 -12
  2. package/dist/adapters/ethers/client.cjs +642 -1
  3. package/dist/adapters/ethers/client.cjs.map +1 -1
  4. package/dist/adapters/ethers/client.js +6 -5
  5. package/dist/adapters/ethers/estimator.d.ts +4 -0
  6. package/dist/adapters/ethers/index.cjs +1279 -925
  7. package/dist/adapters/ethers/index.cjs.map +1 -1
  8. package/dist/adapters/ethers/index.d.ts +1 -0
  9. package/dist/adapters/ethers/index.js +9 -8
  10. package/dist/adapters/ethers/resources/contracts/contracts.d.ts +9 -0
  11. package/dist/adapters/ethers/resources/contracts/index.d.ts +2 -0
  12. package/dist/adapters/ethers/resources/contracts/types.d.ts +60 -0
  13. package/dist/adapters/ethers/resources/deposits/context.d.ts +21 -7
  14. package/dist/adapters/ethers/resources/deposits/index.d.ts +3 -1
  15. package/dist/adapters/ethers/resources/deposits/routes/types.d.ts +2 -6
  16. package/dist/adapters/ethers/resources/deposits/services/fee.d.ts +6 -0
  17. package/dist/adapters/ethers/resources/deposits/services/gas.d.ts +41 -0
  18. package/dist/adapters/ethers/resources/tokens/index.d.ts +1 -0
  19. package/dist/adapters/ethers/resources/tokens/tokens.d.ts +10 -0
  20. package/dist/adapters/ethers/resources/utils.d.ts +3 -17
  21. package/dist/adapters/ethers/resources/withdrawals/context.d.ts +15 -7
  22. package/dist/adapters/ethers/resources/withdrawals/index.d.ts +3 -1
  23. package/dist/adapters/ethers/resources/withdrawals/routes/types.d.ts +2 -2
  24. package/dist/adapters/ethers/resources/withdrawals/services/fees.d.ts +14 -0
  25. package/dist/adapters/ethers/resources/withdrawals/services/gas.d.ts +12 -0
  26. package/dist/adapters/ethers/sdk.cjs +1388 -1501
  27. package/dist/adapters/ethers/sdk.cjs.map +1 -1
  28. package/dist/adapters/ethers/sdk.d.ts +5 -22
  29. package/dist/adapters/ethers/sdk.js +7 -6
  30. package/dist/adapters/viem/client.cjs.map +1 -1
  31. package/dist/adapters/viem/client.d.ts +1 -1
  32. package/dist/adapters/viem/client.js +4 -5
  33. package/dist/adapters/viem/estimator.d.ts +4 -0
  34. package/dist/adapters/viem/index.cjs +1233 -744
  35. package/dist/adapters/viem/index.cjs.map +1 -1
  36. package/dist/adapters/viem/index.d.ts +3 -0
  37. package/dist/adapters/viem/index.js +8 -8
  38. package/dist/adapters/viem/resources/contracts/contracts.d.ts +9 -0
  39. package/dist/adapters/viem/resources/contracts/index.d.ts +2 -0
  40. package/dist/adapters/viem/resources/contracts/types.d.ts +61 -0
  41. package/dist/adapters/viem/resources/deposits/context.d.ts +21 -7
  42. package/dist/adapters/viem/resources/deposits/index.d.ts +3 -1
  43. package/dist/adapters/viem/resources/deposits/routes/types.d.ts +2 -6
  44. package/dist/adapters/viem/resources/deposits/services/fee.d.ts +6 -0
  45. package/dist/adapters/viem/resources/deposits/services/gas.d.ts +37 -0
  46. package/dist/adapters/viem/resources/tokens/index.d.ts +1 -0
  47. package/dist/adapters/viem/resources/tokens/tokens.d.ts +3 -0
  48. package/dist/adapters/viem/resources/utils.d.ts +3 -19
  49. package/dist/adapters/viem/resources/withdrawals/context.d.ts +14 -9
  50. package/dist/adapters/viem/resources/withdrawals/index.d.ts +3 -1
  51. package/dist/adapters/viem/resources/withdrawals/routes/types.d.ts +12 -2
  52. package/dist/adapters/viem/resources/withdrawals/services/fee.d.ts +17 -0
  53. package/dist/adapters/viem/resources/withdrawals/services/gas.d.ts +12 -0
  54. package/dist/adapters/viem/sdk.cjs +1225 -699
  55. package/dist/adapters/viem/sdk.cjs.map +1 -1
  56. package/dist/adapters/viem/sdk.d.ts +5 -25
  57. package/dist/adapters/viem/sdk.js +6 -6
  58. package/dist/{chunk-3LALBFFE.js → chunk-3MRGU4HV.js} +9 -5
  59. package/dist/{chunk-CGO27P7F.js → chunk-5YWP4CZP.js} +849 -835
  60. package/dist/{chunk-4HLJJKIY.js → chunk-6K6VJQAL.js} +2 -2
  61. package/dist/{chunk-6GCT6TLS.js → chunk-F2ENUV3A.js} +13 -1
  62. package/dist/{chunk-7M4V3FMT.js → chunk-JXUFGIJG.js} +986 -678
  63. package/dist/chunk-LL3WKCFJ.js +231 -0
  64. package/dist/{chunk-Y75OMFK6.js → chunk-M5J2MM2U.js} +351 -1
  65. package/dist/{chunk-263G6636.js → chunk-NCAIVYBR.js} +1 -14
  66. package/dist/{chunk-DI2CJDPZ.js → chunk-NEC2ZKHI.js} +5 -13
  67. package/dist/chunk-NTEIA5KA.js +13 -0
  68. package/dist/chunk-XRE7H466.js +157 -0
  69. package/dist/{chunk-BD2LUO5T.js → chunk-YUK547UF.js} +3 -3
  70. package/dist/core/abi.d.ts +9 -0
  71. package/dist/core/adapters/interfaces.d.ts +25 -0
  72. package/dist/core/codec/ntv.d.ts +48 -0
  73. package/dist/core/constants.cjs +12 -0
  74. package/dist/core/constants.cjs.map +1 -1
  75. package/dist/core/constants.d.ts +6 -0
  76. package/dist/core/constants.js +1 -1
  77. package/dist/core/index.cjs +4508 -1
  78. package/dist/core/index.cjs.map +1 -1
  79. package/dist/core/index.d.ts +2 -0
  80. package/dist/core/index.js +5 -4
  81. package/dist/core/resources/deposits/fee.d.ts +15 -0
  82. package/dist/core/resources/deposits/gas.d.ts +38 -0
  83. package/dist/core/resources/withdrawals/gas.d.ts +14 -0
  84. package/dist/core/types/errors.d.ts +1 -1
  85. package/dist/core/types/fees.d.ts +40 -0
  86. package/dist/core/types/flows/base.d.ts +0 -10
  87. package/dist/core/types/flows/deposits.d.ts +20 -6
  88. package/dist/core/types/flows/route.d.ts +2 -3
  89. package/dist/core/types/flows/token.d.ts +192 -0
  90. package/dist/core/types/flows/withdrawals.d.ts +12 -6
  91. package/dist/core/utils/addr.d.ts +2 -0
  92. package/dist/index.cjs +4520 -1
  93. package/dist/index.cjs.map +1 -1
  94. package/dist/index.d.ts +2 -0
  95. package/dist/index.js +5 -4
  96. package/package.json +5 -1
  97. package/dist/adapters/ethers/resources/token-info.d.ts +0 -31
  98. package/dist/adapters/ethers/resources/withdrawals/routes/eth-nonbase.d.ts +0 -2
  99. package/dist/adapters/viem/resources/token-info.d.ts +0 -34
  100. package/dist/adapters/viem/resources/withdrawals/routes/eth-nonbase.d.ts +0 -2
  101. package/dist/chunk-B77GWPO5.js +0 -339
  102. package/dist/core/internal/abi-registry.d.ts +0 -9
  103. package/dist/core/utils/gas.d.ts +0 -13
package/dist/index.cjs CHANGED
@@ -12,6 +12,9 @@ var __export = (target, all) => {
12
12
  // src/core/constants.ts
13
13
  var constants_exports = {};
14
14
  __export(constants_exports, {
15
+ BUFFER: () => BUFFER,
16
+ DEFAULT_ABI_BYTES: () => DEFAULT_ABI_BYTES,
17
+ DEFAULT_PUBDATA_BYTES: () => DEFAULT_PUBDATA_BYTES,
15
18
  ETH_ADDRESS: () => ETH_ADDRESS,
16
19
  FORMAL_ETH_ADDRESS: () => FORMAL_ETH_ADDRESS,
17
20
  L1_FEE_ESTIMATION_COEF_DENOMINATOR: () => L1_FEE_ESTIMATION_COEF_DENOMINATOR,
@@ -21,11 +24,14 @@ __export(constants_exports, {
21
24
  L2_ASSET_ROUTER_ADDRESS: () => L2_ASSET_ROUTER_ADDRESS,
22
25
  L2_BASE_TOKEN_ADDRESS: () => L2_BASE_TOKEN_ADDRESS,
23
26
  L2_NATIVE_TOKEN_VAULT_ADDRESS: () => L2_NATIVE_TOKEN_VAULT_ADDRESS,
27
+ SAFE_L1_BRIDGE_GAS: () => SAFE_L1_BRIDGE_GAS,
24
28
  TOPIC_CANONICAL_ASSIGNED: () => TOPIC_CANONICAL_ASSIGNED,
25
29
  TOPIC_CANONICAL_SUCCESS: () => TOPIC_CANONICAL_SUCCESS,
26
30
  TOPIC_L1_MESSAGE_SENT: () => TOPIC_L1_MESSAGE_SENT,
27
31
  TOPIC_L1_MESSAGE_SENT_LEG: () => TOPIC_L1_MESSAGE_SENT_LEG,
28
32
  TOPIC_L1_MESSAGE_SENT_NEW: () => TOPIC_L1_MESSAGE_SENT_NEW,
33
+ TX_MEMORY_OVERHEAD_GAS: () => TX_MEMORY_OVERHEAD_GAS,
34
+ TX_OVERHEAD_GAS: () => TX_OVERHEAD_GAS,
29
35
  k256hex: () => k256hex
30
36
  });
31
37
  var k256hex = (s) => `0x${utils.bytesToHex(sha3.keccak_256(utils.utf8ToBytes(s)))}`.toLowerCase();
@@ -41,9 +47,4517 @@ var TOPIC_L1_MESSAGE_SENT_NEW = k256hex("L1MessageSent(uint256,bytes32,bytes)");
41
47
  var TOPIC_L1_MESSAGE_SENT_LEG = k256hex("L1MessageSent(address,bytes32,bytes)");
42
48
  var TOPIC_CANONICAL_ASSIGNED = "0x779f441679936c5441b671969f37400b8c3ed0071cb47444431bf985754560df";
43
49
  var TOPIC_CANONICAL_SUCCESS = "0xe4def01b981193a97a9e81230d7b9f31812ceaf23f864a828a82c687911cb2df";
50
+ var BUFFER = 20n;
51
+ var TX_OVERHEAD_GAS = 10000n;
52
+ var TX_MEMORY_OVERHEAD_GAS = 10n;
53
+ var DEFAULT_PUBDATA_BYTES = 155n;
54
+ var DEFAULT_ABI_BYTES = 400n;
55
+ var SAFE_L1_BRIDGE_GAS = 600000n;
44
56
  var L1_FEE_ESTIMATION_COEF_NUMERATOR = 12;
45
57
  var L1_FEE_ESTIMATION_COEF_DENOMINATOR = 10;
46
58
 
59
+ // src/core/abi.ts
60
+ var abi_exports = {};
61
+ __export(abi_exports, {
62
+ IBaseTokenABI: () => IBaseToken_default,
63
+ IBridgehubABI: () => IBridgehub_default,
64
+ IERC20ABI: () => IERC20_default,
65
+ IL1AssetRouterABI: () => IL1AssetRouter_default,
66
+ IL1NullifierABI: () => IL1Nullifier_default,
67
+ IL2AssetRouterABI: () => IL2AssetRouter_default,
68
+ L1NativeTokenVaultABI: () => L1NativeTokenVault_default,
69
+ L2NativeTokenVaultABI: () => L2NativeTokenVault_default,
70
+ MailboxABI: () => Mailbox_default
71
+ });
72
+
73
+ // src/core/internal/abis/IBridgehub.ts
74
+ var IBridgehubABI = [
75
+ {
76
+ anonymous: false,
77
+ inputs: [
78
+ {
79
+ indexed: true,
80
+ internalType: "bytes32",
81
+ name: "assetInfo",
82
+ type: "bytes32"
83
+ },
84
+ {
85
+ indexed: true,
86
+ internalType: "address",
87
+ name: "_assetAddress",
88
+ type: "address"
89
+ },
90
+ {
91
+ indexed: true,
92
+ internalType: "bytes32",
93
+ name: "additionalData",
94
+ type: "bytes32"
95
+ },
96
+ {
97
+ indexed: false,
98
+ internalType: "address",
99
+ name: "sender",
100
+ type: "address"
101
+ }
102
+ ],
103
+ name: "AssetRegistered",
104
+ type: "event"
105
+ },
106
+ {
107
+ anonymous: false,
108
+ inputs: [
109
+ {
110
+ indexed: true,
111
+ internalType: "bytes32",
112
+ name: "assetId",
113
+ type: "bytes32"
114
+ }
115
+ ],
116
+ name: "BaseTokenAssetIdRegistered",
117
+ type: "event"
118
+ },
119
+ {
120
+ anonymous: false,
121
+ inputs: [
122
+ {
123
+ indexed: true,
124
+ internalType: "uint256",
125
+ name: "chainId",
126
+ type: "uint256"
127
+ },
128
+ {
129
+ indexed: true,
130
+ internalType: "bytes32",
131
+ name: "assetId",
132
+ type: "bytes32"
133
+ },
134
+ {
135
+ indexed: true,
136
+ internalType: "address",
137
+ name: "sender",
138
+ type: "address"
139
+ },
140
+ {
141
+ indexed: false,
142
+ internalType: "address",
143
+ name: "receiver",
144
+ type: "address"
145
+ },
146
+ {
147
+ indexed: false,
148
+ internalType: "uint256",
149
+ name: "amount",
150
+ type: "uint256"
151
+ }
152
+ ],
153
+ name: "BridgeBurn",
154
+ type: "event"
155
+ },
156
+ {
157
+ anonymous: false,
158
+ inputs: [
159
+ {
160
+ indexed: true,
161
+ internalType: "uint256",
162
+ name: "chainId",
163
+ type: "uint256"
164
+ },
165
+ {
166
+ indexed: true,
167
+ internalType: "bytes32",
168
+ name: "assetId",
169
+ type: "bytes32"
170
+ },
171
+ {
172
+ indexed: false,
173
+ internalType: "address",
174
+ name: "receiver",
175
+ type: "address"
176
+ },
177
+ {
178
+ indexed: false,
179
+ internalType: "uint256",
180
+ name: "amount",
181
+ type: "uint256"
182
+ }
183
+ ],
184
+ name: "BridgeMint",
185
+ type: "event"
186
+ },
187
+ {
188
+ anonymous: false,
189
+ inputs: [
190
+ {
191
+ indexed: true,
192
+ internalType: "address",
193
+ name: "chainTypeManager",
194
+ type: "address"
195
+ }
196
+ ],
197
+ name: "ChainTypeManagerAdded",
198
+ type: "event"
199
+ },
200
+ {
201
+ anonymous: false,
202
+ inputs: [
203
+ {
204
+ indexed: true,
205
+ internalType: "address",
206
+ name: "chainTypeManager",
207
+ type: "address"
208
+ }
209
+ ],
210
+ name: "ChainTypeManagerRemoved",
211
+ type: "event"
212
+ },
213
+ {
214
+ anonymous: false,
215
+ inputs: [
216
+ {
217
+ indexed: true,
218
+ internalType: "uint256",
219
+ name: "chainId",
220
+ type: "uint256"
221
+ },
222
+ {
223
+ indexed: true,
224
+ internalType: "bytes32",
225
+ name: "assetId",
226
+ type: "bytes32"
227
+ },
228
+ {
229
+ indexed: true,
230
+ internalType: "address",
231
+ name: "zkChain",
232
+ type: "address"
233
+ }
234
+ ],
235
+ name: "MigrationFinalized",
236
+ type: "event"
237
+ },
238
+ {
239
+ anonymous: false,
240
+ inputs: [
241
+ {
242
+ indexed: true,
243
+ internalType: "uint256",
244
+ name: "chainId",
245
+ type: "uint256"
246
+ },
247
+ {
248
+ indexed: true,
249
+ internalType: "bytes32",
250
+ name: "assetId",
251
+ type: "bytes32"
252
+ },
253
+ {
254
+ indexed: true,
255
+ internalType: "uint256",
256
+ name: "settlementLayerChainId",
257
+ type: "uint256"
258
+ }
259
+ ],
260
+ name: "MigrationStarted",
261
+ type: "event"
262
+ },
263
+ {
264
+ anonymous: false,
265
+ inputs: [
266
+ {
267
+ indexed: true,
268
+ internalType: "address",
269
+ name: "oldAdmin",
270
+ type: "address"
271
+ },
272
+ {
273
+ indexed: true,
274
+ internalType: "address",
275
+ name: "newAdmin",
276
+ type: "address"
277
+ }
278
+ ],
279
+ name: "NewAdmin",
280
+ type: "event"
281
+ },
282
+ {
283
+ anonymous: false,
284
+ inputs: [
285
+ {
286
+ indexed: true,
287
+ internalType: "uint256",
288
+ name: "chainId",
289
+ type: "uint256"
290
+ },
291
+ {
292
+ indexed: false,
293
+ internalType: "address",
294
+ name: "chainTypeManager",
295
+ type: "address"
296
+ },
297
+ {
298
+ indexed: true,
299
+ internalType: "address",
300
+ name: "chainGovernance",
301
+ type: "address"
302
+ }
303
+ ],
304
+ name: "NewChain",
305
+ type: "event"
306
+ },
307
+ {
308
+ anonymous: false,
309
+ inputs: [
310
+ {
311
+ indexed: true,
312
+ internalType: "address",
313
+ name: "oldPendingAdmin",
314
+ type: "address"
315
+ },
316
+ {
317
+ indexed: true,
318
+ internalType: "address",
319
+ name: "newPendingAdmin",
320
+ type: "address"
321
+ }
322
+ ],
323
+ name: "NewPendingAdmin",
324
+ type: "event"
325
+ },
326
+ {
327
+ anonymous: false,
328
+ inputs: [
329
+ {
330
+ indexed: true,
331
+ internalType: "uint256",
332
+ name: "chainId",
333
+ type: "uint256"
334
+ },
335
+ {
336
+ indexed: true,
337
+ internalType: "bool",
338
+ name: "isWhitelisted",
339
+ type: "bool"
340
+ }
341
+ ],
342
+ name: "SettlementLayerRegistered",
343
+ type: "event"
344
+ },
345
+ {
346
+ inputs: [],
347
+ name: "L1_CHAIN_ID",
348
+ outputs: [
349
+ {
350
+ internalType: "uint256",
351
+ name: "",
352
+ type: "uint256"
353
+ }
354
+ ],
355
+ stateMutability: "view",
356
+ type: "function"
357
+ },
358
+ {
359
+ inputs: [],
360
+ name: "acceptAdmin",
361
+ outputs: [],
362
+ stateMutability: "nonpayable",
363
+ type: "function"
364
+ },
365
+ {
366
+ inputs: [
367
+ {
368
+ internalType: "address",
369
+ name: "_chainTypeManager",
370
+ type: "address"
371
+ }
372
+ ],
373
+ name: "addChainTypeManager",
374
+ outputs: [],
375
+ stateMutability: "nonpayable",
376
+ type: "function"
377
+ },
378
+ {
379
+ inputs: [
380
+ {
381
+ internalType: "bytes32",
382
+ name: "_baseTokenAssetId",
383
+ type: "bytes32"
384
+ }
385
+ ],
386
+ name: "addTokenAssetId",
387
+ outputs: [],
388
+ stateMutability: "nonpayable",
389
+ type: "function"
390
+ },
391
+ {
392
+ inputs: [],
393
+ name: "admin",
394
+ outputs: [
395
+ {
396
+ internalType: "address",
397
+ name: "",
398
+ type: "address"
399
+ }
400
+ ],
401
+ stateMutability: "view",
402
+ type: "function"
403
+ },
404
+ {
405
+ inputs: [
406
+ {
407
+ internalType: "bytes32",
408
+ name: "_baseTokenAssetId",
409
+ type: "bytes32"
410
+ }
411
+ ],
412
+ name: "assetIdIsRegistered",
413
+ outputs: [
414
+ {
415
+ internalType: "bool",
416
+ name: "",
417
+ type: "bool"
418
+ }
419
+ ],
420
+ stateMutability: "view",
421
+ type: "function"
422
+ },
423
+ {
424
+ inputs: [],
425
+ name: "assetRouter",
426
+ outputs: [
427
+ {
428
+ internalType: "address",
429
+ name: "",
430
+ type: "address"
431
+ }
432
+ ],
433
+ stateMutability: "view",
434
+ type: "function"
435
+ },
436
+ {
437
+ inputs: [
438
+ {
439
+ internalType: "uint256",
440
+ name: "_chainId",
441
+ type: "uint256"
442
+ }
443
+ ],
444
+ name: "baseToken",
445
+ outputs: [
446
+ {
447
+ internalType: "address",
448
+ name: "",
449
+ type: "address"
450
+ }
451
+ ],
452
+ stateMutability: "view",
453
+ type: "function"
454
+ },
455
+ {
456
+ inputs: [
457
+ {
458
+ internalType: "uint256",
459
+ name: "_chainId",
460
+ type: "uint256"
461
+ }
462
+ ],
463
+ name: "baseTokenAssetId",
464
+ outputs: [
465
+ {
466
+ internalType: "bytes32",
467
+ name: "",
468
+ type: "bytes32"
469
+ }
470
+ ],
471
+ stateMutability: "view",
472
+ type: "function"
473
+ },
474
+ {
475
+ inputs: [
476
+ {
477
+ internalType: "uint256",
478
+ name: "_chainId",
479
+ type: "uint256"
480
+ },
481
+ {
482
+ internalType: "uint256",
483
+ name: "_msgValue",
484
+ type: "uint256"
485
+ },
486
+ {
487
+ internalType: "bytes32",
488
+ name: "_assetId",
489
+ type: "bytes32"
490
+ },
491
+ {
492
+ internalType: "address",
493
+ name: "_originalCaller",
494
+ type: "address"
495
+ },
496
+ {
497
+ internalType: "bytes",
498
+ name: "_data",
499
+ type: "bytes"
500
+ }
501
+ ],
502
+ name: "bridgeBurn",
503
+ outputs: [
504
+ {
505
+ internalType: "bytes",
506
+ name: "_bridgeMintData",
507
+ type: "bytes"
508
+ }
509
+ ],
510
+ stateMutability: "payable",
511
+ type: "function"
512
+ },
513
+ {
514
+ inputs: [
515
+ {
516
+ internalType: "uint256",
517
+ name: "_chainId",
518
+ type: "uint256"
519
+ },
520
+ {
521
+ internalType: "bytes32",
522
+ name: "_assetId",
523
+ type: "bytes32"
524
+ },
525
+ {
526
+ internalType: "bytes",
527
+ name: "_data",
528
+ type: "bytes"
529
+ }
530
+ ],
531
+ name: "bridgeMint",
532
+ outputs: [],
533
+ stateMutability: "payable",
534
+ type: "function"
535
+ },
536
+ {
537
+ inputs: [
538
+ {
539
+ internalType: "uint256",
540
+ name: "_chainId",
541
+ type: "uint256"
542
+ },
543
+ {
544
+ internalType: "bytes32",
545
+ name: "_assetId",
546
+ type: "bytes32"
547
+ },
548
+ {
549
+ internalType: "address",
550
+ name: "_depositSender",
551
+ type: "address"
552
+ },
553
+ {
554
+ internalType: "bytes",
555
+ name: "_data",
556
+ type: "bytes"
557
+ }
558
+ ],
559
+ name: "bridgeRecoverFailedTransfer",
560
+ outputs: [],
561
+ stateMutability: "payable",
562
+ type: "function"
563
+ },
564
+ {
565
+ inputs: [
566
+ {
567
+ internalType: "uint256",
568
+ name: "_chainId",
569
+ type: "uint256"
570
+ }
571
+ ],
572
+ name: "chainTypeManager",
573
+ outputs: [
574
+ {
575
+ internalType: "address",
576
+ name: "",
577
+ type: "address"
578
+ }
579
+ ],
580
+ stateMutability: "view",
581
+ type: "function"
582
+ },
583
+ {
584
+ inputs: [
585
+ {
586
+ internalType: "address",
587
+ name: "_chainTypeManager",
588
+ type: "address"
589
+ }
590
+ ],
591
+ name: "chainTypeManagerIsRegistered",
592
+ outputs: [
593
+ {
594
+ internalType: "bool",
595
+ name: "",
596
+ type: "bool"
597
+ }
598
+ ],
599
+ stateMutability: "view",
600
+ type: "function"
601
+ },
602
+ {
603
+ inputs: [
604
+ {
605
+ internalType: "uint256",
606
+ name: "_chainId",
607
+ type: "uint256"
608
+ },
609
+ {
610
+ internalType: "address",
611
+ name: "_chainTypeManager",
612
+ type: "address"
613
+ },
614
+ {
615
+ internalType: "bytes32",
616
+ name: "_baseTokenAssetId",
617
+ type: "bytes32"
618
+ },
619
+ {
620
+ internalType: "uint256",
621
+ name: "_salt",
622
+ type: "uint256"
623
+ },
624
+ {
625
+ internalType: "address",
626
+ name: "_admin",
627
+ type: "address"
628
+ },
629
+ {
630
+ internalType: "bytes",
631
+ name: "_initData",
632
+ type: "bytes"
633
+ },
634
+ {
635
+ internalType: "bytes[]",
636
+ name: "_factoryDeps",
637
+ type: "bytes[]"
638
+ }
639
+ ],
640
+ name: "createNewChain",
641
+ outputs: [
642
+ {
643
+ internalType: "uint256",
644
+ name: "chainId",
645
+ type: "uint256"
646
+ }
647
+ ],
648
+ stateMutability: "nonpayable",
649
+ type: "function"
650
+ },
651
+ {
652
+ inputs: [
653
+ {
654
+ internalType: "address",
655
+ name: "_ctmAddress",
656
+ type: "address"
657
+ }
658
+ ],
659
+ name: "ctmAssetIdFromAddress",
660
+ outputs: [
661
+ {
662
+ internalType: "bytes32",
663
+ name: "",
664
+ type: "bytes32"
665
+ }
666
+ ],
667
+ stateMutability: "view",
668
+ type: "function"
669
+ },
670
+ {
671
+ inputs: [
672
+ {
673
+ internalType: "uint256",
674
+ name: "_chainId",
675
+ type: "uint256"
676
+ }
677
+ ],
678
+ name: "ctmAssetIdFromChainId",
679
+ outputs: [
680
+ {
681
+ internalType: "bytes32",
682
+ name: "",
683
+ type: "bytes32"
684
+ }
685
+ ],
686
+ stateMutability: "view",
687
+ type: "function"
688
+ },
689
+ {
690
+ inputs: [
691
+ {
692
+ internalType: "bytes32",
693
+ name: "_assetInfo",
694
+ type: "bytes32"
695
+ }
696
+ ],
697
+ name: "ctmAssetIdToAddress",
698
+ outputs: [
699
+ {
700
+ internalType: "address",
701
+ name: "",
702
+ type: "address"
703
+ }
704
+ ],
705
+ stateMutability: "view",
706
+ type: "function"
707
+ },
708
+ {
709
+ inputs: [
710
+ {
711
+ internalType: "uint256",
712
+ name: "_chainId",
713
+ type: "uint256"
714
+ },
715
+ {
716
+ internalType: "bytes32",
717
+ name: "_canonicalTxHash",
718
+ type: "bytes32"
719
+ },
720
+ {
721
+ internalType: "uint64",
722
+ name: "_expirationTimestamp",
723
+ type: "uint64"
724
+ }
725
+ ],
726
+ name: "forwardTransactionOnGateway",
727
+ outputs: [],
728
+ stateMutability: "nonpayable",
729
+ type: "function"
730
+ },
731
+ {
732
+ inputs: [],
733
+ name: "getAllZKChainChainIDs",
734
+ outputs: [
735
+ {
736
+ internalType: "uint256[]",
737
+ name: "",
738
+ type: "uint256[]"
739
+ }
740
+ ],
741
+ stateMutability: "view",
742
+ type: "function"
743
+ },
744
+ {
745
+ inputs: [],
746
+ name: "getAllZKChains",
747
+ outputs: [
748
+ {
749
+ internalType: "address[]",
750
+ name: "",
751
+ type: "address[]"
752
+ }
753
+ ],
754
+ stateMutability: "view",
755
+ type: "function"
756
+ },
757
+ {
758
+ inputs: [
759
+ {
760
+ internalType: "uint256",
761
+ name: "_chainId",
762
+ type: "uint256"
763
+ }
764
+ ],
765
+ name: "getHyperchain",
766
+ outputs: [
767
+ {
768
+ internalType: "address",
769
+ name: "",
770
+ type: "address"
771
+ }
772
+ ],
773
+ stateMutability: "view",
774
+ type: "function"
775
+ },
776
+ {
777
+ inputs: [
778
+ {
779
+ internalType: "uint256",
780
+ name: "_chainId",
781
+ type: "uint256"
782
+ }
783
+ ],
784
+ name: "getZKChain",
785
+ outputs: [
786
+ {
787
+ internalType: "address",
788
+ name: "",
789
+ type: "address"
790
+ }
791
+ ],
792
+ stateMutability: "view",
793
+ type: "function"
794
+ },
795
+ {
796
+ inputs: [],
797
+ name: "l1CtmDeployer",
798
+ outputs: [
799
+ {
800
+ internalType: "contract ICTMDeploymentTracker",
801
+ name: "",
802
+ type: "address"
803
+ }
804
+ ],
805
+ stateMutability: "view",
806
+ type: "function"
807
+ },
808
+ {
809
+ inputs: [
810
+ {
811
+ internalType: "uint256",
812
+ name: "_chainId",
813
+ type: "uint256"
814
+ },
815
+ {
816
+ internalType: "uint256",
817
+ name: "_gasPrice",
818
+ type: "uint256"
819
+ },
820
+ {
821
+ internalType: "uint256",
822
+ name: "_l2GasLimit",
823
+ type: "uint256"
824
+ },
825
+ {
826
+ internalType: "uint256",
827
+ name: "_l2GasPerPubdataByteLimit",
828
+ type: "uint256"
829
+ }
830
+ ],
831
+ name: "l2TransactionBaseCost",
832
+ outputs: [
833
+ {
834
+ internalType: "uint256",
835
+ name: "",
836
+ type: "uint256"
837
+ }
838
+ ],
839
+ stateMutability: "view",
840
+ type: "function"
841
+ },
842
+ {
843
+ inputs: [],
844
+ name: "messageRoot",
845
+ outputs: [
846
+ {
847
+ internalType: "contract IMessageRoot",
848
+ name: "",
849
+ type: "address"
850
+ }
851
+ ],
852
+ stateMutability: "view",
853
+ type: "function"
854
+ },
855
+ {
856
+ inputs: [],
857
+ name: "migrationPaused",
858
+ outputs: [
859
+ {
860
+ internalType: "bool",
861
+ name: "",
862
+ type: "bool"
863
+ }
864
+ ],
865
+ stateMutability: "view",
866
+ type: "function"
867
+ },
868
+ {
869
+ inputs: [],
870
+ name: "pauseMigration",
871
+ outputs: [],
872
+ stateMutability: "nonpayable",
873
+ type: "function"
874
+ },
875
+ {
876
+ inputs: [
877
+ {
878
+ internalType: "uint256",
879
+ name: "_chainId",
880
+ type: "uint256"
881
+ },
882
+ {
883
+ internalType: "bytes32",
884
+ name: "_l2TxHash",
885
+ type: "bytes32"
886
+ },
887
+ {
888
+ internalType: "uint256",
889
+ name: "_l2BatchNumber",
890
+ type: "uint256"
891
+ },
892
+ {
893
+ internalType: "uint256",
894
+ name: "_l2MessageIndex",
895
+ type: "uint256"
896
+ },
897
+ {
898
+ internalType: "uint16",
899
+ name: "_l2TxNumberInBatch",
900
+ type: "uint16"
901
+ },
902
+ {
903
+ internalType: "bytes32[]",
904
+ name: "_merkleProof",
905
+ type: "bytes32[]"
906
+ },
907
+ {
908
+ internalType: "enum TxStatus",
909
+ name: "_status",
910
+ type: "uint8"
911
+ }
912
+ ],
913
+ name: "proveL1ToL2TransactionStatus",
914
+ outputs: [
915
+ {
916
+ internalType: "bool",
917
+ name: "",
918
+ type: "bool"
919
+ }
920
+ ],
921
+ stateMutability: "view",
922
+ type: "function"
923
+ },
924
+ {
925
+ inputs: [
926
+ {
927
+ internalType: "uint256",
928
+ name: "_chainId",
929
+ type: "uint256"
930
+ },
931
+ {
932
+ internalType: "uint256",
933
+ name: "_batchNumber",
934
+ type: "uint256"
935
+ },
936
+ {
937
+ internalType: "uint256",
938
+ name: "_index",
939
+ type: "uint256"
940
+ },
941
+ {
942
+ components: [
943
+ {
944
+ internalType: "uint8",
945
+ name: "l2ShardId",
946
+ type: "uint8"
947
+ },
948
+ {
949
+ internalType: "bool",
950
+ name: "isService",
951
+ type: "bool"
952
+ },
953
+ {
954
+ internalType: "uint16",
955
+ name: "txNumberInBatch",
956
+ type: "uint16"
957
+ },
958
+ {
959
+ internalType: "address",
960
+ name: "sender",
961
+ type: "address"
962
+ },
963
+ {
964
+ internalType: "bytes32",
965
+ name: "key",
966
+ type: "bytes32"
967
+ },
968
+ {
969
+ internalType: "bytes32",
970
+ name: "value",
971
+ type: "bytes32"
972
+ }
973
+ ],
974
+ internalType: "struct L2Log",
975
+ name: "_log",
976
+ type: "tuple"
977
+ },
978
+ {
979
+ internalType: "bytes32[]",
980
+ name: "_proof",
981
+ type: "bytes32[]"
982
+ }
983
+ ],
984
+ name: "proveL2LogInclusion",
985
+ outputs: [
986
+ {
987
+ internalType: "bool",
988
+ name: "",
989
+ type: "bool"
990
+ }
991
+ ],
992
+ stateMutability: "view",
993
+ type: "function"
994
+ },
995
+ {
996
+ inputs: [
997
+ {
998
+ internalType: "uint256",
999
+ name: "_chainId",
1000
+ type: "uint256"
1001
+ },
1002
+ {
1003
+ internalType: "uint256",
1004
+ name: "_batchNumber",
1005
+ type: "uint256"
1006
+ },
1007
+ {
1008
+ internalType: "uint256",
1009
+ name: "_index",
1010
+ type: "uint256"
1011
+ },
1012
+ {
1013
+ components: [
1014
+ {
1015
+ internalType: "uint16",
1016
+ name: "txNumberInBatch",
1017
+ type: "uint16"
1018
+ },
1019
+ {
1020
+ internalType: "address",
1021
+ name: "sender",
1022
+ type: "address"
1023
+ },
1024
+ {
1025
+ internalType: "bytes",
1026
+ name: "data",
1027
+ type: "bytes"
1028
+ }
1029
+ ],
1030
+ internalType: "struct L2Message",
1031
+ name: "_message",
1032
+ type: "tuple"
1033
+ },
1034
+ {
1035
+ internalType: "bytes32[]",
1036
+ name: "_proof",
1037
+ type: "bytes32[]"
1038
+ }
1039
+ ],
1040
+ name: "proveL2MessageInclusion",
1041
+ outputs: [
1042
+ {
1043
+ internalType: "bool",
1044
+ name: "",
1045
+ type: "bool"
1046
+ }
1047
+ ],
1048
+ stateMutability: "view",
1049
+ type: "function"
1050
+ },
1051
+ {
1052
+ inputs: [
1053
+ {
1054
+ internalType: "uint256",
1055
+ name: "_chainId",
1056
+ type: "uint256"
1057
+ },
1058
+ {
1059
+ internalType: "address",
1060
+ name: "_hyperchain",
1061
+ type: "address"
1062
+ }
1063
+ ],
1064
+ name: "registerAlreadyDeployedZKChain",
1065
+ outputs: [],
1066
+ stateMutability: "nonpayable",
1067
+ type: "function"
1068
+ },
1069
+ {
1070
+ inputs: [
1071
+ {
1072
+ internalType: "uint256",
1073
+ name: "_chainId",
1074
+ type: "uint256"
1075
+ }
1076
+ ],
1077
+ name: "registerLegacyChain",
1078
+ outputs: [],
1079
+ stateMutability: "nonpayable",
1080
+ type: "function"
1081
+ },
1082
+ {
1083
+ inputs: [
1084
+ {
1085
+ internalType: "uint256",
1086
+ name: "_newSettlementLayerChainId",
1087
+ type: "uint256"
1088
+ },
1089
+ {
1090
+ internalType: "bool",
1091
+ name: "_isWhitelisted",
1092
+ type: "bool"
1093
+ }
1094
+ ],
1095
+ name: "registerSettlementLayer",
1096
+ outputs: [],
1097
+ stateMutability: "nonpayable",
1098
+ type: "function"
1099
+ },
1100
+ {
1101
+ inputs: [
1102
+ {
1103
+ internalType: "address",
1104
+ name: "_chainTypeManager",
1105
+ type: "address"
1106
+ }
1107
+ ],
1108
+ name: "removeChainTypeManager",
1109
+ outputs: [],
1110
+ stateMutability: "nonpayable",
1111
+ type: "function"
1112
+ },
1113
+ {
1114
+ inputs: [
1115
+ {
1116
+ components: [
1117
+ {
1118
+ internalType: "uint256",
1119
+ name: "chainId",
1120
+ type: "uint256"
1121
+ },
1122
+ {
1123
+ internalType: "uint256",
1124
+ name: "mintValue",
1125
+ type: "uint256"
1126
+ },
1127
+ {
1128
+ internalType: "address",
1129
+ name: "l2Contract",
1130
+ type: "address"
1131
+ },
1132
+ {
1133
+ internalType: "uint256",
1134
+ name: "l2Value",
1135
+ type: "uint256"
1136
+ },
1137
+ {
1138
+ internalType: "bytes",
1139
+ name: "l2Calldata",
1140
+ type: "bytes"
1141
+ },
1142
+ {
1143
+ internalType: "uint256",
1144
+ name: "l2GasLimit",
1145
+ type: "uint256"
1146
+ },
1147
+ {
1148
+ internalType: "uint256",
1149
+ name: "l2GasPerPubdataByteLimit",
1150
+ type: "uint256"
1151
+ },
1152
+ {
1153
+ internalType: "bytes[]",
1154
+ name: "factoryDeps",
1155
+ type: "bytes[]"
1156
+ },
1157
+ {
1158
+ internalType: "address",
1159
+ name: "refundRecipient",
1160
+ type: "address"
1161
+ }
1162
+ ],
1163
+ internalType: "struct L2TransactionRequestDirect",
1164
+ name: "_request",
1165
+ type: "tuple"
1166
+ }
1167
+ ],
1168
+ name: "requestL2TransactionDirect",
1169
+ outputs: [
1170
+ {
1171
+ internalType: "bytes32",
1172
+ name: "canonicalTxHash",
1173
+ type: "bytes32"
1174
+ }
1175
+ ],
1176
+ stateMutability: "payable",
1177
+ type: "function"
1178
+ },
1179
+ {
1180
+ inputs: [
1181
+ {
1182
+ components: [
1183
+ {
1184
+ internalType: "uint256",
1185
+ name: "chainId",
1186
+ type: "uint256"
1187
+ },
1188
+ {
1189
+ internalType: "uint256",
1190
+ name: "mintValue",
1191
+ type: "uint256"
1192
+ },
1193
+ {
1194
+ internalType: "uint256",
1195
+ name: "l2Value",
1196
+ type: "uint256"
1197
+ },
1198
+ {
1199
+ internalType: "uint256",
1200
+ name: "l2GasLimit",
1201
+ type: "uint256"
1202
+ },
1203
+ {
1204
+ internalType: "uint256",
1205
+ name: "l2GasPerPubdataByteLimit",
1206
+ type: "uint256"
1207
+ },
1208
+ {
1209
+ internalType: "address",
1210
+ name: "refundRecipient",
1211
+ type: "address"
1212
+ },
1213
+ {
1214
+ internalType: "address",
1215
+ name: "secondBridgeAddress",
1216
+ type: "address"
1217
+ },
1218
+ {
1219
+ internalType: "uint256",
1220
+ name: "secondBridgeValue",
1221
+ type: "uint256"
1222
+ },
1223
+ {
1224
+ internalType: "bytes",
1225
+ name: "secondBridgeCalldata",
1226
+ type: "bytes"
1227
+ }
1228
+ ],
1229
+ internalType: "struct L2TransactionRequestTwoBridgesOuter",
1230
+ name: "_request",
1231
+ type: "tuple"
1232
+ }
1233
+ ],
1234
+ name: "requestL2TransactionTwoBridges",
1235
+ outputs: [
1236
+ {
1237
+ internalType: "bytes32",
1238
+ name: "canonicalTxHash",
1239
+ type: "bytes32"
1240
+ }
1241
+ ],
1242
+ stateMutability: "payable",
1243
+ type: "function"
1244
+ },
1245
+ {
1246
+ inputs: [
1247
+ {
1248
+ internalType: "address",
1249
+ name: "_sharedBridge",
1250
+ type: "address"
1251
+ },
1252
+ {
1253
+ internalType: "contract ICTMDeploymentTracker",
1254
+ name: "_l1CtmDeployer",
1255
+ type: "address"
1256
+ },
1257
+ {
1258
+ internalType: "contract IMessageRoot",
1259
+ name: "_messageRoot",
1260
+ type: "address"
1261
+ }
1262
+ ],
1263
+ name: "setAddresses",
1264
+ outputs: [],
1265
+ stateMutability: "nonpayable",
1266
+ type: "function"
1267
+ },
1268
+ {
1269
+ inputs: [
1270
+ {
1271
+ internalType: "bytes32",
1272
+ name: "_additionalData",
1273
+ type: "bytes32"
1274
+ },
1275
+ {
1276
+ internalType: "address",
1277
+ name: "_assetAddress",
1278
+ type: "address"
1279
+ }
1280
+ ],
1281
+ name: "setCTMAssetAddress",
1282
+ outputs: [],
1283
+ stateMutability: "nonpayable",
1284
+ type: "function"
1285
+ },
1286
+ {
1287
+ inputs: [
1288
+ {
1289
+ internalType: "address",
1290
+ name: "_newPendingAdmin",
1291
+ type: "address"
1292
+ }
1293
+ ],
1294
+ name: "setPendingAdmin",
1295
+ outputs: [],
1296
+ stateMutability: "nonpayable",
1297
+ type: "function"
1298
+ },
1299
+ {
1300
+ inputs: [
1301
+ {
1302
+ internalType: "uint256",
1303
+ name: "_chainId",
1304
+ type: "uint256"
1305
+ }
1306
+ ],
1307
+ name: "settlementLayer",
1308
+ outputs: [
1309
+ {
1310
+ internalType: "uint256",
1311
+ name: "",
1312
+ type: "uint256"
1313
+ }
1314
+ ],
1315
+ stateMutability: "view",
1316
+ type: "function"
1317
+ },
1318
+ {
1319
+ inputs: [],
1320
+ name: "sharedBridge",
1321
+ outputs: [
1322
+ {
1323
+ internalType: "address",
1324
+ name: "",
1325
+ type: "address"
1326
+ }
1327
+ ],
1328
+ stateMutability: "view",
1329
+ type: "function"
1330
+ },
1331
+ {
1332
+ inputs: [],
1333
+ name: "unpauseMigration",
1334
+ outputs: [],
1335
+ stateMutability: "nonpayable",
1336
+ type: "function"
1337
+ },
1338
+ {
1339
+ inputs: [
1340
+ {
1341
+ internalType: "uint256",
1342
+ name: "_chainId",
1343
+ type: "uint256"
1344
+ }
1345
+ ],
1346
+ name: "whitelistedSettlementLayers",
1347
+ outputs: [
1348
+ {
1349
+ internalType: "bool",
1350
+ name: "",
1351
+ type: "bool"
1352
+ }
1353
+ ],
1354
+ stateMutability: "view",
1355
+ type: "function"
1356
+ }
1357
+ ];
1358
+ var IBridgehub_default = IBridgehubABI;
1359
+
1360
+ // src/core/internal/abis/IL1AssetRouter.ts
1361
+ var IL1AssetRouterABI = [
1362
+ {
1363
+ anonymous: false,
1364
+ inputs: [
1365
+ {
1366
+ indexed: true,
1367
+ internalType: "bytes32",
1368
+ name: "assetId",
1369
+ type: "bytes32"
1370
+ },
1371
+ {
1372
+ indexed: true,
1373
+ internalType: "bytes32",
1374
+ name: "additionalData",
1375
+ type: "bytes32"
1376
+ },
1377
+ {
1378
+ indexed: false,
1379
+ internalType: "address",
1380
+ name: "assetDeploymentTracker",
1381
+ type: "address"
1382
+ }
1383
+ ],
1384
+ name: "AssetDeploymentTrackerRegistered",
1385
+ type: "event"
1386
+ },
1387
+ {
1388
+ anonymous: false,
1389
+ inputs: [
1390
+ {
1391
+ indexed: true,
1392
+ internalType: "bytes32",
1393
+ name: "assetId",
1394
+ type: "bytes32"
1395
+ },
1396
+ {
1397
+ indexed: true,
1398
+ internalType: "address",
1399
+ name: "assetDeploymentTracker",
1400
+ type: "address"
1401
+ },
1402
+ {
1403
+ indexed: true,
1404
+ internalType: "bytes32",
1405
+ name: "additionalData",
1406
+ type: "bytes32"
1407
+ }
1408
+ ],
1409
+ name: "AssetDeploymentTrackerSet",
1410
+ type: "event"
1411
+ },
1412
+ {
1413
+ anonymous: false,
1414
+ inputs: [
1415
+ {
1416
+ indexed: true,
1417
+ internalType: "bytes32",
1418
+ name: "assetId",
1419
+ type: "bytes32"
1420
+ },
1421
+ {
1422
+ indexed: true,
1423
+ internalType: "address",
1424
+ name: "_assetHandlerAddress",
1425
+ type: "address"
1426
+ }
1427
+ ],
1428
+ name: "AssetHandlerRegistered",
1429
+ type: "event"
1430
+ },
1431
+ {
1432
+ anonymous: false,
1433
+ inputs: [
1434
+ {
1435
+ indexed: true,
1436
+ internalType: "uint256",
1437
+ name: "chainId",
1438
+ type: "uint256"
1439
+ },
1440
+ {
1441
+ indexed: true,
1442
+ internalType: "address",
1443
+ name: "from",
1444
+ type: "address"
1445
+ },
1446
+ {
1447
+ indexed: false,
1448
+ internalType: "bytes32",
1449
+ name: "assetId",
1450
+ type: "bytes32"
1451
+ },
1452
+ {
1453
+ indexed: false,
1454
+ internalType: "uint256",
1455
+ name: "amount",
1456
+ type: "uint256"
1457
+ }
1458
+ ],
1459
+ name: "BridgehubDepositBaseTokenInitiated",
1460
+ type: "event"
1461
+ },
1462
+ {
1463
+ anonymous: false,
1464
+ inputs: [
1465
+ {
1466
+ indexed: true,
1467
+ internalType: "uint256",
1468
+ name: "chainId",
1469
+ type: "uint256"
1470
+ },
1471
+ {
1472
+ indexed: true,
1473
+ internalType: "bytes32",
1474
+ name: "txDataHash",
1475
+ type: "bytes32"
1476
+ },
1477
+ {
1478
+ indexed: true,
1479
+ internalType: "bytes32",
1480
+ name: "l2DepositTxHash",
1481
+ type: "bytes32"
1482
+ }
1483
+ ],
1484
+ name: "BridgehubDepositFinalized",
1485
+ type: "event"
1486
+ },
1487
+ {
1488
+ anonymous: false,
1489
+ inputs: [
1490
+ {
1491
+ indexed: true,
1492
+ internalType: "uint256",
1493
+ name: "chainId",
1494
+ type: "uint256"
1495
+ },
1496
+ {
1497
+ indexed: true,
1498
+ internalType: "bytes32",
1499
+ name: "txDataHash",
1500
+ type: "bytes32"
1501
+ },
1502
+ {
1503
+ indexed: true,
1504
+ internalType: "address",
1505
+ name: "from",
1506
+ type: "address"
1507
+ },
1508
+ {
1509
+ indexed: false,
1510
+ internalType: "bytes32",
1511
+ name: "assetId",
1512
+ type: "bytes32"
1513
+ },
1514
+ {
1515
+ indexed: false,
1516
+ internalType: "bytes",
1517
+ name: "bridgeMintCalldata",
1518
+ type: "bytes"
1519
+ }
1520
+ ],
1521
+ name: "BridgehubDepositInitiated",
1522
+ type: "event"
1523
+ },
1524
+ {
1525
+ anonymous: false,
1526
+ inputs: [
1527
+ {
1528
+ indexed: false,
1529
+ internalType: "bytes",
1530
+ name: "bridgeMintData",
1531
+ type: "bytes"
1532
+ }
1533
+ ],
1534
+ name: "BridgehubMintData",
1535
+ type: "event"
1536
+ },
1537
+ {
1538
+ anonymous: false,
1539
+ inputs: [
1540
+ {
1541
+ indexed: false,
1542
+ internalType: "uint256",
1543
+ name: "chainId",
1544
+ type: "uint256"
1545
+ },
1546
+ {
1547
+ indexed: true,
1548
+ internalType: "address",
1549
+ name: "sender",
1550
+ type: "address"
1551
+ },
1552
+ {
1553
+ indexed: true,
1554
+ internalType: "bytes32",
1555
+ name: "assetId",
1556
+ type: "bytes32"
1557
+ },
1558
+ {
1559
+ indexed: false,
1560
+ internalType: "bytes32",
1561
+ name: "assetDataHash",
1562
+ type: "bytes32"
1563
+ }
1564
+ ],
1565
+ name: "BridgehubWithdrawalInitiated",
1566
+ type: "event"
1567
+ },
1568
+ {
1569
+ anonymous: false,
1570
+ inputs: [
1571
+ {
1572
+ indexed: true,
1573
+ internalType: "uint256",
1574
+ name: "chainId",
1575
+ type: "uint256"
1576
+ },
1577
+ {
1578
+ indexed: true,
1579
+ internalType: "bytes32",
1580
+ name: "assetId",
1581
+ type: "bytes32"
1582
+ },
1583
+ {
1584
+ indexed: false,
1585
+ internalType: "bytes",
1586
+ name: "assetData",
1587
+ type: "bytes"
1588
+ }
1589
+ ],
1590
+ name: "ClaimedFailedDepositAssetRouter",
1591
+ type: "event"
1592
+ },
1593
+ {
1594
+ anonymous: false,
1595
+ inputs: [
1596
+ {
1597
+ indexed: true,
1598
+ internalType: "uint256",
1599
+ name: "chainId",
1600
+ type: "uint256"
1601
+ },
1602
+ {
1603
+ indexed: true,
1604
+ internalType: "bytes32",
1605
+ name: "assetId",
1606
+ type: "bytes32"
1607
+ },
1608
+ {
1609
+ indexed: false,
1610
+ internalType: "bytes",
1611
+ name: "assetData",
1612
+ type: "bytes"
1613
+ }
1614
+ ],
1615
+ name: "DepositFinalizedAssetRouter",
1616
+ type: "event"
1617
+ },
1618
+ {
1619
+ anonymous: false,
1620
+ inputs: [
1621
+ {
1622
+ indexed: true,
1623
+ internalType: "uint256",
1624
+ name: "chainId",
1625
+ type: "uint256"
1626
+ },
1627
+ {
1628
+ indexed: true,
1629
+ internalType: "bytes32",
1630
+ name: "l2DepositTxHash",
1631
+ type: "bytes32"
1632
+ },
1633
+ {
1634
+ indexed: true,
1635
+ internalType: "address",
1636
+ name: "from",
1637
+ type: "address"
1638
+ },
1639
+ {
1640
+ indexed: false,
1641
+ internalType: "address",
1642
+ name: "to",
1643
+ type: "address"
1644
+ },
1645
+ {
1646
+ indexed: false,
1647
+ internalType: "address",
1648
+ name: "l1Token",
1649
+ type: "address"
1650
+ },
1651
+ {
1652
+ indexed: false,
1653
+ internalType: "uint256",
1654
+ name: "amount",
1655
+ type: "uint256"
1656
+ }
1657
+ ],
1658
+ name: "LegacyDepositInitiated",
1659
+ type: "event"
1660
+ },
1661
+ {
1662
+ inputs: [],
1663
+ name: "BRIDGE_HUB",
1664
+ outputs: [
1665
+ {
1666
+ internalType: "contract IBridgehub",
1667
+ name: "",
1668
+ type: "address"
1669
+ }
1670
+ ],
1671
+ stateMutability: "view",
1672
+ type: "function"
1673
+ },
1674
+ {
1675
+ inputs: [],
1676
+ name: "L1_NULLIFIER",
1677
+ outputs: [
1678
+ {
1679
+ internalType: "contract IL1Nullifier",
1680
+ name: "",
1681
+ type: "address"
1682
+ }
1683
+ ],
1684
+ stateMutability: "view",
1685
+ type: "function"
1686
+ },
1687
+ {
1688
+ inputs: [],
1689
+ name: "L1_WETH_TOKEN",
1690
+ outputs: [
1691
+ {
1692
+ internalType: "address",
1693
+ name: "",
1694
+ type: "address"
1695
+ }
1696
+ ],
1697
+ stateMutability: "view",
1698
+ type: "function"
1699
+ },
1700
+ {
1701
+ inputs: [
1702
+ {
1703
+ internalType: "bytes32",
1704
+ name: "_assetId",
1705
+ type: "bytes32"
1706
+ }
1707
+ ],
1708
+ name: "assetHandlerAddress",
1709
+ outputs: [
1710
+ {
1711
+ internalType: "address",
1712
+ name: "",
1713
+ type: "address"
1714
+ }
1715
+ ],
1716
+ stateMutability: "view",
1717
+ type: "function"
1718
+ },
1719
+ {
1720
+ inputs: [
1721
+ {
1722
+ internalType: "uint256",
1723
+ name: "_chainId",
1724
+ type: "uint256"
1725
+ },
1726
+ {
1727
+ internalType: "address",
1728
+ name: "_depositSender",
1729
+ type: "address"
1730
+ },
1731
+ {
1732
+ internalType: "bytes32",
1733
+ name: "_assetId",
1734
+ type: "bytes32"
1735
+ },
1736
+ {
1737
+ internalType: "bytes",
1738
+ name: "_assetData",
1739
+ type: "bytes"
1740
+ }
1741
+ ],
1742
+ name: "bridgeRecoverFailedTransfer",
1743
+ outputs: [],
1744
+ stateMutability: "nonpayable",
1745
+ type: "function"
1746
+ },
1747
+ {
1748
+ inputs: [
1749
+ {
1750
+ internalType: "uint256",
1751
+ name: "_chainId",
1752
+ type: "uint256"
1753
+ },
1754
+ {
1755
+ internalType: "address",
1756
+ name: "_depositSender",
1757
+ type: "address"
1758
+ },
1759
+ {
1760
+ internalType: "bytes32",
1761
+ name: "_assetId",
1762
+ type: "bytes32"
1763
+ },
1764
+ {
1765
+ internalType: "bytes",
1766
+ name: "_assetData",
1767
+ type: "bytes"
1768
+ },
1769
+ {
1770
+ internalType: "bytes32",
1771
+ name: "_l2TxHash",
1772
+ type: "bytes32"
1773
+ },
1774
+ {
1775
+ internalType: "uint256",
1776
+ name: "_l2BatchNumber",
1777
+ type: "uint256"
1778
+ },
1779
+ {
1780
+ internalType: "uint256",
1781
+ name: "_l2MessageIndex",
1782
+ type: "uint256"
1783
+ },
1784
+ {
1785
+ internalType: "uint16",
1786
+ name: "_l2TxNumberInBatch",
1787
+ type: "uint16"
1788
+ },
1789
+ {
1790
+ internalType: "bytes32[]",
1791
+ name: "_merkleProof",
1792
+ type: "bytes32[]"
1793
+ }
1794
+ ],
1795
+ name: "bridgeRecoverFailedTransfer",
1796
+ outputs: [],
1797
+ stateMutability: "nonpayable",
1798
+ type: "function"
1799
+ },
1800
+ {
1801
+ inputs: [
1802
+ {
1803
+ internalType: "uint256",
1804
+ name: "_chainId",
1805
+ type: "uint256"
1806
+ },
1807
+ {
1808
+ internalType: "bytes32",
1809
+ name: "_txDataHash",
1810
+ type: "bytes32"
1811
+ },
1812
+ {
1813
+ internalType: "bytes32",
1814
+ name: "_txHash",
1815
+ type: "bytes32"
1816
+ }
1817
+ ],
1818
+ name: "bridgehubConfirmL2Transaction",
1819
+ outputs: [],
1820
+ stateMutability: "nonpayable",
1821
+ type: "function"
1822
+ },
1823
+ {
1824
+ inputs: [
1825
+ {
1826
+ internalType: "uint256",
1827
+ name: "_chainId",
1828
+ type: "uint256"
1829
+ },
1830
+ {
1831
+ internalType: "address",
1832
+ name: "_originalCaller",
1833
+ type: "address"
1834
+ },
1835
+ {
1836
+ internalType: "uint256",
1837
+ name: "_value",
1838
+ type: "uint256"
1839
+ },
1840
+ {
1841
+ internalType: "bytes",
1842
+ name: "_data",
1843
+ type: "bytes"
1844
+ }
1845
+ ],
1846
+ name: "bridgehubDeposit",
1847
+ outputs: [
1848
+ {
1849
+ components: [
1850
+ {
1851
+ internalType: "bytes32",
1852
+ name: "magicValue",
1853
+ type: "bytes32"
1854
+ },
1855
+ {
1856
+ internalType: "address",
1857
+ name: "l2Contract",
1858
+ type: "address"
1859
+ },
1860
+ {
1861
+ internalType: "bytes",
1862
+ name: "l2Calldata",
1863
+ type: "bytes"
1864
+ },
1865
+ {
1866
+ internalType: "bytes[]",
1867
+ name: "factoryDeps",
1868
+ type: "bytes[]"
1869
+ },
1870
+ {
1871
+ internalType: "bytes32",
1872
+ name: "txDataHash",
1873
+ type: "bytes32"
1874
+ }
1875
+ ],
1876
+ internalType: "struct L2TransactionRequestTwoBridgesInner",
1877
+ name: "request",
1878
+ type: "tuple"
1879
+ }
1880
+ ],
1881
+ stateMutability: "payable",
1882
+ type: "function"
1883
+ },
1884
+ {
1885
+ inputs: [
1886
+ {
1887
+ internalType: "uint256",
1888
+ name: "_chainId",
1889
+ type: "uint256"
1890
+ },
1891
+ {
1892
+ internalType: "bytes32",
1893
+ name: "_assetId",
1894
+ type: "bytes32"
1895
+ },
1896
+ {
1897
+ internalType: "address",
1898
+ name: "_originalCaller",
1899
+ type: "address"
1900
+ },
1901
+ {
1902
+ internalType: "uint256",
1903
+ name: "_amount",
1904
+ type: "uint256"
1905
+ }
1906
+ ],
1907
+ name: "bridgehubDepositBaseToken",
1908
+ outputs: [],
1909
+ stateMutability: "payable",
1910
+ type: "function"
1911
+ },
1912
+ {
1913
+ inputs: [
1914
+ {
1915
+ internalType: "address",
1916
+ name: "_originalCaller",
1917
+ type: "address"
1918
+ },
1919
+ {
1920
+ internalType: "address",
1921
+ name: "_l2Receiver",
1922
+ type: "address"
1923
+ },
1924
+ {
1925
+ internalType: "address",
1926
+ name: "_l1Token",
1927
+ type: "address"
1928
+ },
1929
+ {
1930
+ internalType: "uint256",
1931
+ name: "_amount",
1932
+ type: "uint256"
1933
+ },
1934
+ {
1935
+ internalType: "uint256",
1936
+ name: "_l2TxGasLimit",
1937
+ type: "uint256"
1938
+ },
1939
+ {
1940
+ internalType: "uint256",
1941
+ name: "_l2TxGasPerPubdataByte",
1942
+ type: "uint256"
1943
+ },
1944
+ {
1945
+ internalType: "address",
1946
+ name: "_refundRecipient",
1947
+ type: "address"
1948
+ }
1949
+ ],
1950
+ name: "depositLegacyErc20Bridge",
1951
+ outputs: [
1952
+ {
1953
+ internalType: "bytes32",
1954
+ name: "txHash",
1955
+ type: "bytes32"
1956
+ }
1957
+ ],
1958
+ stateMutability: "payable",
1959
+ type: "function"
1960
+ },
1961
+ {
1962
+ inputs: [
1963
+ {
1964
+ internalType: "uint256",
1965
+ name: "_chainId",
1966
+ type: "uint256"
1967
+ },
1968
+ {
1969
+ internalType: "bytes32",
1970
+ name: "_assetId",
1971
+ type: "bytes32"
1972
+ },
1973
+ {
1974
+ internalType: "bytes",
1975
+ name: "_transferData",
1976
+ type: "bytes"
1977
+ }
1978
+ ],
1979
+ name: "finalizeDeposit",
1980
+ outputs: [],
1981
+ stateMutability: "payable",
1982
+ type: "function"
1983
+ },
1984
+ {
1985
+ inputs: [
1986
+ {
1987
+ internalType: "uint256",
1988
+ name: "_chainId",
1989
+ type: "uint256"
1990
+ },
1991
+ {
1992
+ internalType: "uint256",
1993
+ name: "_l2BatchNumber",
1994
+ type: "uint256"
1995
+ },
1996
+ {
1997
+ internalType: "uint256",
1998
+ name: "_l2MessageIndex",
1999
+ type: "uint256"
2000
+ },
2001
+ {
2002
+ internalType: "uint16",
2003
+ name: "_l2TxNumberInBatch",
2004
+ type: "uint16"
2005
+ },
2006
+ {
2007
+ internalType: "bytes",
2008
+ name: "_message",
2009
+ type: "bytes"
2010
+ },
2011
+ {
2012
+ internalType: "bytes32[]",
2013
+ name: "_merkleProof",
2014
+ type: "bytes32[]"
2015
+ }
2016
+ ],
2017
+ name: "finalizeWithdrawal",
2018
+ outputs: [],
2019
+ stateMutability: "nonpayable",
2020
+ type: "function"
2021
+ },
2022
+ {
2023
+ inputs: [
2024
+ {
2025
+ internalType: "address",
2026
+ name: "_sender",
2027
+ type: "address"
2028
+ },
2029
+ {
2030
+ internalType: "bytes32",
2031
+ name: "_assetId",
2032
+ type: "bytes32"
2033
+ },
2034
+ {
2035
+ internalType: "bytes",
2036
+ name: "_assetData",
2037
+ type: "bytes"
2038
+ }
2039
+ ],
2040
+ name: "getDepositCalldata",
2041
+ outputs: [
2042
+ {
2043
+ internalType: "bytes",
2044
+ name: "",
2045
+ type: "bytes"
2046
+ }
2047
+ ],
2048
+ stateMutability: "view",
2049
+ type: "function"
2050
+ },
2051
+ {
2052
+ inputs: [
2053
+ {
2054
+ internalType: "uint256",
2055
+ name: "_chainId",
2056
+ type: "uint256"
2057
+ },
2058
+ {
2059
+ internalType: "uint256",
2060
+ name: "_l2BatchNumber",
2061
+ type: "uint256"
2062
+ },
2063
+ {
2064
+ internalType: "uint256",
2065
+ name: "_l2MessageIndex",
2066
+ type: "uint256"
2067
+ }
2068
+ ],
2069
+ name: "isWithdrawalFinalized",
2070
+ outputs: [
2071
+ {
2072
+ internalType: "bool",
2073
+ name: "",
2074
+ type: "bool"
2075
+ }
2076
+ ],
2077
+ stateMutability: "view",
2078
+ type: "function"
2079
+ },
2080
+ {
2081
+ inputs: [
2082
+ {
2083
+ internalType: "uint256",
2084
+ name: "_chainId",
2085
+ type: "uint256"
2086
+ }
2087
+ ],
2088
+ name: "l2BridgeAddress",
2089
+ outputs: [
2090
+ {
2091
+ internalType: "address",
2092
+ name: "",
2093
+ type: "address"
2094
+ }
2095
+ ],
2096
+ stateMutability: "view",
2097
+ type: "function"
2098
+ },
2099
+ {
2100
+ inputs: [],
2101
+ name: "nativeTokenVault",
2102
+ outputs: [
2103
+ {
2104
+ internalType: "contract INativeTokenVault",
2105
+ name: "",
2106
+ type: "address"
2107
+ }
2108
+ ],
2109
+ stateMutability: "view",
2110
+ type: "function"
2111
+ },
2112
+ {
2113
+ inputs: [
2114
+ {
2115
+ internalType: "bytes32",
2116
+ name: "_assetRegistrationData",
2117
+ type: "bytes32"
2118
+ },
2119
+ {
2120
+ internalType: "address",
2121
+ name: "_assetDeploymentTracker",
2122
+ type: "address"
2123
+ }
2124
+ ],
2125
+ name: "setAssetDeploymentTracker",
2126
+ outputs: [],
2127
+ stateMutability: "nonpayable",
2128
+ type: "function"
2129
+ },
2130
+ {
2131
+ inputs: [
2132
+ {
2133
+ internalType: "bytes32",
2134
+ name: "_assetRegistrationData",
2135
+ type: "bytes32"
2136
+ },
2137
+ {
2138
+ internalType: "address",
2139
+ name: "_assetHandlerAddress",
2140
+ type: "address"
2141
+ }
2142
+ ],
2143
+ name: "setAssetHandlerAddressThisChain",
2144
+ outputs: [],
2145
+ stateMutability: "nonpayable",
2146
+ type: "function"
2147
+ },
2148
+ {
2149
+ inputs: [
2150
+ {
2151
+ internalType: "contract IL1ERC20Bridge",
2152
+ name: "_legacyBridge",
2153
+ type: "address"
2154
+ }
2155
+ ],
2156
+ name: "setL1Erc20Bridge",
2157
+ outputs: [],
2158
+ stateMutability: "nonpayable",
2159
+ type: "function"
2160
+ },
2161
+ {
2162
+ inputs: [
2163
+ {
2164
+ internalType: "contract INativeTokenVault",
2165
+ name: "_nativeTokenVault",
2166
+ type: "address"
2167
+ }
2168
+ ],
2169
+ name: "setNativeTokenVault",
2170
+ outputs: [],
2171
+ stateMutability: "nonpayable",
2172
+ type: "function"
2173
+ },
2174
+ {
2175
+ inputs: [
2176
+ {
2177
+ internalType: "bytes32",
2178
+ name: "_assetId",
2179
+ type: "bytes32"
2180
+ },
2181
+ {
2182
+ internalType: "uint256",
2183
+ name: "_amount",
2184
+ type: "uint256"
2185
+ },
2186
+ {
2187
+ internalType: "address",
2188
+ name: "_originalCaller",
2189
+ type: "address"
2190
+ }
2191
+ ],
2192
+ name: "transferFundsToNTV",
2193
+ outputs: [
2194
+ {
2195
+ internalType: "bool",
2196
+ name: "",
2197
+ type: "bool"
2198
+ }
2199
+ ],
2200
+ stateMutability: "nonpayable",
2201
+ type: "function"
2202
+ }
2203
+ ];
2204
+ var IL1AssetRouter_default = IL1AssetRouterABI;
2205
+
2206
+ // src/core/internal/abis/IL1Nullifier.ts
2207
+ var IL1NullifierABI = [
2208
+ {
2209
+ anonymous: false,
2210
+ inputs: [
2211
+ {
2212
+ indexed: true,
2213
+ internalType: "uint256",
2214
+ name: "chainId",
2215
+ type: "uint256"
2216
+ },
2217
+ {
2218
+ indexed: true,
2219
+ internalType: "bytes32",
2220
+ name: "txDataHash",
2221
+ type: "bytes32"
2222
+ },
2223
+ {
2224
+ indexed: true,
2225
+ internalType: "bytes32",
2226
+ name: "l2DepositTxHash",
2227
+ type: "bytes32"
2228
+ }
2229
+ ],
2230
+ name: "BridgehubDepositFinalized",
2231
+ type: "event"
2232
+ },
2233
+ {
2234
+ inputs: [],
2235
+ name: "BRIDGE_HUB",
2236
+ outputs: [
2237
+ {
2238
+ internalType: "contract IBridgehub",
2239
+ name: "",
2240
+ type: "address"
2241
+ }
2242
+ ],
2243
+ stateMutability: "view",
2244
+ type: "function"
2245
+ },
2246
+ {
2247
+ inputs: [
2248
+ {
2249
+ internalType: "uint256",
2250
+ name: "_chainId",
2251
+ type: "uint256"
2252
+ },
2253
+ {
2254
+ internalType: "address",
2255
+ name: "_depositSender",
2256
+ type: "address"
2257
+ },
2258
+ {
2259
+ internalType: "bytes32",
2260
+ name: "_assetId",
2261
+ type: "bytes32"
2262
+ },
2263
+ {
2264
+ internalType: "bytes",
2265
+ name: "_assetData",
2266
+ type: "bytes"
2267
+ },
2268
+ {
2269
+ internalType: "bytes32",
2270
+ name: "_l2TxHash",
2271
+ type: "bytes32"
2272
+ },
2273
+ {
2274
+ internalType: "uint256",
2275
+ name: "_l2BatchNumber",
2276
+ type: "uint256"
2277
+ },
2278
+ {
2279
+ internalType: "uint256",
2280
+ name: "_l2MessageIndex",
2281
+ type: "uint256"
2282
+ },
2283
+ {
2284
+ internalType: "uint16",
2285
+ name: "_l2TxNumberInBatch",
2286
+ type: "uint16"
2287
+ },
2288
+ {
2289
+ internalType: "bytes32[]",
2290
+ name: "_merkleProof",
2291
+ type: "bytes32[]"
2292
+ }
2293
+ ],
2294
+ name: "bridgeRecoverFailedTransfer",
2295
+ outputs: [],
2296
+ stateMutability: "nonpayable",
2297
+ type: "function"
2298
+ },
2299
+ {
2300
+ inputs: [
2301
+ {
2302
+ internalType: "uint256",
2303
+ name: "_chainId",
2304
+ type: "uint256"
2305
+ },
2306
+ {
2307
+ internalType: "bytes32",
2308
+ name: "_txDataHash",
2309
+ type: "bytes32"
2310
+ },
2311
+ {
2312
+ internalType: "bytes32",
2313
+ name: "_txHash",
2314
+ type: "bytes32"
2315
+ }
2316
+ ],
2317
+ name: "bridgehubConfirmL2TransactionForwarded",
2318
+ outputs: [],
2319
+ stateMutability: "nonpayable",
2320
+ type: "function"
2321
+ },
2322
+ {
2323
+ inputs: [
2324
+ {
2325
+ internalType: "uint256",
2326
+ name: "_chainId",
2327
+ type: "uint256"
2328
+ },
2329
+ {
2330
+ internalType: "address",
2331
+ name: "_token",
2332
+ type: "address"
2333
+ }
2334
+ ],
2335
+ name: "chainBalance",
2336
+ outputs: [
2337
+ {
2338
+ internalType: "uint256",
2339
+ name: "",
2340
+ type: "uint256"
2341
+ }
2342
+ ],
2343
+ stateMutability: "view",
2344
+ type: "function"
2345
+ },
2346
+ {
2347
+ inputs: [
2348
+ {
2349
+ internalType: "uint256",
2350
+ name: "_chainId",
2351
+ type: "uint256"
2352
+ },
2353
+ {
2354
+ internalType: "address",
2355
+ name: "_depositSender",
2356
+ type: "address"
2357
+ },
2358
+ {
2359
+ internalType: "address",
2360
+ name: "_l1Token",
2361
+ type: "address"
2362
+ },
2363
+ {
2364
+ internalType: "uint256",
2365
+ name: "_amount",
2366
+ type: "uint256"
2367
+ },
2368
+ {
2369
+ internalType: "bytes32",
2370
+ name: "_l2TxHash",
2371
+ type: "bytes32"
2372
+ },
2373
+ {
2374
+ internalType: "uint256",
2375
+ name: "_l2BatchNumber",
2376
+ type: "uint256"
2377
+ },
2378
+ {
2379
+ internalType: "uint256",
2380
+ name: "_l2MessageIndex",
2381
+ type: "uint256"
2382
+ },
2383
+ {
2384
+ internalType: "uint16",
2385
+ name: "_l2TxNumberInBatch",
2386
+ type: "uint16"
2387
+ },
2388
+ {
2389
+ internalType: "bytes32[]",
2390
+ name: "_merkleProof",
2391
+ type: "bytes32[]"
2392
+ }
2393
+ ],
2394
+ name: "claimFailedDeposit",
2395
+ outputs: [],
2396
+ stateMutability: "nonpayable",
2397
+ type: "function"
2398
+ },
2399
+ {
2400
+ inputs: [
2401
+ {
2402
+ internalType: "address",
2403
+ name: "_depositSender",
2404
+ type: "address"
2405
+ },
2406
+ {
2407
+ internalType: "address",
2408
+ name: "_l1Token",
2409
+ type: "address"
2410
+ },
2411
+ {
2412
+ internalType: "uint256",
2413
+ name: "_amount",
2414
+ type: "uint256"
2415
+ },
2416
+ {
2417
+ internalType: "bytes32",
2418
+ name: "_l2TxHash",
2419
+ type: "bytes32"
2420
+ },
2421
+ {
2422
+ internalType: "uint256",
2423
+ name: "_l2BatchNumber",
2424
+ type: "uint256"
2425
+ },
2426
+ {
2427
+ internalType: "uint256",
2428
+ name: "_l2MessageIndex",
2429
+ type: "uint256"
2430
+ },
2431
+ {
2432
+ internalType: "uint16",
2433
+ name: "_l2TxNumberInBatch",
2434
+ type: "uint16"
2435
+ },
2436
+ {
2437
+ internalType: "bytes32[]",
2438
+ name: "_merkleProof",
2439
+ type: "bytes32[]"
2440
+ }
2441
+ ],
2442
+ name: "claimFailedDepositLegacyErc20Bridge",
2443
+ outputs: [],
2444
+ stateMutability: "nonpayable",
2445
+ type: "function"
2446
+ },
2447
+ {
2448
+ inputs: [
2449
+ {
2450
+ internalType: "uint256",
2451
+ name: "_chainId",
2452
+ type: "uint256"
2453
+ },
2454
+ {
2455
+ internalType: "bytes32",
2456
+ name: "_l2TxHash",
2457
+ type: "bytes32"
2458
+ }
2459
+ ],
2460
+ name: "depositHappened",
2461
+ outputs: [
2462
+ {
2463
+ internalType: "bytes32",
2464
+ name: "",
2465
+ type: "bytes32"
2466
+ }
2467
+ ],
2468
+ stateMutability: "view",
2469
+ type: "function"
2470
+ },
2471
+ {
2472
+ inputs: [
2473
+ {
2474
+ components: [
2475
+ {
2476
+ internalType: "uint256",
2477
+ name: "chainId",
2478
+ type: "uint256"
2479
+ },
2480
+ {
2481
+ internalType: "uint256",
2482
+ name: "l2BatchNumber",
2483
+ type: "uint256"
2484
+ },
2485
+ {
2486
+ internalType: "uint256",
2487
+ name: "l2MessageIndex",
2488
+ type: "uint256"
2489
+ },
2490
+ {
2491
+ internalType: "address",
2492
+ name: "l2Sender",
2493
+ type: "address"
2494
+ },
2495
+ {
2496
+ internalType: "uint16",
2497
+ name: "l2TxNumberInBatch",
2498
+ type: "uint16"
2499
+ },
2500
+ {
2501
+ internalType: "bytes",
2502
+ name: "message",
2503
+ type: "bytes"
2504
+ },
2505
+ {
2506
+ internalType: "bytes32[]",
2507
+ name: "merkleProof",
2508
+ type: "bytes32[]"
2509
+ }
2510
+ ],
2511
+ internalType: "struct FinalizeL1DepositParams",
2512
+ name: "_finalizeWithdrawalParams",
2513
+ type: "tuple"
2514
+ }
2515
+ ],
2516
+ name: "finalizeDeposit",
2517
+ outputs: [],
2518
+ stateMutability: "nonpayable",
2519
+ type: "function"
2520
+ },
2521
+ {
2522
+ inputs: [
2523
+ {
2524
+ internalType: "uint256",
2525
+ name: "_chainId",
2526
+ type: "uint256"
2527
+ },
2528
+ {
2529
+ internalType: "uint256",
2530
+ name: "_l2BatchNumber",
2531
+ type: "uint256"
2532
+ },
2533
+ {
2534
+ internalType: "uint256",
2535
+ name: "_l2MessageIndex",
2536
+ type: "uint256"
2537
+ },
2538
+ {
2539
+ internalType: "uint16",
2540
+ name: "_l2TxNumberInBatch",
2541
+ type: "uint16"
2542
+ },
2543
+ {
2544
+ internalType: "bytes",
2545
+ name: "_message",
2546
+ type: "bytes"
2547
+ },
2548
+ {
2549
+ internalType: "bytes32[]",
2550
+ name: "_merkleProof",
2551
+ type: "bytes32[]"
2552
+ }
2553
+ ],
2554
+ name: "finalizeWithdrawal",
2555
+ outputs: [],
2556
+ stateMutability: "nonpayable",
2557
+ type: "function"
2558
+ },
2559
+ {
2560
+ inputs: [
2561
+ {
2562
+ internalType: "uint256",
2563
+ name: "_chainId",
2564
+ type: "uint256"
2565
+ },
2566
+ {
2567
+ internalType: "uint256",
2568
+ name: "_l2BatchNumber",
2569
+ type: "uint256"
2570
+ },
2571
+ {
2572
+ internalType: "uint256",
2573
+ name: "_l2MessageIndex",
2574
+ type: "uint256"
2575
+ }
2576
+ ],
2577
+ name: "isWithdrawalFinalized",
2578
+ outputs: [
2579
+ {
2580
+ internalType: "bool",
2581
+ name: "",
2582
+ type: "bool"
2583
+ }
2584
+ ],
2585
+ stateMutability: "view",
2586
+ type: "function"
2587
+ },
2588
+ {
2589
+ inputs: [],
2590
+ name: "l1NativeTokenVault",
2591
+ outputs: [
2592
+ {
2593
+ internalType: "contract IL1NativeTokenVault",
2594
+ name: "",
2595
+ type: "address"
2596
+ }
2597
+ ],
2598
+ stateMutability: "view",
2599
+ type: "function"
2600
+ },
2601
+ {
2602
+ inputs: [
2603
+ {
2604
+ internalType: "uint256",
2605
+ name: "_chainId",
2606
+ type: "uint256"
2607
+ }
2608
+ ],
2609
+ name: "l2BridgeAddress",
2610
+ outputs: [
2611
+ {
2612
+ internalType: "address",
2613
+ name: "",
2614
+ type: "address"
2615
+ }
2616
+ ],
2617
+ stateMutability: "view",
2618
+ type: "function"
2619
+ },
2620
+ {
2621
+ inputs: [],
2622
+ name: "legacyBridge",
2623
+ outputs: [
2624
+ {
2625
+ internalType: "contract IL1ERC20Bridge",
2626
+ name: "",
2627
+ type: "address"
2628
+ }
2629
+ ],
2630
+ stateMutability: "view",
2631
+ type: "function"
2632
+ },
2633
+ {
2634
+ inputs: [
2635
+ {
2636
+ internalType: "uint256",
2637
+ name: "_chainId",
2638
+ type: "uint256"
2639
+ },
2640
+ {
2641
+ internalType: "address",
2642
+ name: "_token",
2643
+ type: "address"
2644
+ }
2645
+ ],
2646
+ name: "nullifyChainBalanceByNTV",
2647
+ outputs: [],
2648
+ stateMutability: "nonpayable",
2649
+ type: "function"
2650
+ },
2651
+ {
2652
+ inputs: [
2653
+ {
2654
+ internalType: "address",
2655
+ name: "_l1AssetRouter",
2656
+ type: "address"
2657
+ }
2658
+ ],
2659
+ name: "setL1AssetRouter",
2660
+ outputs: [],
2661
+ stateMutability: "nonpayable",
2662
+ type: "function"
2663
+ },
2664
+ {
2665
+ inputs: [
2666
+ {
2667
+ internalType: "contract IL1NativeTokenVault",
2668
+ name: "_nativeTokenVault",
2669
+ type: "address"
2670
+ }
2671
+ ],
2672
+ name: "setL1NativeTokenVault",
2673
+ outputs: [],
2674
+ stateMutability: "nonpayable",
2675
+ type: "function"
2676
+ },
2677
+ {
2678
+ inputs: [
2679
+ {
2680
+ internalType: "address",
2681
+ name: "_token",
2682
+ type: "address"
2683
+ }
2684
+ ],
2685
+ name: "transferTokenToNTV",
2686
+ outputs: [],
2687
+ stateMutability: "nonpayable",
2688
+ type: "function"
2689
+ }
2690
+ ];
2691
+ var IL1Nullifier_default = IL1NullifierABI;
2692
+
2693
+ // src/core/internal/abis/IL2AssetRouter.ts
2694
+ var IL2AssetRouterABI = [
2695
+ {
2696
+ type: "function",
2697
+ name: "BASE_TOKEN_ASSET_ID",
2698
+ inputs: [],
2699
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
2700
+ stateMutability: "view"
2701
+ },
2702
+ {
2703
+ type: "function",
2704
+ name: "BRIDGE_HUB",
2705
+ inputs: [],
2706
+ outputs: [{ name: "", type: "address", internalType: "contract IBridgehub" }],
2707
+ stateMutability: "view"
2708
+ },
2709
+ {
2710
+ type: "function",
2711
+ name: "L1_ASSET_ROUTER",
2712
+ inputs: [],
2713
+ outputs: [{ name: "", type: "address", internalType: "address" }],
2714
+ stateMutability: "view"
2715
+ },
2716
+ {
2717
+ type: "function",
2718
+ name: "L1_CHAIN_ID",
2719
+ inputs: [],
2720
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
2721
+ stateMutability: "view"
2722
+ },
2723
+ {
2724
+ type: "function",
2725
+ name: "L2_LEGACY_SHARED_BRIDGE",
2726
+ inputs: [],
2727
+ outputs: [{ name: "", type: "address", internalType: "address" }],
2728
+ stateMutability: "view"
2729
+ },
2730
+ {
2731
+ type: "function",
2732
+ name: "acceptOwnership",
2733
+ inputs: [],
2734
+ outputs: [],
2735
+ stateMutability: "nonpayable"
2736
+ },
2737
+ {
2738
+ type: "function",
2739
+ name: "assetDeploymentTracker",
2740
+ inputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
2741
+ outputs: [{ name: "assetDeploymentTracker", type: "address", internalType: "address" }],
2742
+ stateMutability: "view"
2743
+ },
2744
+ {
2745
+ type: "function",
2746
+ name: "assetHandlerAddress",
2747
+ inputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
2748
+ outputs: [{ name: "assetHandlerAddress", type: "address", internalType: "address" }],
2749
+ stateMutability: "view"
2750
+ },
2751
+ {
2752
+ type: "function",
2753
+ name: "eraChainId",
2754
+ inputs: [],
2755
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
2756
+ stateMutability: "view"
2757
+ },
2758
+ {
2759
+ type: "function",
2760
+ name: "finalizeDeposit",
2761
+ inputs: [
2762
+ { name: "", type: "uint256", internalType: "uint256" },
2763
+ { name: "_assetId", type: "bytes32", internalType: "bytes32" },
2764
+ { name: "_transferData", type: "bytes", internalType: "bytes" }
2765
+ ],
2766
+ outputs: [],
2767
+ stateMutability: "payable"
2768
+ },
2769
+ {
2770
+ type: "function",
2771
+ name: "finalizeDeposit",
2772
+ inputs: [
2773
+ { name: "_l1Sender", type: "address", internalType: "address" },
2774
+ { name: "_l2Receiver", type: "address", internalType: "address" },
2775
+ { name: "_l1Token", type: "address", internalType: "address" },
2776
+ { name: "_amount", type: "uint256", internalType: "uint256" },
2777
+ { name: "_data", type: "bytes", internalType: "bytes" }
2778
+ ],
2779
+ outputs: [],
2780
+ stateMutability: "payable"
2781
+ },
2782
+ {
2783
+ type: "function",
2784
+ name: "finalizeDepositLegacyBridge",
2785
+ inputs: [
2786
+ { name: "_l1Sender", type: "address", internalType: "address" },
2787
+ { name: "_l2Receiver", type: "address", internalType: "address" },
2788
+ { name: "_l1Token", type: "address", internalType: "address" },
2789
+ { name: "_amount", type: "uint256", internalType: "uint256" },
2790
+ { name: "_data", type: "bytes", internalType: "bytes" }
2791
+ ],
2792
+ outputs: [],
2793
+ stateMutability: "nonpayable"
2794
+ },
2795
+ {
2796
+ type: "function",
2797
+ name: "initL2",
2798
+ inputs: [
2799
+ { name: "_l1ChainId", type: "uint256", internalType: "uint256" },
2800
+ { name: "_eraChainId", type: "uint256", internalType: "uint256" },
2801
+ { name: "_l1AssetRouter", type: "address", internalType: "address" },
2802
+ { name: "_legacySharedBridge", type: "address", internalType: "address" },
2803
+ { name: "_baseTokenAssetId", type: "bytes32", internalType: "bytes32" },
2804
+ { name: "_aliasedOwner", type: "address", internalType: "address" }
2805
+ ],
2806
+ outputs: [],
2807
+ stateMutability: "nonpayable"
2808
+ },
2809
+ {
2810
+ type: "function",
2811
+ name: "l1Bridge",
2812
+ inputs: [],
2813
+ outputs: [{ name: "", type: "address", internalType: "address" }],
2814
+ stateMutability: "view"
2815
+ },
2816
+ {
2817
+ type: "function",
2818
+ name: "l1TokenAddress",
2819
+ inputs: [{ name: "_l2Token", type: "address", internalType: "address" }],
2820
+ outputs: [{ name: "", type: "address", internalType: "address" }],
2821
+ stateMutability: "view"
2822
+ },
2823
+ {
2824
+ type: "function",
2825
+ name: "l2TokenAddress",
2826
+ inputs: [{ name: "_l1Token", type: "address", internalType: "address" }],
2827
+ outputs: [{ name: "", type: "address", internalType: "address" }],
2828
+ stateMutability: "view"
2829
+ },
2830
+ {
2831
+ type: "function",
2832
+ name: "owner",
2833
+ inputs: [],
2834
+ outputs: [{ name: "", type: "address", internalType: "address" }],
2835
+ stateMutability: "view"
2836
+ },
2837
+ {
2838
+ type: "function",
2839
+ name: "pause",
2840
+ inputs: [],
2841
+ outputs: [],
2842
+ stateMutability: "nonpayable"
2843
+ },
2844
+ {
2845
+ type: "function",
2846
+ name: "paused",
2847
+ inputs: [],
2848
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
2849
+ stateMutability: "view"
2850
+ },
2851
+ {
2852
+ type: "function",
2853
+ name: "pendingOwner",
2854
+ inputs: [],
2855
+ outputs: [{ name: "", type: "address", internalType: "address" }],
2856
+ stateMutability: "view"
2857
+ },
2858
+ {
2859
+ type: "function",
2860
+ name: "renounceOwnership",
2861
+ inputs: [],
2862
+ outputs: [],
2863
+ stateMutability: "nonpayable"
2864
+ },
2865
+ {
2866
+ type: "function",
2867
+ name: "setAssetHandlerAddress",
2868
+ inputs: [
2869
+ { name: "_originChainId", type: "uint256", internalType: "uint256" },
2870
+ { name: "_assetId", type: "bytes32", internalType: "bytes32" },
2871
+ { name: "_assetHandlerAddress", type: "address", internalType: "address" }
2872
+ ],
2873
+ outputs: [],
2874
+ stateMutability: "nonpayable"
2875
+ },
2876
+ {
2877
+ type: "function",
2878
+ name: "setAssetHandlerAddressThisChain",
2879
+ inputs: [
2880
+ { name: "_assetRegistrationData", type: "bytes32", internalType: "bytes32" },
2881
+ { name: "_assetHandlerAddress", type: "address", internalType: "address" }
2882
+ ],
2883
+ outputs: [],
2884
+ stateMutability: "nonpayable"
2885
+ },
2886
+ {
2887
+ type: "function",
2888
+ name: "setLegacyTokenAssetHandler",
2889
+ inputs: [{ name: "_assetId", type: "bytes32", internalType: "bytes32" }],
2890
+ outputs: [],
2891
+ stateMutability: "nonpayable"
2892
+ },
2893
+ {
2894
+ type: "function",
2895
+ name: "transferOwnership",
2896
+ inputs: [{ name: "newOwner", type: "address", internalType: "address" }],
2897
+ outputs: [],
2898
+ stateMutability: "nonpayable"
2899
+ },
2900
+ {
2901
+ type: "function",
2902
+ name: "unpause",
2903
+ inputs: [],
2904
+ outputs: [],
2905
+ stateMutability: "nonpayable"
2906
+ },
2907
+ {
2908
+ type: "function",
2909
+ name: "updateL2",
2910
+ inputs: [
2911
+ { name: "_l1ChainId", type: "uint256", internalType: "uint256" },
2912
+ { name: "_eraChainId", type: "uint256", internalType: "uint256" },
2913
+ { name: "_l1AssetRouter", type: "address", internalType: "address" },
2914
+ { name: "_legacySharedBridge", type: "address", internalType: "address" },
2915
+ { name: "_baseTokenAssetId", type: "bytes32", internalType: "bytes32" }
2916
+ ],
2917
+ outputs: [],
2918
+ stateMutability: "nonpayable"
2919
+ },
2920
+ {
2921
+ type: "function",
2922
+ name: "withdraw",
2923
+ inputs: [
2924
+ { name: "_assetId", type: "bytes32", internalType: "bytes32" },
2925
+ { name: "_assetData", type: "bytes", internalType: "bytes" }
2926
+ ],
2927
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
2928
+ stateMutability: "nonpayable"
2929
+ },
2930
+ {
2931
+ type: "function",
2932
+ name: "withdraw",
2933
+ inputs: [
2934
+ { name: "_l1Receiver", type: "address", internalType: "address" },
2935
+ { name: "_l2Token", type: "address", internalType: "address" },
2936
+ { name: "_amount", type: "uint256", internalType: "uint256" }
2937
+ ],
2938
+ outputs: [],
2939
+ stateMutability: "nonpayable"
2940
+ },
2941
+ {
2942
+ type: "function",
2943
+ name: "withdrawLegacyBridge",
2944
+ inputs: [
2945
+ { name: "_l1Receiver", type: "address", internalType: "address" },
2946
+ { name: "_l2Token", type: "address", internalType: "address" },
2947
+ { name: "_amount", type: "uint256", internalType: "uint256" },
2948
+ { name: "_sender", type: "address", internalType: "address" }
2949
+ ],
2950
+ outputs: [],
2951
+ stateMutability: "nonpayable"
2952
+ },
2953
+ {
2954
+ type: "event",
2955
+ name: "AssetDeploymentTrackerRegistered",
2956
+ inputs: [
2957
+ { name: "assetId", type: "bytes32", indexed: true, internalType: "bytes32" },
2958
+ { name: "additionalData", type: "bytes32", indexed: true, internalType: "bytes32" },
2959
+ {
2960
+ name: "assetDeploymentTracker",
2961
+ type: "address",
2962
+ indexed: false,
2963
+ internalType: "address"
2964
+ }
2965
+ ],
2966
+ anonymous: false
2967
+ },
2968
+ {
2969
+ type: "event",
2970
+ name: "AssetHandlerRegistered",
2971
+ inputs: [
2972
+ { name: "assetId", type: "bytes32", indexed: true, internalType: "bytes32" },
2973
+ {
2974
+ name: "_assetHandlerAddress",
2975
+ type: "address",
2976
+ indexed: true,
2977
+ internalType: "address"
2978
+ }
2979
+ ],
2980
+ anonymous: false
2981
+ },
2982
+ {
2983
+ type: "event",
2984
+ name: "BridgehubDepositBaseTokenInitiated",
2985
+ inputs: [
2986
+ { name: "chainId", type: "uint256", indexed: true, internalType: "uint256" },
2987
+ { name: "from", type: "address", indexed: true, internalType: "address" },
2988
+ { name: "assetId", type: "bytes32", indexed: false, internalType: "bytes32" },
2989
+ { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }
2990
+ ],
2991
+ anonymous: false
2992
+ },
2993
+ {
2994
+ type: "event",
2995
+ name: "BridgehubDepositInitiated",
2996
+ inputs: [
2997
+ { name: "chainId", type: "uint256", indexed: true, internalType: "uint256" },
2998
+ { name: "txDataHash", type: "bytes32", indexed: true, internalType: "bytes32" },
2999
+ { name: "from", type: "address", indexed: true, internalType: "address" },
3000
+ { name: "assetId", type: "bytes32", indexed: false, internalType: "bytes32" },
3001
+ { name: "bridgeMintCalldata", type: "bytes", indexed: false, internalType: "bytes" }
3002
+ ],
3003
+ anonymous: false
3004
+ },
3005
+ {
3006
+ type: "event",
3007
+ name: "BridgehubWithdrawalInitiated",
3008
+ inputs: [
3009
+ { name: "chainId", type: "uint256", indexed: false, internalType: "uint256" },
3010
+ { name: "sender", type: "address", indexed: true, internalType: "address" },
3011
+ { name: "assetId", type: "bytes32", indexed: true, internalType: "bytes32" },
3012
+ { name: "assetDataHash", type: "bytes32", indexed: false, internalType: "bytes32" }
3013
+ ],
3014
+ anonymous: false
3015
+ },
3016
+ {
3017
+ type: "event",
3018
+ name: "DepositFinalizedAssetRouter",
3019
+ inputs: [
3020
+ { name: "chainId", type: "uint256", indexed: true, internalType: "uint256" },
3021
+ { name: "assetId", type: "bytes32", indexed: true, internalType: "bytes32" },
3022
+ { name: "assetData", type: "bytes", indexed: false, internalType: "bytes" }
3023
+ ],
3024
+ anonymous: false
3025
+ },
3026
+ {
3027
+ type: "event",
3028
+ name: "Initialized",
3029
+ inputs: [{ name: "version", type: "uint8", indexed: false, internalType: "uint8" }],
3030
+ anonymous: false
3031
+ },
3032
+ {
3033
+ type: "event",
3034
+ name: "OwnershipTransferStarted",
3035
+ inputs: [
3036
+ { name: "previousOwner", type: "address", indexed: true, internalType: "address" },
3037
+ { name: "newOwner", type: "address", indexed: true, internalType: "address" }
3038
+ ],
3039
+ anonymous: false
3040
+ },
3041
+ {
3042
+ type: "event",
3043
+ name: "OwnershipTransferred",
3044
+ inputs: [
3045
+ { name: "previousOwner", type: "address", indexed: true, internalType: "address" },
3046
+ { name: "newOwner", type: "address", indexed: true, internalType: "address" }
3047
+ ],
3048
+ anonymous: false
3049
+ },
3050
+ {
3051
+ type: "event",
3052
+ name: "Paused",
3053
+ inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }],
3054
+ anonymous: false
3055
+ },
3056
+ {
3057
+ type: "event",
3058
+ name: "Unpaused",
3059
+ inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }],
3060
+ anonymous: false
3061
+ },
3062
+ {
3063
+ type: "event",
3064
+ name: "WithdrawalInitiatedAssetRouter",
3065
+ inputs: [
3066
+ { name: "chainId", type: "uint256", indexed: false, internalType: "uint256" },
3067
+ { name: "l2Sender", type: "address", indexed: true, internalType: "address" },
3068
+ { name: "assetId", type: "bytes32", indexed: true, internalType: "bytes32" },
3069
+ { name: "assetData", type: "bytes", indexed: false, internalType: "bytes" }
3070
+ ],
3071
+ anonymous: false
3072
+ },
3073
+ { type: "error", name: "AmountMustBeGreaterThanZero", inputs: [] },
3074
+ {
3075
+ type: "error",
3076
+ name: "AssetIdNotSupported",
3077
+ inputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }]
3078
+ },
3079
+ { type: "error", name: "EmptyAddress", inputs: [] },
3080
+ {
3081
+ type: "error",
3082
+ name: "InvalidCaller",
3083
+ inputs: [{ name: "", type: "address", internalType: "address" }]
3084
+ },
3085
+ { type: "error", name: "InvalidNTVBurnData", inputs: [] },
3086
+ { type: "error", name: "NotInitializedReentrancyGuard", inputs: [] },
3087
+ { type: "error", name: "Reentrancy", inputs: [] },
3088
+ { type: "error", name: "SlotOccupied", inputs: [] },
3089
+ { type: "error", name: "TokenNotLegacy", inputs: [] },
3090
+ {
3091
+ type: "error",
3092
+ name: "Unauthorized",
3093
+ inputs: [{ name: "caller", type: "address", internalType: "address" }]
3094
+ }
3095
+ ];
3096
+ var IL2AssetRouter_default = IL2AssetRouterABI;
3097
+
3098
+ // src/core/internal/abis/L1NativeTokenVault.ts
3099
+ var L1NativeTokenVaultABI = [
3100
+ {
3101
+ type: "constructor",
3102
+ inputs: [
3103
+ { name: "_l1WethAddress", type: "address", internalType: "address" },
3104
+ { name: "_l1AssetRouter", type: "address", internalType: "address" },
3105
+ { name: "_l1Nullifier", type: "address", internalType: "contract IL1Nullifier" }
3106
+ ],
3107
+ stateMutability: "nonpayable"
3108
+ },
3109
+ { type: "receive", stateMutability: "payable" },
3110
+ {
3111
+ type: "function",
3112
+ name: "ASSET_ROUTER",
3113
+ inputs: [],
3114
+ outputs: [{ name: "", type: "address", internalType: "contract IAssetRouterBase" }],
3115
+ stateMutability: "view"
3116
+ },
3117
+ {
3118
+ type: "function",
3119
+ name: "BASE_TOKEN_ASSET_ID",
3120
+ inputs: [],
3121
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
3122
+ stateMutability: "view"
3123
+ },
3124
+ {
3125
+ type: "function",
3126
+ name: "L1_CHAIN_ID",
3127
+ inputs: [],
3128
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
3129
+ stateMutability: "view"
3130
+ },
3131
+ {
3132
+ type: "function",
3133
+ name: "L1_NULLIFIER",
3134
+ inputs: [],
3135
+ outputs: [{ name: "", type: "address", internalType: "contract IL1Nullifier" }],
3136
+ stateMutability: "view"
3137
+ },
3138
+ {
3139
+ type: "function",
3140
+ name: "WETH_TOKEN",
3141
+ inputs: [],
3142
+ outputs: [{ name: "", type: "address", internalType: "address" }],
3143
+ stateMutability: "view"
3144
+ },
3145
+ {
3146
+ type: "function",
3147
+ name: "acceptOwnership",
3148
+ inputs: [],
3149
+ outputs: [],
3150
+ stateMutability: "nonpayable"
3151
+ },
3152
+ {
3153
+ type: "function",
3154
+ name: "addLegacyTokenToBridgedTokensList",
3155
+ inputs: [{ name: "_token", type: "address", internalType: "address" }],
3156
+ outputs: [],
3157
+ stateMutability: "nonpayable"
3158
+ },
3159
+ {
3160
+ type: "function",
3161
+ name: "assetId",
3162
+ inputs: [{ name: "tokenAddress", type: "address", internalType: "address" }],
3163
+ outputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
3164
+ stateMutability: "view"
3165
+ },
3166
+ {
3167
+ type: "function",
3168
+ name: "bridgeBurn",
3169
+ inputs: [
3170
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
3171
+ { name: "_l2MsgValue", type: "uint256", internalType: "uint256" },
3172
+ { name: "_assetId", type: "bytes32", internalType: "bytes32" },
3173
+ { name: "_originalCaller", type: "address", internalType: "address" },
3174
+ { name: "_data", type: "bytes", internalType: "bytes" }
3175
+ ],
3176
+ outputs: [{ name: "_bridgeMintData", type: "bytes", internalType: "bytes" }],
3177
+ stateMutability: "payable"
3178
+ },
3179
+ {
3180
+ type: "function",
3181
+ name: "bridgeCheckCounterpartAddress",
3182
+ inputs: [
3183
+ { name: "", type: "uint256", internalType: "uint256" },
3184
+ { name: "", type: "bytes32", internalType: "bytes32" },
3185
+ { name: "", type: "address", internalType: "address" },
3186
+ {
3187
+ name: "_assetHandlerAddressOnCounterpart",
3188
+ type: "address",
3189
+ internalType: "address"
3190
+ }
3191
+ ],
3192
+ outputs: [],
3193
+ stateMutability: "view"
3194
+ },
3195
+ {
3196
+ type: "function",
3197
+ name: "bridgeMint",
3198
+ inputs: [
3199
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
3200
+ { name: "_assetId", type: "bytes32", internalType: "bytes32" },
3201
+ { name: "_data", type: "bytes", internalType: "bytes" }
3202
+ ],
3203
+ outputs: [],
3204
+ stateMutability: "payable"
3205
+ },
3206
+ {
3207
+ type: "function",
3208
+ name: "bridgeRecoverFailedTransfer",
3209
+ inputs: [
3210
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
3211
+ { name: "_assetId", type: "bytes32", internalType: "bytes32" },
3212
+ { name: "_depositSender", type: "address", internalType: "address" },
3213
+ { name: "_data", type: "bytes", internalType: "bytes" }
3214
+ ],
3215
+ outputs: [],
3216
+ stateMutability: "payable"
3217
+ },
3218
+ {
3219
+ type: "function",
3220
+ name: "bridgedTokenBeacon",
3221
+ inputs: [],
3222
+ outputs: [{ name: "", type: "address", internalType: "contract IBeacon" }],
3223
+ stateMutability: "view"
3224
+ },
3225
+ {
3226
+ type: "function",
3227
+ name: "bridgedTokens",
3228
+ inputs: [{ name: "count", type: "uint256", internalType: "uint256" }],
3229
+ outputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
3230
+ stateMutability: "view"
3231
+ },
3232
+ {
3233
+ type: "function",
3234
+ name: "bridgedTokensCount",
3235
+ inputs: [],
3236
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
3237
+ stateMutability: "view"
3238
+ },
3239
+ {
3240
+ type: "function",
3241
+ name: "calculateCreate2TokenAddress",
3242
+ inputs: [
3243
+ { name: "_originChainId", type: "uint256", internalType: "uint256" },
3244
+ { name: "_nonNativeToken", type: "address", internalType: "address" }
3245
+ ],
3246
+ outputs: [{ name: "", type: "address", internalType: "address" }],
3247
+ stateMutability: "view"
3248
+ },
3249
+ {
3250
+ type: "function",
3251
+ name: "chainBalance",
3252
+ inputs: [
3253
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
3254
+ { name: "_assetId", type: "bytes32", internalType: "bytes32" }
3255
+ ],
3256
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
3257
+ stateMutability: "view"
3258
+ },
3259
+ {
3260
+ type: "function",
3261
+ name: "ensureTokenIsRegistered",
3262
+ inputs: [{ name: "_nativeToken", type: "address", internalType: "address" }],
3263
+ outputs: [{ name: "tokenAssetId", type: "bytes32", internalType: "bytes32" }],
3264
+ stateMutability: "nonpayable"
3265
+ },
3266
+ {
3267
+ type: "function",
3268
+ name: "getERC20Getters",
3269
+ inputs: [
3270
+ { name: "_token", type: "address", internalType: "address" },
3271
+ { name: "_originChainId", type: "uint256", internalType: "uint256" }
3272
+ ],
3273
+ outputs: [{ name: "", type: "bytes", internalType: "bytes" }],
3274
+ stateMutability: "view"
3275
+ },
3276
+ {
3277
+ type: "function",
3278
+ name: "initialize",
3279
+ inputs: [
3280
+ { name: "_owner", type: "address", internalType: "address" },
3281
+ { name: "_bridgedTokenBeacon", type: "address", internalType: "address" }
3282
+ ],
3283
+ outputs: [],
3284
+ stateMutability: "nonpayable"
3285
+ },
3286
+ {
3287
+ type: "function",
3288
+ name: "l1AssetTracker",
3289
+ inputs: [],
3290
+ outputs: [{ name: "", type: "address", internalType: "contract IL1AssetTracker" }],
3291
+ stateMutability: "view"
3292
+ },
3293
+ {
3294
+ type: "function",
3295
+ name: "originChainId",
3296
+ inputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
3297
+ outputs: [{ name: "originChainId", type: "uint256", internalType: "uint256" }],
3298
+ stateMutability: "view"
3299
+ },
3300
+ {
3301
+ type: "function",
3302
+ name: "owner",
3303
+ inputs: [],
3304
+ outputs: [{ name: "", type: "address", internalType: "address" }],
3305
+ stateMutability: "view"
3306
+ },
3307
+ {
3308
+ type: "function",
3309
+ name: "pause",
3310
+ inputs: [],
3311
+ outputs: [],
3312
+ stateMutability: "nonpayable"
3313
+ },
3314
+ {
3315
+ type: "function",
3316
+ name: "paused",
3317
+ inputs: [],
3318
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
3319
+ stateMutability: "view"
3320
+ },
3321
+ {
3322
+ type: "function",
3323
+ name: "pendingOwner",
3324
+ inputs: [],
3325
+ outputs: [{ name: "", type: "address", internalType: "address" }],
3326
+ stateMutability: "view"
3327
+ },
3328
+ {
3329
+ type: "function",
3330
+ name: "registerEthToken",
3331
+ inputs: [],
3332
+ outputs: [],
3333
+ stateMutability: "nonpayable"
3334
+ },
3335
+ {
3336
+ type: "function",
3337
+ name: "registerToken",
3338
+ inputs: [{ name: "_nativeToken", type: "address", internalType: "address" }],
3339
+ outputs: [],
3340
+ stateMutability: "nonpayable"
3341
+ },
3342
+ {
3343
+ type: "function",
3344
+ name: "renounceOwnership",
3345
+ inputs: [],
3346
+ outputs: [],
3347
+ stateMutability: "nonpayable"
3348
+ },
3349
+ {
3350
+ type: "function",
3351
+ name: "setAssetTracker",
3352
+ inputs: [{ name: "_l1AssetTracker", type: "address", internalType: "address" }],
3353
+ outputs: [],
3354
+ stateMutability: "nonpayable"
3355
+ },
3356
+ {
3357
+ type: "function",
3358
+ name: "tokenAddress",
3359
+ inputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
3360
+ outputs: [{ name: "tokenAddress", type: "address", internalType: "address" }],
3361
+ stateMutability: "view"
3362
+ },
3363
+ {
3364
+ type: "function",
3365
+ name: "tokenDataOriginChainId",
3366
+ inputs: [{ name: "_erc20Data", type: "bytes", internalType: "bytes" }],
3367
+ outputs: [{ name: "tokenOriginChainId", type: "uint256", internalType: "uint256" }],
3368
+ stateMutability: "view"
3369
+ },
3370
+ {
3371
+ type: "function",
3372
+ name: "transferOwnership",
3373
+ inputs: [{ name: "newOwner", type: "address", internalType: "address" }],
3374
+ outputs: [],
3375
+ stateMutability: "nonpayable"
3376
+ },
3377
+ {
3378
+ type: "function",
3379
+ name: "tryRegisterTokenFromBurnData",
3380
+ inputs: [
3381
+ { name: "_burnData", type: "bytes", internalType: "bytes" },
3382
+ { name: "_expectedAssetId", type: "bytes32", internalType: "bytes32" }
3383
+ ],
3384
+ outputs: [],
3385
+ stateMutability: "nonpayable"
3386
+ },
3387
+ {
3388
+ type: "function",
3389
+ name: "unpause",
3390
+ inputs: [],
3391
+ outputs: [],
3392
+ stateMutability: "nonpayable"
3393
+ },
3394
+ {
3395
+ type: "event",
3396
+ name: "BridgeBurn",
3397
+ inputs: [
3398
+ { name: "chainId", type: "uint256", indexed: true, internalType: "uint256" },
3399
+ { name: "assetId", type: "bytes32", indexed: true, internalType: "bytes32" },
3400
+ { name: "sender", type: "address", indexed: true, internalType: "address" },
3401
+ { name: "receiver", type: "address", indexed: false, internalType: "address" },
3402
+ { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }
3403
+ ],
3404
+ anonymous: false
3405
+ },
3406
+ {
3407
+ type: "event",
3408
+ name: "BridgeMint",
3409
+ inputs: [
3410
+ { name: "chainId", type: "uint256", indexed: true, internalType: "uint256" },
3411
+ { name: "assetId", type: "bytes32", indexed: true, internalType: "bytes32" },
3412
+ { name: "receiver", type: "address", indexed: false, internalType: "address" },
3413
+ { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }
3414
+ ],
3415
+ anonymous: false
3416
+ },
3417
+ {
3418
+ type: "event",
3419
+ name: "BridgedTokenBeaconUpdated",
3420
+ inputs: [
3421
+ {
3422
+ name: "bridgedTokenBeacon",
3423
+ type: "address",
3424
+ indexed: false,
3425
+ internalType: "address"
3426
+ },
3427
+ {
3428
+ name: "bridgedTokenProxyBytecodeHash",
3429
+ type: "bytes32",
3430
+ indexed: false,
3431
+ internalType: "bytes32"
3432
+ }
3433
+ ],
3434
+ anonymous: false
3435
+ },
3436
+ {
3437
+ type: "event",
3438
+ name: "Initialized",
3439
+ inputs: [{ name: "version", type: "uint8", indexed: false, internalType: "uint8" }],
3440
+ anonymous: false
3441
+ },
3442
+ {
3443
+ type: "event",
3444
+ name: "OwnershipTransferStarted",
3445
+ inputs: [
3446
+ { name: "previousOwner", type: "address", indexed: true, internalType: "address" },
3447
+ { name: "newOwner", type: "address", indexed: true, internalType: "address" }
3448
+ ],
3449
+ anonymous: false
3450
+ },
3451
+ {
3452
+ type: "event",
3453
+ name: "OwnershipTransferred",
3454
+ inputs: [
3455
+ { name: "previousOwner", type: "address", indexed: true, internalType: "address" },
3456
+ { name: "newOwner", type: "address", indexed: true, internalType: "address" }
3457
+ ],
3458
+ anonymous: false
3459
+ },
3460
+ {
3461
+ type: "event",
3462
+ name: "Paused",
3463
+ inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }],
3464
+ anonymous: false
3465
+ },
3466
+ {
3467
+ type: "event",
3468
+ name: "TokenBeaconUpdated",
3469
+ inputs: [{ name: "l2TokenBeacon", type: "address", indexed: true, internalType: "address" }],
3470
+ anonymous: false
3471
+ },
3472
+ {
3473
+ type: "event",
3474
+ name: "Unpaused",
3475
+ inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }],
3476
+ anonymous: false
3477
+ },
3478
+ {
3479
+ type: "error",
3480
+ name: "AddressMismatch",
3481
+ inputs: [
3482
+ { name: "expected", type: "address", internalType: "address" },
3483
+ { name: "supplied", type: "address", internalType: "address" }
3484
+ ]
3485
+ },
3486
+ { type: "error", name: "AmountMustBeGreaterThanZero", inputs: [] },
3487
+ { type: "error", name: "AssetIdAlreadyRegistered", inputs: [] },
3488
+ {
3489
+ type: "error",
3490
+ name: "AssetIdMismatch",
3491
+ inputs: [
3492
+ { name: "expected", type: "bytes32", internalType: "bytes32" },
3493
+ { name: "supplied", type: "bytes32", internalType: "bytes32" }
3494
+ ]
3495
+ },
3496
+ { type: "error", name: "BurningNativeWETHNotSupported", inputs: [] },
3497
+ { type: "error", name: "ClaimFailedDepositFailed", inputs: [] },
3498
+ { type: "error", name: "DeployingBridgedTokenForNativeToken", inputs: [] },
3499
+ { type: "error", name: "EmptyDeposit", inputs: [] },
3500
+ { type: "error", name: "EmptyToken", inputs: [] },
3501
+ { type: "error", name: "InvalidNTVBurnData", inputs: [] },
3502
+ { type: "error", name: "NoFundsTransferred", inputs: [] },
3503
+ { type: "error", name: "NonEmptyMsgValue", inputs: [] },
3504
+ { type: "error", name: "OriginChainIdNotFound", inputs: [] },
3505
+ { type: "error", name: "TokenNotLegacy", inputs: [] },
3506
+ {
3507
+ type: "error",
3508
+ name: "TokenNotSupported",
3509
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
3510
+ },
3511
+ { type: "error", name: "TokensWithFeesNotSupported", inputs: [] },
3512
+ {
3513
+ type: "error",
3514
+ name: "Unauthorized",
3515
+ inputs: [{ name: "caller", type: "address", internalType: "address" }]
3516
+ },
3517
+ { type: "error", name: "UnsupportedEncodingVersion", inputs: [] },
3518
+ {
3519
+ type: "error",
3520
+ name: "ValueMismatch",
3521
+ inputs: [
3522
+ { name: "expected", type: "uint256", internalType: "uint256" },
3523
+ { name: "actual", type: "uint256", internalType: "uint256" }
3524
+ ]
3525
+ },
3526
+ { type: "error", name: "WithdrawFailed", inputs: [] },
3527
+ { type: "error", name: "WrongCounterpart", inputs: [] },
3528
+ { type: "error", name: "ZeroAddress", inputs: [] }
3529
+ ];
3530
+ var L1NativeTokenVault_default = L1NativeTokenVaultABI;
3531
+
3532
+ // src/core/internal/abis/L2NativeTokenVault.ts
3533
+ var L2NativeTokenVaultABI = [
3534
+ {
3535
+ type: "constructor",
3536
+ inputs: [
3537
+ { name: "_l1ChainId", type: "uint256", internalType: "uint256" },
3538
+ { name: "_aliasedOwner", type: "address", internalType: "address" },
3539
+ { name: "_l2TokenProxyBytecodeHash", type: "bytes32", internalType: "bytes32" },
3540
+ { name: "_legacySharedBridge", type: "address", internalType: "address" },
3541
+ { name: "_bridgedTokenBeacon", type: "address", internalType: "address" },
3542
+ { name: "_contractsDeployedAlready", type: "bool", internalType: "bool" },
3543
+ { name: "_wethToken", type: "address", internalType: "address" },
3544
+ { name: "_baseTokenAssetId", type: "bytes32", internalType: "bytes32" }
3545
+ ],
3546
+ stateMutability: "nonpayable"
3547
+ },
3548
+ {
3549
+ type: "function",
3550
+ name: "ASSET_ROUTER",
3551
+ inputs: [],
3552
+ outputs: [{ name: "", type: "address", internalType: "contract IAssetRouterBase" }],
3553
+ stateMutability: "view"
3554
+ },
3555
+ {
3556
+ type: "function",
3557
+ name: "BASE_TOKEN_ASSET_ID",
3558
+ inputs: [],
3559
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
3560
+ stateMutability: "view"
3561
+ },
3562
+ {
3563
+ type: "function",
3564
+ name: "L1_CHAIN_ID",
3565
+ inputs: [],
3566
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
3567
+ stateMutability: "view"
3568
+ },
3569
+ {
3570
+ type: "function",
3571
+ name: "L2_LEGACY_SHARED_BRIDGE",
3572
+ inputs: [],
3573
+ outputs: [{ name: "", type: "address", internalType: "contract IL2SharedBridgeLegacy" }],
3574
+ stateMutability: "view"
3575
+ },
3576
+ {
3577
+ type: "function",
3578
+ name: "L2_TOKEN_PROXY_BYTECODE_HASH",
3579
+ inputs: [],
3580
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
3581
+ stateMutability: "view"
3582
+ },
3583
+ {
3584
+ type: "function",
3585
+ name: "WETH_TOKEN",
3586
+ inputs: [],
3587
+ outputs: [{ name: "", type: "address", internalType: "address" }],
3588
+ stateMutability: "view"
3589
+ },
3590
+ {
3591
+ type: "function",
3592
+ name: "acceptOwnership",
3593
+ inputs: [],
3594
+ outputs: [],
3595
+ stateMutability: "nonpayable"
3596
+ },
3597
+ {
3598
+ type: "function",
3599
+ name: "addLegacyTokenToBridgedTokensList",
3600
+ inputs: [{ name: "_token", type: "address", internalType: "address" }],
3601
+ outputs: [],
3602
+ stateMutability: "nonpayable"
3603
+ },
3604
+ {
3605
+ type: "function",
3606
+ name: "assetId",
3607
+ inputs: [{ name: "tokenAddress", type: "address", internalType: "address" }],
3608
+ outputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
3609
+ stateMutability: "view"
3610
+ },
3611
+ {
3612
+ type: "function",
3613
+ name: "bridgeBurn",
3614
+ inputs: [
3615
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
3616
+ { name: "_l2MsgValue", type: "uint256", internalType: "uint256" },
3617
+ { name: "_assetId", type: "bytes32", internalType: "bytes32" },
3618
+ { name: "_originalCaller", type: "address", internalType: "address" },
3619
+ { name: "_data", type: "bytes", internalType: "bytes" }
3620
+ ],
3621
+ outputs: [{ name: "_bridgeMintData", type: "bytes", internalType: "bytes" }],
3622
+ stateMutability: "payable"
3623
+ },
3624
+ {
3625
+ type: "function",
3626
+ name: "bridgeMint",
3627
+ inputs: [
3628
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
3629
+ { name: "_assetId", type: "bytes32", internalType: "bytes32" },
3630
+ { name: "_data", type: "bytes", internalType: "bytes" }
3631
+ ],
3632
+ outputs: [],
3633
+ stateMutability: "payable"
3634
+ },
3635
+ {
3636
+ type: "function",
3637
+ name: "bridgedTokenBeacon",
3638
+ inputs: [],
3639
+ outputs: [{ name: "", type: "address", internalType: "contract IBeacon" }],
3640
+ stateMutability: "view"
3641
+ },
3642
+ {
3643
+ type: "function",
3644
+ name: "bridgedTokens",
3645
+ inputs: [{ name: "count", type: "uint256", internalType: "uint256" }],
3646
+ outputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
3647
+ stateMutability: "view"
3648
+ },
3649
+ {
3650
+ type: "function",
3651
+ name: "bridgedTokensCount",
3652
+ inputs: [],
3653
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
3654
+ stateMutability: "view"
3655
+ },
3656
+ {
3657
+ type: "function",
3658
+ name: "calculateCreate2TokenAddress",
3659
+ inputs: [
3660
+ { name: "_tokenOriginChainId", type: "uint256", internalType: "uint256" },
3661
+ { name: "_nonNativeToken", type: "address", internalType: "address" }
3662
+ ],
3663
+ outputs: [{ name: "", type: "address", internalType: "address" }],
3664
+ stateMutability: "view"
3665
+ },
3666
+ {
3667
+ type: "function",
3668
+ name: "ensureTokenIsRegistered",
3669
+ inputs: [{ name: "_nativeToken", type: "address", internalType: "address" }],
3670
+ outputs: [{ name: "tokenAssetId", type: "bytes32", internalType: "bytes32" }],
3671
+ stateMutability: "nonpayable"
3672
+ },
3673
+ {
3674
+ type: "function",
3675
+ name: "getERC20Getters",
3676
+ inputs: [
3677
+ { name: "_token", type: "address", internalType: "address" },
3678
+ { name: "_originChainId", type: "uint256", internalType: "uint256" }
3679
+ ],
3680
+ outputs: [{ name: "", type: "bytes", internalType: "bytes" }],
3681
+ stateMutability: "view"
3682
+ },
3683
+ {
3684
+ type: "function",
3685
+ name: "l2TokenAddress",
3686
+ inputs: [{ name: "_l1Token", type: "address", internalType: "address" }],
3687
+ outputs: [{ name: "expectedToken", type: "address", internalType: "address" }],
3688
+ stateMutability: "view"
3689
+ },
3690
+ {
3691
+ type: "function",
3692
+ name: "originChainId",
3693
+ inputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
3694
+ outputs: [{ name: "originChainId", type: "uint256", internalType: "uint256" }],
3695
+ stateMutability: "view"
3696
+ },
3697
+ {
3698
+ type: "function",
3699
+ name: "owner",
3700
+ inputs: [],
3701
+ outputs: [{ name: "", type: "address", internalType: "address" }],
3702
+ stateMutability: "view"
3703
+ },
3704
+ {
3705
+ type: "function",
3706
+ name: "pause",
3707
+ inputs: [],
3708
+ outputs: [],
3709
+ stateMutability: "nonpayable"
3710
+ },
3711
+ {
3712
+ type: "function",
3713
+ name: "paused",
3714
+ inputs: [],
3715
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
3716
+ stateMutability: "view"
3717
+ },
3718
+ {
3719
+ type: "function",
3720
+ name: "pendingOwner",
3721
+ inputs: [],
3722
+ outputs: [{ name: "", type: "address", internalType: "address" }],
3723
+ stateMutability: "view"
3724
+ },
3725
+ {
3726
+ type: "function",
3727
+ name: "registerToken",
3728
+ inputs: [{ name: "_nativeToken", type: "address", internalType: "address" }],
3729
+ outputs: [],
3730
+ stateMutability: "nonpayable"
3731
+ },
3732
+ {
3733
+ type: "function",
3734
+ name: "renounceOwnership",
3735
+ inputs: [],
3736
+ outputs: [],
3737
+ stateMutability: "nonpayable"
3738
+ },
3739
+ {
3740
+ type: "function",
3741
+ name: "setLegacyTokenAssetId",
3742
+ inputs: [{ name: "_l2TokenAddress", type: "address", internalType: "address" }],
3743
+ outputs: [],
3744
+ stateMutability: "nonpayable"
3745
+ },
3746
+ {
3747
+ type: "function",
3748
+ name: "tokenAddress",
3749
+ inputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }],
3750
+ outputs: [{ name: "tokenAddress", type: "address", internalType: "address" }],
3751
+ stateMutability: "view"
3752
+ },
3753
+ {
3754
+ type: "function",
3755
+ name: "tokenDataOriginChainId",
3756
+ inputs: [{ name: "_erc20Data", type: "bytes", internalType: "bytes" }],
3757
+ outputs: [{ name: "tokenOriginChainId", type: "uint256", internalType: "uint256" }],
3758
+ stateMutability: "view"
3759
+ },
3760
+ {
3761
+ type: "function",
3762
+ name: "transferOwnership",
3763
+ inputs: [{ name: "newOwner", type: "address", internalType: "address" }],
3764
+ outputs: [],
3765
+ stateMutability: "nonpayable"
3766
+ },
3767
+ {
3768
+ type: "function",
3769
+ name: "tryRegisterTokenFromBurnData",
3770
+ inputs: [
3771
+ { name: "_burnData", type: "bytes", internalType: "bytes" },
3772
+ { name: "_expectedAssetId", type: "bytes32", internalType: "bytes32" }
3773
+ ],
3774
+ outputs: [],
3775
+ stateMutability: "nonpayable"
3776
+ },
3777
+ {
3778
+ type: "function",
3779
+ name: "unpause",
3780
+ inputs: [],
3781
+ outputs: [],
3782
+ stateMutability: "nonpayable"
3783
+ },
3784
+ {
3785
+ type: "event",
3786
+ name: "BridgeBurn",
3787
+ inputs: [
3788
+ { name: "chainId", type: "uint256", indexed: true, internalType: "uint256" },
3789
+ { name: "assetId", type: "bytes32", indexed: true, internalType: "bytes32" },
3790
+ { name: "sender", type: "address", indexed: true, internalType: "address" },
3791
+ { name: "receiver", type: "address", indexed: false, internalType: "address" },
3792
+ { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }
3793
+ ],
3794
+ anonymous: false
3795
+ },
3796
+ {
3797
+ type: "event",
3798
+ name: "BridgeMint",
3799
+ inputs: [
3800
+ { name: "chainId", type: "uint256", indexed: true, internalType: "uint256" },
3801
+ { name: "assetId", type: "bytes32", indexed: true, internalType: "bytes32" },
3802
+ { name: "receiver", type: "address", indexed: false, internalType: "address" },
3803
+ { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }
3804
+ ],
3805
+ anonymous: false
3806
+ },
3807
+ {
3808
+ type: "event",
3809
+ name: "BridgedTokenBeaconUpdated",
3810
+ inputs: [
3811
+ {
3812
+ name: "bridgedTokenBeacon",
3813
+ type: "address",
3814
+ indexed: false,
3815
+ internalType: "address"
3816
+ },
3817
+ {
3818
+ name: "bridgedTokenProxyBytecodeHash",
3819
+ type: "bytes32",
3820
+ indexed: false,
3821
+ internalType: "bytes32"
3822
+ }
3823
+ ],
3824
+ anonymous: false
3825
+ },
3826
+ {
3827
+ type: "event",
3828
+ name: "FinalizeDeposit",
3829
+ inputs: [
3830
+ { name: "l1Sender", type: "address", indexed: true, internalType: "address" },
3831
+ { name: "l2Receiver", type: "address", indexed: true, internalType: "address" },
3832
+ { name: "l2Token", type: "address", indexed: true, internalType: "address" },
3833
+ { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }
3834
+ ],
3835
+ anonymous: false
3836
+ },
3837
+ {
3838
+ type: "event",
3839
+ name: "Initialized",
3840
+ inputs: [{ name: "version", type: "uint8", indexed: false, internalType: "uint8" }],
3841
+ anonymous: false
3842
+ },
3843
+ {
3844
+ type: "event",
3845
+ name: "L2TokenBeaconUpdated",
3846
+ inputs: [
3847
+ { name: "l2TokenBeacon", type: "address", indexed: true, internalType: "address" },
3848
+ {
3849
+ name: "l2TokenProxyBytecodeHash",
3850
+ type: "bytes32",
3851
+ indexed: true,
3852
+ internalType: "bytes32"
3853
+ }
3854
+ ],
3855
+ anonymous: false
3856
+ },
3857
+ {
3858
+ type: "event",
3859
+ name: "OwnershipTransferStarted",
3860
+ inputs: [
3861
+ { name: "previousOwner", type: "address", indexed: true, internalType: "address" },
3862
+ { name: "newOwner", type: "address", indexed: true, internalType: "address" }
3863
+ ],
3864
+ anonymous: false
3865
+ },
3866
+ {
3867
+ type: "event",
3868
+ name: "OwnershipTransferred",
3869
+ inputs: [
3870
+ { name: "previousOwner", type: "address", indexed: true, internalType: "address" },
3871
+ { name: "newOwner", type: "address", indexed: true, internalType: "address" }
3872
+ ],
3873
+ anonymous: false
3874
+ },
3875
+ {
3876
+ type: "event",
3877
+ name: "Paused",
3878
+ inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }],
3879
+ anonymous: false
3880
+ },
3881
+ {
3882
+ type: "event",
3883
+ name: "Unpaused",
3884
+ inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }],
3885
+ anonymous: false
3886
+ },
3887
+ {
3888
+ type: "event",
3889
+ name: "WithdrawalInitiated",
3890
+ inputs: [
3891
+ { name: "l2Sender", type: "address", indexed: true, internalType: "address" },
3892
+ { name: "l1Receiver", type: "address", indexed: true, internalType: "address" },
3893
+ { name: "l2Token", type: "address", indexed: true, internalType: "address" },
3894
+ { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }
3895
+ ],
3896
+ anonymous: false
3897
+ },
3898
+ {
3899
+ type: "error",
3900
+ name: "AddressMismatch",
3901
+ inputs: [
3902
+ { name: "expected", type: "address", internalType: "address" },
3903
+ { name: "supplied", type: "address", internalType: "address" }
3904
+ ]
3905
+ },
3906
+ { type: "error", name: "AmountMustBeGreaterThanZero", inputs: [] },
3907
+ { type: "error", name: "AssetIdAlreadyRegistered", inputs: [] },
3908
+ {
3909
+ type: "error",
3910
+ name: "AssetIdMismatch",
3911
+ inputs: [
3912
+ { name: "expected", type: "bytes32", internalType: "bytes32" },
3913
+ { name: "supplied", type: "bytes32", internalType: "bytes32" }
3914
+ ]
3915
+ },
3916
+ {
3917
+ type: "error",
3918
+ name: "AssetIdNotSupported",
3919
+ inputs: [{ name: "assetId", type: "bytes32", internalType: "bytes32" }]
3920
+ },
3921
+ { type: "error", name: "BurningNativeWETHNotSupported", inputs: [] },
3922
+ { type: "error", name: "DeployFailed", inputs: [] },
3923
+ { type: "error", name: "DeployingBridgedTokenForNativeToken", inputs: [] },
3924
+ { type: "error", name: "EmptyAddress", inputs: [] },
3925
+ { type: "error", name: "EmptyBytes32", inputs: [] },
3926
+ { type: "error", name: "EmptyDeposit", inputs: [] },
3927
+ { type: "error", name: "EmptyToken", inputs: [] },
3928
+ { type: "error", name: "InvalidNTVBurnData", inputs: [] },
3929
+ { type: "error", name: "NoLegacySharedBridge", inputs: [] },
3930
+ { type: "error", name: "NonEmptyMsgValue", inputs: [] },
3931
+ { type: "error", name: "TokenIsLegacy", inputs: [] },
3932
+ { type: "error", name: "TokenNotLegacy", inputs: [] },
3933
+ {
3934
+ type: "error",
3935
+ name: "TokenNotSupported",
3936
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
3937
+ },
3938
+ { type: "error", name: "TokensWithFeesNotSupported", inputs: [] },
3939
+ { type: "error", name: "U32CastOverflow", inputs: [] },
3940
+ {
3941
+ type: "error",
3942
+ name: "Unauthorized",
3943
+ inputs: [{ name: "caller", type: "address", internalType: "address" }]
3944
+ },
3945
+ { type: "error", name: "UnsupportedEncodingVersion", inputs: [] },
3946
+ {
3947
+ type: "error",
3948
+ name: "ValueMismatch",
3949
+ inputs: [
3950
+ { name: "expected", type: "uint256", internalType: "uint256" },
3951
+ { name: "actual", type: "uint256", internalType: "uint256" }
3952
+ ]
3953
+ },
3954
+ { type: "error", name: "ZeroAddress", inputs: [] }
3955
+ ];
3956
+ var L2NativeTokenVault_default = L2NativeTokenVaultABI;
3957
+
3958
+ // src/core/internal/abis/IBaseToken.ts
3959
+ var IBaseTokenABI = [
3960
+ {
3961
+ type: "function",
3962
+ name: "balanceOf",
3963
+ inputs: [{ name: "", type: "uint256", internalType: "uint256" }],
3964
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
3965
+ stateMutability: "view"
3966
+ },
3967
+ {
3968
+ type: "function",
3969
+ name: "mint",
3970
+ inputs: [
3971
+ { name: "_account", type: "address", internalType: "address" },
3972
+ { name: "_amount", type: "uint256", internalType: "uint256" }
3973
+ ],
3974
+ outputs: [],
3975
+ stateMutability: "nonpayable"
3976
+ },
3977
+ {
3978
+ type: "function",
3979
+ name: "totalSupply",
3980
+ inputs: [],
3981
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
3982
+ stateMutability: "view"
3983
+ },
3984
+ {
3985
+ type: "function",
3986
+ name: "transferFromTo",
3987
+ inputs: [
3988
+ { name: "_from", type: "address", internalType: "address" },
3989
+ { name: "_to", type: "address", internalType: "address" },
3990
+ { name: "_amount", type: "uint256", internalType: "uint256" }
3991
+ ],
3992
+ outputs: [],
3993
+ stateMutability: "nonpayable"
3994
+ },
3995
+ {
3996
+ type: "function",
3997
+ name: "withdraw",
3998
+ inputs: [{ name: "_l1Receiver", type: "address", internalType: "address" }],
3999
+ outputs: [],
4000
+ stateMutability: "payable"
4001
+ },
4002
+ {
4003
+ type: "function",
4004
+ name: "withdrawWithMessage",
4005
+ inputs: [
4006
+ { name: "_l1Receiver", type: "address", internalType: "address" },
4007
+ { name: "_additionalData", type: "bytes", internalType: "bytes" }
4008
+ ],
4009
+ outputs: [],
4010
+ stateMutability: "payable"
4011
+ },
4012
+ {
4013
+ type: "event",
4014
+ name: "Mint",
4015
+ inputs: [
4016
+ { name: "account", type: "address", indexed: true, internalType: "address" },
4017
+ { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }
4018
+ ],
4019
+ anonymous: false
4020
+ },
4021
+ {
4022
+ type: "event",
4023
+ name: "Transfer",
4024
+ inputs: [
4025
+ { name: "from", type: "address", indexed: true, internalType: "address" },
4026
+ { name: "to", type: "address", indexed: true, internalType: "address" },
4027
+ { name: "value", type: "uint256", indexed: false, internalType: "uint256" }
4028
+ ],
4029
+ anonymous: false
4030
+ },
4031
+ {
4032
+ type: "event",
4033
+ name: "Withdrawal",
4034
+ inputs: [
4035
+ { name: "_l2Sender", type: "address", indexed: true, internalType: "address" },
4036
+ { name: "_l1Receiver", type: "address", indexed: true, internalType: "address" },
4037
+ { name: "_amount", type: "uint256", indexed: false, internalType: "uint256" }
4038
+ ],
4039
+ anonymous: false
4040
+ },
4041
+ {
4042
+ type: "event",
4043
+ name: "WithdrawalWithMessage",
4044
+ inputs: [
4045
+ { name: "_l2Sender", type: "address", indexed: true, internalType: "address" },
4046
+ { name: "_l1Receiver", type: "address", indexed: true, internalType: "address" },
4047
+ { name: "_amount", type: "uint256", indexed: false, internalType: "uint256" },
4048
+ { name: "_additionalData", type: "bytes", indexed: false, internalType: "bytes" }
4049
+ ],
4050
+ anonymous: false
4051
+ }
4052
+ ];
4053
+ var IBaseToken_default = IBaseTokenABI;
4054
+
4055
+ // src/core/internal/abis/IERC20.ts
4056
+ var IERC20ABI = [
4057
+ {
4058
+ type: "constructor",
4059
+ inputs: [
4060
+ { name: "_name", type: "string", internalType: "string" },
4061
+ { name: "_symbol", type: "string", internalType: "string" },
4062
+ { name: "_decimals", type: "uint8", internalType: "uint8" }
4063
+ ],
4064
+ stateMutability: "nonpayable"
4065
+ },
4066
+ {
4067
+ type: "function",
4068
+ name: "allowance",
4069
+ inputs: [
4070
+ { name: "", type: "address", internalType: "address" },
4071
+ { name: "", type: "address", internalType: "address" }
4072
+ ],
4073
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
4074
+ stateMutability: "view"
4075
+ },
4076
+ {
4077
+ type: "function",
4078
+ name: "approve",
4079
+ inputs: [
4080
+ { name: "spender", type: "address", internalType: "address" },
4081
+ { name: "amount", type: "uint256", internalType: "uint256" }
4082
+ ],
4083
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4084
+ stateMutability: "nonpayable"
4085
+ },
4086
+ {
4087
+ type: "function",
4088
+ name: "balanceOf",
4089
+ inputs: [{ name: "", type: "address", internalType: "address" }],
4090
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
4091
+ stateMutability: "view"
4092
+ },
4093
+ {
4094
+ type: "function",
4095
+ name: "decimals",
4096
+ inputs: [],
4097
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
4098
+ stateMutability: "view"
4099
+ },
4100
+ {
4101
+ type: "function",
4102
+ name: "mint",
4103
+ inputs: [
4104
+ { name: "to", type: "address", internalType: "address" },
4105
+ { name: "amount", type: "uint256", internalType: "uint256" }
4106
+ ],
4107
+ outputs: [],
4108
+ stateMutability: "nonpayable"
4109
+ },
4110
+ {
4111
+ type: "function",
4112
+ name: "name",
4113
+ inputs: [],
4114
+ outputs: [{ name: "", type: "string", internalType: "string" }],
4115
+ stateMutability: "view"
4116
+ },
4117
+ {
4118
+ type: "function",
4119
+ name: "owner",
4120
+ inputs: [],
4121
+ outputs: [{ name: "", type: "address", internalType: "address" }],
4122
+ stateMutability: "view"
4123
+ },
4124
+ {
4125
+ type: "function",
4126
+ name: "symbol",
4127
+ inputs: [],
4128
+ outputs: [{ name: "", type: "string", internalType: "string" }],
4129
+ stateMutability: "view"
4130
+ },
4131
+ {
4132
+ type: "function",
4133
+ name: "totalSupply",
4134
+ inputs: [],
4135
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
4136
+ stateMutability: "view"
4137
+ },
4138
+ {
4139
+ type: "function",
4140
+ name: "transfer",
4141
+ inputs: [
4142
+ { name: "to", type: "address", internalType: "address" },
4143
+ { name: "amount", type: "uint256", internalType: "uint256" }
4144
+ ],
4145
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4146
+ stateMutability: "nonpayable"
4147
+ },
4148
+ {
4149
+ type: "function",
4150
+ name: "transferFrom",
4151
+ inputs: [
4152
+ { name: "from", type: "address", internalType: "address" },
4153
+ { name: "to", type: "address", internalType: "address" },
4154
+ { name: "amount", type: "uint256", internalType: "uint256" }
4155
+ ],
4156
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4157
+ stateMutability: "nonpayable"
4158
+ },
4159
+ {
4160
+ type: "event",
4161
+ name: "Approval",
4162
+ inputs: [
4163
+ { name: "owner", type: "address", indexed: true, internalType: "address" },
4164
+ { name: "spender", type: "address", indexed: true, internalType: "address" },
4165
+ { name: "value", type: "uint256", indexed: false, internalType: "uint256" }
4166
+ ],
4167
+ anonymous: false
4168
+ },
4169
+ {
4170
+ type: "event",
4171
+ name: "Transfer",
4172
+ inputs: [
4173
+ { name: "from", type: "address", indexed: true, internalType: "address" },
4174
+ { name: "to", type: "address", indexed: true, internalType: "address" },
4175
+ { name: "value", type: "uint256", indexed: false, internalType: "uint256" }
4176
+ ],
4177
+ anonymous: false
4178
+ },
4179
+ { type: "error", name: "InsufficientAllowance", inputs: [] },
4180
+ { type: "error", name: "InsufficientBalance", inputs: [] },
4181
+ { type: "error", name: "NotOwner", inputs: [] }
4182
+ ];
4183
+ var IERC20_default = IERC20ABI;
4184
+
4185
+ // src/core/internal/abis/Mailbox.ts
4186
+ var MailboxABI = [
4187
+ {
4188
+ type: "constructor",
4189
+ inputs: [
4190
+ { name: "_eraChainId", type: "uint256", internalType: "uint256" },
4191
+ { name: "_l1ChainId", type: "uint256", internalType: "uint256" }
4192
+ ],
4193
+ stateMutability: "nonpayable"
4194
+ },
4195
+ {
4196
+ type: "function",
4197
+ name: "bridgehubRequestL2Transaction",
4198
+ inputs: [
4199
+ {
4200
+ name: "_request",
4201
+ type: "tuple",
4202
+ internalType: "struct BridgehubL2TransactionRequest",
4203
+ components: [
4204
+ { name: "sender", type: "address", internalType: "address" },
4205
+ { name: "contractL2", type: "address", internalType: "address" },
4206
+ { name: "mintValue", type: "uint256", internalType: "uint256" },
4207
+ { name: "l2Value", type: "uint256", internalType: "uint256" },
4208
+ { name: "l2Calldata", type: "bytes", internalType: "bytes" },
4209
+ { name: "l2GasLimit", type: "uint256", internalType: "uint256" },
4210
+ { name: "l2GasPerPubdataByteLimit", type: "uint256", internalType: "uint256" },
4211
+ { name: "factoryDeps", type: "bytes[]", internalType: "bytes[]" },
4212
+ { name: "refundRecipient", type: "address", internalType: "address" }
4213
+ ]
4214
+ }
4215
+ ],
4216
+ outputs: [{ name: "canonicalTxHash", type: "bytes32", internalType: "bytes32" }],
4217
+ stateMutability: "nonpayable"
4218
+ },
4219
+ {
4220
+ type: "function",
4221
+ name: "bridgehubRequestL2TransactionOnGateway",
4222
+ inputs: [
4223
+ { name: "_canonicalTxHash", type: "bytes32", internalType: "bytes32" },
4224
+ { name: "_expirationTimestamp", type: "uint64", internalType: "uint64" }
4225
+ ],
4226
+ outputs: [],
4227
+ stateMutability: "nonpayable"
4228
+ },
4229
+ {
4230
+ type: "function",
4231
+ name: "finalizeEthWithdrawal",
4232
+ inputs: [
4233
+ { name: "_l2BatchNumber", type: "uint256", internalType: "uint256" },
4234
+ { name: "_l2MessageIndex", type: "uint256", internalType: "uint256" },
4235
+ { name: "_l2TxNumberInBatch", type: "uint16", internalType: "uint16" },
4236
+ { name: "_message", type: "bytes", internalType: "bytes" },
4237
+ { name: "_merkleProof", type: "bytes32[]", internalType: "bytes32[]" }
4238
+ ],
4239
+ outputs: [],
4240
+ stateMutability: "nonpayable"
4241
+ },
4242
+ {
4243
+ type: "function",
4244
+ name: "getName",
4245
+ inputs: [],
4246
+ outputs: [{ name: "", type: "string", internalType: "string" }],
4247
+ stateMutability: "view"
4248
+ },
4249
+ {
4250
+ type: "function",
4251
+ name: "l2TransactionBaseCost",
4252
+ inputs: [
4253
+ { name: "_gasPrice", type: "uint256", internalType: "uint256" },
4254
+ { name: "_l2GasLimit", type: "uint256", internalType: "uint256" },
4255
+ { name: "_l2GasPerPubdataByteLimit", type: "uint256", internalType: "uint256" }
4256
+ ],
4257
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
4258
+ stateMutability: "view"
4259
+ },
4260
+ {
4261
+ type: "function",
4262
+ name: "proveL1ToL2TransactionStatus",
4263
+ inputs: [
4264
+ { name: "_l2TxHash", type: "bytes32", internalType: "bytes32" },
4265
+ { name: "_l2BatchNumber", type: "uint256", internalType: "uint256" },
4266
+ { name: "_l2MessageIndex", type: "uint256", internalType: "uint256" },
4267
+ { name: "_l2TxNumberInBatch", type: "uint16", internalType: "uint16" },
4268
+ { name: "_merkleProof", type: "bytes32[]", internalType: "bytes32[]" },
4269
+ { name: "_status", type: "uint8", internalType: "enum TxStatus" }
4270
+ ],
4271
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4272
+ stateMutability: "view"
4273
+ },
4274
+ {
4275
+ type: "function",
4276
+ name: "proveL2LeafInclusion",
4277
+ inputs: [
4278
+ { name: "_batchNumber", type: "uint256", internalType: "uint256" },
4279
+ { name: "_leafProofMask", type: "uint256", internalType: "uint256" },
4280
+ { name: "_leaf", type: "bytes32", internalType: "bytes32" },
4281
+ { name: "_proof", type: "bytes32[]", internalType: "bytes32[]" }
4282
+ ],
4283
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4284
+ stateMutability: "view"
4285
+ },
4286
+ {
4287
+ type: "function",
4288
+ name: "proveL2LeafInclusionShared",
4289
+ inputs: [
4290
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
4291
+ { name: "_blockOrBatchNumber", type: "uint256", internalType: "uint256" },
4292
+ { name: "_leafProofMask", type: "uint256", internalType: "uint256" },
4293
+ { name: "_leaf", type: "bytes32", internalType: "bytes32" },
4294
+ { name: "_proof", type: "bytes32[]", internalType: "bytes32[]" }
4295
+ ],
4296
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4297
+ stateMutability: "view"
4298
+ },
4299
+ {
4300
+ type: "function",
4301
+ name: "proveL2LogInclusion",
4302
+ inputs: [
4303
+ { name: "_batchNumber", type: "uint256", internalType: "uint256" },
4304
+ { name: "_index", type: "uint256", internalType: "uint256" },
4305
+ {
4306
+ name: "_log",
4307
+ type: "tuple",
4308
+ internalType: "struct L2Log",
4309
+ components: [
4310
+ { name: "l2ShardId", type: "uint8", internalType: "uint8" },
4311
+ { name: "isService", type: "bool", internalType: "bool" },
4312
+ { name: "txNumberInBatch", type: "uint16", internalType: "uint16" },
4313
+ { name: "sender", type: "address", internalType: "address" },
4314
+ { name: "key", type: "bytes32", internalType: "bytes32" },
4315
+ { name: "value", type: "bytes32", internalType: "bytes32" }
4316
+ ]
4317
+ },
4318
+ { name: "_proof", type: "bytes32[]", internalType: "bytes32[]" }
4319
+ ],
4320
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4321
+ stateMutability: "view"
4322
+ },
4323
+ {
4324
+ type: "function",
4325
+ name: "proveL2LogInclusionShared",
4326
+ inputs: [
4327
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
4328
+ { name: "_blockOrBatchNumber", type: "uint256", internalType: "uint256" },
4329
+ { name: "_index", type: "uint256", internalType: "uint256" },
4330
+ {
4331
+ name: "_log",
4332
+ type: "tuple",
4333
+ internalType: "struct L2Log",
4334
+ components: [
4335
+ { name: "l2ShardId", type: "uint8", internalType: "uint8" },
4336
+ { name: "isService", type: "bool", internalType: "bool" },
4337
+ { name: "txNumberInBatch", type: "uint16", internalType: "uint16" },
4338
+ { name: "sender", type: "address", internalType: "address" },
4339
+ { name: "key", type: "bytes32", internalType: "bytes32" },
4340
+ { name: "value", type: "bytes32", internalType: "bytes32" }
4341
+ ]
4342
+ },
4343
+ { name: "_proof", type: "bytes32[]", internalType: "bytes32[]" }
4344
+ ],
4345
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4346
+ stateMutability: "view"
4347
+ },
4348
+ {
4349
+ type: "function",
4350
+ name: "proveL2MessageInclusion",
4351
+ inputs: [
4352
+ { name: "_batchNumber", type: "uint256", internalType: "uint256" },
4353
+ { name: "_index", type: "uint256", internalType: "uint256" },
4354
+ {
4355
+ name: "_message",
4356
+ type: "tuple",
4357
+ internalType: "struct L2Message",
4358
+ components: [
4359
+ { name: "txNumberInBatch", type: "uint16", internalType: "uint16" },
4360
+ { name: "sender", type: "address", internalType: "address" },
4361
+ { name: "data", type: "bytes", internalType: "bytes" }
4362
+ ]
4363
+ },
4364
+ { name: "_proof", type: "bytes32[]", internalType: "bytes32[]" }
4365
+ ],
4366
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4367
+ stateMutability: "view"
4368
+ },
4369
+ {
4370
+ type: "function",
4371
+ name: "proveL2MessageInclusionShared",
4372
+ inputs: [
4373
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
4374
+ { name: "_blockOrBatchNumber", type: "uint256", internalType: "uint256" },
4375
+ { name: "_index", type: "uint256", internalType: "uint256" },
4376
+ {
4377
+ name: "_message",
4378
+ type: "tuple",
4379
+ internalType: "struct L2Message",
4380
+ components: [
4381
+ { name: "txNumberInBatch", type: "uint16", internalType: "uint16" },
4382
+ { name: "sender", type: "address", internalType: "address" },
4383
+ { name: "data", type: "bytes", internalType: "bytes" }
4384
+ ]
4385
+ },
4386
+ { name: "_proof", type: "bytes32[]", internalType: "bytes32[]" }
4387
+ ],
4388
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4389
+ stateMutability: "view"
4390
+ },
4391
+ {
4392
+ type: "function",
4393
+ name: "requestL2ServiceTransaction",
4394
+ inputs: [
4395
+ { name: "_contractL2", type: "address", internalType: "address" },
4396
+ { name: "_l2Calldata", type: "bytes", internalType: "bytes" }
4397
+ ],
4398
+ outputs: [{ name: "canonicalTxHash", type: "bytes32", internalType: "bytes32" }],
4399
+ stateMutability: "nonpayable"
4400
+ },
4401
+ {
4402
+ type: "function",
4403
+ name: "requestL2Transaction",
4404
+ inputs: [
4405
+ { name: "_contractL2", type: "address", internalType: "address" },
4406
+ { name: "_l2Value", type: "uint256", internalType: "uint256" },
4407
+ { name: "_calldata", type: "bytes", internalType: "bytes" },
4408
+ { name: "_l2GasLimit", type: "uint256", internalType: "uint256" },
4409
+ { name: "_l2GasPerPubdataByteLimit", type: "uint256", internalType: "uint256" },
4410
+ { name: "_factoryDeps", type: "bytes[]", internalType: "bytes[]" },
4411
+ { name: "_refundRecipient", type: "address", internalType: "address" }
4412
+ ],
4413
+ outputs: [{ name: "canonicalTxHash", type: "bytes32", internalType: "bytes32" }],
4414
+ stateMutability: "payable"
4415
+ },
4416
+ {
4417
+ type: "function",
4418
+ name: "requestL2TransactionToGatewayMailbox",
4419
+ inputs: [
4420
+ { name: "_chainId", type: "uint256", internalType: "uint256" },
4421
+ { name: "_canonicalTxHash", type: "bytes32", internalType: "bytes32" },
4422
+ { name: "_expirationTimestamp", type: "uint64", internalType: "uint64" }
4423
+ ],
4424
+ outputs: [{ name: "canonicalTxHash", type: "bytes32", internalType: "bytes32" }],
4425
+ stateMutability: "nonpayable"
4426
+ },
4427
+ {
4428
+ type: "event",
4429
+ name: "NewPriorityRequest",
4430
+ inputs: [
4431
+ { name: "txId", type: "uint256", indexed: false, internalType: "uint256" },
4432
+ { name: "txHash", type: "bytes32", indexed: false, internalType: "bytes32" },
4433
+ {
4434
+ name: "expirationTimestamp",
4435
+ type: "uint64",
4436
+ indexed: false,
4437
+ internalType: "uint64"
4438
+ },
4439
+ {
4440
+ name: "transaction",
4441
+ type: "tuple",
4442
+ indexed: false,
4443
+ internalType: "struct L2CanonicalTransaction",
4444
+ components: [
4445
+ { name: "txType", type: "uint256", internalType: "uint256" },
4446
+ { name: "from", type: "uint256", internalType: "uint256" },
4447
+ { name: "to", type: "uint256", internalType: "uint256" },
4448
+ { name: "gasLimit", type: "uint256", internalType: "uint256" },
4449
+ { name: "gasPerPubdataByteLimit", type: "uint256", internalType: "uint256" },
4450
+ { name: "maxFeePerGas", type: "uint256", internalType: "uint256" },
4451
+ { name: "maxPriorityFeePerGas", type: "uint256", internalType: "uint256" },
4452
+ { name: "paymaster", type: "uint256", internalType: "uint256" },
4453
+ { name: "nonce", type: "uint256", internalType: "uint256" },
4454
+ { name: "value", type: "uint256", internalType: "uint256" },
4455
+ { name: "reserved", type: "uint256[4]", internalType: "uint256[4]" },
4456
+ { name: "data", type: "bytes", internalType: "bytes" },
4457
+ { name: "signature", type: "bytes", internalType: "bytes" },
4458
+ { name: "factoryDeps", type: "uint256[]", internalType: "uint256[]" },
4459
+ { name: "paymasterInput", type: "bytes", internalType: "bytes" },
4460
+ { name: "reservedDynamic", type: "bytes", internalType: "bytes" }
4461
+ ]
4462
+ },
4463
+ { name: "factoryDeps", type: "bytes[]", indexed: false, internalType: "bytes[]" }
4464
+ ],
4465
+ anonymous: false
4466
+ },
4467
+ {
4468
+ type: "event",
4469
+ name: "NewPriorityRequestId",
4470
+ inputs: [
4471
+ { name: "txId", type: "uint256", indexed: true, internalType: "uint256" },
4472
+ { name: "txHash", type: "bytes32", indexed: true, internalType: "bytes32" }
4473
+ ],
4474
+ anonymous: false
4475
+ },
4476
+ {
4477
+ type: "event",
4478
+ name: "NewRelayedPriorityTransaction",
4479
+ inputs: [
4480
+ { name: "txId", type: "uint256", indexed: false, internalType: "uint256" },
4481
+ { name: "txHash", type: "bytes32", indexed: false, internalType: "bytes32" },
4482
+ {
4483
+ name: "expirationTimestamp",
4484
+ type: "uint64",
4485
+ indexed: false,
4486
+ internalType: "uint64"
4487
+ }
4488
+ ],
4489
+ anonymous: false
4490
+ },
4491
+ { type: "error", name: "BaseTokenGasPriceDenominatorNotSet", inputs: [] },
4492
+ {
4493
+ type: "error",
4494
+ name: "BatchNotExecuted",
4495
+ inputs: [{ name: "batchNumber", type: "uint256", internalType: "uint256" }]
4496
+ },
4497
+ { type: "error", name: "GasPerPubdataMismatch", inputs: [] },
4498
+ { type: "error", name: "HashedLogIsDefault", inputs: [] },
4499
+ { type: "error", name: "InvalidChainId", inputs: [] },
4500
+ { type: "error", name: "InvalidProofLengthForFinalNode", inputs: [] },
4501
+ {
4502
+ type: "error",
4503
+ name: "LengthIsNotDivisibleBy32",
4504
+ inputs: [{ name: "length", type: "uint256", internalType: "uint256" }]
4505
+ },
4506
+ { type: "error", name: "LocalRootIsZero", inputs: [] },
4507
+ { type: "error", name: "LocalRootMustBeZero", inputs: [] },
4508
+ {
4509
+ type: "error",
4510
+ name: "MalformedBytecode",
4511
+ inputs: [{ name: "", type: "uint8", internalType: "enum BytecodeError" }]
4512
+ },
4513
+ { type: "error", name: "MerkleIndexOutOfBounds", inputs: [] },
4514
+ { type: "error", name: "MerklePathEmpty", inputs: [] },
4515
+ { type: "error", name: "MerklePathOutOfBounds", inputs: [] },
4516
+ {
4517
+ type: "error",
4518
+ name: "MsgValueTooLow",
4519
+ inputs: [
4520
+ { name: "required", type: "uint256", internalType: "uint256" },
4521
+ { name: "provided", type: "uint256", internalType: "uint256" }
4522
+ ]
4523
+ },
4524
+ { type: "error", name: "NotHyperchain", inputs: [] },
4525
+ { type: "error", name: "NotInitializedReentrancyGuard", inputs: [] },
4526
+ {
4527
+ type: "error",
4528
+ name: "NotL1",
4529
+ inputs: [{ name: "blockChainId", type: "uint256", internalType: "uint256" }]
4530
+ },
4531
+ { type: "error", name: "NotSettlementLayer", inputs: [] },
4532
+ { type: "error", name: "OnlyEraSupported", inputs: [] },
4533
+ {
4534
+ type: "error",
4535
+ name: "PubdataGreaterThanLimit",
4536
+ inputs: [
4537
+ { name: "limit", type: "uint256", internalType: "uint256" },
4538
+ { name: "length", type: "uint256", internalType: "uint256" }
4539
+ ]
4540
+ },
4541
+ { type: "error", name: "Reentrancy", inputs: [] },
4542
+ { type: "error", name: "TooManyFactoryDeps", inputs: [] },
4543
+ { type: "error", name: "TooMuchGas", inputs: [] },
4544
+ { type: "error", name: "TransactionNotAllowed", inputs: [] },
4545
+ { type: "error", name: "TxnBodyGasLimitNotEnoughGas", inputs: [] },
4546
+ {
4547
+ type: "error",
4548
+ name: "Unauthorized",
4549
+ inputs: [{ name: "caller", type: "address", internalType: "address" }]
4550
+ },
4551
+ {
4552
+ type: "error",
4553
+ name: "UnsupportedProofMetadataVersion",
4554
+ inputs: [{ name: "metadataVersion", type: "uint256", internalType: "uint256" }]
4555
+ },
4556
+ { type: "error", name: "ValidateTxnNotEnoughGas", inputs: [] },
4557
+ { type: "error", name: "ZeroGasPriceL1TxZKSyncOS", inputs: [] }
4558
+ ];
4559
+ var Mailbox_default = MailboxABI;
4560
+
47
4561
  // src/core/errors/factory.ts
48
4562
  var factory_exports = {};
49
4563
  __export(factory_exports, {
@@ -497,6 +5011,8 @@ function normalizeAddrEq(a, b) {
497
5011
  };
498
5012
  return normalize(a) === normalize(b);
499
5013
  }
5014
+ var hexEq = (a, b) => a.toLowerCase() === b.toLowerCase();
5015
+ var normalizeL1Token = (token) => isAddressEq(token, FORMAL_ETH_ADDRESS) ? ETH_ADDRESS : token;
500
5016
 
501
5017
  // src/core/resources/deposits/route.ts
502
5018
  async function pickDepositRoute(client, chainIdL2, token) {
@@ -517,7 +5033,7 @@ function normalizeTokenForRouting(token) {
517
5033
  function pickWithdrawRoute(args) {
518
5034
  const tokenNorm = normalizeTokenForRouting(args.token);
519
5035
  const isL2BaseAlias = tokenNorm.toLowerCase() === L2_BASE_TOKEN_ADDRESS.toLowerCase();
520
- if (isL2BaseAlias) return args.baseIsEth ? "eth-base" : "eth-nonbase";
5036
+ if (isL2BaseAlias) return "base";
521
5037
  return "erc20-nonbase";
522
5038
  }
523
5039
 
@@ -553,10 +5069,12 @@ function messengerLogIndex(raw, opts) {
553
5069
  return (hits[index] ?? hits[0]).i;
554
5070
  }
555
5071
 
5072
+ exports.abi = abi_exports;
556
5073
  exports.constants = constants_exports;
557
5074
  exports.errors = factory_exports;
558
5075
  exports.findL1MessageSentLog = findL1MessageSentLog;
559
5076
  exports.formatEnvelopePretty = formatEnvelopePretty;
5077
+ exports.hexEq = hexEq;
560
5078
  exports.isAddressEq = isAddressEq;
561
5079
  exports.isETH = isETH;
562
5080
  exports.isHash66 = isHash66;
@@ -564,6 +5082,7 @@ exports.makeTransportFromEthers = makeTransportFromEthers;
564
5082
  exports.makeTransportFromViem = makeTransportFromViem;
565
5083
  exports.messengerLogIndex = messengerLogIndex;
566
5084
  exports.normalizeAddrEq = normalizeAddrEq;
5085
+ exports.normalizeL1Token = normalizeL1Token;
567
5086
  exports.pickDepositRoute = pickDepositRoute;
568
5087
  exports.pickWithdrawRoute = pickWithdrawRoute;
569
5088
  exports.zksRpc = zks_exports;