@matterlabs/zksync-js 0.0.12 → 0.0.14
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/dist/adapters/ethers/client.cjs +735 -8
- package/dist/adapters/ethers/client.cjs.map +1 -1
- package/dist/adapters/ethers/client.js +7 -6
- package/dist/adapters/ethers/index.cjs +1421 -441
- package/dist/adapters/ethers/index.cjs.map +1 -1
- package/dist/adapters/ethers/index.js +10 -9
- package/dist/adapters/ethers/resources/deposits/routes/priority.d.ts +12 -0
- package/dist/adapters/ethers/resources/deposits/services/gas.d.ts +4 -0
- package/dist/adapters/ethers/resources/interop/index.d.ts +14 -14
- package/dist/adapters/ethers/resources/interop/resolvers.d.ts +3 -8
- package/dist/adapters/ethers/resources/interop/routes/types.d.ts +2 -1
- package/dist/adapters/ethers/resources/interop/services/erc20.d.ts +10 -0
- package/dist/adapters/ethers/resources/interop/services/fee.d.ts +12 -0
- package/dist/adapters/ethers/resources/interop/services/finalization/index.d.ts +1 -1
- package/dist/adapters/ethers/resources/interop/services/finalization/polling.d.ts +1 -1
- package/dist/adapters/ethers/resources/interop/types.d.ts +6 -14
- package/dist/adapters/ethers/sdk.cjs +3068 -1685
- package/dist/adapters/ethers/sdk.cjs.map +1 -1
- package/dist/adapters/ethers/sdk.d.ts +6 -1
- package/dist/adapters/ethers/sdk.js +8 -7
- package/dist/adapters/viem/client.cjs +10 -8
- package/dist/adapters/viem/client.cjs.map +1 -1
- package/dist/adapters/viem/client.js +7 -6
- package/dist/adapters/viem/index.cjs +317 -77
- package/dist/adapters/viem/index.cjs.map +1 -1
- package/dist/adapters/viem/index.js +10 -9
- package/dist/adapters/viem/resources/deposits/routes/priority.d.ts +13 -0
- package/dist/adapters/viem/resources/deposits/services/gas.d.ts +4 -0
- package/dist/adapters/viem/sdk.cjs +307 -69
- package/dist/adapters/viem/sdk.cjs.map +1 -1
- package/dist/adapters/viem/sdk.js +7 -7
- package/dist/{chunk-E3KP7XCG.js → chunk-3HHUZXSV.js} +1 -1
- package/dist/{chunk-4PFO3J7W.js → chunk-5RRJDPAJ.js} +10 -2
- package/dist/{chunk-AUN5Y2A3.js → chunk-75IOOODG.js} +253 -53
- package/dist/{chunk-LWA7LC3N.js → chunk-7CAVFIMW.js} +5 -4
- package/dist/chunk-BWKWWLY4.js +9 -0
- package/dist/{chunk-NBQVHW2N.js → chunk-DYJKK5FW.js} +19 -19
- package/dist/{chunk-I5VQBVQ2.js → chunk-EOBXYHTZ.js} +35 -7
- package/dist/{chunk-GMNLOTNG.js → chunk-HP3EWKJL.js} +1 -1
- package/dist/{chunk-IUSH7YBZ.js → chunk-J47RI3G7.js} +1 -1
- package/dist/{chunk-6CLYCJMV.js → chunk-JY62QO3W.js} +759 -22
- package/dist/{chunk-QQ2OR434.js → chunk-MT4X5FEO.js} +18 -2
- package/dist/{chunk-BGUNJK2H.js → chunk-OTXPSNNC.js} +5 -4
- package/dist/{chunk-TE2YQHVI.js → chunk-XDRCN4FC.js} +2 -2
- package/dist/{chunk-6JM4PE62.js → chunk-XKRNLFET.js} +407 -210
- package/dist/core/abi.d.ts +2 -0
- package/dist/core/constants.cjs +17 -1
- package/dist/core/constants.cjs.map +1 -1
- package/dist/core/constants.d.ts +9 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/index.cjs +768 -28
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +6 -5
- package/dist/core/internal/abis/IERC7786Attributes.d.ts +21 -11
- package/dist/core/internal/abis/IInteropCenter.d.ts +4 -0
- package/dist/core/internal/abis/IInteropErrors.d.ts +197 -0
- package/dist/core/internal/abis/IL1ContractErrors.d.ts +1021 -0
- package/dist/core/resources/deposits/priority.d.ts +37 -0
- package/dist/core/resources/interop/attributes/bundle.d.ts +1 -0
- package/dist/core/resources/interop/attributes/resource.d.ts +1 -0
- package/dist/core/resources/interop/plan.d.ts +11 -3
- package/dist/core/rpc/types.d.ts +1 -1
- package/dist/core/rpc/zks.d.ts +5 -1
- package/dist/core/types/errors.d.ts +5 -0
- package/dist/core/types/flows/interop.d.ts +11 -18
- package/dist/index.cjs +785 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,12 @@ __export(constants_exports, {
|
|
|
22
22
|
L1_FEE_ESTIMATION_COEF_NUMERATOR: () => L1_FEE_ESTIMATION_COEF_NUMERATOR,
|
|
23
23
|
L1_MESSENGER_ADDRESS: () => L1_MESSENGER_ADDRESS,
|
|
24
24
|
L1_SOPH_TOKEN_ADDRESS: () => L1_SOPH_TOKEN_ADDRESS,
|
|
25
|
+
L1_TX_DELTA_544_ENCODING_BYTES: () => L1_TX_DELTA_544_ENCODING_BYTES,
|
|
26
|
+
L1_TX_DELTA_FACTORY_DEPS_L2_GAS: () => L1_TX_DELTA_FACTORY_DEPS_L2_GAS,
|
|
27
|
+
L1_TX_DELTA_FACTORY_DEPS_PUBDATA: () => L1_TX_DELTA_FACTORY_DEPS_PUBDATA,
|
|
28
|
+
L1_TX_INTRINSIC_L2_GAS: () => L1_TX_INTRINSIC_L2_GAS,
|
|
29
|
+
L1_TX_INTRINSIC_PUBDATA: () => L1_TX_INTRINSIC_PUBDATA,
|
|
30
|
+
L1_TX_MIN_L2_GAS_BASE: () => L1_TX_MIN_L2_GAS_BASE,
|
|
25
31
|
L2_ASSET_ROUTER_ADDRESS: () => L2_ASSET_ROUTER_ADDRESS,
|
|
26
32
|
L2_BASE_TOKEN_ADDRESS: () => L2_BASE_TOKEN_ADDRESS,
|
|
27
33
|
L2_INTEROP_CENTER_ADDRESS: () => L2_INTEROP_CENTER_ADDRESS,
|
|
@@ -29,6 +35,7 @@ __export(constants_exports, {
|
|
|
29
35
|
L2_INTEROP_ROOT_STORAGE_ADDRESS: () => L2_INTEROP_ROOT_STORAGE_ADDRESS,
|
|
30
36
|
L2_MESSAGE_VERIFICATION_ADDRESS: () => L2_MESSAGE_VERIFICATION_ADDRESS,
|
|
31
37
|
L2_NATIVE_TOKEN_VAULT_ADDRESS: () => L2_NATIVE_TOKEN_VAULT_ADDRESS,
|
|
38
|
+
PRIORITY_TX_MAX_GAS_LIMIT: () => PRIORITY_TX_MAX_GAS_LIMIT,
|
|
32
39
|
SAFE_L1_BRIDGE_GAS: () => SAFE_L1_BRIDGE_GAS,
|
|
33
40
|
TOPIC_CANONICAL_ASSIGNED: () => TOPIC_CANONICAL_ASSIGNED,
|
|
34
41
|
TOPIC_CANONICAL_SUCCESS: () => TOPIC_CANONICAL_SUCCESS,
|
|
@@ -37,6 +44,7 @@ __export(constants_exports, {
|
|
|
37
44
|
TOPIC_L1_MESSAGE_SENT_NEW: () => TOPIC_L1_MESSAGE_SENT_NEW,
|
|
38
45
|
TX_MEMORY_OVERHEAD_GAS: () => TX_MEMORY_OVERHEAD_GAS,
|
|
39
46
|
TX_OVERHEAD_GAS: () => TX_OVERHEAD_GAS,
|
|
47
|
+
TX_SLOT_OVERHEAD_L2_GAS: () => TX_SLOT_OVERHEAD_L2_GAS,
|
|
40
48
|
k256hex: () => k256hex
|
|
41
49
|
});
|
|
42
50
|
var k256hex = (s) => `0x${utils.bytesToHex(sha3.keccak_256(utils.utf8ToBytes(s)))}`.toLowerCase();
|
|
@@ -62,7 +70,15 @@ var TX_OVERHEAD_GAS = 10000n;
|
|
|
62
70
|
var TX_MEMORY_OVERHEAD_GAS = 10n;
|
|
63
71
|
var DEFAULT_PUBDATA_BYTES = 155n;
|
|
64
72
|
var DEFAULT_ABI_BYTES = 400n;
|
|
65
|
-
var SAFE_L1_BRIDGE_GAS =
|
|
73
|
+
var SAFE_L1_BRIDGE_GAS = 3000000n;
|
|
74
|
+
var L1_TX_INTRINSIC_L2_GAS = 167157n;
|
|
75
|
+
var L1_TX_INTRINSIC_PUBDATA = 88n;
|
|
76
|
+
var L1_TX_MIN_L2_GAS_BASE = 173484n;
|
|
77
|
+
var L1_TX_DELTA_544_ENCODING_BYTES = 1656n;
|
|
78
|
+
var L1_TX_DELTA_FACTORY_DEPS_L2_GAS = 2473n;
|
|
79
|
+
var L1_TX_DELTA_FACTORY_DEPS_PUBDATA = 64n;
|
|
80
|
+
var TX_SLOT_OVERHEAD_L2_GAS = 10000n;
|
|
81
|
+
var PRIORITY_TX_MAX_GAS_LIMIT = 72000000n;
|
|
66
82
|
var L1_FEE_ESTIMATION_COEF_NUMERATOR = 12;
|
|
67
83
|
var L1_FEE_ESTIMATION_COEF_DENOMINATOR = 10;
|
|
68
84
|
|
|
@@ -74,9 +90,11 @@ __export(abi_exports, {
|
|
|
74
90
|
IERC20ABI: () => IERC20_default,
|
|
75
91
|
IERC7786AttributesABI: () => IERC7786Attributes_default,
|
|
76
92
|
IInteropCenterABI: () => IInteropCenter_default,
|
|
93
|
+
IInteropErrorsABI: () => IInteropErrors_default,
|
|
77
94
|
IInteropHandlerABI: () => IInteropHandler_default,
|
|
78
95
|
IInteropRootStorageABI: () => IInteropRootStorage_default,
|
|
79
96
|
IL1AssetRouterABI: () => IL1AssetRouter_default,
|
|
97
|
+
IL1ContractErrorsABI: () => IL1ContractErrors_default,
|
|
80
98
|
IL1NullifierABI: () => IL1Nullifier_default,
|
|
81
99
|
IL2AssetRouterABI: () => IL2AssetRouter_default,
|
|
82
100
|
L1NativeTokenVaultABI: () => L1NativeTokenVault_default,
|
|
@@ -4200,56 +4218,69 @@ var IERC20_default = IERC20ABI;
|
|
|
4200
4218
|
// src/core/internal/abis/IERC7786Attributes.ts
|
|
4201
4219
|
var IERC7786AttributesABI = [
|
|
4202
4220
|
{
|
|
4221
|
+
type: "function",
|
|
4222
|
+
name: "executionAddress",
|
|
4203
4223
|
inputs: [
|
|
4204
4224
|
{
|
|
4205
|
-
internalType: "bytes",
|
|
4206
4225
|
name: "_executionAddress",
|
|
4207
|
-
type: "bytes"
|
|
4226
|
+
type: "bytes",
|
|
4227
|
+
internalType: "bytes"
|
|
4208
4228
|
}
|
|
4209
4229
|
],
|
|
4210
|
-
name: "executionAddress",
|
|
4211
4230
|
outputs: [],
|
|
4212
|
-
stateMutability: "pure"
|
|
4213
|
-
type: "function"
|
|
4231
|
+
stateMutability: "pure"
|
|
4214
4232
|
},
|
|
4215
4233
|
{
|
|
4234
|
+
type: "function",
|
|
4235
|
+
name: "indirectCall",
|
|
4216
4236
|
inputs: [
|
|
4217
4237
|
{
|
|
4218
|
-
internalType: "uint256",
|
|
4219
4238
|
name: "_indirectCallMessageValue",
|
|
4220
|
-
type: "uint256"
|
|
4239
|
+
type: "uint256",
|
|
4240
|
+
internalType: "uint256"
|
|
4221
4241
|
}
|
|
4222
4242
|
],
|
|
4223
|
-
name: "indirectCall",
|
|
4224
4243
|
outputs: [],
|
|
4225
|
-
stateMutability: "pure"
|
|
4226
|
-
type: "function"
|
|
4244
|
+
stateMutability: "pure"
|
|
4227
4245
|
},
|
|
4228
4246
|
{
|
|
4247
|
+
type: "function",
|
|
4248
|
+
name: "interopCallValue",
|
|
4229
4249
|
inputs: [
|
|
4230
4250
|
{
|
|
4231
|
-
internalType: "uint256",
|
|
4232
4251
|
name: "_interopCallValue",
|
|
4233
|
-
type: "uint256"
|
|
4252
|
+
type: "uint256",
|
|
4253
|
+
internalType: "uint256"
|
|
4234
4254
|
}
|
|
4235
4255
|
],
|
|
4236
|
-
name: "interopCallValue",
|
|
4237
4256
|
outputs: [],
|
|
4238
|
-
stateMutability: "pure"
|
|
4239
|
-
type: "function"
|
|
4257
|
+
stateMutability: "pure"
|
|
4240
4258
|
},
|
|
4241
4259
|
{
|
|
4260
|
+
type: "function",
|
|
4261
|
+
name: "unbundlerAddress",
|
|
4242
4262
|
inputs: [
|
|
4243
4263
|
{
|
|
4244
|
-
internalType: "bytes",
|
|
4245
4264
|
name: "_unbundlerAddress",
|
|
4246
|
-
type: "bytes"
|
|
4265
|
+
type: "bytes",
|
|
4266
|
+
internalType: "bytes"
|
|
4247
4267
|
}
|
|
4248
4268
|
],
|
|
4249
|
-
name: "unbundlerAddress",
|
|
4250
4269
|
outputs: [],
|
|
4251
|
-
stateMutability: "pure"
|
|
4252
|
-
|
|
4270
|
+
stateMutability: "pure"
|
|
4271
|
+
},
|
|
4272
|
+
{
|
|
4273
|
+
type: "function",
|
|
4274
|
+
name: "useFixedFee",
|
|
4275
|
+
inputs: [
|
|
4276
|
+
{
|
|
4277
|
+
name: "_useFixed",
|
|
4278
|
+
type: "bool",
|
|
4279
|
+
internalType: "bool"
|
|
4280
|
+
}
|
|
4281
|
+
],
|
|
4282
|
+
outputs: [],
|
|
4283
|
+
stateMutability: "pure"
|
|
4253
4284
|
}
|
|
4254
4285
|
];
|
|
4255
4286
|
var IERC7786Attributes_default = IERC7786AttributesABI;
|
|
@@ -5097,6 +5128,11 @@ var IInteropCenterABI = [
|
|
|
5097
5128
|
type: "uint256",
|
|
5098
5129
|
internalType: "uint256"
|
|
5099
5130
|
},
|
|
5131
|
+
{
|
|
5132
|
+
name: "destinationBaseTokenAssetId",
|
|
5133
|
+
type: "bytes32",
|
|
5134
|
+
internalType: "bytes32"
|
|
5135
|
+
},
|
|
5100
5136
|
{
|
|
5101
5137
|
name: "interopBundleSalt",
|
|
5102
5138
|
type: "bytes32",
|
|
@@ -5995,6 +6031,718 @@ var L2MessageVerificationABI = [
|
|
|
5995
6031
|
];
|
|
5996
6032
|
var L2MessageVerification_default = L2MessageVerificationABI;
|
|
5997
6033
|
|
|
6034
|
+
// src/core/internal/abis/IInteropErrors.ts
|
|
6035
|
+
var IInteropErrorsABI = [
|
|
6036
|
+
{
|
|
6037
|
+
type: "error",
|
|
6038
|
+
name: "AttributeAlreadySet",
|
|
6039
|
+
inputs: [
|
|
6040
|
+
{
|
|
6041
|
+
name: "selector",
|
|
6042
|
+
type: "bytes4"
|
|
6043
|
+
}
|
|
6044
|
+
]
|
|
6045
|
+
},
|
|
6046
|
+
{
|
|
6047
|
+
type: "error",
|
|
6048
|
+
name: "AttributeViolatesRestriction",
|
|
6049
|
+
inputs: [
|
|
6050
|
+
{
|
|
6051
|
+
name: "selector",
|
|
6052
|
+
type: "bytes4"
|
|
6053
|
+
},
|
|
6054
|
+
{
|
|
6055
|
+
name: "restriction",
|
|
6056
|
+
type: "uint256"
|
|
6057
|
+
}
|
|
6058
|
+
]
|
|
6059
|
+
},
|
|
6060
|
+
{
|
|
6061
|
+
type: "error",
|
|
6062
|
+
name: "BundleAlreadyProcessed",
|
|
6063
|
+
inputs: [
|
|
6064
|
+
{
|
|
6065
|
+
name: "bundleHash",
|
|
6066
|
+
type: "bytes32"
|
|
6067
|
+
}
|
|
6068
|
+
]
|
|
6069
|
+
},
|
|
6070
|
+
{
|
|
6071
|
+
type: "error",
|
|
6072
|
+
name: "CallAlreadyExecuted",
|
|
6073
|
+
inputs: [
|
|
6074
|
+
{
|
|
6075
|
+
name: "bundleHash",
|
|
6076
|
+
type: "bytes32"
|
|
6077
|
+
},
|
|
6078
|
+
{
|
|
6079
|
+
name: "callIndex",
|
|
6080
|
+
type: "uint256"
|
|
6081
|
+
}
|
|
6082
|
+
]
|
|
6083
|
+
},
|
|
6084
|
+
{
|
|
6085
|
+
type: "error",
|
|
6086
|
+
name: "CallNotExecutable",
|
|
6087
|
+
inputs: [
|
|
6088
|
+
{
|
|
6089
|
+
name: "bundleHash",
|
|
6090
|
+
type: "bytes32"
|
|
6091
|
+
},
|
|
6092
|
+
{
|
|
6093
|
+
name: "callIndex",
|
|
6094
|
+
type: "uint256"
|
|
6095
|
+
}
|
|
6096
|
+
]
|
|
6097
|
+
},
|
|
6098
|
+
{
|
|
6099
|
+
type: "error",
|
|
6100
|
+
name: "CanNotUnbundle",
|
|
6101
|
+
inputs: [
|
|
6102
|
+
{
|
|
6103
|
+
name: "bundleHash",
|
|
6104
|
+
type: "bytes32"
|
|
6105
|
+
}
|
|
6106
|
+
]
|
|
6107
|
+
},
|
|
6108
|
+
{
|
|
6109
|
+
type: "error",
|
|
6110
|
+
name: "DestinationChainNotRegistered",
|
|
6111
|
+
inputs: [
|
|
6112
|
+
{
|
|
6113
|
+
name: "destinationChainId",
|
|
6114
|
+
type: "uint256"
|
|
6115
|
+
}
|
|
6116
|
+
]
|
|
6117
|
+
},
|
|
6118
|
+
{
|
|
6119
|
+
type: "error",
|
|
6120
|
+
name: "ExecutingNotAllowed",
|
|
6121
|
+
inputs: [
|
|
6122
|
+
{
|
|
6123
|
+
name: "bundleHash",
|
|
6124
|
+
type: "bytes32"
|
|
6125
|
+
},
|
|
6126
|
+
{
|
|
6127
|
+
name: "callerAddress",
|
|
6128
|
+
type: "bytes"
|
|
6129
|
+
},
|
|
6130
|
+
{
|
|
6131
|
+
name: "executionAddress",
|
|
6132
|
+
type: "bytes"
|
|
6133
|
+
}
|
|
6134
|
+
]
|
|
6135
|
+
},
|
|
6136
|
+
{
|
|
6137
|
+
type: "error",
|
|
6138
|
+
name: "FeeWithdrawalFailed",
|
|
6139
|
+
inputs: []
|
|
6140
|
+
},
|
|
6141
|
+
{
|
|
6142
|
+
type: "error",
|
|
6143
|
+
name: "IndirectCallValueMismatch",
|
|
6144
|
+
inputs: [
|
|
6145
|
+
{
|
|
6146
|
+
name: "expected",
|
|
6147
|
+
type: "uint256"
|
|
6148
|
+
},
|
|
6149
|
+
{
|
|
6150
|
+
name: "actual",
|
|
6151
|
+
type: "uint256"
|
|
6152
|
+
}
|
|
6153
|
+
]
|
|
6154
|
+
},
|
|
6155
|
+
{
|
|
6156
|
+
type: "error",
|
|
6157
|
+
name: "InteroperableAddressChainReferenceNotEmpty",
|
|
6158
|
+
inputs: [
|
|
6159
|
+
{
|
|
6160
|
+
name: "interoperableAddress",
|
|
6161
|
+
type: "bytes"
|
|
6162
|
+
}
|
|
6163
|
+
]
|
|
6164
|
+
},
|
|
6165
|
+
{
|
|
6166
|
+
type: "error",
|
|
6167
|
+
name: "InteroperableAddressNotEmpty",
|
|
6168
|
+
inputs: [
|
|
6169
|
+
{
|
|
6170
|
+
name: "interoperableAddress",
|
|
6171
|
+
type: "bytes"
|
|
6172
|
+
}
|
|
6173
|
+
]
|
|
6174
|
+
},
|
|
6175
|
+
{
|
|
6176
|
+
type: "error",
|
|
6177
|
+
name: "InvalidInteropBundleVersion",
|
|
6178
|
+
inputs: []
|
|
6179
|
+
},
|
|
6180
|
+
{
|
|
6181
|
+
type: "error",
|
|
6182
|
+
name: "InvalidInteropCallVersion",
|
|
6183
|
+
inputs: []
|
|
6184
|
+
},
|
|
6185
|
+
{
|
|
6186
|
+
type: "error",
|
|
6187
|
+
name: "InteropRootAlreadyExists",
|
|
6188
|
+
inputs: []
|
|
6189
|
+
},
|
|
6190
|
+
{
|
|
6191
|
+
type: "error",
|
|
6192
|
+
name: "MessageNotIncluded",
|
|
6193
|
+
inputs: []
|
|
6194
|
+
},
|
|
6195
|
+
{
|
|
6196
|
+
type: "error",
|
|
6197
|
+
name: "SidesLengthNotOne",
|
|
6198
|
+
inputs: []
|
|
6199
|
+
},
|
|
6200
|
+
{
|
|
6201
|
+
type: "error",
|
|
6202
|
+
name: "UnauthorizedMessageSender",
|
|
6203
|
+
inputs: [
|
|
6204
|
+
{
|
|
6205
|
+
name: "expected",
|
|
6206
|
+
type: "address"
|
|
6207
|
+
},
|
|
6208
|
+
{
|
|
6209
|
+
name: "actual",
|
|
6210
|
+
type: "address"
|
|
6211
|
+
}
|
|
6212
|
+
]
|
|
6213
|
+
},
|
|
6214
|
+
{
|
|
6215
|
+
type: "error",
|
|
6216
|
+
name: "UnbundlingNotAllowed",
|
|
6217
|
+
inputs: [
|
|
6218
|
+
{
|
|
6219
|
+
name: "bundleHash",
|
|
6220
|
+
type: "bytes32"
|
|
6221
|
+
},
|
|
6222
|
+
{
|
|
6223
|
+
name: "callerAddress",
|
|
6224
|
+
type: "bytes"
|
|
6225
|
+
},
|
|
6226
|
+
{
|
|
6227
|
+
name: "unbundlerAddress",
|
|
6228
|
+
type: "bytes"
|
|
6229
|
+
}
|
|
6230
|
+
]
|
|
6231
|
+
},
|
|
6232
|
+
{
|
|
6233
|
+
type: "error",
|
|
6234
|
+
name: "WrongCallStatusLength",
|
|
6235
|
+
inputs: [
|
|
6236
|
+
{
|
|
6237
|
+
name: "bundleCallsLength",
|
|
6238
|
+
type: "uint256"
|
|
6239
|
+
},
|
|
6240
|
+
{
|
|
6241
|
+
name: "providedCallStatusLength",
|
|
6242
|
+
type: "uint256"
|
|
6243
|
+
}
|
|
6244
|
+
]
|
|
6245
|
+
},
|
|
6246
|
+
{
|
|
6247
|
+
type: "error",
|
|
6248
|
+
name: "WrongDestinationChainId",
|
|
6249
|
+
inputs: [
|
|
6250
|
+
{
|
|
6251
|
+
name: "bundleHash",
|
|
6252
|
+
type: "bytes32"
|
|
6253
|
+
},
|
|
6254
|
+
{
|
|
6255
|
+
name: "expected",
|
|
6256
|
+
type: "uint256"
|
|
6257
|
+
},
|
|
6258
|
+
{
|
|
6259
|
+
name: "actual",
|
|
6260
|
+
type: "uint256"
|
|
6261
|
+
}
|
|
6262
|
+
]
|
|
6263
|
+
},
|
|
6264
|
+
{
|
|
6265
|
+
type: "error",
|
|
6266
|
+
name: "WrongDestinationBaseTokenAssetId",
|
|
6267
|
+
inputs: [
|
|
6268
|
+
{
|
|
6269
|
+
name: "bundleHash",
|
|
6270
|
+
type: "bytes32"
|
|
6271
|
+
},
|
|
6272
|
+
{
|
|
6273
|
+
name: "expected",
|
|
6274
|
+
type: "bytes32"
|
|
6275
|
+
},
|
|
6276
|
+
{
|
|
6277
|
+
name: "actual",
|
|
6278
|
+
type: "bytes32"
|
|
6279
|
+
}
|
|
6280
|
+
]
|
|
6281
|
+
},
|
|
6282
|
+
{
|
|
6283
|
+
type: "error",
|
|
6284
|
+
name: "WrongSourceChainId",
|
|
6285
|
+
inputs: [
|
|
6286
|
+
{
|
|
6287
|
+
name: "bundleHash",
|
|
6288
|
+
type: "bytes32"
|
|
6289
|
+
},
|
|
6290
|
+
{
|
|
6291
|
+
name: "expected",
|
|
6292
|
+
type: "uint256"
|
|
6293
|
+
},
|
|
6294
|
+
{
|
|
6295
|
+
name: "actual",
|
|
6296
|
+
type: "uint256"
|
|
6297
|
+
}
|
|
6298
|
+
]
|
|
6299
|
+
},
|
|
6300
|
+
{
|
|
6301
|
+
type: "error",
|
|
6302
|
+
name: "ZKTokenNotAvailable",
|
|
6303
|
+
inputs: []
|
|
6304
|
+
}
|
|
6305
|
+
];
|
|
6306
|
+
var IInteropErrors_default = IInteropErrorsABI;
|
|
6307
|
+
|
|
6308
|
+
// src/core/internal/abis/IL1ContractErrors.ts
|
|
6309
|
+
var IL1ContractErrorsABI = [
|
|
6310
|
+
{
|
|
6311
|
+
type: "error",
|
|
6312
|
+
name: "AccessToFallbackDenied",
|
|
6313
|
+
inputs: [
|
|
6314
|
+
{ name: "target", type: "address" },
|
|
6315
|
+
{ name: "invoker", type: "address" }
|
|
6316
|
+
]
|
|
6317
|
+
},
|
|
6318
|
+
{
|
|
6319
|
+
type: "error",
|
|
6320
|
+
name: "AccessToFunctionDenied",
|
|
6321
|
+
inputs: [
|
|
6322
|
+
{ name: "target", type: "address" },
|
|
6323
|
+
{ name: "selector", type: "bytes4" },
|
|
6324
|
+
{ name: "invoker", type: "address" }
|
|
6325
|
+
]
|
|
6326
|
+
},
|
|
6327
|
+
{ type: "error", name: "AddressAlreadySet", inputs: [{ name: "addr", type: "address" }] },
|
|
6328
|
+
{ type: "error", name: "AddressHasNoCode", inputs: [{ name: "", type: "address" }] },
|
|
6329
|
+
{
|
|
6330
|
+
type: "error",
|
|
6331
|
+
name: "AddressMismatch",
|
|
6332
|
+
inputs: [
|
|
6333
|
+
{ name: "expected", type: "address" },
|
|
6334
|
+
{ name: "supplied", type: "address" }
|
|
6335
|
+
]
|
|
6336
|
+
},
|
|
6337
|
+
{ type: "error", name: "AlreadyPermanentRollup", inputs: [] },
|
|
6338
|
+
{ type: "error", name: "AlreadyWhitelisted", inputs: [{ name: "", type: "address" }] },
|
|
6339
|
+
{ type: "error", name: "AmountMustBeGreaterThanZero", inputs: [] },
|
|
6340
|
+
{
|
|
6341
|
+
type: "error",
|
|
6342
|
+
name: "AssetHandlerDoesNotExist",
|
|
6343
|
+
inputs: [{ name: "assetId", type: "bytes32" }]
|
|
6344
|
+
},
|
|
6345
|
+
{
|
|
6346
|
+
type: "error",
|
|
6347
|
+
name: "AssetHandlerNotRegistered",
|
|
6348
|
+
inputs: [{ name: "assetId", type: "bytes32" }]
|
|
6349
|
+
},
|
|
6350
|
+
{ type: "error", name: "AssetIdAlreadyRegistered", inputs: [] },
|
|
6351
|
+
{
|
|
6352
|
+
type: "error",
|
|
6353
|
+
name: "AssetIdMismatch",
|
|
6354
|
+
inputs: [
|
|
6355
|
+
{ name: "expected", type: "bytes32" },
|
|
6356
|
+
{ name: "supplied", type: "bytes32" }
|
|
6357
|
+
]
|
|
6358
|
+
},
|
|
6359
|
+
{ type: "error", name: "AssetIdNotSupported", inputs: [{ name: "assetId", type: "bytes32" }] },
|
|
6360
|
+
{ type: "error", name: "AssetRouterAllowanceNotZero", inputs: [] },
|
|
6361
|
+
{ type: "error", name: "BaseTokenGasPriceDenominatorNotSet", inputs: [] },
|
|
6362
|
+
{
|
|
6363
|
+
type: "error",
|
|
6364
|
+
name: "BatchHashMismatch",
|
|
6365
|
+
inputs: [
|
|
6366
|
+
{ name: "expected", type: "bytes32" },
|
|
6367
|
+
{ name: "actual", type: "bytes32" }
|
|
6368
|
+
]
|
|
6369
|
+
},
|
|
6370
|
+
{ type: "error", name: "BatchNotExecuted", inputs: [{ name: "batchNumber", type: "uint256" }] },
|
|
6371
|
+
{
|
|
6372
|
+
type: "error",
|
|
6373
|
+
name: "BatchNumberMismatch",
|
|
6374
|
+
inputs: [
|
|
6375
|
+
{ name: "expectedBatchNumber", type: "uint256" },
|
|
6376
|
+
{ name: "providedBatchNumber", type: "uint256" }
|
|
6377
|
+
]
|
|
6378
|
+
},
|
|
6379
|
+
{ type: "error", name: "BridgeHubAlreadyRegistered", inputs: [] },
|
|
6380
|
+
{ type: "error", name: "BridgeMintNotImplemented", inputs: [] },
|
|
6381
|
+
{ type: "error", name: "BurningNativeWETHNotSupported", inputs: [] },
|
|
6382
|
+
{
|
|
6383
|
+
type: "error",
|
|
6384
|
+
name: "BytecodeAlreadyPublished",
|
|
6385
|
+
inputs: [{ name: "bytecodeHash", type: "bytes32" }]
|
|
6386
|
+
},
|
|
6387
|
+
{ type: "error", name: "CallerNotTimerAdmin", inputs: [] },
|
|
6388
|
+
{ type: "error", name: "CallNotAllowed", inputs: [{ name: "call", type: "bytes" }] },
|
|
6389
|
+
{ type: "error", name: "CanOnlyProcessOneBatch", inputs: [] },
|
|
6390
|
+
{ type: "error", name: "CantExecuteUnprovenBatches", inputs: [] },
|
|
6391
|
+
{ type: "error", name: "CantRevertExecutedBatch", inputs: [] },
|
|
6392
|
+
{ type: "error", name: "ChainAlreadyLive", inputs: [] },
|
|
6393
|
+
{ type: "error", name: "ChainIdAlreadyExists", inputs: [] },
|
|
6394
|
+
{ type: "error", name: "ChainIdCantBeCurrentChain", inputs: [] },
|
|
6395
|
+
{ type: "error", name: "ChainIdMismatch", inputs: [] },
|
|
6396
|
+
{ type: "error", name: "ChainIdNotRegistered", inputs: [{ name: "chainId", type: "uint256" }] },
|
|
6397
|
+
{ type: "error", name: "ChainIdTooBig", inputs: [] },
|
|
6398
|
+
{ type: "error", name: "CTMAlreadyRegistered", inputs: [] },
|
|
6399
|
+
{ type: "error", name: "CTMNotRegistered", inputs: [] },
|
|
6400
|
+
{ type: "error", name: "DeadlineNotYetPassed", inputs: [] },
|
|
6401
|
+
{ type: "error", name: "DefaultAdminTransferNotAllowed", inputs: [] },
|
|
6402
|
+
{ type: "error", name: "DelegateCallFailed", inputs: [{ name: "returnData", type: "bytes" }] },
|
|
6403
|
+
{ type: "error", name: "DenominatorIsZero", inputs: [] },
|
|
6404
|
+
{ type: "error", name: "DeployFailed", inputs: [] },
|
|
6405
|
+
{ type: "error", name: "DeployingBridgedTokenForNativeToken", inputs: [] },
|
|
6406
|
+
{ type: "error", name: "DepositDoesNotExist", inputs: [] },
|
|
6407
|
+
{ type: "error", name: "DepositExists", inputs: [] },
|
|
6408
|
+
{ type: "error", name: "DiamondAlreadyFrozen", inputs: [] },
|
|
6409
|
+
{ type: "error", name: "DiamondNotFrozen", inputs: [] },
|
|
6410
|
+
{ type: "error", name: "EmptyAddress", inputs: [] },
|
|
6411
|
+
{ type: "error", name: "EmptyAssetId", inputs: [] },
|
|
6412
|
+
{ type: "error", name: "EmptyBytes32", inputs: [] },
|
|
6413
|
+
{ type: "error", name: "EmptyData", inputs: [] },
|
|
6414
|
+
{ type: "error", name: "EmptyDeposit", inputs: [] },
|
|
6415
|
+
{ type: "error", name: "EmptyPrecommitData", inputs: [{ name: "batchNumber", type: "uint256" }] },
|
|
6416
|
+
{ type: "error", name: "EmptyProofLength", inputs: [] },
|
|
6417
|
+
{ type: "error", name: "ETHDepositNotSupported", inputs: [] },
|
|
6418
|
+
{
|
|
6419
|
+
type: "error",
|
|
6420
|
+
name: "FacetExists",
|
|
6421
|
+
inputs: [
|
|
6422
|
+
{ name: "selector", type: "bytes4" },
|
|
6423
|
+
{ name: "", type: "address" }
|
|
6424
|
+
]
|
|
6425
|
+
},
|
|
6426
|
+
{ type: "error", name: "GasPerPubdataMismatch", inputs: [] },
|
|
6427
|
+
{ type: "error", name: "GenesisBatchCommitmentZero", inputs: [] },
|
|
6428
|
+
{ type: "error", name: "GenesisBatchHashZero", inputs: [] },
|
|
6429
|
+
{ type: "error", name: "GenesisIndexStorageZero", inputs: [] },
|
|
6430
|
+
{ type: "error", name: "GenesisUpgradeZero", inputs: [] },
|
|
6431
|
+
{ type: "error", name: "HashedLogIsDefault", inputs: [] },
|
|
6432
|
+
{
|
|
6433
|
+
type: "error",
|
|
6434
|
+
name: "HashMismatch",
|
|
6435
|
+
inputs: [
|
|
6436
|
+
{ name: "expected", type: "bytes32" },
|
|
6437
|
+
{ name: "actual", type: "bytes32" }
|
|
6438
|
+
]
|
|
6439
|
+
},
|
|
6440
|
+
{
|
|
6441
|
+
type: "error",
|
|
6442
|
+
name: "IncorrectBatchBounds",
|
|
6443
|
+
inputs: [
|
|
6444
|
+
{ name: "processFromExpected", type: "uint256" },
|
|
6445
|
+
{ name: "processToExpected", type: "uint256" },
|
|
6446
|
+
{ name: "processFromProvided", type: "uint256" },
|
|
6447
|
+
{ name: "processToProvided", type: "uint256" }
|
|
6448
|
+
]
|
|
6449
|
+
},
|
|
6450
|
+
{
|
|
6451
|
+
type: "error",
|
|
6452
|
+
name: "IncorrectBridgeHubAddress",
|
|
6453
|
+
inputs: [{ name: "bridgehub", type: "address" }]
|
|
6454
|
+
},
|
|
6455
|
+
{
|
|
6456
|
+
type: "error",
|
|
6457
|
+
name: "IncorrectTokenAddressFromNTV",
|
|
6458
|
+
inputs: [
|
|
6459
|
+
{ name: "assetId", type: "bytes32" },
|
|
6460
|
+
{ name: "tokenAddress", type: "address" }
|
|
6461
|
+
]
|
|
6462
|
+
},
|
|
6463
|
+
{ type: "error", name: "InsufficientChainBalance", inputs: [] },
|
|
6464
|
+
{
|
|
6465
|
+
type: "error",
|
|
6466
|
+
name: "InvalidBatchNumber",
|
|
6467
|
+
inputs: [
|
|
6468
|
+
{ name: "provided", type: "uint256" },
|
|
6469
|
+
{ name: "expected", type: "uint256" }
|
|
6470
|
+
]
|
|
6471
|
+
},
|
|
6472
|
+
{ type: "error", name: "InvalidCaller", inputs: [{ name: "", type: "address" }] },
|
|
6473
|
+
{ type: "error", name: "InvalidDAForPermanentRollup", inputs: [] },
|
|
6474
|
+
{ type: "error", name: "InvalidDelay", inputs: [] },
|
|
6475
|
+
{
|
|
6476
|
+
type: "error",
|
|
6477
|
+
name: "InvalidLogSender",
|
|
6478
|
+
inputs: [
|
|
6479
|
+
{ name: "sender", type: "address" },
|
|
6480
|
+
{ name: "logKey", type: "uint256" }
|
|
6481
|
+
]
|
|
6482
|
+
},
|
|
6483
|
+
{
|
|
6484
|
+
type: "error",
|
|
6485
|
+
name: "InvalidMessageRoot",
|
|
6486
|
+
inputs: [
|
|
6487
|
+
{ name: "expectedMessageRoot", type: "bytes32" },
|
|
6488
|
+
{ name: "providedMessageRoot", type: "bytes32" }
|
|
6489
|
+
]
|
|
6490
|
+
},
|
|
6491
|
+
{ type: "error", name: "InvalidNTVBurnData", inputs: [] },
|
|
6492
|
+
{
|
|
6493
|
+
type: "error",
|
|
6494
|
+
name: "InvalidNumberOfBlobs",
|
|
6495
|
+
inputs: [
|
|
6496
|
+
{ name: "expected", type: "uint256" },
|
|
6497
|
+
{ name: "numCommitments", type: "uint256" },
|
|
6498
|
+
{ name: "numHashes", type: "uint256" }
|
|
6499
|
+
]
|
|
6500
|
+
},
|
|
6501
|
+
{
|
|
6502
|
+
type: "error",
|
|
6503
|
+
name: "InvalidPackedPrecommitmentLength",
|
|
6504
|
+
inputs: [{ name: "length", type: "uint256" }]
|
|
6505
|
+
},
|
|
6506
|
+
{ type: "error", name: "InvalidProof", inputs: [] },
|
|
6507
|
+
{ type: "error", name: "InvalidProofLengthForFinalNode", inputs: [] },
|
|
6508
|
+
{ type: "error", name: "InvalidProtocolVersion", inputs: [] },
|
|
6509
|
+
{ type: "error", name: "InvalidPubdataPricingMode", inputs: [] },
|
|
6510
|
+
{ type: "error", name: "InvalidSelector", inputs: [{ name: "func", type: "bytes4" }] },
|
|
6511
|
+
{ type: "error", name: "InvalidSystemLogsLength", inputs: [] },
|
|
6512
|
+
{ type: "error", name: "InvalidUpgradeTxn", inputs: [{ name: "", type: "uint8" }] },
|
|
6513
|
+
{ type: "error", name: "L2TimestampTooBig", inputs: [] },
|
|
6514
|
+
{
|
|
6515
|
+
type: "error",
|
|
6516
|
+
name: "L2WithdrawalMessageWrongLength",
|
|
6517
|
+
inputs: [{ name: "messageLen", type: "uint256" }]
|
|
6518
|
+
},
|
|
6519
|
+
{ type: "error", name: "LegacyBridgeNotSet", inputs: [] },
|
|
6520
|
+
{ type: "error", name: "LegacyBridgeUsesNonNativeToken", inputs: [] },
|
|
6521
|
+
{ type: "error", name: "LegacyEncodingUsedForNonL1Token", inputs: [] },
|
|
6522
|
+
{ type: "error", name: "LegacyMethodForNonL1Token", inputs: [] },
|
|
6523
|
+
{
|
|
6524
|
+
type: "error",
|
|
6525
|
+
name: "LengthIsNotDivisibleBy32",
|
|
6526
|
+
inputs: [{ name: "length", type: "uint256" }]
|
|
6527
|
+
},
|
|
6528
|
+
{ type: "error", name: "LogAlreadyProcessed", inputs: [{ name: "", type: "uint8" }] },
|
|
6529
|
+
{ type: "error", name: "MalformedBytecode", inputs: [{ name: "", type: "uint8" }] },
|
|
6530
|
+
{ type: "error", name: "MerkleIndexOrHeightMismatch", inputs: [] },
|
|
6531
|
+
{ type: "error", name: "MerkleIndexOutOfBounds", inputs: [] },
|
|
6532
|
+
{ type: "error", name: "MerkleNothingToProve", inputs: [] },
|
|
6533
|
+
{ type: "error", name: "MerklePathEmpty", inputs: [] },
|
|
6534
|
+
{
|
|
6535
|
+
type: "error",
|
|
6536
|
+
name: "MerklePathLengthMismatch",
|
|
6537
|
+
inputs: [
|
|
6538
|
+
{ name: "pathLength", type: "uint256" },
|
|
6539
|
+
{ name: "expectedLength", type: "uint256" }
|
|
6540
|
+
]
|
|
6541
|
+
},
|
|
6542
|
+
{ type: "error", name: "MerklePathOutOfBounds", inputs: [] },
|
|
6543
|
+
{
|
|
6544
|
+
type: "error",
|
|
6545
|
+
name: "MerkleWrongIndex",
|
|
6546
|
+
inputs: [
|
|
6547
|
+
{ name: "index", type: "uint256" },
|
|
6548
|
+
{ name: "maxNodeNumber", type: "uint256" }
|
|
6549
|
+
]
|
|
6550
|
+
},
|
|
6551
|
+
{
|
|
6552
|
+
type: "error",
|
|
6553
|
+
name: "MerkleWrongLength",
|
|
6554
|
+
inputs: [
|
|
6555
|
+
{ name: "newLeavesLength", type: "uint256" },
|
|
6556
|
+
{ name: "leafNumber", type: "uint256" }
|
|
6557
|
+
]
|
|
6558
|
+
},
|
|
6559
|
+
{ type: "error", name: "MigrationPaused", inputs: [] },
|
|
6560
|
+
{ type: "error", name: "MigrationsNotPaused", inputs: [] },
|
|
6561
|
+
{
|
|
6562
|
+
type: "error",
|
|
6563
|
+
name: "MissingSystemLogs",
|
|
6564
|
+
inputs: [
|
|
6565
|
+
{ name: "expected", type: "uint256" },
|
|
6566
|
+
{ name: "actual", type: "uint256" }
|
|
6567
|
+
]
|
|
6568
|
+
},
|
|
6569
|
+
{
|
|
6570
|
+
type: "error",
|
|
6571
|
+
name: "MsgValueMismatch",
|
|
6572
|
+
inputs: [
|
|
6573
|
+
{ name: "expectedMsgValue", type: "uint256" },
|
|
6574
|
+
{ name: "providedMsgValue", type: "uint256" }
|
|
6575
|
+
]
|
|
6576
|
+
},
|
|
6577
|
+
{
|
|
6578
|
+
type: "error",
|
|
6579
|
+
name: "MsgValueTooLow",
|
|
6580
|
+
inputs: [
|
|
6581
|
+
{ name: "required", type: "uint256" },
|
|
6582
|
+
{ name: "provided", type: "uint256" }
|
|
6583
|
+
]
|
|
6584
|
+
},
|
|
6585
|
+
{ type: "error", name: "NewDeadlineExceedsMaxDeadline", inputs: [] },
|
|
6586
|
+
{ type: "error", name: "NewDeadlineNotGreaterThanCurrent", inputs: [] },
|
|
6587
|
+
{ type: "error", name: "NoCallsProvided", inputs: [] },
|
|
6588
|
+
{ type: "error", name: "NoCTMForAssetId", inputs: [{ name: "assetId", type: "bytes32" }] },
|
|
6589
|
+
{ type: "error", name: "NoFunctionsForDiamondCut", inputs: [] },
|
|
6590
|
+
{ type: "error", name: "NoFundsTransferred", inputs: [] },
|
|
6591
|
+
{ type: "error", name: "NoLegacySharedBridge", inputs: [] },
|
|
6592
|
+
{ type: "error", name: "NonEmptyCalldata", inputs: [] },
|
|
6593
|
+
{ type: "error", name: "NonEmptyMsgValue", inputs: [] },
|
|
6594
|
+
{ type: "error", name: "NonIncreasingTimestamp", inputs: [] },
|
|
6595
|
+
{ type: "error", name: "NonSequentialBatch", inputs: [] },
|
|
6596
|
+
{ type: "error", name: "NonSequentialVersion", inputs: [] },
|
|
6597
|
+
{ type: "error", name: "NotAllowed", inputs: [{ name: "addr", type: "address" }] },
|
|
6598
|
+
{ type: "error", name: "NotARestriction", inputs: [{ name: "addr", type: "address" }] },
|
|
6599
|
+
{ type: "error", name: "NotAZKChain", inputs: [{ name: "addr", type: "address" }] },
|
|
6600
|
+
{ type: "error", name: "NotInitializedReentrancyGuard", inputs: [] },
|
|
6601
|
+
{ type: "error", name: "NotWhitelisted", inputs: [{ name: "", type: "address" }] },
|
|
6602
|
+
{ type: "error", name: "OnlyEraSupported", inputs: [] },
|
|
6603
|
+
{ type: "error", name: "OnlySelfAllowed", inputs: [] },
|
|
6604
|
+
{ type: "error", name: "OperationExists", inputs: [] },
|
|
6605
|
+
{ type: "error", name: "OperationMustBePending", inputs: [] },
|
|
6606
|
+
{ type: "error", name: "OperationMustBeReady", inputs: [] },
|
|
6607
|
+
{ type: "error", name: "OriginChainIdNotFound", inputs: [] },
|
|
6608
|
+
{
|
|
6609
|
+
type: "error",
|
|
6610
|
+
name: "PrecommitmentMismatch",
|
|
6611
|
+
inputs: [
|
|
6612
|
+
{ name: "batchNumber", type: "uint256" },
|
|
6613
|
+
{ name: "expected", type: "bytes32" },
|
|
6614
|
+
{ name: "found", type: "bytes32" }
|
|
6615
|
+
]
|
|
6616
|
+
},
|
|
6617
|
+
{ type: "error", name: "PreviousOperationNotExecuted", inputs: [] },
|
|
6618
|
+
{ type: "error", name: "PriorityOperationsRollingHashMismatch", inputs: [] },
|
|
6619
|
+
{ type: "error", name: "PriorityTxPubdataExceedsMaxPubDataPerBatch", inputs: [] },
|
|
6620
|
+
{
|
|
6621
|
+
type: "error",
|
|
6622
|
+
name: "ProtocolIdMismatch",
|
|
6623
|
+
inputs: [
|
|
6624
|
+
{ name: "expectedProtocolVersion", type: "uint256" },
|
|
6625
|
+
{ name: "providedProtocolId", type: "uint256" }
|
|
6626
|
+
]
|
|
6627
|
+
},
|
|
6628
|
+
{ type: "error", name: "ProtocolIdNotGreater", inputs: [] },
|
|
6629
|
+
{
|
|
6630
|
+
type: "error",
|
|
6631
|
+
name: "PubdataGreaterThanLimit",
|
|
6632
|
+
inputs: [
|
|
6633
|
+
{ name: "limit", type: "uint256" },
|
|
6634
|
+
{ name: "length", type: "uint256" }
|
|
6635
|
+
]
|
|
6636
|
+
},
|
|
6637
|
+
{ type: "error", name: "QueueIsEmpty", inputs: [] },
|
|
6638
|
+
{ type: "error", name: "Reentrancy", inputs: [] },
|
|
6639
|
+
{
|
|
6640
|
+
type: "error",
|
|
6641
|
+
name: "RemoveFunctionFacetAddressNotZero",
|
|
6642
|
+
inputs: [{ name: "facet", type: "address" }]
|
|
6643
|
+
},
|
|
6644
|
+
{ type: "error", name: "RemoveFunctionFacetAddressZero", inputs: [] },
|
|
6645
|
+
{ type: "error", name: "RemovingPermanentRestriction", inputs: [] },
|
|
6646
|
+
{ type: "error", name: "ReplaceFunctionFacetAddressZero", inputs: [] },
|
|
6647
|
+
{
|
|
6648
|
+
type: "error",
|
|
6649
|
+
name: "RestrictionWasAlreadyPresent",
|
|
6650
|
+
inputs: [{ name: "restriction", type: "address" }]
|
|
6651
|
+
},
|
|
6652
|
+
{
|
|
6653
|
+
type: "error",
|
|
6654
|
+
name: "RestrictionWasNotPresent",
|
|
6655
|
+
inputs: [{ name: "restriction", type: "address" }]
|
|
6656
|
+
},
|
|
6657
|
+
{ type: "error", name: "RevertedBatchNotAfterNewLastBatch", inputs: [] },
|
|
6658
|
+
{
|
|
6659
|
+
type: "error",
|
|
6660
|
+
name: "RoleAccessDenied",
|
|
6661
|
+
inputs: [
|
|
6662
|
+
{ name: "chainAddress", type: "address" },
|
|
6663
|
+
{ name: "role", type: "bytes32" },
|
|
6664
|
+
{ name: "account", type: "address" }
|
|
6665
|
+
]
|
|
6666
|
+
},
|
|
6667
|
+
{ type: "error", name: "SelectorsMustAllHaveSameFreezability", inputs: [] },
|
|
6668
|
+
{ type: "error", name: "SettlementLayersMustSettleOnL1", inputs: [] },
|
|
6669
|
+
{ type: "error", name: "SharedBridgeNotSet", inputs: [] },
|
|
6670
|
+
{ type: "error", name: "SharedBridgeValueNotSet", inputs: [{ name: "", type: "uint8" }] },
|
|
6671
|
+
{ type: "error", name: "SlotOccupied", inputs: [] },
|
|
6672
|
+
{ type: "error", name: "SystemLogsSizeTooBig", inputs: [] },
|
|
6673
|
+
{
|
|
6674
|
+
type: "error",
|
|
6675
|
+
name: "TimeNotReached",
|
|
6676
|
+
inputs: [
|
|
6677
|
+
{ name: "expectedTimestamp", type: "uint256" },
|
|
6678
|
+
{ name: "actualTimestamp", type: "uint256" }
|
|
6679
|
+
]
|
|
6680
|
+
},
|
|
6681
|
+
{ type: "error", name: "TimerAlreadyStarted", inputs: [] },
|
|
6682
|
+
{ type: "error", name: "TimestampError", inputs: [] },
|
|
6683
|
+
{ type: "error", name: "TokenIsLegacy", inputs: [] },
|
|
6684
|
+
{ type: "error", name: "TokenNotLegacy", inputs: [] },
|
|
6685
|
+
{ type: "error", name: "TokenNotSupported", inputs: [{ name: "token", type: "address" }] },
|
|
6686
|
+
{ type: "error", name: "TokensWithFeesNotSupported", inputs: [] },
|
|
6687
|
+
{ type: "error", name: "TooHighDeploymentNonce", inputs: [] },
|
|
6688
|
+
{ type: "error", name: "TooManyFactoryDeps", inputs: [] },
|
|
6689
|
+
{ type: "error", name: "TooMuchGas", inputs: [] },
|
|
6690
|
+
{ type: "error", name: "TransactionNotAllowed", inputs: [] },
|
|
6691
|
+
{ type: "error", name: "TxHashMismatch", inputs: [] },
|
|
6692
|
+
{ type: "error", name: "TxnBodyGasLimitNotEnoughGas", inputs: [] },
|
|
6693
|
+
{
|
|
6694
|
+
type: "error",
|
|
6695
|
+
name: "UnallowedImplementation",
|
|
6696
|
+
inputs: [{ name: "implementationHash", type: "bytes32" }]
|
|
6697
|
+
},
|
|
6698
|
+
{ type: "error", name: "Unauthorized", inputs: [{ name: "caller", type: "address" }] },
|
|
6699
|
+
{ type: "error", name: "UndefinedDiamondCutAction", inputs: [] },
|
|
6700
|
+
{ type: "error", name: "UnexpectedSystemLog", inputs: [{ name: "logKey", type: "uint256" }] },
|
|
6701
|
+
{ type: "error", name: "UnknownVerifierType", inputs: [] },
|
|
6702
|
+
{
|
|
6703
|
+
type: "error",
|
|
6704
|
+
name: "UnsupportedCommitBatchEncoding",
|
|
6705
|
+
inputs: [{ name: "version", type: "uint8" }]
|
|
6706
|
+
},
|
|
6707
|
+
{ type: "error", name: "UnsupportedEncodingVersion", inputs: [] },
|
|
6708
|
+
{
|
|
6709
|
+
type: "error",
|
|
6710
|
+
name: "UnsupportedExecuteBatchEncoding",
|
|
6711
|
+
inputs: [{ name: "version", type: "uint8" }]
|
|
6712
|
+
},
|
|
6713
|
+
{
|
|
6714
|
+
type: "error",
|
|
6715
|
+
name: "UnsupportedProofBatchEncoding",
|
|
6716
|
+
inputs: [{ name: "version", type: "uint8" }]
|
|
6717
|
+
},
|
|
6718
|
+
{ type: "error", name: "UpgradeBatchNumberIsNotZero", inputs: [] },
|
|
6719
|
+
{ type: "error", name: "ValidateTxnNotEnoughGas", inputs: [] },
|
|
6720
|
+
{
|
|
6721
|
+
type: "error",
|
|
6722
|
+
name: "ValueMismatch",
|
|
6723
|
+
inputs: [
|
|
6724
|
+
{ name: "expected", type: "uint256" },
|
|
6725
|
+
{ name: "actual", type: "uint256" }
|
|
6726
|
+
]
|
|
6727
|
+
},
|
|
6728
|
+
{ type: "error", name: "VerifiedBatchesExceedsCommittedBatches", inputs: [] },
|
|
6729
|
+
{ type: "error", name: "WithdrawalAlreadyFinalized", inputs: [] },
|
|
6730
|
+
{ type: "error", name: "WithdrawFailed", inputs: [] },
|
|
6731
|
+
{ type: "error", name: "WrappedBaseTokenAlreadyRegistered", inputs: [] },
|
|
6732
|
+
{
|
|
6733
|
+
type: "error",
|
|
6734
|
+
name: "WrongMagicValue",
|
|
6735
|
+
inputs: [
|
|
6736
|
+
{ name: "expectedMagicValue", type: "uint256" },
|
|
6737
|
+
{ name: "providedMagicValue", type: "uint256" }
|
|
6738
|
+
]
|
|
6739
|
+
},
|
|
6740
|
+
{ type: "error", name: "ZeroAddress", inputs: [] },
|
|
6741
|
+
{ type: "error", name: "ZeroChainId", inputs: [] },
|
|
6742
|
+
{ type: "error", name: "ZKChainLimitReached", inputs: [] }
|
|
6743
|
+
];
|
|
6744
|
+
var IL1ContractErrors_default = IL1ContractErrorsABI;
|
|
6745
|
+
|
|
5998
6746
|
// src/core/errors/factory.ts
|
|
5999
6747
|
var factory_exports = {};
|
|
6000
6748
|
__export(factory_exports, {
|
|
@@ -6216,6 +6964,7 @@ function shapeCause(err) {
|
|
|
6216
6964
|
// src/core/rpc/zks.ts
|
|
6217
6965
|
var zks_exports = {};
|
|
6218
6966
|
__export(zks_exports, {
|
|
6967
|
+
ProofTarget: () => ProofTarget,
|
|
6219
6968
|
createZksRpc: () => createZksRpc,
|
|
6220
6969
|
normalizeBlockMetadata: () => normalizeBlockMetadata,
|
|
6221
6970
|
normalizeGenesis: () => normalizeGenesis,
|
|
@@ -6239,6 +6988,11 @@ async function withRpcOp(operation, message, ctx, fn) {
|
|
|
6239
6988
|
}
|
|
6240
6989
|
|
|
6241
6990
|
// src/core/rpc/zks.ts
|
|
6991
|
+
var ProofTarget = /* @__PURE__ */ ((ProofTarget2) => {
|
|
6992
|
+
ProofTarget2["L1BatchRoot"] = "l1BatchRoot";
|
|
6993
|
+
ProofTarget2["MessageRoot"] = "messageRoot";
|
|
6994
|
+
return ProofTarget2;
|
|
6995
|
+
})(ProofTarget || {});
|
|
6242
6996
|
var METHODS = {
|
|
6243
6997
|
getBridgehub: "zks_getBridgehubContract",
|
|
6244
6998
|
getL2ToL1LogProof: "zks_getL2ToL1LogProof",
|
|
@@ -6256,6 +7010,7 @@ function normalizeProof(p) {
|
|
|
6256
7010
|
const raw = p ?? {};
|
|
6257
7011
|
const idRaw = raw?.id ?? raw?.index;
|
|
6258
7012
|
const bnRaw = raw?.batch_number ?? raw?.batchNumber;
|
|
7013
|
+
const gwBlockNumberRaw = raw?.gatewayBlockNumber;
|
|
6259
7014
|
if (idRaw == null || bnRaw == null) {
|
|
6260
7015
|
throw createError("RPC", {
|
|
6261
7016
|
resource: "zksrpc",
|
|
@@ -6276,7 +7031,8 @@ function normalizeProof(p) {
|
|
|
6276
7031
|
id: toBig(idRaw),
|
|
6277
7032
|
batchNumber: toBig(bnRaw),
|
|
6278
7033
|
proof: toHexArray(raw?.proof),
|
|
6279
|
-
root: raw.root
|
|
7034
|
+
root: raw.root,
|
|
7035
|
+
gatewayBlockNumber: gwBlockNumberRaw != null ? toBig(gwBlockNumberRaw) : void 0
|
|
6280
7036
|
};
|
|
6281
7037
|
} catch (e) {
|
|
6282
7038
|
if (isZKsyncError(e)) throw e;
|
|
@@ -6299,8 +7055,8 @@ function ensureHex(value, field, context) {
|
|
|
6299
7055
|
});
|
|
6300
7056
|
}
|
|
6301
7057
|
function ensureNumber(value, field, opts) {
|
|
6302
|
-
const operation = opts?.operation
|
|
6303
|
-
const messagePrefix = opts?.messagePrefix
|
|
7058
|
+
const operation = opts?.operation;
|
|
7059
|
+
const messagePrefix = opts?.messagePrefix;
|
|
6304
7060
|
if (isNumber(value)) return value;
|
|
6305
7061
|
if (isBigint(value)) return Number(value);
|
|
6306
7062
|
if (typeof value === "string" && value.trim() !== "") {
|
|
@@ -6438,7 +7194,6 @@ function normalizeGenesis(raw) {
|
|
|
6438
7194
|
context: { valueType: typeof contractsRaw }
|
|
6439
7195
|
});
|
|
6440
7196
|
}
|
|
6441
|
-
const executionVersion = ensureNumber(record["execution_version"], "execution_version");
|
|
6442
7197
|
const genesisRoot = ensureHex(record["genesis_root"], "genesis_root", {});
|
|
6443
7198
|
const initialContracts = contractsRaw.map(
|
|
6444
7199
|
(entry, index) => normalizeContractTuple(entry, index)
|
|
@@ -6447,7 +7202,6 @@ function normalizeGenesis(raw) {
|
|
|
6447
7202
|
return {
|
|
6448
7203
|
initialContracts,
|
|
6449
7204
|
additionalStorage,
|
|
6450
|
-
executionVersion,
|
|
6451
7205
|
genesisRoot
|
|
6452
7206
|
};
|
|
6453
7207
|
} catch (e) {
|
|
@@ -6555,13 +7309,15 @@ function createZksRpc(transport) {
|
|
|
6555
7309
|
);
|
|
6556
7310
|
},
|
|
6557
7311
|
// Fetches a proof for an L2→L1 log emitted in the given transaction.
|
|
6558
|
-
async getL2ToL1LogProof(txHash, index) {
|
|
7312
|
+
async getL2ToL1LogProof(txHash, index, proofTarget) {
|
|
6559
7313
|
return withRpcOp(
|
|
6560
7314
|
"zksrpc.getL2ToL1LogProof",
|
|
6561
7315
|
"Failed to fetch L2\u2192L1 log proof.",
|
|
6562
|
-
{ txHash, index },
|
|
7316
|
+
{ txHash, index, proofTarget },
|
|
6563
7317
|
async () => {
|
|
6564
|
-
const
|
|
7318
|
+
const params = [txHash, index];
|
|
7319
|
+
if (proofTarget != void 0) params.push(proofTarget);
|
|
7320
|
+
const proof = await transport(METHODS.getL2ToL1LogProof, params);
|
|
6565
7321
|
if (!proof) {
|
|
6566
7322
|
throw createError("STATE", {
|
|
6567
7323
|
resource: "zksrpc",
|