@matterlabs/zksync-js 0.0.11 → 0.0.13

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 (48) hide show
  1. package/README.md +13 -0
  2. package/dist/adapters/ethers/client.cjs +722 -4
  3. package/dist/adapters/ethers/client.cjs.map +1 -1
  4. package/dist/adapters/ethers/client.js +6 -6
  5. package/dist/adapters/ethers/index.cjs +774 -45
  6. package/dist/adapters/ethers/index.cjs.map +1 -1
  7. package/dist/adapters/ethers/index.js +9 -9
  8. package/dist/adapters/ethers/resources/deposits/services/gas.d.ts +4 -4
  9. package/dist/adapters/ethers/sdk.cjs +772 -41
  10. package/dist/adapters/ethers/sdk.cjs.map +1 -1
  11. package/dist/adapters/ethers/sdk.js +7 -7
  12. package/dist/adapters/viem/client.cjs +2 -4
  13. package/dist/adapters/viem/client.cjs.map +1 -1
  14. package/dist/adapters/viem/client.js +6 -6
  15. package/dist/adapters/viem/index.cjs +38 -33
  16. package/dist/adapters/viem/index.cjs.map +1 -1
  17. package/dist/adapters/viem/index.js +9 -9
  18. package/dist/adapters/viem/resources/deposits/services/gas.d.ts +4 -4
  19. package/dist/adapters/viem/sdk.cjs +36 -29
  20. package/dist/adapters/viem/sdk.cjs.map +1 -1
  21. package/dist/adapters/viem/sdk.js +7 -7
  22. package/dist/{chunk-EWBYKU4G.js → chunk-2RIARDXZ.js} +4 -4
  23. package/dist/{chunk-USXSAFYA.js → chunk-4S4XDA4N.js} +4 -6
  24. package/dist/{chunk-H3BPVVMN.js → chunk-53MC5BR2.js} +1 -1
  25. package/dist/{chunk-IQVH7YZT.js → chunk-5L6EYUJB.js} +2 -2
  26. package/dist/{chunk-QUI3J42E.js → chunk-5R7L5NM5.js} +2 -2
  27. package/dist/{chunk-ZVHFVUDE.js → chunk-E3KP7XCG.js} +1 -1
  28. package/dist/{chunk-CCUAGJ6K.js → chunk-EDWBCPO3.js} +40 -33
  29. package/dist/{chunk-6IT5PEEN.js → chunk-HI64OOAR.js} +1 -1
  30. package/dist/{chunk-TL26ZONW.js → chunk-JHO2UQ5F.js} +56 -45
  31. package/dist/{chunk-C3AGOEHR.js → chunk-QQ2OR434.js} +1 -1
  32. package/dist/{chunk-FXSFLZ6D.js → chunk-R5WRFPK2.js} +4 -4
  33. package/dist/{chunk-QFEYV4O3.js → chunk-RI73VJSH.js} +716 -2
  34. package/dist/{chunk-N4PR5SVB.js → chunk-UDBRUBEK.js} +10 -2
  35. package/dist/core/abi.d.ts +2 -0
  36. package/dist/core/constants.cjs +1 -1
  37. package/dist/core/constants.d.ts +1 -1
  38. package/dist/core/constants.js +1 -1
  39. package/dist/core/index.cjs +716 -4
  40. package/dist/core/index.cjs.map +1 -1
  41. package/dist/core/index.js +5 -5
  42. package/dist/core/internal/abis/IInteropErrors.d.ts +197 -0
  43. package/dist/core/internal/abis/IL1ContractErrors.d.ts +1021 -0
  44. package/dist/core/rpc/types.d.ts +1 -1
  45. package/dist/index.cjs +717 -5
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.js +5 -5
  48. package/package.json +1 -1
@@ -281,8 +281,8 @@ function ensureHex(value, field, context) {
281
281
  });
282
282
  }
283
283
  function ensureNumber(value, field, opts) {
284
- const operation = opts?.operation ?? "zksrpc.normalizeGenesis";
285
- const messagePrefix = opts?.messagePrefix ?? "Malformed genesis response";
284
+ const operation = opts?.operation;
285
+ const messagePrefix = opts?.messagePrefix;
286
286
  if (isNumber(value)) return value;
287
287
  if (isBigint(value)) return Number(value);
288
288
  if (typeof value === "string" && value.trim() !== "") {
@@ -420,7 +420,6 @@ function normalizeGenesis(raw) {
420
420
  context: { valueType: typeof contractsRaw }
421
421
  });
422
422
  }
423
- const executionVersion = ensureNumber(record["execution_version"], "execution_version");
424
423
  const genesisRoot = ensureHex(record["genesis_root"], "genesis_root", {});
