@matterlabs/zksync-js 0.0.12 → 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 (38) hide show
  1. package/dist/adapters/ethers/client.cjs +722 -4
  2. package/dist/adapters/ethers/client.cjs.map +1 -1
  3. package/dist/adapters/ethers/client.js +5 -5
  4. package/dist/adapters/ethers/index.cjs +735 -14
  5. package/dist/adapters/ethers/index.cjs.map +1 -1
  6. package/dist/adapters/ethers/index.js +7 -7
  7. package/dist/adapters/ethers/sdk.cjs +733 -10
  8. package/dist/adapters/ethers/sdk.cjs.map +1 -1
  9. package/dist/adapters/ethers/sdk.js +5 -5
  10. package/dist/adapters/viem/client.cjs +2 -4
  11. package/dist/adapters/viem/client.cjs.map +1 -1
  12. package/dist/adapters/viem/client.js +5 -5
  13. package/dist/adapters/viem/index.cjs +2 -4
  14. package/dist/adapters/viem/index.cjs.map +1 -1
  15. package/dist/adapters/viem/index.js +7 -7
  16. package/dist/adapters/viem/sdk.js +5 -5
  17. package/dist/{chunk-BGUNJK2H.js → chunk-2RIARDXZ.js} +3 -3
  18. package/dist/{chunk-NBQVHW2N.js → chunk-4S4XDA4N.js} +3 -5
  19. package/dist/{chunk-GMNLOTNG.js → chunk-53MC5BR2.js} +1 -1
  20. package/dist/{chunk-I5VQBVQ2.js → chunk-5L6EYUJB.js} +1 -1
  21. package/dist/{chunk-TE2YQHVI.js → chunk-5R7L5NM5.js} +2 -2
  22. package/dist/{chunk-AUN5Y2A3.js → chunk-EDWBCPO3.js} +3 -3
  23. package/dist/{chunk-IUSH7YBZ.js → chunk-HI64OOAR.js} +1 -1
  24. package/dist/{chunk-6JM4PE62.js → chunk-JHO2UQ5F.js} +16 -13
  25. package/dist/{chunk-LWA7LC3N.js → chunk-R5WRFPK2.js} +3 -3
  26. package/dist/{chunk-6CLYCJMV.js → chunk-RI73VJSH.js} +715 -1
  27. package/dist/{chunk-4PFO3J7W.js → chunk-UDBRUBEK.js} +10 -2
  28. package/dist/core/abi.d.ts +2 -0
  29. package/dist/core/index.cjs +716 -4
  30. package/dist/core/index.cjs.map +1 -1
  31. package/dist/core/index.js +3 -3
  32. package/dist/core/internal/abis/IInteropErrors.d.ts +197 -0
  33. package/dist/core/internal/abis/IL1ContractErrors.d.ts +1021 -0
  34. package/dist/core/rpc/types.d.ts +0 -1
  35. package/dist/index.cjs +716 -4
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.js +3 -3
  38. package/package.json +1 -1
@@ -4701,6 +4701,718 @@ var InteropRootStorageABI = [
4701
4701
  ];
4702
4702
  var IInteropRootStorage_default = InteropRootStorageABI;
4703
4703
 
