@matterlabs/zksync-js 0.0.23 → 0.0.24
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.js +4 -4
- package/dist/adapters/ethers/index.cjs +17 -3
- package/dist/adapters/ethers/index.cjs.map +1 -1
- package/dist/adapters/ethers/index.js +7 -7
- package/dist/adapters/ethers/sdk.cjs +17 -12
- package/dist/adapters/ethers/sdk.cjs.map +1 -1
- package/dist/adapters/ethers/sdk.js +6 -6
- package/dist/adapters/viem/client.js +4 -4
- package/dist/adapters/viem/index.cjs +17 -3
- package/dist/adapters/viem/index.cjs.map +1 -1
- package/dist/adapters/viem/index.js +7 -7
- package/dist/adapters/viem/sdk.cjs +17 -16
- package/dist/adapters/viem/sdk.cjs.map +1 -1
- package/dist/adapters/viem/sdk.js +6 -6
- package/dist/{chunk-4GPIHYVF.js → chunk-4ZANKNIK.js} +1 -1
- package/dist/{chunk-WPCZNITC.js → chunk-5S63J6DW.js} +1 -1
- package/dist/{chunk-V2TDNGI5.js → chunk-B6P24GL5.js} +20 -6
- package/dist/{chunk-JJ523MOL.js → chunk-BQ2YCWV2.js} +1 -1
- package/dist/{chunk-4M7VNYGC.js → chunk-H5A6GU3D.js} +2 -2
- package/dist/{chunk-2DDJFHHD.js → chunk-JNS4XZE2.js} +1 -1
- package/dist/{chunk-URHDNDFN.js → chunk-PNTR5FTL.js} +2 -2
- package/dist/{chunk-NVOFHV3A.js → chunk-QMMFUWRV.js} +20 -6
- package/dist/{chunk-TUN6NH5D.js → chunk-RZH7HBH3.js} +2 -2
- package/dist/{chunk-6WIAMFIW.js → chunk-YEA74D2L.js} +2 -2
- package/dist/{chunk-X2JJDQ4O.js → chunk-YGXEIOK6.js} +1 -1
- package/dist/core/index.js +3 -3
- package/dist/core/types/errors.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { createEthersClient } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { createEthersClient } from '../../chunk-PNTR5FTL.js';
|
|
2
|
+
import '../../chunk-RZH7HBH3.js';
|
|
3
3
|
import '../../chunk-UMPAKZCQ.js';
|
|
4
4
|
import '../../chunk-BWKWWLY4.js';
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-4ZANKNIK.js';
|
|
6
|
+
import '../../chunk-JNS4XZE2.js';
|
|
7
7
|
import '../../chunk-3IPSDGHO.js';
|
|
@@ -329,7 +329,7 @@ var OP_DEPOSITS = {
|
|
|
329
329
|
ethNonBase: {
|
|
330
330
|
allowanceBase: "deposits.eth-nonbase:allowanceBaseToken",
|
|
331
331
|
ethBalance: "deposits.eth-nonbase:getEthBalance",
|
|
332
|
-
encodeCalldata: "deposits.eth-nonbase:
|
|
332
|
+
encodeCalldata: "deposits.eth-nonbase:encodeSecondBridgeEthDepositCalldata",
|
|
333
333
|
assertEthAsset: "deposits.eth-nonbase:assertEthAsset",
|
|
334
334
|
assertNonEthBase: "deposits.eth-nonbase:assertNonEthBase",
|
|
335
335
|
assertEthBalance: "deposits.eth-nonbase:assertEthBalance"
|
|
@@ -9219,6 +9219,20 @@ var ntvCodec2 = createNTVCodec({
|
|
|
9219
9219
|
encode: (types, values) => ethers.AbiCoder.defaultAbiCoder().encode(types, values),
|
|
9220
9220
|
keccak256: (data) => ethers.keccak256(data)
|
|
9221
9221
|
});
|
|
9222
|
+
async function encodeSecondBridgeEthDepositCalldata(input) {
|
|
9223
|
+
const registeredAssetId = input.ctx.resolvedToken?.assetId;
|
|
9224
|
+
const assetId = registeredAssetId && registeredAssetId.toLowerCase() !== ZERO_ASSET_ID2 ? registeredAssetId : ntvCodec2.encodeAssetId(
|
|
9225
|
+
BigInt((await input.ctx.client.l1.getNetwork()).chainId),
|
|
9226
|
+
L2_NATIVE_TOKEN_VAULT_ADDRESS,
|
|
9227
|
+
ETH_ADDRESS
|
|
9228
|
+
);
|
|
9229
|
+
const transferData = encodeNativeTokenVaultTransferData(
|
|
9230
|
+
input.amount,
|
|
9231
|
+
input.receiver,
|
|
9232
|
+
ETH_ADDRESS
|
|
9233
|
+
);
|
|
9234
|
+
return encodeSecondBridgeDataV1(assetId, transferData);
|
|
9235
|
+
}
|
|
9222
9236
|
async function getPriorityGasModel2(input) {
|
|
9223
9237
|
try {
|
|
9224
9238
|
const l1AssetRouter = await input.ctx.contracts.l1AssetRouter();
|
|
@@ -9372,10 +9386,10 @@ function routeEthNonBase() {
|
|
|
9372
9386
|
const secondBridgeCalldata = await wrapAs4(
|
|
9373
9387
|
"INTERNAL",
|
|
9374
9388
|
OP_DEPOSITS.ethNonBase.encodeCalldata,
|
|
9375
|
-
() =>
|
|
9389
|
+
() => encodeSecondBridgeEthDepositCalldata({ ctx, amount: p.amount, receiver }),
|
|
9376
9390
|
{
|
|
9377
9391
|
ctx: {
|
|
9378
|
-
where: "
|
|
9392
|
+
where: "encodeSecondBridgeEthDepositCalldata",
|
|
9379
9393
|
amount: p.amount.toString(),
|
|
9380
9394
|
to: receiver
|
|
9381
9395
|
}
|