425
424
  const initialContracts = contractsRaw.map(
426
425
  (entry, index) => normalizeContractTuple(entry, index)
@@ -429,7 +428,6 @@ function normalizeGenesis(raw) {
429
428
  return {
430
429
  initialContracts,
431
430
  additionalStorage,
432
- executionVersion,
433
431
  genesisRoot
434
432
  };
435
433
  } catch (e) {
@@ -6410,6 +6408,718 @@ var L2MessageVerificationABI = [
6410
6408
  ];
6411
6409
  var L2MessageVerification_default = L2MessageVerificationABI;
6412
6410
 
6411
+ // src/core/internal/abis/IInteropErrors.ts
6412
+ var IInteropErrorsABI = [
6413
+ {
6414
+ type: "error",
6415
+ name: "AttributeAlreadySet",
6416
+ inputs: [
6417
+ {
6418
+ name: "selector",
6419
+ type: "bytes4"
6420
+ }
6421
+ ]
6422
+ },
6423
+ {
6424
+ type: "error",
6425
+ name: "AttributeViolatesRestriction",
6426
+ inputs: [
6427
+ {
6428
+ name: "selector",
6429
+ type: "bytes4"
6430
+ },
6431
+ {
6432
+ name: "restriction",
6433
+ type: "uint256"
6434
+ }
6435
+ ]
6436
+ },
6437
+ {
6438
+ type: "error",
6439
+ name: "BundleAlreadyProcessed",
6440
+ inputs: [
6441
+ {
6442
+ name: "bundleHash",
6443
+ type: "bytes32"
6444
+ }
6445
+ ]
6446
+ },
6447
+ {
6448
+ type: "error",
6449
+ name: "CallAlreadyExecuted",
6450
+ inputs: [
6451
+ {
6452
+ name: "bundleHash",
6453
+ type: "bytes32"
6454
+ },
6455
+ {
6456
+ name: "callIndex",
6457
+ type: "uint256"
6458
+ }
6459
+ ]
6460
+ },
6461
+ {
6462
+ type: "error",
6463
+ name: "CallNotExecutable",
6464
+ inputs: [
6465
+ {
6466
+ name: "bundleHash",
6467
+ type: "bytes32"
6468
+ },
6469
+ {
6470
+ name: "callIndex",
6471
+ type: "uint256"
6472
+ }
6473
+ ]
6474
+ },
6475
+ {
6476
+ type: "error",
6477
+ name: "CanNotUnbundle",
6478
+ inputs: [
6479
+ {
6480
+ name: "bundleHash",
6481
+ type: "bytes32"
6482
+ }
6483
+ ]
6484
+ },
6485
+ {
6486
+ type: "error",
6487
+ name: "DestinationChainNotRegistered",
6488
+ inputs: [
6489
+ {
6490
+ name: "destinationChainId",
6491
+ type: "uint256"
6492
+ }
6493
+ ]
6494
+ },
6495
+ {
6496
+ type: "error",
6497
+ name: "ExecutingNotAllowed",
6498
+ inputs: [
6499
+ {
6500
+ name: "bundleHash",
6501
+ type: "bytes32"
6502
+ },
6503
+ {
6504
+ name: "callerAddress",
6505
+ type: "bytes"
6506
+ },
6507
+ {
6508
+ name: "executionAddress",
6509
+ type: "bytes"
6510
+ }
6511
+ ]
6512
+ },
6513
+ {
6514
+ type: "error",
6515
+ name: "FeeWithdrawalFailed",
6516
+ inputs: []
6517
+ },
6518
+ {
6519
+ type: "error",
6520
+ name: "IndirectCallValueMismatch",
6521
+ inputs: [
6522
+ {
6523
+ name: "expected",
6524
+ type: "uint256"
6525
+ },
6526
+ {
6527
+ name: "actual",
6528
+ type: "uint256"
6529
+ }
6530
+ ]
6531
+ },
6532
+ {
6533
+ type: "error",
6534
+ name: "InteroperableAddressChainReferenceNotEmpty",
6535
+ inputs: [
6536
+ {
6537
+ name: "interoperableAddress",
6538
+ type: "bytes"
6539
+ }
6540
+ ]
6541
+ },
6542
+ {
6543
+ type: "error",
6544
+ name: "InteroperableAddressNotEmpty",
6545
+ inputs: [
6546
+ {
6547
+ name: "interoperableAddress",
6548
+ type: "bytes"
6549
+ }
6550
+ ]
6551
+ },
6552
+ {
6553
+ type: "error",
6554
+ name: "InvalidInteropBundleVersion",
6555
+ inputs: []
6556
+ },
6557
+ {
6558
+ type: "error",
6559
+ name: "InvalidInteropCallVersion",
6560
+ inputs: []
6561
+ },
6562
+ {
6563
+ type: "error",
6564
+ name: "InteropRootAlreadyExists",
6565
+ inputs: []
6566
+ },
6567
+ {
6568
+ type: "error",
6569
+ name: "MessageNotIncluded",
6570
+ inputs: []
6571
+ },
6572
+ {
6573
+ type: "error",
6574
+ name: "SidesLengthNotOne",
6575
+ inputs: []
6576
+ },
6577
+ {
6578
+ type: "error",
6579
+ name: "UnauthorizedMessageSender",
6580
+ inputs: [
6581
+ {
6582
+ name: "expected",
6583
+ type: "address"
6584
+ },
6585
+ {
6586
+ name: "actual",
6587
+ type: "address"
6588
+ }
6589
+ ]
6590
+ },
6591
+ {
6592
+ type: "error",
6593
+ name: "UnbundlingNotAllowed",
6594
+ inputs: [
6595
+ {
6596
+ name: "bundleHash",
6597
+ type: "bytes32"
6598
+ },
6599
+ {
6600
+ name: "callerAddress",
6601
+ type: "bytes"
6602
+ },
6603
+ {
6604
+ name: "unbundlerAddress",
6605
+ type: "bytes"
6606
+ }
6607
+ ]
6608
+ },
6609
+ {
6610
+ type: "error",
6611
+ name: "WrongCallStatusLength",
6612
+ inputs: [
6613
+ {
6614
+ name: "bundleCallsLength",
6615
+ type: "uint256"
6616
+ },
6617
+ {
6618
+ name: "providedCallStatusLength",
6619
+ type: "uint256"
6620
+ }
6621
+ ]
6622
+ },
6623
+ {
6624
+ type: "error",
6625
+ name: "WrongDestinationChainId",
6626
+ inputs: [
6627
+ {
6628
+ name: "bundleHash",
6629
+ type: "bytes32"
6630
+ },
6631
+ {
6632
+ name: "expected",
6633
+ type: "uint256"
6634
+ },
6635
+ {
6636
+ name: "actual",
6637
+ type: "uint256"
6638
+ }
6639
+ ]
6640
+ },
6641
+ {
6642
+ type: "error",
6643
+ name: "WrongDestinationBaseTokenAssetId",
6644
+ inputs: [
6645
+ {
6646
+ name: "bundleHash",
6647
+ type: "bytes32"
6648
+ },
6649
+ {
6650
+ name: "expected",
6651
+ type: "bytes32"
6652
+ },
6653
+ {
6654
+ name: "actual",
6655
+ type: "bytes32"
6656
+ }
6657
+ ]
6658
+ },
6659
+ {
6660
+ type: "error",
6661
+ name: "WrongSourceChainId",
6662
+ inputs: [
6663
+ {
6664
+ name: "bundleHash",
6665
+ type: "bytes32"
6666
+ },
6667
+ {
6668
+ name: "expected",
6669
+ type: "uint256"
6670
+ },
6671
+ {
6672
+ name: "actual",
6673
+ type: "uint256"
6674
+ }
6675
+ ]
6676
+ },
6677
+ {
6678
+ type: "error",
6679
+ name: "ZKTokenNotAvailable",
6680
+ inputs: []
6681
+ }
6682
+ ];
6683
+ var IInteropErrors_default = IInteropErrorsABI;
6684
+
6685
+ // src/core/internal/abis/IL1ContractErrors.ts
6686
+ var IL1ContractErrorsABI = [
6687
+ {
6688
+ type: "error",
6689
+ name: "AccessToFallbackDenied",
6690
+ inputs: [
6691
+ { name: "target", type: "address" },
6692
+ { name: "invoker", type: "address" }
6693
+ ]
6694
+ },
6695
+ {
6696
+ type: "error",
6697
+ name: "AccessToFunctionDenied",
6698
+ inputs: [
6699
+ { name: "target", type: "address" },
6700
+ { name: "selector", type: "bytes4" },
6701
+ { name: "invoker", type: "address" }
6702
+ ]
6703
+ },
6704
+ { type: "error", name: "AddressAlreadySet", inputs: [{ name: "addr", type: "address" }] },
6705
+ { type: "error", name: "AddressHasNoCode", inputs: [{ name: "", type: "address" }] },
6706
+ {
6707
+ type: "error",
6708
+ name: "AddressMismatch",
6709
+ inputs: [
6710
+ { name: "expected", type: "address" },
6711
+ { name: "supplied", type: "address" }
6712
+ ]
6713
+ },
6714
+ { type: "error", name: "AlreadyPermanentRollup", inputs: [] },
6715
+ { type: "error", name: "AlreadyWhitelisted", inputs: [{ name: "", type: "address" }] },
6716
+ { type: "error", name: "AmountMustBeGreaterThanZero", inputs: [] },
6717
+ {
6718
+ type: "error",
6719
+ name: "AssetHandlerDoesNotExist",
6720
+ inputs: [{ name: "assetId", type: "bytes32" }]
6721
+ },
6722
+ {
6723
+ type: "error",
6724
+ name: "AssetHandlerNotRegistered",
6725
+ inputs: [{ name: "assetId", type: "bytes32" }]
6726
+ },
6727
+ { type: "error", name: "AssetIdAlreadyRegistered", inputs: [] },
6728
+ {
6729
+ type: "error",
6730
+ name: "AssetIdMismatch",
6731
+ inputs: [
6732
+ { name: "expected", type: "bytes32" },
6733
+ { name: "supplied", type: "bytes32" }
6734
+ ]
6735
+ },
6736
+ { type: "error", name: "AssetIdNotSupported", inputs: [{ name: "assetId", type: "bytes32" }] },
6737
+ { type: "error", name: "AssetRouterAllowanceNotZero", inputs: [] },
6738
+ { type: "error", name: "BaseTokenGasPriceDenominatorNotSet", inputs: [] },
6739
+ {
6740
+ type: "error",
6741
+ name: "BatchHashMismatch",
6742
+ inputs: [
6743
+ { name: "expected", type: "bytes32" },
6744
+ { name: "actual", type: "bytes32" }
6745
+ ]
6746
+ },
6747
+ { type: "error", name: "BatchNotExecuted", inputs: [{ name: "batchNumber", type: "uint256" }] },
6748
+ {
6749
+ type: "error",
6750
+ name: "BatchNumberMismatch",
6751
+ inputs: [
6752
+ { name: "expectedBatchNumber", type: "uint256" },
6753
+ { name: "providedBatchNumber", type: "uint256" }
6754
+ ]
6755
+ },
6756
+ { type: "error", name: "BridgeHubAlreadyRegistered", inputs: [] },
6757
+ { type: "error", name: "BridgeMintNotImplemented", inputs: [] },
6758
+ { type: "error", name: "BurningNativeWETHNotSupported", inputs: [] },
6759
+ {
6760
+ type: "error",
6761
+ name: "BytecodeAlreadyPublished",
6762
+ inputs: [{ name: "bytecodeHash", type: "bytes32" }]
6763
+ },
6764
+ { type: "error", name: "CallerNotTimerAdmin", inputs: [] },
6765
+ { type: "error", name: "CallNotAllowed", inputs: [{ name: "call", type: "bytes" }] },
6766
+ { type: "error", name: "CanOnlyProcessOneBatch", inputs: [] },
6767
+ { type: "error", name: "CantExecuteUnprovenBatches", inputs: [] },
6768
+ { type: "error", name: "CantRevertExecutedBatch", inputs: [] },
6769
+ { type: "error", name: "ChainAlreadyLive", inputs: [] },
6770
+ { type: "error", name: "ChainIdAlreadyExists", inputs: [] },
6771
+ { type: "error", name: "ChainIdCantBeCurrentChain", inputs: [] },
6772
+ { type: "error", name: "ChainIdMismatch", inputs: [] },
6773
+ { type: "error", name: "ChainIdNotRegistered", inputs: [{ name: "chainId", type: "uint256" }] },
6774
+ { type: "error", name: "ChainIdTooBig", inputs: [] },
6775
+ { type: "error", name: "CTMAlreadyRegistered", inputs: [] },
6776
+ { type: "error", name: "CTMNotRegistered", inputs: [] },
6777
+ { type: "error", name: "DeadlineNotYetPassed", inputs: [] },
6778
+ { type: "error", name: "DefaultAdminTransferNotAllowed", inputs: [] },
6779
+ { type: "error", name: "DelegateCallFailed", inputs: [{ name: "returnData", type: "bytes" }] },
6780
+ { type: "error", name: "DenominatorIsZero", inputs: [] },
6781
+ { type: "error", name: "DeployFailed", inputs: [] },
6782
+ { type: "error", name: "DeployingBridgedTokenForNativeToken", inputs: [] },
6783
+ { type: "error", name: "DepositDoesNotExist", inputs: [] },
6784
+ { type: "error", name: "DepositExists", inputs: [] },
6785
+ { type: "error", name: "DiamondAlreadyFrozen", inputs: [] },
6786
+ { type: "error", name: "DiamondNotFrozen", inputs: [] },
6787
+ { type: "error", name: "EmptyAddress", inputs: [] },
6788
+ { type: "error", name: "EmptyAssetId", inputs: [] },
6789
+ { type: "error", name: "EmptyBytes32", inputs: [] },
6790
+ { type: "error", name: "EmptyData", inputs: [] },
6791
+ { type: "error", name: "EmptyDeposit", inputs: [] },
6792
+ { type: "error", name: "EmptyPrecommitData", inputs: [{ name: "batchNumber", type: "uint256" }] },
6793
+ { type: "error", name: "EmptyProofLength", inputs: [] },
6794
+ { type: "error", name: "ETHDepositNotSupported", inputs: [] },
6795
+ {
6796
+ type: "error",
6797
+ name: "FacetExists",
6798
+ inputs: [
6799
+ { name: "selector", type: "bytes4" },
6800
+ { name: "", type: "address" }
6801
+ ]
6802
+ },
6803
+ { type: "error", name: "GasPerPubdataMismatch", inputs: [] },
6804
+ { type: "error", name: "GenesisBatchCommitmentZero", inputs: [] },
6805
+ { type: "error", name: "GenesisBatchHashZero", inputs: [] },
6806
+ { type: "error", name: "GenesisIndexStorageZero", inputs: [] },
6807
+ { type: "error", name: "GenesisUpgradeZero", inputs: [] },
6808
+ { type: "error", name: "HashedLogIsDefault", inputs: [] },
6809
+ {
6810
+ type: "error",
6811
+ name: "HashMismatch",
6812
+ inputs: [
6813
+ { name: "expected", type: "bytes32" },
6814
+ { name: "actual", type: "bytes32" }
6815
+ ]
6816
+ },
6817
+ {
6818
+ type: "error",
6819
+ name: "IncorrectBatchBounds",
6820
+ inputs: [
6821
+ { name: "processFromExpected", type: "uint256" },
6822
+ { name: "processToExpected", type: "uint256" },
6823
+ { name: "processFromProvided", type: "uint256" },
6824
+ { name: "processToProvided", type: "uint256" }
6825
+ ]
6826
+ },
6827
+ {
6828
+ type: "error",
6829
+ name: "IncorrectBridgeHubAddress",
6830
+ inputs: [{ name: "bridgehub", type: "address" }]
6831
+ },
6832
+ {
6833
+ type: "error",
6834
+ name: "IncorrectTokenAddressFromNTV",
6835
+ inputs: [
6836
+ { name: "assetId", type: "bytes32" },
6837
+ { name: "tokenAddress", type: "address" }
6838
+ ]
6839
+ },
6840
+ { type: "error", name: "InsufficientChainBalance", inputs: [] },
6841
+ {
6842
+ type: "error",
6843
+ name: "InvalidBatchNumber",
6844
+ inputs: [
6845
+ { name: "provided", type: "uint256" },
6846
+ { name: "expected", type: "uint256" }
6847
+ ]
6848
+ },
6849
+ { type: "error", name: "InvalidCaller", inputs: [{ name: "", type: "address" }] },
6850
+ { type: "error", name: "InvalidDAForPermanentRollup", inputs: [] },
6851
+ { type: "error", name: "InvalidDelay", inputs: [] },
6852
+ {
6853
+ type: "error",
6854
+ name: "InvalidLogSender",
6855
+ inputs: [
6856
+ { name: "sender", type: "address" },
6857
+ { name: "logKey", type: "uint256" }
6858
+ ]
6859
+ },
6860
+ {
6861
+ type: "error",
6862
+ name: "InvalidMessageRoot",
6863
+ inputs: [
6864
+ { name: "expectedMessageRoot", type: "bytes32" },
6865
+ { name: "providedMessageRoot", type: "bytes32" }
6866
+ ]
6867
+ },
6868
+ { type: "error", name: "InvalidNTVBurnData", inputs: [] },
6869
+ {
6870
+ type: "error",
6871
+ name: "InvalidNumberOfBlobs",
6872
+ inputs: [
6873
+ { name: "expected", type: "uint256" },
6874
+ { name: "numCommitments", type: "uint256" },
6875
+ { name: "numHashes", type: "uint256" }
6876
+ ]
6877
+ },
6878
+ {
6879
+ type: "error",
6880
+ name: "InvalidPackedPrecommitmentLength",
6881
+ inputs: [{ name: "length", type: "uint256" }]
6882
+ },
6883
+ { type: "error", name: "InvalidProof", inputs: [] },
6884
+ { type: "error", name: "InvalidProofLengthForFinalNode", inputs: [] },
6885
+ { type: "error", name: "InvalidProtocolVersion", inputs: [] },
6886
+ { type: "error", name: "InvalidPubdataPricingMode", inputs: [] },
6887
+ { type: "error", name: "InvalidSelector", inputs: [{ name: "func", type: "bytes4" }] },
6888
+ { type: "error", name: "InvalidSystemLogsLength", inputs: [] },
6889
+ { type: "error", name: "InvalidUpgradeTxn", inputs: [{ name: "", type: "uint8" }] },
6890
+ { type: "error", name: "L2TimestampTooBig", inputs: [] },
6891
+ {
6892
+ type: "error",
6893
+ name: "L2WithdrawalMessageWrongLength",
6894
+ inputs: [{ name: "messageLen", type: "uint256" }]
6895
+ },
6896
+ { type: "error", name: "LegacyBridgeNotSet", inputs: [] },
6897
+ { type: "error", name: "LegacyBridgeUsesNonNativeToken", inputs: [] },
6898
+ { type: "error", name: "LegacyEncodingUsedForNonL1Token", inputs: [] },
6899
+ { type: "error", name: "LegacyMethodForNonL1Token", inputs: [] },
6900
+ {
6901
+ type: "error",
6902
+ name: "LengthIsNotDivisibleBy32",
6903
+ inputs: [{ name: "length", type: "uint256" }]
6904
+ },
6905
+ { type: "error", name: "LogAlreadyProcessed", inputs: [{ name: "", type: "uint8" }] },
6906
+ { type: "error", name: "MalformedBytecode", inputs: [{ name: "", type: "uint8" }] },
6907
+ { type: "error", name: "MerkleIndexOrHeightMismatch", inputs: [] },
6908
+ { type: "error", name: "MerkleIndexOutOfBounds", inputs: [] },
6909
+ { type: "error", name: "MerkleNothingToProve", inputs: [] },
6910
+ { type: "error", name: "MerklePathEmpty", inputs: [] },
6911
+ {
6912
+ type: "error",
6913
+ name: "MerklePathLengthMismatch",
6914
+ inputs: [
6915
+ { name: "pathLength", type: "uint256" },
6916
+ { name: "expectedLength", type: "uint256" }
6917
+ ]
6918
+ },
6919
+ { type: "error", name: "MerklePathOutOfBounds", inputs: [] },
6920
+ {
6921
+ type: "error",
6922
+ name: "MerkleWrongIndex",
6923
+ inputs: [
6924
+ { name: "index", type: "uint256" },
6925
+ { name: "maxNodeNumber", type: "uint256" }
6926
+ ]
6927
+ },
6928
+ {
6929
+ type: "error",
6930
+ name: "MerkleWrongLength",
6931
+ inputs: [
6932
+ { name: "newLeavesLength", type: "uint256" },
6933
+ { name: "leafNumber", type: "uint256" }
6934
+ ]
6935
+ },
6936
+ { type: "error", name: "MigrationPaused", inputs: [] },
6937
+ { type: "error", name: "MigrationsNotPaused", inputs: [] },
6938
+ {
6939
+ type: "error",
6940
+ name: "MissingSystemLogs",
6941
+ inputs: [
6942
+ { name: "expected", type: "uint256" },
6943
+ { name: "actual", type: "uint256" }
6944
+ ]
6945
+ },
6946
+ {
6947
+ type: "error",
6948
+ name: "MsgValueMismatch",
6949
+ inputs: [
6950
+ { name: "expectedMsgValue", type: "uint256" },
6951
+ { name: "providedMsgValue", type: "uint256" }
6952
+ ]
6953
+ },
6954
+ {
6955
+ type: "error",
6956
+ name: "MsgValueTooLow",
6957
+ inputs: [
6958
+ { name: "required", type: "uint256" },
6959
+ { name: "provided", type: "uint256" }
6960
+ ]
6961
+ },
6962
+ { type: "error", name: "NewDeadlineExceedsMaxDeadline", inputs: [] },
6963
+ { type: "error", name: "NewDeadlineNotGreaterThanCurrent", inputs: [] },
6964
+ { type: "error", name: "NoCallsProvided", inputs: [] },
6965
+ { type: "error", name: "NoCTMForAssetId", inputs: [{ name: "assetId", type: "bytes32" }] },
6966
+ { type: "error", name: "NoFunctionsForDiamondCut", inputs: [] },
6967
+ { type: "error", name: "NoFundsTransferred", inputs: [] },
6968
+ { type: "error", name: "NoLegacySharedBridge", inputs: [] },
6969
+ { type: "error", name: "NonEmptyCalldata", inputs: [] },
6970
+ { type: "error", name: "NonEmptyMsgValue", inputs: [] },
6971
+ { type: "error", name: "NonIncreasingTimestamp", inputs: [] },
6972
+ { type: "error", name: "NonSequentialBatch", inputs: [] },
6973
+ { type: "error", name: "NonSequentialVersion", inputs: [] },
6974
+ { type: "error", name: "NotAllowed", inputs: [{ name: "addr", type: "address" }] },
6975
+ { type: "error", name: "NotARestriction", inputs: [{ name: "addr", type: "address" }] },
6976
+ { type: "error", name: "NotAZKChain", inputs: [{ name: "addr", type: "address" }] },
6977
+ { type: "error", name: "NotInitializedReentrancyGuard", inputs: [] },
6978
+ { type: "error", name: "NotWhitelisted", inputs: [{ name: "", type: "address" }] },
6979
+ { type: "error", name: "OnlyEraSupported", inputs: [] },
6980
+ { type: "error", name: "OnlySelfAllowed", inputs: [] },
6981
+ { type: "error", name: "OperationExists", inputs: [] },
6982
+ { type: "error", name: "OperationMustBePending", inputs: [] },
6983
+ { type: "error", name: "OperationMustBeReady", inputs: [] },
6984
+ { type: "error", name: "OriginChainIdNotFound", inputs: [] },
6985
+ {
6986
+ type: "error",
6987
+ name: "PrecommitmentMismatch",
6988
+ inputs: [
6989
+ { name: "batchNumber", type: "uint256" },
6990
+ { name: "expected", type: "bytes32" },
6991
+ { name: "found", type: "bytes32" }
6992
+ ]
6993
+ },
6994
+ { type: "error", name: "PreviousOperationNotExecuted", inputs: [] },
6995
+ { type: "error", name: "PriorityOperationsRollingHashMismatch", inputs: [] },
6996
+ { type: "error", name: "PriorityTxPubdataExceedsMaxPubDataPerBatch", inputs: [] },
6997
+ {
6998
+ type: "error",
6999
+ name: "ProtocolIdMismatch",
7000
+ inputs: [
7001
+ { name: "expectedProtocolVersion", type: "uint256" },
7002
+ { name: "providedProtocolId", type: "uint256" }
7003
+ ]
7004
+ },
7005
+ { type: "error", name: "ProtocolIdNotGreater", inputs: [] },
7006
+ {
7007
+ type: "error",
7008
+ name: "PubdataGreaterThanLimit",
7009
+ inputs: [
7010
+ { name: "limit", type: "uint256" },
7011
+ { name: "length", type: "uint256" }
7012
+ ]
7013
+ },
7014
+ { type: "error", name: "QueueIsEmpty", inputs: [] },
7015
+ { type: "error", name: "Reentrancy", inputs: [] },
7016
+ {
7017
+ type: "error",
7018
+ name: "RemoveFunctionFacetAddressNotZero",
7019
+ inputs: [{ name: "facet", type: "address" }]
7020
+ },
7021
+ { type: "error", name: "RemoveFunctionFacetAddressZero", inputs: [] },
7022
+ { type: "error", name: "RemovingPermanentRestriction", inputs: [] },
7023
+ { type: "error", name: "ReplaceFunctionFacetAddressZero", inputs: [] },
7024
+ {
7025
+ type: "error",
7026
+ name: "RestrictionWasAlreadyPresent",
7027
+ inputs: [{ name: "restriction", type: "address" }]
7028
+ },
7029
+ {
7030
+ type: "error",
7031
+ name: "RestrictionWasNotPresent",
7032
+ inputs: [{ name: "restriction", type: "address" }]
7033
+ },
7034
+ { type: "error", name: "RevertedBatchNotAfterNewLastBatch", inputs: [] },
7035
+ {
7036
+ type: "error",
7037
+ name: "RoleAccessDenied",
7038
+ inputs: [
7039
+ { name: "chainAddress", type: "address" },
7040
+ { name: "role", type: "bytes32" },
7041
+ { name: "account", type: "address" }
7042
+ ]
7043
+ },
7044
+ { type: "error", name: "SelectorsMustAllHaveSameFreezability", inputs: [] },
7045
+ { type: "error", name: "SettlementLayersMustSettleOnL1", inputs: [] },
7046
+ { type: "error", name: "SharedBridgeNotSet", inputs: [] },
7047
+ { type: "error", name: "SharedBridgeValueNotSet", inputs: [{ name: "", type: "uint8" }] },
7048
+ { type: "error", name: "SlotOccupied", inputs: [] },
7049
+ { type: "error", name: "SystemLogsSizeTooBig", inputs: [] },
7050
+ {
7051
+ type: "error",
7052
+ name: "TimeNotReached",
7053
+ inputs: [
7054
+ { name: "expectedTimestamp", type: "uint256" },
7055
+ { name: "actualTimestamp", type: "uint256" }
7056
+ ]
7057
+ },
7058
+ { type: "error", name: "TimerAlreadyStarted", inputs: [] },
7059
+ { type: "error", name: "TimestampError", inputs: [] },
7060
+ { type: "error", name: "TokenIsLegacy", inputs: [] },
7061
+ { type: "error", name: "TokenNotLegacy", inputs: [] },
7062
+ { type: "error", name: "TokenNotSupported", inputs: [{ name: "token", type: "address" }] },
7063
+ { type: "error", name: "TokensWithFeesNotSupported", inputs: [] },
7064
+ { type: "error", name: "TooHighDeploymentNonce", inputs: [] },
7065
+ { type: "error", name: "TooManyFactoryDeps", inputs: [] },
7066
+ { type: "error", name: "TooMuchGas", inputs: [] },
7067
+ { type: "error", name: "TransactionNotAllowed", inputs: [] },
7068
+ { type: "error", name: "TxHashMismatch", inputs: [] },
7069
+ { type: "error", name: "TxnBodyGasLimitNotEnoughGas", inputs: [] },
7070
+ {
7071
+ type: "error",
7072
+ name: "UnallowedImplementation",
7073
+ inputs: [{ name: "implementationHash", type: "bytes32" }]
7074
+ },
7075
+ { type: "error", name: "Unauthorized", inputs: [{ name: "caller", type: "address" }] },
7076
+ { type: "error", name: "UndefinedDiamondCutAction", inputs: [] },
7077
+ { type: "error", name: "UnexpectedSystemLog", inputs: [{ name: "logKey", type: "uint256" }] },
7078
+ { type: "error", name: "UnknownVerifierType", inputs: [] },
7079
+ {
7080
+ type: "error",
7081
+ name: "UnsupportedCommitBatchEncoding",
7082
+ inputs: [{ name: "version", type: "uint8" }]
7083
+ },
7084
+ { type: "error", name: "UnsupportedEncodingVersion", inputs: [] },
7085
+ {
7086
+ type: "error",
7087
+ name: "UnsupportedExecuteBatchEncoding",
7088
+ inputs: [{ name: "version", type: "uint8" }]
7089
+ },
7090
+ {
7091
+ type: "error",
7092
+ name: "UnsupportedProofBatchEncoding",
7093
+ inputs: [{ name: "version", type: "uint8" }]
7094
+ },
7095
+ { type: "error", name: "UpgradeBatchNumberIsNotZero", inputs: [] },
7096
+ { type: "error", name: "ValidateTxnNotEnoughGas", inputs: [] },
7097
+ {
7098
+ type: "error",
7099
+ name: "ValueMismatch",
7100
+ inputs: [
7101
+ { name: "expected", type: "uint256" },
7102
+ { name: "actual", type: "uint256" }
7103
+ ]
7104
+ },
7105
+ { type: "error", name: "VerifiedBatchesExceedsCommittedBatches", inputs: [] },
7106
+ { type: "error", name: "WithdrawalAlreadyFinalized", inputs: [] },
7107
+ { type: "error", name: "WithdrawFailed", inputs: [] },
7108
+ { type: "error", name: "WrappedBaseTokenAlreadyRegistered", inputs: [] },
7109
+ {
7110
+ type: "error",
7111
+ name: "WrongMagicValue",
7112
+ inputs: [
7113
+ { name: "expectedMagicValue", type: "uint256" },
7114
+ { name: "providedMagicValue", type: "uint256" }
7115
+ ]
7116
+ },
7117
+ { type: "error", name: "ZeroAddress", inputs: [] },
7118
+ { type: "error", name: "ZeroChainId", inputs: [] },
7119
+ { type: "error", name: "ZKChainLimitReached", inputs: [] }
7120
+ ];
7121
+ var IL1ContractErrors_default = IL1ContractErrorsABI;
7122
+
6413
7123
  // src/core/errors/error-ops.ts
6414
7124
  function resolveMessage(op, msg) {
6415
7125
  if (!msg) return `Error during ${op}.`;
@@ -6492,6 +7202,14 @@ var IFACE_PANIC = new ethers.Interface(["error Panic(uint256)"]);
6492
7202
  ERROR_IFACES.push({ name: "Mailbox", iface: new ethers.Interface(Mailbox_default) });
6493
7203
  } catch {
6494
7204
  }
7205
+ try {
7206
+ ERROR_IFACES.push({ name: "IL1ContractErrors", iface: new ethers.Interface(IL1ContractErrors_default) });
7207
+ } catch {
7208
+ }
7209
+ try {
7210
+ ERROR_IFACES.push({ name: "IInteropErrors", iface: new ethers.Interface(IInteropErrors_default) });
7211
+ } catch {
7212
+ }
6495
7213
  })();
6496
7214
  function extractRevertData(e) {
6497
7215
  const maybe = (