4704
+ // src/core/internal/abis/IInteropErrors.ts
4705
+ var IInteropErrorsABI = [
4706
+ {
4707
+ type: "error",
4708
+ name: "AttributeAlreadySet",
4709
+ inputs: [
4710
+ {
4711
+ name: "selector",
4712
+ type: "bytes4"
4713
+ }
4714
+ ]
4715
+ },
4716
+ {
4717
+ type: "error",
4718
+ name: "AttributeViolatesRestriction",
4719
+ inputs: [
4720
+ {
4721
+ name: "selector",
4722
+ type: "bytes4"
4723
+ },
4724
+ {
4725
+ name: "restriction",
4726
+ type: "uint256"
4727
+ }
4728
+ ]
4729
+ },
4730
+ {
4731
+ type: "error",
4732
+ name: "BundleAlreadyProcessed",
4733
+ inputs: [
4734
+ {
4735
+ name: "bundleHash",
4736
+ type: "bytes32"
4737
+ }
4738
+ ]
4739
+ },
4740
+ {
4741
+ type: "error",
4742
+ name: "CallAlreadyExecuted",
4743
+ inputs: [
4744
+ {
4745
+ name: "bundleHash",
4746
+ type: "bytes32"
4747
+ },
4748
+ {
4749
+ name: "callIndex",
4750
+ type: "uint256"
4751
+ }
4752
+ ]
4753
+ },
4754
+ {
4755
+ type: "error",
4756
+ name: "CallNotExecutable",
4757
+ inputs: [
4758
+ {
4759
+ name: "bundleHash",
4760
+ type: "bytes32"
4761
+ },
4762
+ {
4763
+ name: "callIndex",
4764
+ type: "uint256"
4765
+ }
4766
+ ]
4767
+ },
4768
+ {
4769
+ type: "error",
4770
+ name: "CanNotUnbundle",
4771
+ inputs: [
4772
+ {
4773
+ name: "bundleHash",
4774
+ type: "bytes32"
4775
+ }
4776
+ ]
4777
+ },
4778
+ {
4779
+ type: "error",
4780
+ name: "DestinationChainNotRegistered",
4781
+ inputs: [
4782
+ {
4783
+ name: "destinationChainId",
4784
+ type: "uint256"
4785
+ }
4786
+ ]
4787
+ },
4788
+ {
4789
+ type: "error",
4790
+ name: "ExecutingNotAllowed",
4791
+ inputs: [
4792
+ {
4793
+ name: "bundleHash",
4794
+ type: "bytes32"
4795
+ },
4796
+ {
4797
+ name: "callerAddress",
4798
+ type: "bytes"
4799
+ },
4800
+ {
4801
+ name: "executionAddress",
4802
+ type: "bytes"
4803
+ }
4804
+ ]
4805
+ },
4806
+ {
4807
+ type: "error",
4808
+ name: "FeeWithdrawalFailed",
4809
+ inputs: []
4810
+ },
4811
+ {
4812
+ type: "error",
4813
+ name: "IndirectCallValueMismatch",
4814
+ inputs: [
4815
+ {
4816
+ name: "expected",
4817
+ type: "uint256"
4818
+ },
4819
+ {
4820
+ name: "actual",
4821
+ type: "uint256"
4822
+ }
4823
+ ]
4824
+ },
4825
+ {
4826
+ type: "error",
4827
+ name: "InteroperableAddressChainReferenceNotEmpty",
4828
+ inputs: [
4829
+ {
4830
+ name: "interoperableAddress",
4831
+ type: "bytes"
4832
+ }
4833
+ ]
4834
+ },
4835
+ {
4836
+ type: "error",
4837
+ name: "InteroperableAddressNotEmpty",
4838
+ inputs: [
4839
+ {
4840
+ name: "interoperableAddress",
4841
+ type: "bytes"
4842
+ }
4843
+ ]
4844
+ },
4845
+ {
4846
+ type: "error",
4847
+ name: "InvalidInteropBundleVersion",
4848
+ inputs: []
4849
+ },
4850
+ {
4851
+ type: "error",
4852
+ name: "InvalidInteropCallVersion",
4853
+ inputs: []
4854
+ },
4855
+ {
4856
+ type: "error",
4857
+ name: "InteropRootAlreadyExists",
4858
+ inputs: []
4859
+ },
4860
+ {
4861
+ type: "error",
4862
+ name: "MessageNotIncluded",
4863
+ inputs: []
4864
+ },
4865
+ {
4866
+ type: "error",
4867
+ name: "SidesLengthNotOne",
4868
+ inputs: []
4869
+ },
4870
+ {
4871
+ type: "error",
4872
+ name: "UnauthorizedMessageSender",
4873
+ inputs: [
4874
+ {
4875
+ name: "expected",
4876
+ type: "address"
4877
+ },
4878
+ {
4879
+ name: "actual",
4880
+ type: "address"
4881
+ }
4882
+ ]
4883
+ },
4884
+ {
4885
+ type: "error",
4886
+ name: "UnbundlingNotAllowed",
4887
+ inputs: [
4888
+ {
4889
+ name: "bundleHash",
4890
+ type: "bytes32"
4891
+ },
4892
+ {
4893
+ name: "callerAddress",
4894
+ type: "bytes"
4895
+ },
4896
+ {
4897
+ name: "unbundlerAddress",
4898
+ type: "bytes"
4899
+ }
4900
+ ]
4901
+ },
4902
+ {
4903
+ type: "error",
4904
+ name: "WrongCallStatusLength",
4905
+ inputs: [
4906
+ {
4907
+ name: "bundleCallsLength",
4908
+ type: "uint256"
4909
+ },
4910
+ {
4911
+ name: "providedCallStatusLength",
4912
+ type: "uint256"
4913
+ }
4914
+ ]
4915
+ },
4916
+ {
4917
+ type: "error",
4918
+ name: "WrongDestinationChainId",
4919
+ inputs: [
4920
+ {
4921
+ name: "bundleHash",
4922
+ type: "bytes32"
4923
+ },
4924
+ {
4925
+ name: "expected",
4926
+ type: "uint256"
4927
+ },
4928
+ {
4929
+ name: "actual",
4930
+ type: "uint256"
4931
+ }
4932
+ ]
4933
+ },
4934
+ {
4935
+ type: "error",
4936
+ name: "WrongDestinationBaseTokenAssetId",
4937
+ inputs: [
4938
+ {
4939
+ name: "bundleHash",
4940
+ type: "bytes32"
4941
+ },
4942
+ {
4943
+ name: "expected",
4944
+ type: "bytes32"
4945
+ },
4946
+ {
4947
+ name: "actual",
4948
+ type: "bytes32"
4949
+ }
4950
+ ]
4951
+ },
4952
+ {
4953
+ type: "error",
4954
+ name: "WrongSourceChainId",
4955
+ inputs: [
4956
+ {
4957
+ name: "bundleHash",
4958
+ type: "bytes32"
4959
+ },
4960
+ {
4961
+ name: "expected",
4962
+ type: "uint256"
4963
+ },
4964
+ {
4965
+ name: "actual",
4966
+ type: "uint256"
4967
+ }
4968
+ ]
4969
+ },
4970
+ {
4971
+ type: "error",
4972
+ name: "ZKTokenNotAvailable",
4973
+ inputs: []
4974
+ }
4975
+ ];
4976
+ var IInteropErrors_default = IInteropErrorsABI;
4977
+
4978
+ // src/core/internal/abis/IL1ContractErrors.ts
4979
+ var IL1ContractErrorsABI = [
4980
+ {
4981
+ type: "error",
4982
+ name: "AccessToFallbackDenied",
4983
+ inputs: [
4984
+ { name: "target", type: "address" },
4985
+ { name: "invoker", type: "address" }
4986
+ ]
4987
+ },
4988
+ {
4989
+ type: "error",
4990
+ name: "AccessToFunctionDenied",
4991
+ inputs: [
4992
+ { name: "target", type: "address" },
4993
+ { name: "selector", type: "bytes4" },
4994
+ { name: "invoker", type: "address" }
4995
+ ]
4996
+ },
4997
+ { type: "error", name: "AddressAlreadySet", inputs: [{ name: "addr", type: "address" }] },
4998
+ { type: "error", name: "AddressHasNoCode", inputs: [{ name: "", type: "address" }] },
4999
+ {
5000
+ type: "error",
5001
+ name: "AddressMismatch",
5002
+ inputs: [
5003
+ { name: "expected", type: "address" },
5004
+ { name: "supplied", type: "address" }
5005
+ ]
5006
+ },
5007
+ { type: "error", name: "AlreadyPermanentRollup", inputs: [] },
5008
+ { type: "error", name: "AlreadyWhitelisted", inputs: [{ name: "", type: "address" }] },
5009
+ { type: "error", name: "AmountMustBeGreaterThanZero", inputs: [] },
5010
+ {
5011
+ type: "error",
5012
+ name: "AssetHandlerDoesNotExist",
5013
+ inputs: [{ name: "assetId", type: "bytes32" }]
5014
+ },
5015
+ {
5016
+ type: "error",
5017
+ name: "AssetHandlerNotRegistered",
5018
+ inputs: [{ name: "assetId", type: "bytes32" }]
5019
+ },
5020
+ { type: "error", name: "AssetIdAlreadyRegistered", inputs: [] },
5021
+ {
5022
+ type: "error",
5023
+ name: "AssetIdMismatch",
5024
+ inputs: [
5025
+ { name: "expected", type: "bytes32" },
5026
+ { name: "supplied", type: "bytes32" }
5027
+ ]
5028
+ },
5029
+ { type: "error", name: "AssetIdNotSupported", inputs: [{ name: "assetId", type: "bytes32" }] },
5030
+ { type: "error", name: "AssetRouterAllowanceNotZero", inputs: [] },
5031
+ { type: "error", name: "BaseTokenGasPriceDenominatorNotSet", inputs: [] },
5032
+ {
5033
+ type: "error",
5034
+ name: "BatchHashMismatch",
5035
+ inputs: [
5036
+ { name: "expected", type: "bytes32" },
5037
+ { name: "actual", type: "bytes32" }
5038
+ ]
5039
+ },
5040
+ { type: "error", name: "BatchNotExecuted", inputs: [{ name: "batchNumber", type: "uint256" }] },
5041
+ {
5042
+ type: "error",
5043
+ name: "BatchNumberMismatch",
5044
+ inputs: [
5045
+ { name: "expectedBatchNumber", type: "uint256" },
5046
+ { name: "providedBatchNumber", type: "uint256" }
5047
+ ]
5048
+ },
5049
+ { type: "error", name: "BridgeHubAlreadyRegistered", inputs: [] },
5050
+ { type: "error", name: "BridgeMintNotImplemented", inputs: [] },
5051
+ { type: "error", name: "BurningNativeWETHNotSupported", inputs: [] },
5052
+ {
5053
+ type: "error",
5054
+ name: "BytecodeAlreadyPublished",
5055
+ inputs: [{ name: "bytecodeHash", type: "bytes32" }]
5056
+ },
5057
+ { type: "error", name: "CallerNotTimerAdmin", inputs: [] },
5058
+ { type: "error", name: "CallNotAllowed", inputs: [{ name: "call", type: "bytes" }] },
5059
+ { type: "error", name: "CanOnlyProcessOneBatch", inputs: [] },
5060
+ { type: "error", name: "CantExecuteUnprovenBatches", inputs: [] },
5061
+ { type: "error", name: "CantRevertExecutedBatch", inputs: [] },
5062
+ { type: "error", name: "ChainAlreadyLive", inputs: [] },
5063
+ { type: "error", name: "ChainIdAlreadyExists", inputs: [] },
5064
+ { type: "error", name: "ChainIdCantBeCurrentChain", inputs: [] },
5065
+ { type: "error", name: "ChainIdMismatch", inputs: [] },
5066
+ { type: "error", name: "ChainIdNotRegistered", inputs: [{ name: "chainId", type: "uint256" }] },
5067
+ { type: "error", name: "ChainIdTooBig", inputs: [] },
5068
+ { type: "error", name: "CTMAlreadyRegistered", inputs: [] },
5069
+ { type: "error", name: "CTMNotRegistered", inputs: [] },
5070
+ { type: "error", name: "DeadlineNotYetPassed", inputs: [] },
5071
+ { type: "error", name: "DefaultAdminTransferNotAllowed", inputs: [] },
5072
+ { type: "error", name: "DelegateCallFailed", inputs: [{ name: "returnData", type: "bytes" }] },
5073
+ { type: "error", name: "DenominatorIsZero", inputs: [] },
5074
+ { type: "error", name: "DeployFailed", inputs: [] },
5075
+ { type: "error", name: "DeployingBridgedTokenForNativeToken", inputs: [] },
5076
+ { type: "error", name: "DepositDoesNotExist", inputs: [] },
5077
+ { type: "error", name: "DepositExists", inputs: [] },
5078
+ { type: "error", name: "DiamondAlreadyFrozen", inputs: [] },
5079
+ { type: "error", name: "DiamondNotFrozen", inputs: [] },
5080
+ { type: "error", name: "EmptyAddress", inputs: [] },
5081
+ { type: "error", name: "EmptyAssetId", inputs: [] },
5082
+ { type: "error", name: "EmptyBytes32", inputs: [] },
5083
+ { type: "error", name: "EmptyData", inputs: [] },
5084
+ { type: "error", name: "EmptyDeposit", inputs: [] },
5085
+ { type: "error", name: "EmptyPrecommitData", inputs: [{ name: "batchNumber", type: "uint256" }] },
5086
+ { type: "error", name: "EmptyProofLength", inputs: [] },
5087
+ { type: "error", name: "ETHDepositNotSupported", inputs: [] },
5088
+ {
5089
+ type: "error",
5090
+ name: "FacetExists",
5091
+ inputs: [
5092
+ { name: "selector", type: "bytes4" },
5093
+ { name: "", type: "address" }
5094
+ ]
5095
+ },
5096
+ { type: "error", name: "GasPerPubdataMismatch", inputs: [] },
5097
+ { type: "error", name: "GenesisBatchCommitmentZero", inputs: [] },
5098
+ { type: "error", name: "GenesisBatchHashZero", inputs: [] },
5099
+ { type: "error", name: "GenesisIndexStorageZero", inputs: [] },
5100
+ { type: "error", name: "GenesisUpgradeZero", inputs: [] },
5101
+ { type: "error", name: "HashedLogIsDefault", inputs: [] },
5102
+ {
5103
+ type: "error",
5104
+ name: "HashMismatch",
5105
+ inputs: [
5106
+ { name: "expected", type: "bytes32" },
5107
+ { name: "actual", type: "bytes32" }
5108
+ ]
5109
+ },
5110
+ {
5111
+ type: "error",
5112
+ name: "IncorrectBatchBounds",
5113
+ inputs: [
5114
+ { name: "processFromExpected", type: "uint256" },
5115
+ { name: "processToExpected", type: "uint256" },
5116
+ { name: "processFromProvided", type: "uint256" },
5117
+ { name: "processToProvided", type: "uint256" }
5118
+ ]
5119
+ },
5120
+ {
5121
+ type: "error",
5122
+ name: "IncorrectBridgeHubAddress",
5123
+ inputs: [{ name: "bridgehub", type: "address" }]
5124
+ },
5125
+ {
5126
+ type: "error",
5127
+ name: "IncorrectTokenAddressFromNTV",
5128
+ inputs: [
5129
+ { name: "assetId", type: "bytes32" },
5130
+ { name: "tokenAddress", type: "address" }
5131
+ ]
5132
+ },
5133
+ { type: "error", name: "InsufficientChainBalance", inputs: [] },
5134
+ {
5135
+ type: "error",
5136
+ name: "InvalidBatchNumber",
5137
+ inputs: [
5138
+ { name: "provided", type: "uint256" },
5139
+ { name: "expected", type: "uint256" }
5140
+ ]
5141
+ },
5142
+ { type: "error", name: "InvalidCaller", inputs: [{ name: "", type: "address" }] },
5143
+ { type: "error", name: "InvalidDAForPermanentRollup", inputs: [] },
5144
+ { type: "error", name: "InvalidDelay", inputs: [] },
5145
+ {
5146
+ type: "error",
5147
+ name: "InvalidLogSender",
5148
+ inputs: [
5149
+ { name: "sender", type: "address" },
5150
+ { name: "logKey", type: "uint256" }
5151
+ ]
5152
+ },
5153
+ {
5154
+ type: "error",
5155
+ name: "InvalidMessageRoot",
5156
+ inputs: [
5157
+ { name: "expectedMessageRoot", type: "bytes32" },
5158
+ { name: "providedMessageRoot", type: "bytes32" }
5159
+ ]
5160
+ },
5161
+ { type: "error", name: "InvalidNTVBurnData", inputs: [] },
5162
+ {
5163
+ type: "error",
5164
+ name: "InvalidNumberOfBlobs",
5165
+ inputs: [
5166
+ { name: "expected", type: "uint256" },
5167
+ { name: "numCommitments", type: "uint256" },
5168
+ { name: "numHashes", type: "uint256" }
5169
+ ]
5170
+ },
5171
+ {
5172
+ type: "error",
5173
+ name: "InvalidPackedPrecommitmentLength",
5174
+ inputs: [{ name: "length", type: "uint256" }]
5175
+ },
5176
+ { type: "error", name: "InvalidProof", inputs: [] },
5177
+ { type: "error", name: "InvalidProofLengthForFinalNode", inputs: [] },
5178
+ { type: "error", name: "InvalidProtocolVersion", inputs: [] },
5179
+ { type: "error", name: "InvalidPubdataPricingMode", inputs: [] },
5180
+ { type: "error", name: "InvalidSelector", inputs: [{ name: "func", type: "bytes4" }] },
5181
+ { type: "error", name: "InvalidSystemLogsLength", inputs: [] },
5182
+ { type: "error", name: "InvalidUpgradeTxn", inputs: [{ name: "", type: "uint8" }] },
5183
+ { type: "error", name: "L2TimestampTooBig", inputs: [] },
5184
+ {
5185
+ type: "error",
5186
+ name: "L2WithdrawalMessageWrongLength",
5187
+ inputs: [{ name: "messageLen", type: "uint256" }]
5188
+ },
5189
+ { type: "error", name: "LegacyBridgeNotSet", inputs: [] },
5190
+ { type: "error", name: "LegacyBridgeUsesNonNativeToken", inputs: [] },
5191
+ { type: "error", name: "LegacyEncodingUsedForNonL1Token", inputs: [] },
5192
+ { type: "error", name: "LegacyMethodForNonL1Token", inputs: [] },
5193
+ {
5194
+ type: "error",
5195
+ name: "LengthIsNotDivisibleBy32",
5196
+ inputs: [{ name: "length", type: "uint256" }]
5197
+ },
5198
+ { type: "error", name: "LogAlreadyProcessed", inputs: [{ name: "", type: "uint8" }] },
5199
+ { type: "error", name: "MalformedBytecode", inputs: [{ name: "", type: "uint8" }] },
5200
+ { type: "error", name: "MerkleIndexOrHeightMismatch", inputs: [] },
5201
+ { type: "error", name: "MerkleIndexOutOfBounds", inputs: [] },
5202
+ { type: "error", name: "MerkleNothingToProve", inputs: [] },
5203
+ { type: "error", name: "MerklePathEmpty", inputs: [] },
5204
+ {
5205
+ type: "error",
5206
+ name: "MerklePathLengthMismatch",
5207
+ inputs: [
5208
+ { name: "pathLength", type: "uint256" },
5209
+ { name: "expectedLength", type: "uint256" }
5210
+ ]
5211
+ },
5212
+ { type: "error", name: "MerklePathOutOfBounds", inputs: [] },
5213
+ {
5214
+ type: "error",
5215
+ name: "MerkleWrongIndex",
5216
+ inputs: [
5217
+ { name: "index", type: "uint256" },
5218
+ { name: "maxNodeNumber", type: "uint256" }
5219
+ ]
5220
+ },
5221
+ {
5222
+ type: "error",
5223
+ name: "MerkleWrongLength",
5224
+ inputs: [
5225
+ { name: "newLeavesLength", type: "uint256" },
5226
+ { name: "leafNumber", type: "uint256" }
5227
+ ]
5228
+ },
5229
+ { type: "error", name: "MigrationPaused", inputs: [] },
5230
+ { type: "error", name: "MigrationsNotPaused", inputs: [] },
5231
+ {
5232
+ type: "error",
5233
+ name: "MissingSystemLogs",
5234
+ inputs: [
5235
+ { name: "expected", type: "uint256" },
5236
+ { name: "actual", type: "uint256" }
5237
+ ]
5238
+ },
5239
+ {
5240
+ type: "error",
5241
+ name: "MsgValueMismatch",
5242
+ inputs: [
5243
+ { name: "expectedMsgValue", type: "uint256" },
5244
+ { name: "providedMsgValue", type: "uint256" }
5245
+ ]
5246
+ },
5247
+ {
5248
+ type: "error",
5249
+ name: "MsgValueTooLow",
5250
+ inputs: [
5251
+ { name: "required", type: "uint256" },
5252
+ { name: "provided", type: "uint256" }
5253
+ ]
5254
+ },
5255
+ { type: "error", name: "NewDeadlineExceedsMaxDeadline", inputs: [] },
5256
+ { type: "error", name: "NewDeadlineNotGreaterThanCurrent", inputs: [] },
5257
+ { type: "error", name: "NoCallsProvided", inputs: [] },
5258
+ { type: "error", name: "NoCTMForAssetId", inputs: [{ name: "assetId", type: "bytes32" }] },
5259
+ { type: "error", name: "NoFunctionsForDiamondCut", inputs: [] },
5260
+ { type: "error", name: "NoFundsTransferred", inputs: [] },
5261
+ { type: "error", name: "NoLegacySharedBridge", inputs: [] },
5262
+ { type: "error", name: "NonEmptyCalldata", inputs: [] },
5263
+ { type: "error", name: "NonEmptyMsgValue", inputs: [] },
5264
+ { type: "error", name: "NonIncreasingTimestamp", inputs: [] },
5265
+ { type: "error", name: "NonSequentialBatch", inputs: [] },
5266
+ { type: "error", name: "NonSequentialVersion", inputs: [] },
5267
+ { type: "error", name: "NotAllowed", inputs: [{ name: "addr", type: "address" }] },
5268
+ { type: "error", name: "NotARestriction", inputs: [{ name: "addr", type: "address" }] },
5269
+ { type: "error", name: "NotAZKChain", inputs: [{ name: "addr", type: "address" }] },
5270
+ { type: "error", name: "NotInitializedReentrancyGuard", inputs: [] },
5271
+ { type: "error", name: "NotWhitelisted", inputs: [{ name: "", type: "address" }] },
5272
+ { type: "error", name: "OnlyEraSupported", inputs: [] },
5273
+ { type: "error", name: "OnlySelfAllowed", inputs: [] },
5274
+ { type: "error", name: "OperationExists", inputs: [] },
5275
+ { type: "error", name: "OperationMustBePending", inputs: [] },
5276
+ { type: "error", name: "OperationMustBeReady", inputs: [] },
5277
+ { type: "error", name: "OriginChainIdNotFound", inputs: [] },
5278
+ {
5279
+ type: "error",
5280
+ name: "PrecommitmentMismatch",
5281
+ inputs: [
5282
+ { name: "batchNumber", type: "uint256" },
5283
+ { name: "expected", type: "bytes32" },
5284
+ { name: "found", type: "bytes32" }
5285
+ ]
5286
+ },
5287
+ { type: "error", name: "PreviousOperationNotExecuted", inputs: [] },
5288
+ { type: "error", name: "PriorityOperationsRollingHashMismatch", inputs: [] },
5289
+ { type: "error", name: "PriorityTxPubdataExceedsMaxPubDataPerBatch", inputs: [] },
5290
+ {
5291
+ type: "error",
5292
+ name: "ProtocolIdMismatch",
5293
+ inputs: [
5294
+ { name: "expectedProtocolVersion", type: "uint256" },
5295
+ { name: "providedProtocolId", type: "uint256" }
5296
+ ]
5297
+ },
5298
+ { type: "error", name: "ProtocolIdNotGreater", inputs: [] },
5299
+ {
5300
+ type: "error",
5301
+ name: "PubdataGreaterThanLimit",
5302
+ inputs: [
5303
+ { name: "limit", type: "uint256" },
5304
+ { name: "length", type: "uint256" }
5305
+ ]
5306
+ },
5307
+ { type: "error", name: "QueueIsEmpty", inputs: [] },
5308
+ { type: "error", name: "Reentrancy", inputs: [] },
5309
+ {
5310
+ type: "error",
5311
+ name: "RemoveFunctionFacetAddressNotZero",
5312
+ inputs: [{ name: "facet", type: "address" }]
5313
+ },
5314
+ { type: "error", name: "RemoveFunctionFacetAddressZero", inputs: [] },
5315
+ { type: "error", name: "RemovingPermanentRestriction", inputs: [] },
5316
+ { type: "error", name: "ReplaceFunctionFacetAddressZero", inputs: [] },
5317
+ {
5318
+ type: "error",
5319
+ name: "RestrictionWasAlreadyPresent",
5320
+ inputs: [{ name: "restriction", type: "address" }]
5321
+ },
5322
+ {
5323
+ type: "error",
5324
+ name: "RestrictionWasNotPresent",
5325
+ inputs: [{ name: "restriction", type: "address" }]
5326
+ },
5327
+ { type: "error", name: "RevertedBatchNotAfterNewLastBatch", inputs: [] },
5328
+ {
5329
+ type: "error",
5330
+ name: "RoleAccessDenied",
5331
+ inputs: [
5332
+ { name: "chainAddress", type: "address" },
5333
+ { name: "role", type: "bytes32" },
5334
+ { name: "account", type: "address" }
5335
+ ]
5336
+ },
5337
+ { type: "error", name: "SelectorsMustAllHaveSameFreezability", inputs: [] },
5338
+ { type: "error", name: "SettlementLayersMustSettleOnL1", inputs: [] },
5339
+ { type: "error", name: "SharedBridgeNotSet", inputs: [] },
5340
+ { type: "error", name: "SharedBridgeValueNotSet", inputs: [{ name: "", type: "uint8" }] },
5341
+ { type: "error", name: "SlotOccupied", inputs: [] },
5342
+ { type: "error", name: "SystemLogsSizeTooBig", inputs: [] },
5343
+ {
5344
+ type: "error",
5345
+ name: "TimeNotReached",
5346
+ inputs: [
5347
+ { name: "expectedTimestamp", type: "uint256" },
5348
+ { name: "actualTimestamp", type: "uint256" }
5349
+ ]
5350
+ },
5351
+ { type: "error", name: "TimerAlreadyStarted", inputs: [] },
5352
+ { type: "error", name: "TimestampError", inputs: [] },
5353
+ { type: "error", name: "TokenIsLegacy", inputs: [] },
5354
+ { type: "error", name: "TokenNotLegacy", inputs: [] },
5355
+ { type: "error", name: "TokenNotSupported", inputs: [{ name: "token", type: "address" }] },
5356
+ { type: "error", name: "TokensWithFeesNotSupported", inputs: [] },
5357
+ { type: "error", name: "TooHighDeploymentNonce", inputs: [] },
5358
+ { type: "error", name: "TooManyFactoryDeps", inputs: [] },
5359
+ { type: "error", name: "TooMuchGas", inputs: [] },
5360
+ { type: "error", name: "TransactionNotAllowed", inputs: [] },
5361
+ { type: "error", name: "TxHashMismatch", inputs: [] },
5362
+ { type: "error", name: "TxnBodyGasLimitNotEnoughGas", inputs: [] },
5363
+ {
5364
+ type: "error",
5365
+ name: "UnallowedImplementation",
5366
+ inputs: [{ name: "implementationHash", type: "bytes32" }]
5367
+ },
5368
+ { type: "error", name: "Unauthorized", inputs: [{ name: "caller", type: "address" }] },
5369
+ { type: "error", name: "UndefinedDiamondCutAction", inputs: [] },
5370
+ { type: "error", name: "UnexpectedSystemLog", inputs: [{ name: "logKey", type: "uint256" }] },
5371
+ { type: "error", name: "UnknownVerifierType", inputs: [] },
5372
+ {
5373
+ type: "error",
5374
+ name: "UnsupportedCommitBatchEncoding",
5375
+ inputs: [{ name: "version", type: "uint8" }]
5376
+ },
5377
+ { type: "error", name: "UnsupportedEncodingVersion", inputs: [] },
5378
+ {
5379
+ type: "error",
5380
+ name: "UnsupportedExecuteBatchEncoding",
5381
+ inputs: [{ name: "version", type: "uint8" }]
5382
+ },
5383
+ {
5384
+ type: "error",
5385
+ name: "UnsupportedProofBatchEncoding",
5386
+ inputs: [{ name: "version", type: "uint8" }]
5387
+ },
5388
+ { type: "error", name: "UpgradeBatchNumberIsNotZero", inputs: [] },
5389
+ { type: "error", name: "ValidateTxnNotEnoughGas", inputs: [] },
5390
+ {
5391
+ type: "error",
5392
+ name: "ValueMismatch",
5393
+ inputs: [
5394
+ { name: "expected", type: "uint256" },
5395
+ { name: "actual", type: "uint256" }
5396
+ ]
5397
+ },
5398
+ { type: "error", name: "VerifiedBatchesExceedsCommittedBatches", inputs: [] },
5399
+ { type: "error", name: "WithdrawalAlreadyFinalized", inputs: [] },
5400
+ { type: "error", name: "WithdrawFailed", inputs: [] },
5401
+ { type: "error", name: "WrappedBaseTokenAlreadyRegistered", inputs: [] },
5402
+ {
5403
+ type: "error",
5404
+ name: "WrongMagicValue",
5405
+ inputs: [
5406
+ { name: "expectedMagicValue", type: "uint256" },
5407
+ { name: "providedMagicValue", type: "uint256" }
5408
+ ]
5409
+ },
5410
+ { type: "error", name: "ZeroAddress", inputs: [] },
5411
+ { type: "error", name: "ZeroChainId", inputs: [] },
5412
+ { type: "error", name: "ZKChainLimitReached", inputs: [] }
5413
+ ];
5414
+ var IL1ContractErrors_default = IL1ContractErrorsABI;
5415
+
4704
5416
  // src/core/types/fees.ts
