@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.
- package/README.md +13 -0
- package/dist/adapters/ethers/client.cjs +722 -4
- package/dist/adapters/ethers/client.cjs.map +1 -1
- package/dist/adapters/ethers/client.js +6 -6
- package/dist/adapters/ethers/index.cjs +774 -45
- package/dist/adapters/ethers/index.cjs.map +1 -1
- package/dist/adapters/ethers/index.js +9 -9
- package/dist/adapters/ethers/resources/deposits/services/gas.d.ts +4 -4
- package/dist/adapters/ethers/sdk.cjs +772 -41
- package/dist/adapters/ethers/sdk.cjs.map +1 -1
- package/dist/adapters/ethers/sdk.js +7 -7
- package/dist/adapters/viem/client.cjs +2 -4
- package/dist/adapters/viem/client.cjs.map +1 -1
- package/dist/adapters/viem/client.js +6 -6
- package/dist/adapters/viem/index.cjs +38 -33
- package/dist/adapters/viem/index.cjs.map +1 -1
- package/dist/adapters/viem/index.js +9 -9
- package/dist/adapters/viem/resources/deposits/services/gas.d.ts +4 -4
- package/dist/adapters/viem/sdk.cjs +36 -29
- package/dist/adapters/viem/sdk.cjs.map +1 -1
- package/dist/adapters/viem/sdk.js +7 -7
- package/dist/{chunk-EWBYKU4G.js → chunk-2RIARDXZ.js} +4 -4
- package/dist/{chunk-USXSAFYA.js → chunk-4S4XDA4N.js} +4 -6
- package/dist/{chunk-H3BPVVMN.js → chunk-53MC5BR2.js} +1 -1
- package/dist/{chunk-IQVH7YZT.js → chunk-5L6EYUJB.js} +2 -2
- package/dist/{chunk-QUI3J42E.js → chunk-5R7L5NM5.js} +2 -2
- package/dist/{chunk-ZVHFVUDE.js → chunk-E3KP7XCG.js} +1 -1
- package/dist/{chunk-CCUAGJ6K.js → chunk-EDWBCPO3.js} +40 -33
- package/dist/{chunk-6IT5PEEN.js → chunk-HI64OOAR.js} +1 -1
- package/dist/{chunk-TL26ZONW.js → chunk-JHO2UQ5F.js} +56 -45
- package/dist/{chunk-C3AGOEHR.js → chunk-QQ2OR434.js} +1 -1
- package/dist/{chunk-FXSFLZ6D.js → chunk-R5WRFPK2.js} +4 -4
- package/dist/{chunk-QFEYV4O3.js → chunk-RI73VJSH.js} +716 -2
- package/dist/{chunk-N4PR5SVB.js → chunk-UDBRUBEK.js} +10 -2
- package/dist/core/abi.d.ts +2 -0
- package/dist/core/constants.cjs +1 -1
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/index.cjs +716 -4
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +5 -5
- package/dist/core/internal/abis/IInteropErrors.d.ts +197 -0
- package/dist/core/internal/abis/IL1ContractErrors.d.ts +1021 -0
- package/dist/core/rpc/types.d.ts +1 -1
- package/dist/index.cjs +717 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -62,7 +62,7 @@ var TX_OVERHEAD_GAS = 10000n;
|
|
|
62
62
|
var TX_MEMORY_OVERHEAD_GAS = 10n;
|
|
63
63
|
var DEFAULT_PUBDATA_BYTES = 155n;
|
|
64
64
|
var DEFAULT_ABI_BYTES = 400n;
|
|
65
|
-
var SAFE_L1_BRIDGE_GAS =
|
|
65
|
+
var SAFE_L1_BRIDGE_GAS = 800000n;
|
|
66
66
|
var L1_FEE_ESTIMATION_COEF_NUMERATOR = 12;
|
|
67
67
|
var L1_FEE_ESTIMATION_COEF_DENOMINATOR = 10;
|
|
68
68
|
|
|
@@ -74,9 +74,11 @@ __export(abi_exports, {
|
|
|
74
74
|
IERC20ABI: () => IERC20_default,
|
|
75
75
|
IERC7786AttributesABI: () => IERC7786Attributes_default,
|
|
76
76
|
IInteropCenterABI: () => IInteropCenter_default,
|
|
77
|
+
IInteropErrorsABI: () => IInteropErrors_default,
|
|
77
78
|
IInteropHandlerABI: () => IInteropHandler_default,
|
|
78
79
|
IInteropRootStorageABI: () => IInteropRootStorage_default,
|
|
79
80
|
IL1AssetRouterABI: () => IL1AssetRouter_default,
|
|
81
|
+
IL1ContractErrorsABI: () => IL1ContractErrors_default,
|
|
80
82
|
IL1NullifierABI: () => IL1Nullifier_default,
|
|
81
83
|
IL2AssetRouterABI: () => IL2AssetRouter_default,
|
|
82
84
|
L1NativeTokenVaultABI: () => L1NativeTokenVault_default,
|
|
@@ -5995,6 +5997,718 @@ var L2MessageVerificationABI = [
|
|
|
5995
5997
|
];
|
|
5996
5998
|
var L2MessageVerification_default = L2MessageVerificationABI;
|
|
5997
5999
|
|
|
6000
|
+
// src/core/internal/abis/IInteropErrors.ts
|
|
6001
|
+
var IInteropErrorsABI = [
|
|
6002
|
+
{
|
|
6003
|
+
type: "error",
|
|
6004
|
+
name: "AttributeAlreadySet",
|
|
6005
|
+
inputs: [
|
|
6006
|
+
{
|
|
6007
|
+
name: "selector",
|
|
6008
|
+
type: "bytes4"
|
|
6009
|
+
}
|
|
6010
|
+
]
|
|
6011
|
+
},
|
|
6012
|
+
{
|
|
6013
|
+
type: "error",
|
|
6014
|
+
name: "AttributeViolatesRestriction",
|
|
6015
|
+
inputs: [
|
|
6016
|
+
{
|
|
6017
|
+
name: "selector",
|
|
6018
|
+
type: "bytes4"
|
|
6019
|
+
},
|
|
6020
|
+
{
|
|
6021
|
+
name: "restriction",
|
|
6022
|
+
type: "uint256"
|
|
6023
|
+
}
|
|
6024
|
+
]
|
|
6025
|
+
},
|
|
6026
|
+
{
|
|
6027
|
+
type: "error",
|
|
6028
|
+
name: "BundleAlreadyProcessed",
|
|
6029
|
+
inputs: [
|
|
6030
|
+
{
|
|
6031
|
+
name: "bundleHash",
|
|
6032
|
+
type: "bytes32"
|
|
6033
|
+
}
|
|
6034
|
+
]
|
|
6035
|
+
},
|
|
6036
|
+
{
|
|
6037
|
+
type: "error",
|
|
6038
|
+
name: "CallAlreadyExecuted",
|
|
6039
|
+
inputs: [
|
|
6040
|
+
{
|
|
6041
|
+
name: "bundleHash",
|
|
6042
|
+
type: "bytes32"
|
|
6043
|
+
},
|
|
6044
|
+
{
|
|
6045
|
+
name: "callIndex",
|
|
6046
|
+
type: "uint256"
|
|
6047
|
+
}
|
|
6048
|
+
]
|
|
6049
|
+
},
|
|
6050
|
+
{
|
|
6051
|
+
type: "error",
|
|
6052
|
+
name: "CallNotExecutable",
|
|
6053
|
+
inputs: [
|
|
6054
|
+
{
|
|
6055
|
+
name: "bundleHash",
|
|
6056
|
+
type: "bytes32"
|
|
6057
|
+
},
|
|
6058
|
+
{
|
|
6059
|
+
name: "callIndex",
|
|
6060
|
+
type: "uint256"
|
|
6061
|
+
}
|
|
6062
|
+
]
|
|
6063
|
+
},
|
|
6064
|
+
{
|
|
6065
|
+
type: "error",
|
|
6066
|
+
name: "CanNotUnbundle",
|
|
6067
|
+
inputs: [
|
|
6068
|
+
{
|
|
6069
|
+
name: "bundleHash",
|
|
6070
|
+
type: "bytes32"
|
|
6071
|
+
}
|
|
6072
|
+
]
|
|
6073
|
+
},
|
|
6074
|
+
{
|
|
6075
|
+
type: "error",
|
|
6076
|
+
name: "DestinationChainNotRegistered",
|
|
6077
|
+
inputs: [
|
|
6078
|
+
{
|
|
6079
|
+
name: "destinationChainId",
|
|
6080
|
+
type: "uint256"
|
|
6081
|
+
}
|
|
6082
|
+
]
|
|
6083
|
+
},
|
|
6084
|
+
{
|
|
6085
|
+
type: "error",
|
|
6086
|
+
name: "ExecutingNotAllowed",
|
|
6087
|
+
inputs: [
|
|
6088
|
+
{
|
|
6089
|
+
name: "bundleHash",
|
|
6090
|
+
type: "bytes32"
|
|
6091
|
+
},
|
|
6092
|
+
{
|
|
6093
|
+
name: "callerAddress",
|
|
6094
|
+
type: "bytes"
|
|
6095
|
+
},
|
|
6096
|
+
{
|
|
6097
|
+
name: "executionAddress",
|
|
6098
|
+
type: "bytes"
|
|
6099
|
+
}
|
|
6100
|
+
]
|
|
6101
|
+
},
|
|
6102
|
+
{
|
|
6103
|
+
type: "error",
|
|
6104
|
+
name: "FeeWithdrawalFailed",
|
|
6105
|
+
inputs: []
|
|
6106
|
+
},
|
|
6107
|
+
{
|
|
6108
|
+
type: "error",
|
|
6109
|
+
name: "IndirectCallValueMismatch",
|
|
6110
|
+
inputs: [
|
|
6111
|
+
{
|
|
6112
|
+
name: "expected",
|
|
6113
|
+
type: "uint256"
|
|
6114
|
+
},
|
|
6115
|
+
{
|
|
6116
|
+
name: "actual",
|
|
6117
|
+
type: "uint256"
|
|
6118
|
+
}
|
|
6119
|
+
]
|
|
6120
|
+
},
|
|
6121
|
+
{
|
|
6122
|
+
type: "error",
|
|
6123
|
+
name: "InteroperableAddressChainReferenceNotEmpty",
|
|
6124
|
+
inputs: [
|
|
6125
|
+
{
|
|
6126
|
+
name: "interoperableAddress",
|
|
6127
|
+
type: "bytes"
|
|
6128
|
+
}
|
|
6129
|
+
]
|
|
6130
|
+
},
|
|
6131
|
+
{
|
|
6132
|
+
type: "error",
|
|
6133
|
+
name: "InteroperableAddressNotEmpty",
|
|
6134
|
+
inputs: [
|
|
6135
|
+
{
|
|
6136
|
+
name: "interoperableAddress",
|
|
6137
|
+
type: "bytes"
|
|
6138
|
+
}
|
|
6139
|
+
]
|
|
6140
|
+
},
|
|
6141
|
+
{
|
|
6142
|
+
type: "error",
|
|
6143
|
+
name: "InvalidInteropBundleVersion",
|
|
6144
|
+
inputs: []
|
|
6145
|
+
},
|
|
6146
|
+
{
|
|
6147
|
+
type: "error",
|
|
6148
|
+
name: "InvalidInteropCallVersion",
|
|
6149
|
+
inputs: []
|
|
6150
|
+
},
|
|
6151
|
+
{
|
|
6152
|
+
type: "error",
|
|
6153
|
+
name: "InteropRootAlreadyExists",
|
|
6154
|
+
inputs: []
|
|
6155
|
+
},
|
|
6156
|
+
{
|
|
6157
|
+
type: "error",
|
|
6158
|
+
name: "MessageNotIncluded",
|
|
6159
|
+
inputs: []
|
|
6160
|
+
},
|
|
6161
|
+
{
|
|
6162
|
+
type: "error",
|
|
6163
|
+
name: "SidesLengthNotOne",
|
|
6164
|
+
inputs: []
|
|
6165
|
+
},
|
|
6166
|
+
{
|
|
6167
|
+
type: "error",
|
|
6168
|
+
name: "UnauthorizedMessageSender",
|
|
6169
|
+
inputs: [
|
|
6170
|
+
{
|
|
6171
|
+
name: "expected",
|
|
6172
|
+
type: "address"
|
|
6173
|
+
},
|
|
6174
|
+
{
|
|
6175
|
+
name: "actual",
|
|
6176
|
+
type: "address"
|
|
6177
|
+
}
|
|
6178
|
+
]
|
|
6179
|
+
},
|
|
6180
|
+
{
|
|
6181
|
+
type: "error",
|
|
6182
|
+
name: "UnbundlingNotAllowed",
|
|
6183
|
+
inputs: [
|
|
6184
|
+
{
|
|
6185
|
+
name: "bundleHash",
|
|
6186
|
+
type: "bytes32"
|
|
6187
|
+
},
|
|
6188
|
+
{
|
|
6189
|
+
name: "callerAddress",
|
|
6190
|
+
type: "bytes"
|
|
6191
|
+
},
|
|
6192
|
+
{
|
|
6193
|
+
name: "unbundlerAddress",
|
|
6194
|
+
type: "bytes"
|
|
6195
|
+
}
|
|
6196
|
+
]
|
|
6197
|
+
},
|
|
6198
|
+
{
|
|
6199
|
+
type: "error",
|
|
6200
|
+
name: "WrongCallStatusLength",
|
|
6201
|
+
inputs: [
|
|
6202
|
+
{
|
|
6203
|
+
name: "bundleCallsLength",
|
|
6204
|
+
type: "uint256"
|
|
6205
|
+
},
|
|
6206
|
+
{
|
|
6207
|
+
name: "providedCallStatusLength",
|
|
6208
|
+
type: "uint256"
|
|
6209
|
+
}
|
|
6210
|
+
]
|
|
6211
|
+
},
|
|
6212
|
+
{
|
|
6213
|
+
type: "error",
|
|
6214
|
+
name: "WrongDestinationChainId",
|
|
6215
|
+
inputs: [
|
|
6216
|
+
{
|
|
6217
|
+
name: "bundleHash",
|
|
6218
|
+
type: "bytes32"
|
|
6219
|
+
},
|
|
6220
|
+
{
|
|
6221
|
+
name: "expected",
|
|
6222
|
+
type: "uint256"
|
|
6223
|
+
},
|
|
6224
|
+
{
|
|
6225
|
+
name: "actual",
|
|
6226
|
+
type: "uint256"
|
|
6227
|
+
}
|
|
6228
|
+
]
|
|
6229
|
+
},
|
|
6230
|
+
{
|
|
6231
|
+
type: "error",
|
|
6232
|
+
name: "WrongDestinationBaseTokenAssetId",
|
|
6233
|
+
inputs: [
|
|
6234
|
+
{
|
|
6235
|
+
name: "bundleHash",
|
|
6236
|
+
type: "bytes32"
|
|
6237
|
+
},
|
|
6238
|
+
{
|
|
6239
|
+
name: "expected",
|
|
6240
|
+
type: "bytes32"
|
|
6241
|
+
},
|
|
6242
|
+
{
|
|
6243
|
+
name: "actual",
|
|
6244
|
+
type: "bytes32"
|
|
6245
|
+
}
|
|
6246
|
+
]
|
|
6247
|
+
},
|
|
6248
|
+
{
|
|
6249
|
+
type: "error",
|
|
6250
|
+
name: "WrongSourceChainId",
|
|
6251
|
+
inputs: [
|
|
6252
|
+
{
|
|
6253
|
+
name: "bundleHash",
|
|
6254
|
+
type: "bytes32"
|
|
6255
|
+
},
|
|
6256
|
+
{
|
|
6257
|
+
name: "expected",
|
|
6258
|
+
type: "uint256"
|
|
6259
|
+
},
|
|
6260
|
+
{
|
|
6261
|
+
name: "actual",
|
|
6262
|
+
type: "uint256"
|
|
6263
|
+
}
|
|
6264
|
+
]
|
|
6265
|
+
},
|
|
6266
|
+
{
|
|
6267
|
+
type: "error",
|
|
6268
|
+
name: "ZKTokenNotAvailable",
|
|
6269
|
+
inputs: []
|
|
6270
|
+
}
|
|
6271
|
+
];
|
|
6272
|
+
var IInteropErrors_default = IInteropErrorsABI;
|
|
6273
|
+
|
|
6274
|
+
// src/core/internal/abis/IL1ContractErrors.ts
|
|
6275
|
+
var IL1ContractErrorsABI = [
|
|
6276
|
+
{
|
|
6277
|
+
type: "error",
|
|
6278
|
+
name: "AccessToFallbackDenied",
|
|
6279
|
+
inputs: [
|
|
6280
|
+
{ name: "target", type: "address" },
|
|
6281
|
+
{ name: "invoker", type: "address" }
|
|
6282
|
+
]
|
|
6283
|
+
},
|
|
6284
|
+
{
|
|
6285
|
+
type: "error",
|
|
6286
|
+
name: "AccessToFunctionDenied",
|
|
6287
|
+
inputs: [
|
|
6288
|
+
{ name: "target", type: "address" },
|
|
6289
|
+
{ name: "selector", type: "bytes4" },
|
|
6290
|
+
{ name: "invoker", type: "address" }
|
|
6291
|
+
]
|
|
6292
|
+
},
|
|
6293
|
+
{ type: "error", name: "AddressAlreadySet", inputs: [{ name: "addr", type: "address" }] },
|
|
6294
|
+
{ type: "error", name: "AddressHasNoCode", inputs: [{ name: "", type: "address" }] },
|
|
6295
|
+
{
|
|
6296
|
+
type: "error",
|
|
6297
|
+
name: "AddressMismatch",
|
|
6298
|
+
inputs: [
|
|
6299
|
+
{ name: "expected", type: "address" },
|
|
6300
|
+
{ name: "supplied", type: "address" }
|
|
6301
|
+
]
|
|
6302
|
+
},
|
|
6303
|
+
{ type: "error", name: "AlreadyPermanentRollup", inputs: [] },
|
|
6304
|
+
{ type: "error", name: "AlreadyWhitelisted", inputs: [{ name: "", type: "address" }] },
|
|
6305
|
+
{ type: "error", name: "AmountMustBeGreaterThanZero", inputs: [] },
|
|
6306
|
+
{
|
|
6307
|
+
type: "error",
|
|
6308
|
+
name: "AssetHandlerDoesNotExist",
|
|
6309
|
+
inputs: [{ name: "assetId", type: "bytes32" }]
|
|
6310
|
+
},
|
|
6311
|
+
{
|
|
6312
|
+
type: "error",
|
|
6313
|
+
name: "AssetHandlerNotRegistered",
|
|
6314
|
+
inputs: [{ name: "assetId", type: "bytes32" }]
|
|
6315
|
+
},
|
|
6316
|
+
{ type: "error", name: "AssetIdAlreadyRegistered", inputs: [] },
|
|
6317
|
+
{
|
|
6318
|
+
type: "error",
|
|
6319
|
+
name: "AssetIdMismatch",
|
|
6320
|
+
inputs: [
|
|
6321
|
+
{ name: "expected", type: "bytes32" },
|
|
6322
|
+
{ name: "supplied", type: "bytes32" }
|
|
6323
|
+
]
|
|
6324
|
+
},
|
|
6325
|
+
{ type: "error", name: "AssetIdNotSupported", inputs: [{ name: "assetId", type: "bytes32" }] },
|
|
6326
|
+
{ type: "error", name: "AssetRouterAllowanceNotZero", inputs: [] },
|
|
6327
|
+
{ type: "error", name: "BaseTokenGasPriceDenominatorNotSet", inputs: [] },
|
|
6328
|
+
{
|
|
6329
|
+
type: "error",
|
|
6330
|
+
name: "BatchHashMismatch",
|
|
6331
|
+
inputs: [
|
|
6332
|
+
{ name: "expected", type: "bytes32" },
|
|
6333
|
+
{ name: "actual", type: "bytes32" }
|
|
6334
|
+
]
|
|
6335
|
+
},
|
|
6336
|
+
{ type: "error", name: "BatchNotExecuted", inputs: [{ name: "batchNumber", type: "uint256" }] },
|
|
6337
|
+
{
|
|
6338
|
+
type: "error",
|
|
6339
|
+
name: "BatchNumberMismatch",
|
|
6340
|
+
inputs: [
|
|
6341
|
+
{ name: "expectedBatchNumber", type: "uint256" },
|
|
6342
|
+
{ name: "providedBatchNumber", type: "uint256" }
|
|
6343
|
+
]
|
|
6344
|
+
},
|
|
6345
|
+
{ type: "error", name: "BridgeHubAlreadyRegistered", inputs: [] },
|
|
6346
|
+
{ type: "error", name: "BridgeMintNotImplemented", inputs: [] },
|
|
6347
|
+
{ type: "error", name: "BurningNativeWETHNotSupported", inputs: [] },
|
|
6348
|
+
{
|
|
6349
|
+
type: "error",
|
|
6350
|
+
name: "BytecodeAlreadyPublished",
|
|
6351
|
+
inputs: [{ name: "bytecodeHash", type: "bytes32" }]
|
|
6352
|
+
},
|
|
6353
|
+
{ type: "error", name: "CallerNotTimerAdmin", inputs: [] },
|
|
6354
|
+
{ type: "error", name: "CallNotAllowed", inputs: [{ name: "call", type: "bytes" }] },
|
|
6355
|
+
{ type: "error", name: "CanOnlyProcessOneBatch", inputs: [] },
|
|
6356
|
+
{ type: "error", name: "CantExecuteUnprovenBatches", inputs: [] },
|
|
6357
|
+
{ type: "error", name: "CantRevertExecutedBatch", inputs: [] },
|
|
6358
|
+
{ type: "error", name: "ChainAlreadyLive", inputs: [] },
|
|
6359
|
+
{ type: "error", name: "ChainIdAlreadyExists", inputs: [] },
|
|
6360
|
+
{ type: "error", name: "ChainIdCantBeCurrentChain", inputs: [] },
|
|
6361
|
+
{ type: "error", name: "ChainIdMismatch", inputs: [] },
|
|
6362
|
+
{ type: "error", name: "ChainIdNotRegistered", inputs: [{ name: "chainId", type: "uint256" }] },
|
|
6363
|
+
{ type: "error", name: "ChainIdTooBig", inputs: [] },
|
|
6364
|
+
{ type: "error", name: "CTMAlreadyRegistered", inputs: [] },
|
|
6365
|
+
{ type: "error", name: "CTMNotRegistered", inputs: [] },
|
|
6366
|
+
{ type: "error", name: "DeadlineNotYetPassed", inputs: [] },
|
|
6367
|
+
{ type: "error", name: "DefaultAdminTransferNotAllowed", inputs: [] },
|
|
6368
|
+
{ type: "error", name: "DelegateCallFailed", inputs: [{ name: "returnData", type: "bytes" }] },
|
|
6369
|
+
{ type: "error", name: "DenominatorIsZero", inputs: [] },
|
|
6370
|
+
{ type: "error", name: "DeployFailed", inputs: [] },
|
|
6371
|
+
{ type: "error", name: "DeployingBridgedTokenForNativeToken", inputs: [] },
|
|
6372
|
+
{ type: "error", name: "DepositDoesNotExist", inputs: [] },
|
|
6373
|
+
{ type: "error", name: "DepositExists", inputs: [] },
|
|
6374
|
+
{ type: "error", name: "DiamondAlreadyFrozen", inputs: [] },
|
|
6375
|
+
{ type: "error", name: "DiamondNotFrozen", inputs: [] },
|
|
6376
|
+
{ type: "error", name: "EmptyAddress", inputs: [] },
|
|
6377
|
+
{ type: "error", name: "EmptyAssetId", inputs: [] },
|
|
6378
|
+
{ type: "error", name: "EmptyBytes32", inputs: [] },
|
|
6379
|
+
{ type: "error", name: "EmptyData", inputs: [] },
|
|
6380
|
+
{ type: "error", name: "EmptyDeposit", inputs: [] },
|
|
6381
|
+
{ type: "error", name: "EmptyPrecommitData", inputs: [{ name: "batchNumber", type: "uint256" }] },
|
|
6382
|
+
{ type: "error", name: "EmptyProofLength", inputs: [] },
|
|
6383
|
+
{ type: "error", name: "ETHDepositNotSupported", inputs: [] },
|
|
6384
|
+
{
|
|
6385
|
+
type: "error",
|
|
6386
|
+
name: "FacetExists",
|
|
6387
|
+
inputs: [
|
|
6388
|
+
{ name: "selector", type: "bytes4" },
|
|
6389
|
+
{ name: "", type: "address" }
|
|
6390
|
+
]
|
|
6391
|
+
},
|
|
6392
|
+
{ type: "error", name: "GasPerPubdataMismatch", inputs: [] },
|
|
6393
|
+
{ type: "error", name: "GenesisBatchCommitmentZero", inputs: [] },
|
|
6394
|
+
{ type: "error", name: "GenesisBatchHashZero", inputs: [] },
|
|
6395
|
+
{ type: "error", name: "GenesisIndexStorageZero", inputs: [] },
|
|
6396
|
+
{ type: "error", name: "GenesisUpgradeZero", inputs: [] },
|
|
6397
|
+
{ type: "error", name: "HashedLogIsDefault", inputs: [] },
|
|
6398
|
+
{
|
|
6399
|
+
type: "error",
|
|
6400
|
+
name: "HashMismatch",
|
|
6401
|
+
inputs: [
|
|
6402
|
+
{ name: "expected", type: "bytes32" },
|
|
6403
|
+
{ name: "actual", type: "bytes32" }
|
|
6404
|
+
]
|
|
6405
|
+
},
|
|
6406
|
+
{
|
|
6407
|
+
type: "error",
|
|
6408
|
+
name: "IncorrectBatchBounds",
|
|
6409
|
+
inputs: [
|
|
6410
|
+
{ name: "processFromExpected", type: "uint256" },
|
|
6411
|
+
{ name: "processToExpected", type: "uint256" },
|
|
6412
|
+
{ name: "processFromProvided", type: "uint256" },
|
|
6413
|
+
{ name: "processToProvided", type: "uint256" }
|
|
6414
|
+
]
|
|
6415
|
+
},
|
|
6416
|
+
{
|
|
6417
|
+
type: "error",
|
|
6418
|
+
name: "IncorrectBridgeHubAddress",
|
|
6419
|
+
inputs: [{ name: "bridgehub", type: "address" }]
|
|
6420
|
+
},
|
|
6421
|
+
{
|
|
6422
|
+
type: "error",
|
|
6423
|
+
name: "IncorrectTokenAddressFromNTV",
|
|
6424
|
+
inputs: [
|
|
6425
|
+
{ name: "assetId", type: "bytes32" },
|
|
6426
|
+
{ name: "tokenAddress", type: "address" }
|
|
6427
|
+
]
|
|
6428
|
+
},
|
|
6429
|
+
{ type: "error", name: "InsufficientChainBalance", inputs: [] },
|
|
6430
|
+
{
|
|
6431
|
+
type: "error",
|
|
6432
|
+
name: "InvalidBatchNumber",
|
|
6433
|
+
inputs: [
|
|
6434
|
+
{ name: "provided", type: "uint256" },
|
|
6435
|
+
{ name: "expected", type: "uint256" }
|
|
6436
|
+
]
|
|
6437
|
+
},
|
|
6438
|
+
{ type: "error", name: "InvalidCaller", inputs: [{ name: "", type: "address" }] },
|
|
6439
|
+
{ type: "error", name: "InvalidDAForPermanentRollup", inputs: [] },
|
|
6440
|
+
{ type: "error", name: "InvalidDelay", inputs: [] },
|
|
6441
|
+
{
|
|
6442
|
+
type: "error",
|
|
6443
|
+
name: "InvalidLogSender",
|
|
6444
|
+
inputs: [
|
|
6445
|
+
{ name: "sender", type: "address" },
|
|
6446
|
+
{ name: "logKey", type: "uint256" }
|
|
6447
|
+
]
|
|
6448
|
+
},
|
|
6449
|
+
{
|
|
6450
|
+
type: "error",
|
|
6451
|
+
name: "InvalidMessageRoot",
|
|
6452
|
+
inputs: [
|
|
6453
|
+
{ name: "expectedMessageRoot", type: "bytes32" },
|
|
6454
|
+
{ name: "providedMessageRoot", type: "bytes32" }
|
|
6455
|
+
]
|
|
6456
|
+
},
|
|
6457
|
+
{ type: "error", name: "InvalidNTVBurnData", inputs: [] },
|
|
6458
|
+
{
|
|
6459
|
+
type: "error",
|
|
6460
|
+
name: "InvalidNumberOfBlobs",
|
|
6461
|
+
inputs: [
|
|
6462
|
+
{ name: "expected", type: "uint256" },
|
|
6463
|
+
{ name: "numCommitments", type: "uint256" },
|
|
6464
|
+
{ name: "numHashes", type: "uint256" }
|
|
6465
|
+
]
|
|
6466
|
+
},
|
|
6467
|
+
{
|
|
6468
|
+
type: "error",
|
|
6469
|
+
name: "InvalidPackedPrecommitmentLength",
|
|
6470
|
+
inputs: [{ name: "length", type: "uint256" }]
|
|
6471
|
+
},
|
|
6472
|
+
{ type: "error", name: "InvalidProof", inputs: [] },
|
|
6473
|
+
{ type: "error", name: "InvalidProofLengthForFinalNode", inputs: [] },
|
|
6474
|
+
{ type: "error", name: "InvalidProtocolVersion", inputs: [] },
|
|
6475
|
+
{ type: "error", name: "InvalidPubdataPricingMode", inputs: [] },
|
|
6476
|
+
{ type: "error", name: "InvalidSelector", inputs: [{ name: "func", type: "bytes4" }] },
|
|
6477
|
+
{ type: "error", name: "InvalidSystemLogsLength", inputs: [] },
|
|
6478
|
+
{ type: "error", name: "InvalidUpgradeTxn", inputs: [{ name: "", type: "uint8" }] },
|
|
6479
|
+
{ type: "error", name: "L2TimestampTooBig", inputs: [] },
|
|
6480
|
+
{
|
|
6481
|
+
type: "error",
|
|
6482
|
+
name: "L2WithdrawalMessageWrongLength",
|
|
6483
|
+
inputs: [{ name: "messageLen", type: "uint256" }]
|
|
6484
|
+
},
|
|
6485
|
+
{ type: "error", name: "LegacyBridgeNotSet", inputs: [] },
|
|
6486
|
+
{ type: "error", name: "LegacyBridgeUsesNonNativeToken", inputs: [] },
|
|
6487
|
+
{ type: "error", name: "LegacyEncodingUsedForNonL1Token", inputs: [] },
|
|
6488
|
+
{ type: "error", name: "LegacyMethodForNonL1Token", inputs: [] },
|
|
6489
|
+
{
|
|
6490
|
+
type: "error",
|
|
6491
|
+
name: "LengthIsNotDivisibleBy32",
|
|
6492
|
+
inputs: [{ name: "length", type: "uint256" }]
|
|
6493
|
+
},
|
|
6494
|
+
{ type: "error", name: "LogAlreadyProcessed", inputs: [{ name: "", type: "uint8" }] },
|
|
6495
|
+
{ type: "error", name: "MalformedBytecode", inputs: [{ name: "", type: "uint8" }] },
|
|
6496
|
+
{ type: "error", name: "MerkleIndexOrHeightMismatch", inputs: [] },
|
|
6497
|
+
{ type: "error", name: "MerkleIndexOutOfBounds", inputs: [] },
|
|
6498
|
+
{ type: "error", name: "MerkleNothingToProve", inputs: [] },
|
|
6499
|
+
{ type: "error", name: "MerklePathEmpty", inputs: [] },
|
|
6500
|
+
{
|
|
6501
|
+
type: "error",
|
|
6502
|
+
name: "MerklePathLengthMismatch",
|
|
6503
|
+
inputs: [
|
|
6504
|
+
{ name: "pathLength", type: "uint256" },
|
|
6505
|
+
{ name: "expectedLength", type: "uint256" }
|
|
6506
|
+
]
|
|
6507
|
+
},
|
|
6508
|
+
{ type: "error", name: "MerklePathOutOfBounds", inputs: [] },
|
|
6509
|
+
{
|
|
6510
|
+
type: "error",
|
|
6511
|
+
name: "MerkleWrongIndex",
|
|
6512
|
+
inputs: [
|
|
6513
|
+
{ name: "index", type: "uint256" },
|
|
6514
|
+
{ name: "maxNodeNumber", type: "uint256" }
|
|
6515
|
+
]
|
|
6516
|
+
},
|
|
6517
|
+
{
|
|
6518
|
+
type: "error",
|
|
6519
|
+
name: "MerkleWrongLength",
|
|
6520
|
+
inputs: [
|
|
6521
|
+
{ name: "newLeavesLength", type: "uint256" },
|
|
6522
|
+
{ name: "leafNumber", type: "uint256" }
|
|
6523
|
+
]
|
|
6524
|
+
},
|
|
6525
|
+
{ type: "error", name: "MigrationPaused", inputs: [] },
|
|
6526
|
+
{ type: "error", name: "MigrationsNotPaused", inputs: [] },
|
|
6527
|
+
{
|
|
6528
|
+
type: "error",
|
|
6529
|
+
name: "MissingSystemLogs",
|
|
6530
|
+
inputs: [
|
|
6531
|
+
{ name: "expected", type: "uint256" },
|
|
6532
|
+
{ name: "actual", type: "uint256" }
|
|
6533
|
+
]
|
|
6534
|
+
},
|
|
6535
|
+
{
|
|
6536
|
+
type: "error",
|
|
6537
|
+
name: "MsgValueMismatch",
|
|
6538
|
+
inputs: [
|
|
6539
|
+
{ name: "expectedMsgValue", type: "uint256" },
|
|
6540
|
+
{ name: "providedMsgValue", type: "uint256" }
|
|
6541
|
+
]
|
|
6542
|
+
},
|
|
6543
|
+
{
|
|
6544
|
+
type: "error",
|
|
6545
|
+
name: "MsgValueTooLow",
|
|
6546
|
+
inputs: [
|
|
6547
|
+
{ name: "required", type: "uint256" },
|
|
6548
|
+
{ name: "provided", type: "uint256" }
|
|
6549
|
+
]
|
|
6550
|
+
},
|
|
6551
|
+
{ type: "error", name: "NewDeadlineExceedsMaxDeadline", inputs: [] },
|
|
6552
|
+
{ type: "error", name: "NewDeadlineNotGreaterThanCurrent", inputs: [] },
|
|
6553
|
+
{ type: "error", name: "NoCallsProvided", inputs: [] },
|
|
6554
|
+
{ type: "error", name: "NoCTMForAssetId", inputs: [{ name: "assetId", type: "bytes32" }] },
|
|
6555
|
+
{ type: "error", name: "NoFunctionsForDiamondCut", inputs: [] },
|
|
6556
|
+
{ type: "error", name: "NoFundsTransferred", inputs: [] },
|
|
6557
|
+
{ type: "error", name: "NoLegacySharedBridge", inputs: [] },
|
|
6558
|
+
{ type: "error", name: "NonEmptyCalldata", inputs: [] },
|
|
6559
|
+
{ type: "error", name: "NonEmptyMsgValue", inputs: [] },
|
|
6560
|
+
{ type: "error", name: "NonIncreasingTimestamp", inputs: [] },
|
|
6561
|
+
{ type: "error", name: "NonSequentialBatch", inputs: [] },
|
|
6562
|
+
{ type: "error", name: "NonSequentialVersion", inputs: [] },
|
|
6563
|
+
{ type: "error", name: "NotAllowed", inputs: [{ name: "addr", type: "address" }] },
|
|
6564
|
+
{ type: "error", name: "NotARestriction", inputs: [{ name: "addr", type: "address" }] },
|
|
6565
|
+
{ type: "error", name: "NotAZKChain", inputs: [{ name: "addr", type: "address" }] },
|
|
6566
|
+
{ type: "error", name: "NotInitializedReentrancyGuard", inputs: [] },
|
|
6567
|
+
{ type: "error", name: "NotWhitelisted", inputs: [{ name: "", type: "address" }] },
|
|
6568
|
+
{ type: "error", name: "OnlyEraSupported", inputs: [] },
|
|
6569
|
+
{ type: "error", name: "OnlySelfAllowed", inputs: [] },
|
|
6570
|
+
{ type: "error", name: "OperationExists", inputs: [] },
|
|
6571
|
+
{ type: "error", name: "OperationMustBePending", inputs: [] },
|
|
6572
|
+
{ type: "error", name: "OperationMustBeReady", inputs: [] },
|
|
6573
|
+
{ type: "error", name: "OriginChainIdNotFound", inputs: [] },
|
|
6574
|
+
{
|
|
6575
|
+
type: "error",
|
|
6576
|
+
name: "PrecommitmentMismatch",
|
|
6577
|
+
inputs: [
|
|
6578
|
+
{ name: "batchNumber", type: "uint256" },
|
|
6579
|
+
{ name: "expected", type: "bytes32" },
|
|
6580
|
+
{ name: "found", type: "bytes32" }
|
|
6581
|
+
]
|
|
6582
|
+
},
|
|
6583
|
+
{ type: "error", name: "PreviousOperationNotExecuted", inputs: [] },
|
|
6584
|
+
{ type: "error", name: "PriorityOperationsRollingHashMismatch", inputs: [] },
|
|
6585
|
+
{ type: "error", name: "PriorityTxPubdataExceedsMaxPubDataPerBatch", inputs: [] },
|
|
6586
|
+
{
|
|
6587
|
+
type: "error",
|
|
6588
|
+
name: "ProtocolIdMismatch",
|
|
6589
|
+
inputs: [
|
|
6590
|
+
{ name: "expectedProtocolVersion", type: "uint256" },
|
|
6591
|
+
{ name: "providedProtocolId", type: "uint256" }
|
|
6592
|
+
]
|
|
6593
|
+
},
|
|
6594
|
+
{ type: "error", name: "ProtocolIdNotGreater", inputs: [] },
|
|
6595
|
+
{
|
|
6596
|
+
type: "error",
|
|
6597
|
+
name: "PubdataGreaterThanLimit",
|
|
6598
|
+
inputs: [
|
|
6599
|
+
{ name: "limit", type: "uint256" },
|
|
6600
|
+
{ name: "length", type: "uint256" }
|
|
6601
|
+
]
|
|
6602
|
+
},
|
|
6603
|
+
{ type: "error", name: "QueueIsEmpty", inputs: [] },
|
|
6604
|
+
{ type: "error", name: "Reentrancy", inputs: [] },
|
|
6605
|
+
{
|
|
6606
|
+
type: "error",
|
|
6607
|
+
name: "RemoveFunctionFacetAddressNotZero",
|
|
6608
|
+
inputs: [{ name: "facet", type: "address" }]
|
|
6609
|
+
},
|
|
6610
|
+
{ type: "error", name: "RemoveFunctionFacetAddressZero", inputs: [] },
|
|
6611
|
+
{ type: "error", name: "RemovingPermanentRestriction", inputs: [] },
|
|
6612
|
+
{ type: "error", name: "ReplaceFunctionFacetAddressZero", inputs: [] },
|
|
6613
|
+
{
|
|
6614
|
+
type: "error",
|
|
6615
|
+
name: "RestrictionWasAlreadyPresent",
|
|
6616
|
+
inputs: [{ name: "restriction", type: "address" }]
|
|
6617
|
+
},
|
|
6618
|
+
{
|
|
6619
|
+
type: "error",
|
|
6620
|
+
name: "RestrictionWasNotPresent",
|
|
6621
|
+
inputs: [{ name: "restriction", type: "address" }]
|
|
6622
|
+
},
|
|
6623
|
+
{ type: "error", name: "RevertedBatchNotAfterNewLastBatch", inputs: [] },
|
|
6624
|
+
{
|
|
6625
|
+
type: "error",
|
|
6626
|
+
name: "RoleAccessDenied",
|
|
6627
|
+
inputs: [
|
|
6628
|
+
{ name: "chainAddress", type: "address" },
|
|
6629
|
+
{ name: "role", type: "bytes32" },
|
|
6630
|
+
{ name: "account", type: "address" }
|
|
6631
|
+
]
|
|
6632
|
+
},
|
|
6633
|
+
{ type: "error", name: "SelectorsMustAllHaveSameFreezability", inputs: [] },
|
|
6634
|
+
{ type: "error", name: "SettlementLayersMustSettleOnL1", inputs: [] },
|
|
6635
|
+
{ type: "error", name: "SharedBridgeNotSet", inputs: [] },
|
|
6636
|
+
{ type: "error", name: "SharedBridgeValueNotSet", inputs: [{ name: "", type: "uint8" }] },
|
|
6637
|
+
{ type: "error", name: "SlotOccupied", inputs: [] },
|
|
6638
|
+
{ type: "error", name: "SystemLogsSizeTooBig", inputs: [] },
|
|
6639
|
+
{
|
|
6640
|
+
type: "error",
|
|
6641
|
+
name: "TimeNotReached",
|
|
6642
|
+
inputs: [
|
|
6643
|
+
{ name: "expectedTimestamp", type: "uint256" },
|
|
6644
|
+
{ name: "actualTimestamp", type: "uint256" }
|
|
6645
|
+
]
|
|
6646
|
+
},
|
|
6647
|
+
{ type: "error", name: "TimerAlreadyStarted", inputs: [] },
|
|
6648
|
+
{ type: "error", name: "TimestampError", inputs: [] },
|
|
6649
|
+
{ type: "error", name: "TokenIsLegacy", inputs: [] },
|
|
6650
|
+
{ type: "error", name: "TokenNotLegacy", inputs: [] },
|
|
6651
|
+
{ type: "error", name: "TokenNotSupported", inputs: [{ name: "token", type: "address" }] },
|
|
6652
|
+
{ type: "error", name: "TokensWithFeesNotSupported", inputs: [] },
|
|
6653
|
+
{ type: "error", name: "TooHighDeploymentNonce", inputs: [] },
|
|
6654
|
+
{ type: "error", name: "TooManyFactoryDeps", inputs: [] },
|
|
6655
|
+
{ type: "error", name: "TooMuchGas", inputs: [] },
|
|
6656
|
+
{ type: "error", name: "TransactionNotAllowed", inputs: [] },
|
|
6657
|
+
{ type: "error", name: "TxHashMismatch", inputs: [] },
|
|
6658
|
+
{ type: "error", name: "TxnBodyGasLimitNotEnoughGas", inputs: [] },
|
|
6659
|
+
{
|
|
6660
|
+
type: "error",
|
|
6661
|
+
name: "UnallowedImplementation",
|
|
6662
|
+
inputs: [{ name: "implementationHash", type: "bytes32" }]
|
|
6663
|
+
},
|
|
6664
|
+
{ type: "error", name: "Unauthorized", inputs: [{ name: "caller", type: "address" }] },
|
|
6665
|
+
{ type: "error", name: "UndefinedDiamondCutAction", inputs: [] },
|
|
6666
|
+
{ type: "error", name: "UnexpectedSystemLog", inputs: [{ name: "logKey", type: "uint256" }] },
|
|
6667
|
+
{ type: "error", name: "UnknownVerifierType", inputs: [] },
|
|
6668
|
+
{
|
|
6669
|
+
type: "error",
|
|
6670
|
+
name: "UnsupportedCommitBatchEncoding",
|
|
6671
|
+
inputs: [{ name: "version", type: "uint8" }]
|
|
6672
|
+
},
|
|
6673
|
+
{ type: "error", name: "UnsupportedEncodingVersion", inputs: [] },
|
|
6674
|
+
{
|
|
6675
|
+
type: "error",
|
|
6676
|
+
name: "UnsupportedExecuteBatchEncoding",
|
|
6677
|
+
inputs: [{ name: "version", type: "uint8" }]
|
|
6678
|
+
},
|
|
6679
|
+
{
|
|
6680
|
+
type: "error",
|
|
6681
|
+
name: "UnsupportedProofBatchEncoding",
|
|
6682
|
+
inputs: [{ name: "version", type: "uint8" }]
|
|
6683
|
+
},
|
|
6684
|
+
{ type: "error", name: "UpgradeBatchNumberIsNotZero", inputs: [] },
|
|
6685
|
+
{ type: "error", name: "ValidateTxnNotEnoughGas", inputs: [] },
|
|
6686
|
+
{
|
|
6687
|
+
type: "error",
|
|
6688
|
+
name: "ValueMismatch",
|
|
6689
|
+
inputs: [
|
|
6690
|
+
{ name: "expected", type: "uint256" },
|
|
6691
|
+
{ name: "actual", type: "uint256" }
|
|
6692
|
+
]
|
|
6693
|
+
},
|
|
6694
|
+
{ type: "error", name: "VerifiedBatchesExceedsCommittedBatches", inputs: [] },
|
|
6695
|
+
{ type: "error", name: "WithdrawalAlreadyFinalized", inputs: [] },
|
|
6696
|
+
{ type: "error", name: "WithdrawFailed", inputs: [] },
|
|
6697
|
+
{ type: "error", name: "WrappedBaseTokenAlreadyRegistered", inputs: [] },
|
|
6698
|
+
{
|
|
6699
|
+
type: "error",
|
|
6700
|
+
name: "WrongMagicValue",
|
|
6701
|
+
inputs: [
|
|
6702
|
+
{ name: "expectedMagicValue", type: "uint256" },
|
|
6703
|
+
{ name: "providedMagicValue", type: "uint256" }
|
|
6704
|
+
]
|
|
6705
|
+
},
|
|
6706
|
+
{ type: "error", name: "ZeroAddress", inputs: [] },
|
|
6707
|
+
{ type: "error", name: "ZeroChainId", inputs: [] },
|
|
6708
|
+
{ type: "error", name: "ZKChainLimitReached", inputs: [] }
|
|
6709
|
+
];
|
|
6710
|
+
var IL1ContractErrors_default = IL1ContractErrorsABI;
|
|
6711
|
+
|
|
5998
6712
|
// src/core/errors/factory.ts
|
|
5999
6713
|
var factory_exports = {};
|
|
6000
6714
|
__export(factory_exports, {
|
|
@@ -6299,8 +7013,8 @@ function ensureHex(value, field, context) {
|
|
|
6299
7013
|
});
|
|
6300
7014
|
}
|
|
6301
7015
|
function ensureNumber(value, field, opts) {
|
|
6302
|
-
const operation = opts?.operation
|
|
6303
|
-
const messagePrefix = opts?.messagePrefix
|
|
7016
|
+
const operation = opts?.operation;
|
|
7017
|
+
const messagePrefix = opts?.messagePrefix;
|
|
6304
7018
|
if (isNumber(value)) return value;
|
|
6305
7019
|
if (isBigint(value)) return Number(value);
|
|
6306
7020
|
if (typeof value === "string" && value.trim() !== "") {
|
|
@@ -6438,7 +7152,6 @@ function normalizeGenesis(raw) {
|
|
|
6438
7152
|
context: { valueType: typeof contractsRaw }
|
|
6439
7153
|
});
|
|
6440
7154
|
}
|
|
6441
|
-
const executionVersion = ensureNumber(record["execution_version"], "execution_version");
|
|
6442
7155
|
const genesisRoot = ensureHex(record["genesis_root"], "genesis_root", {});
|
|
6443
7156
|
const initialContracts = contractsRaw.map(
|
|
6444
7157
|
(entry, index) => normalizeContractTuple(entry, index)
|
|
@@ -6447,7 +7160,6 @@ function normalizeGenesis(raw) {
|
|
|
6447
7160
|
return {
|
|
6448
7161
|
initialContracts,
|
|
6449
7162
|
additionalStorage,
|
|
6450
|
-
executionVersion,
|
|
6451
7163
|
genesisRoot
|
|
6452
7164
|
};
|
|
6453
7165
|
} catch (e) {
|