4705
5417
  function toGasOverrides(overrides) {
4706
5418
  const { nonce: _, ...gas } = overrides;
@@ -5081,6 +5793,14 @@ var IFACE_PANIC = new ethers.Interface(["error Panic(uint256)"]);
5081
5793
  ERROR_IFACES.push({ name: "Mailbox", iface: new ethers.Interface(Mailbox_default) });
5082
5794
  } catch {
5083
5795
  }
5796
+ try {
5797
+ ERROR_IFACES.push({ name: "IL1ContractErrors", iface: new ethers.Interface(IL1ContractErrors_default) });
5798
+ } catch {
5799
+ }
5800
+ try {
5801
+ ERROR_IFACES.push({ name: "IInteropErrors", iface: new ethers.Interface(IInteropErrors_default) });
5802
+ } catch {
5803
+ }
5084
5804
  })();
5085
5805
  function extractRevertData(e) {
5086
5806
  const maybe = (
@@ -8520,17 +9240,20 @@ function createInteropResource(client, tokens, contracts, attributes) {
8520
9240
  }
8521
9241
  } catch (e) {
8522
9242
  if (isZKsyncError(e)) throw e;
8523
- throw createError("EXECUTION", {
8524
- resource: "interop",
8525
- operation: "interop.create.sendTransaction",
8526
- message: "Failed to send or confirm an interop transaction step.",
8527
- context: {
8528
- step: step.key,
8529
- txHash: hash,
8530
- nonce: Number(step.tx.nonce ?? -1)
9243
+ throw toZKsyncError(
9244
+ "EXECUTION",
9245
+ {
9246
+ resource: "interop",
9247
+ operation: "interop.create.sendTransaction",
9248
+ message: "Failed to send or confirm an interop transaction step.",
9249
+ context: {
9250
+ step: step.key,
9251
+ txHash: hash,
9252
+ nonce: Number(step.tx.nonce ?? -1)
9253
+ }
8531
9254
  },
8532
- cause: e
8533
- });
9255
+ e
9256
+ );
8534
9257
  }
8535
9258
  }
8536
9259
  const last = Object.values(stepHashes).pop();