@matterlabs/zksync-js 0.0.10 → 0.0.12
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 +632 -649
- package/dist/adapters/ethers/client.cjs.map +1 -1
- package/dist/adapters/ethers/client.js +6 -6
- package/dist/adapters/ethers/index.cjs +707 -691
- 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 +706 -690
- package/dist/adapters/ethers/sdk.cjs.map +1 -1
- package/dist/adapters/ethers/sdk.js +7 -7
- package/dist/adapters/viem/client.js +6 -6
- package/dist/adapters/viem/index.cjs +36 -29
- 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-QDJOEVGJ.js → chunk-4PFO3J7W.js} +2 -2
- package/dist/{chunk-FBKBF7YM.js → chunk-6CLYCJMV.js} +670 -662
- package/dist/{chunk-MBEMIFYS.js → chunk-6JM4PE62.js} +46 -38
- package/dist/{chunk-ZBGQQ63V.js → chunk-AUN5Y2A3.js} +40 -33
- package/dist/{chunk-VKUTFNZA.js → chunk-BGUNJK2H.js} +4 -4
- package/dist/{chunk-ZVHFVUDE.js → chunk-E3KP7XCG.js} +1 -1
- package/dist/{chunk-SRPKTXIF.js → chunk-GMNLOTNG.js} +1 -1
- package/dist/{chunk-AIFHAPJC.js → chunk-I5VQBVQ2.js} +2 -2
- package/dist/{chunk-IYEDEUXG.js → chunk-IUSH7YBZ.js} +1 -1
- package/dist/{chunk-HOZTREW6.js → chunk-LWA7LC3N.js} +5 -5
- package/dist/{chunk-UIXU35ZU.js → chunk-NBQVHW2N.js} +2 -2
- package/dist/{chunk-C3AGOEHR.js → chunk-QQ2OR434.js} +1 -1
- package/dist/{chunk-N3FVEFOK.js → chunk-TE2YQHVI.js} +2 -2
- package/dist/core/abi.d.ts +2 -2
- 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 +668 -660
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +5 -5
- package/dist/core/internal/abis/IInteropCenter.d.ts +425 -121
- package/dist/core/internal/abis/IInteropHandler.d.ts +121 -69
- package/dist/core/internal/abis/IInteropRootStorage.d.ts +40 -0
- package/dist/core/rpc/types.d.ts +1 -0
- package/dist/index.cjs +669 -661
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/dist/core/internal/abis/InteropCenter.d.ts +0 -578
- package/dist/core/internal/abis/InteropRootStorage.d.ts +0 -20
|
@@ -48,7 +48,7 @@ var TX_OVERHEAD_GAS = 10000n;
|
|
|
48
48
|
var TX_MEMORY_OVERHEAD_GAS = 10n;
|
|
49
49
|
var DEFAULT_PUBDATA_BYTES = 155n;
|
|
50
50
|
var DEFAULT_ABI_BYTES = 400n;
|
|
51
|
-
var SAFE_L1_BRIDGE_GAS =
|
|
51
|
+
var SAFE_L1_BRIDGE_GAS = 800000n;
|
|
52
52
|
|
|
53
53
|
// src/core/utils/addr.ts
|
|
54
54
|
function isAddress(x) {
|
|
@@ -5399,1001 +5399,1009 @@ var MailboxABI = [
|
|
|
5399
5399
|
];
|
|
5400
5400
|
var Mailbox_default = MailboxABI;
|
|
5401
5401
|
|
|
5402
|
-
// src/core/internal/abis/
|
|
5403
|
-
var
|
|
5402
|
+
// src/core/internal/abis/IInteropCenter.ts
|
|
5403
|
+
var IInteropCenterABI = [
|
|
5404
5404
|
{
|
|
5405
|
-
|
|
5405
|
+
type: "function",
|
|
5406
|
+
name: "L1_CHAIN_ID",
|
|
5407
|
+
inputs: [],
|
|
5408
|
+
outputs: [
|
|
5406
5409
|
{
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
+
name: "",
|
|
5411
|
+
type: "uint256",
|
|
5412
|
+
internalType: "uint256"
|
|
5410
5413
|
}
|
|
5411
5414
|
],
|
|
5412
|
-
|
|
5413
|
-
type: "error"
|
|
5415
|
+
stateMutability: "view"
|
|
5414
5416
|
},
|
|
5415
5417
|
{
|
|
5416
|
-
|
|
5418
|
+
type: "function",
|
|
5419
|
+
name: "ZK_INTEROP_FEE",
|
|
5420
|
+
inputs: [],
|
|
5421
|
+
outputs: [
|
|
5417
5422
|
{
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
}
|
|
5423
|
+
name: "",
|
|
5424
|
+
type: "uint256",
|
|
5425
|
+
internalType: "uint256"
|
|
5426
|
+
}
|
|
5427
|
+
],
|
|
5428
|
+
stateMutability: "view"
|
|
5429
|
+
},
|
|
5430
|
+
{
|
|
5431
|
+
type: "function",
|
|
5432
|
+
name: "ZK_TOKEN_ASSET_ID",
|
|
5433
|
+
inputs: [],
|
|
5434
|
+
outputs: [
|
|
5422
5435
|
{
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5436
|
+
name: "",
|
|
5437
|
+
type: "bytes32",
|
|
5438
|
+
internalType: "bytes32"
|
|
5426
5439
|
}
|
|
5427
5440
|
],
|
|
5428
|
-
|
|
5429
|
-
type: "error"
|
|
5441
|
+
stateMutability: "view"
|
|
5430
5442
|
},
|
|
5431
5443
|
{
|
|
5444
|
+
type: "function",
|
|
5445
|
+
name: "accumulatedProtocolFees",
|
|
5432
5446
|
inputs: [
|
|
5433
5447
|
{
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
}
|
|
5448
|
+
name: "coinbase",
|
|
5449
|
+
type: "address",
|
|
5450
|
+
internalType: "address"
|
|
5451
|
+
}
|
|
5452
|
+
],
|
|
5453
|
+
outputs: [
|
|
5438
5454
|
{
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5455
|
+
name: "",
|
|
5456
|
+
type: "uint256",
|
|
5457
|
+
internalType: "uint256"
|
|
5442
5458
|
}
|
|
5443
5459
|
],
|
|
5444
|
-
|
|
5445
|
-
type: "error"
|
|
5460
|
+
stateMutability: "view"
|
|
5446
5461
|
},
|
|
5447
5462
|
{
|
|
5463
|
+
type: "function",
|
|
5464
|
+
name: "accumulatedZKFees",
|
|
5448
5465
|
inputs: [
|
|
5449
5466
|
{
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5467
|
+
name: "coinbase",
|
|
5468
|
+
type: "address",
|
|
5469
|
+
internalType: "address"
|
|
5453
5470
|
}
|
|
5454
5471
|
],
|
|
5455
|
-
|
|
5456
|
-
|
|
5472
|
+
outputs: [
|
|
5473
|
+
{
|
|
5474
|
+
name: "",
|
|
5475
|
+
type: "uint256",
|
|
5476
|
+
internalType: "uint256"
|
|
5477
|
+
}
|
|
5478
|
+
],
|
|
5479
|
+
stateMutability: "view"
|
|
5457
5480
|
},
|
|
5458
5481
|
{
|
|
5482
|
+
type: "function",
|
|
5483
|
+
name: "claimProtocolFees",
|
|
5459
5484
|
inputs: [
|
|
5460
5485
|
{
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5486
|
+
name: "_receiver",
|
|
5487
|
+
type: "address",
|
|
5488
|
+
internalType: "address"
|
|
5464
5489
|
}
|
|
5465
5490
|
],
|
|
5466
|
-
|
|
5467
|
-
|
|
5491
|
+
outputs: [],
|
|
5492
|
+
stateMutability: "nonpayable"
|
|
5468
5493
|
},
|
|
5469
5494
|
{
|
|
5495
|
+
type: "function",
|
|
5496
|
+
name: "claimZKFees",
|
|
5470
5497
|
inputs: [
|
|
5471
5498
|
{
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5499
|
+
name: "_receiver",
|
|
5500
|
+
type: "address",
|
|
5501
|
+
internalType: "address"
|
|
5475
5502
|
}
|
|
5476
5503
|
],
|
|
5477
|
-
|
|
5478
|
-
|
|
5504
|
+
outputs: [],
|
|
5505
|
+
stateMutability: "nonpayable"
|
|
5479
5506
|
},
|
|
5480
5507
|
{
|
|
5508
|
+
type: "function",
|
|
5509
|
+
name: "forwardTransactionOnGatewayWithBalanceChange",
|
|
5481
5510
|
inputs: [
|
|
5482
5511
|
{
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5512
|
+
name: "_chainId",
|
|
5513
|
+
type: "uint256",
|
|
5514
|
+
internalType: "uint256"
|
|
5486
5515
|
},
|
|
5487
5516
|
{
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5517
|
+
name: "_canonicalTxHash",
|
|
5518
|
+
type: "bytes32",
|
|
5519
|
+
internalType: "bytes32"
|
|
5520
|
+
},
|
|
5521
|
+
{
|
|
5522
|
+
name: "_expirationTimestamp",
|
|
5523
|
+
type: "uint64",
|
|
5524
|
+
internalType: "uint64"
|
|
5525
|
+
},
|
|
5526
|
+
{
|
|
5527
|
+
name: "_balanceChange",
|
|
5528
|
+
type: "tuple",
|
|
5529
|
+
internalType: "struct BalanceChange",
|
|
5530
|
+
components: [
|
|
5531
|
+
{
|
|
5532
|
+
name: "version",
|
|
5533
|
+
type: "bytes1",
|
|
5534
|
+
internalType: "bytes1"
|
|
5535
|
+
},
|
|
5536
|
+
{
|
|
5537
|
+
name: "originToken",
|
|
5538
|
+
type: "address",
|
|
5539
|
+
internalType: "address"
|
|
5540
|
+
},
|
|
5541
|
+
{
|
|
5542
|
+
name: "baseTokenAssetId",
|
|
5543
|
+
type: "bytes32",
|
|
5544
|
+
internalType: "bytes32"
|
|
5545
|
+
},
|
|
5546
|
+
{
|
|
5547
|
+
name: "baseTokenAmount",
|
|
5548
|
+
type: "uint256",
|
|
5549
|
+
internalType: "uint256"
|
|
5550
|
+
},
|
|
5551
|
+
{
|
|
5552
|
+
name: "assetId",
|
|
5553
|
+
type: "bytes32",
|
|
5554
|
+
internalType: "bytes32"
|
|
5555
|
+
},
|
|
5556
|
+
{
|
|
5557
|
+
name: "amount",
|
|
5558
|
+
type: "uint256",
|
|
5559
|
+
internalType: "uint256"
|
|
5560
|
+
},
|
|
5561
|
+
{
|
|
5562
|
+
name: "tokenOriginChainId",
|
|
5563
|
+
type: "uint256",
|
|
5564
|
+
internalType: "uint256"
|
|
5565
|
+
}
|
|
5566
|
+
]
|
|
5491
5567
|
}
|
|
5492
5568
|
],
|
|
5493
|
-
|
|
5494
|
-
|
|
5569
|
+
outputs: [],
|
|
5570
|
+
stateMutability: "nonpayable"
|
|
5495
5571
|
},
|
|
5496
5572
|
{
|
|
5573
|
+
type: "function",
|
|
5574
|
+
name: "getZKTokenAddress",
|
|
5497
5575
|
inputs: [],
|
|
5498
|
-
|
|
5499
|
-
|
|
5576
|
+
outputs: [
|
|
5577
|
+
{
|
|
5578
|
+
name: "",
|
|
5579
|
+
type: "address",
|
|
5580
|
+
internalType: "address"
|
|
5581
|
+
}
|
|
5582
|
+
],
|
|
5583
|
+
stateMutability: "view"
|
|
5500
5584
|
},
|
|
5501
5585
|
{
|
|
5586
|
+
type: "function",
|
|
5587
|
+
name: "initL2",
|
|
5502
5588
|
inputs: [
|
|
5503
5589
|
{
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5590
|
+
name: "_l1ChainId",
|
|
5591
|
+
type: "uint256",
|
|
5592
|
+
internalType: "uint256"
|
|
5507
5593
|
},
|
|
5508
5594
|
{
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5595
|
+
name: "_owner",
|
|
5596
|
+
type: "address",
|
|
5597
|
+
internalType: "address"
|
|
5598
|
+
},
|
|
5599
|
+
{
|
|
5600
|
+
name: "_zkTokenAssetId",
|
|
5601
|
+
type: "bytes32",
|
|
5602
|
+
internalType: "bytes32"
|
|
5512
5603
|
}
|
|
5513
5604
|
],
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
},
|
|
5517
|
-
{
|
|
5518
|
-
inputs: [],
|
|
5519
|
-
name: "SlotOccupied",
|
|
5520
|
-
type: "error"
|
|
5605
|
+
outputs: [],
|
|
5606
|
+
stateMutability: "nonpayable"
|
|
5521
5607
|
},
|
|
5522
5608
|
{
|
|
5609
|
+
type: "function",
|
|
5610
|
+
name: "interopBundleNonce",
|
|
5523
5611
|
inputs: [
|
|
5524
5612
|
{
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5613
|
+
name: "sender",
|
|
5614
|
+
type: "address",
|
|
5615
|
+
internalType: "address"
|
|
5528
5616
|
}
|
|
5529
5617
|
],
|
|
5530
|
-
|
|
5531
|
-
type: "error"
|
|
5532
|
-
},
|
|
5533
|
-
{
|
|
5534
|
-
inputs: [
|
|
5618
|
+
outputs: [
|
|
5535
5619
|
{
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5620
|
+
name: "",
|
|
5621
|
+
type: "uint256",
|
|
5622
|
+
internalType: "uint256"
|
|
5539
5623
|
}
|
|
5540
5624
|
],
|
|
5541
|
-
|
|
5542
|
-
type: "error"
|
|
5625
|
+
stateMutability: "view"
|
|
5543
5626
|
},
|
|
5544
5627
|
{
|
|
5545
|
-
|
|
5546
|
-
|
|
5628
|
+
type: "function",
|
|
5629
|
+
name: "interopProtocolFee",
|
|
5630
|
+
inputs: [],
|
|
5631
|
+
outputs: [
|
|
5547
5632
|
{
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
type: "uint8"
|
|
5633
|
+
name: "",
|
|
5634
|
+
type: "uint256",
|
|
5635
|
+
internalType: "uint256"
|
|
5552
5636
|
}
|
|
5553
5637
|
],
|
|
5554
|
-
|
|
5555
|
-
type: "event"
|
|
5638
|
+
stateMutability: "view"
|
|
5556
5639
|
},
|
|
5557
5640
|
{
|
|
5558
|
-
|
|
5641
|
+
type: "function",
|
|
5642
|
+
name: "parseAttributes",
|
|
5559
5643
|
inputs: [
|
|
5560
5644
|
{
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
type: "bytes32"
|
|
5645
|
+
name: "_attributes",
|
|
5646
|
+
type: "bytes[]",
|
|
5647
|
+
internalType: "bytes[]"
|
|
5565
5648
|
},
|
|
5566
5649
|
{
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5650
|
+
name: "_restriction",
|
|
5651
|
+
type: "uint8",
|
|
5652
|
+
internalType: "enum IInteropCenter.AttributeParsingRestrictions"
|
|
5653
|
+
}
|
|
5654
|
+
],
|
|
5655
|
+
outputs: [
|
|
5572
5656
|
{
|
|
5657
|
+
name: "callAttributes",
|
|
5658
|
+
type: "tuple",
|
|
5659
|
+
internalType: "struct CallAttributes",
|
|
5573
5660
|
components: [
|
|
5574
5661
|
{
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5662
|
+
name: "interopCallValue",
|
|
5663
|
+
type: "uint256",
|
|
5664
|
+
internalType: "uint256"
|
|
5578
5665
|
},
|
|
5579
5666
|
{
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5667
|
+
name: "indirectCall",
|
|
5668
|
+
type: "bool",
|
|
5669
|
+
internalType: "bool"
|
|
5583
5670
|
},
|
|
5584
5671
|
{
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
}
|
|
5672
|
+
name: "indirectCallMessageValue",
|
|
5673
|
+
type: "uint256",
|
|
5674
|
+
internalType: "uint256"
|
|
5675
|
+
}
|
|
5676
|
+
]
|
|
5677
|
+
},
|
|
5678
|
+
{
|
|
5679
|
+
name: "bundleAttributes",
|
|
5680
|
+
type: "tuple",
|
|
5681
|
+
internalType: "struct BundleAttributes",
|
|
5682
|
+
components: [
|
|
5589
5683
|
{
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5684
|
+
name: "executionAddress",
|
|
5685
|
+
type: "bytes",
|
|
5686
|
+
internalType: "bytes"
|
|
5593
5687
|
},
|
|
5594
5688
|
{
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
name: "version",
|
|
5599
|
-
type: "bytes1"
|
|
5600
|
-
},
|
|
5601
|
-
{
|
|
5602
|
-
internalType: "bool",
|
|
5603
|
-
name: "shadowAccount",
|
|
5604
|
-
type: "bool"
|
|
5605
|
-
},
|
|
5606
|
-
{
|
|
5607
|
-
internalType: "address",
|
|
5608
|
-
name: "to",
|
|
5609
|
-
type: "address"
|
|
5610
|
-
},
|
|
5611
|
-
{
|
|
5612
|
-
internalType: "address",
|
|
5613
|
-
name: "from",
|
|
5614
|
-
type: "address"
|
|
5615
|
-
},
|
|
5616
|
-
{
|
|
5617
|
-
internalType: "uint256",
|
|
5618
|
-
name: "value",
|
|
5619
|
-
type: "uint256"
|
|
5620
|
-
},
|
|
5621
|
-
{
|
|
5622
|
-
internalType: "bytes",
|
|
5623
|
-
name: "data",
|
|
5624
|
-
type: "bytes"
|
|
5625
|
-
}
|
|
5626
|
-
],
|
|
5627
|
-
internalType: "struct InteropCall[]",
|
|
5628
|
-
name: "calls",
|
|
5629
|
-
type: "tuple[]"
|
|
5689
|
+
name: "unbundlerAddress",
|
|
5690
|
+
type: "bytes",
|
|
5691
|
+
internalType: "bytes"
|
|
5630
5692
|
},
|
|
5631
5693
|
{
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
name: "executionAddress",
|
|
5636
|
-
type: "bytes"
|
|
5637
|
-
},
|
|
5638
|
-
{
|
|
5639
|
-
internalType: "bytes",
|
|
5640
|
-
name: "unbundlerAddress",
|
|
5641
|
-
type: "bytes"
|
|
5642
|
-
}
|
|
5643
|
-
],
|
|
5644
|
-
internalType: "struct BundleAttributes",
|
|
5645
|
-
name: "bundleAttributes",
|
|
5646
|
-
type: "tuple"
|
|
5694
|
+
name: "useFixedFee",
|
|
5695
|
+
type: "bool",
|
|
5696
|
+
internalType: "bool"
|
|
5647
5697
|
}
|
|
5648
|
-
]
|
|
5649
|
-
indexed: false,
|
|
5650
|
-
internalType: "struct InteropBundle",
|
|
5651
|
-
name: "interopBundle",
|
|
5652
|
-
type: "tuple"
|
|
5698
|
+
]
|
|
5653
5699
|
}
|
|
5654
5700
|
],
|
|
5655
|
-
|
|
5656
|
-
type: "event"
|
|
5701
|
+
stateMutability: "pure"
|
|
5657
5702
|
},
|
|
5658
5703
|
{
|
|
5659
|
-
|
|
5704
|
+
type: "function",
|
|
5705
|
+
name: "pause",
|
|
5706
|
+
inputs: [],
|
|
5707
|
+
outputs: [],
|
|
5708
|
+
stateMutability: "nonpayable"
|
|
5709
|
+
},
|
|
5710
|
+
{
|
|
5711
|
+
type: "function",
|
|
5712
|
+
name: "sendBundle",
|
|
5660
5713
|
inputs: [
|
|
5661
5714
|
{
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
type: "bytes32"
|
|
5666
|
-
},
|
|
5667
|
-
{
|
|
5668
|
-
indexed: false,
|
|
5669
|
-
internalType: "bytes",
|
|
5670
|
-
name: "sender",
|
|
5671
|
-
type: "bytes"
|
|
5672
|
-
},
|
|
5673
|
-
{
|
|
5674
|
-
indexed: false,
|
|
5675
|
-
internalType: "bytes",
|
|
5676
|
-
name: "recipient",
|
|
5677
|
-
type: "bytes"
|
|
5715
|
+
name: "_destinationChainId",
|
|
5716
|
+
type: "bytes",
|
|
5717
|
+
internalType: "bytes"
|
|
5678
5718
|
},
|
|
5679
5719
|
{
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5720
|
+
name: "_callStarters",
|
|
5721
|
+
type: "tuple[]",
|
|
5722
|
+
internalType: "struct InteropCallStarter[]",
|
|
5723
|
+
components: [
|
|
5724
|
+
{
|
|
5725
|
+
name: "to",
|
|
5726
|
+
type: "bytes",
|
|
5727
|
+
internalType: "bytes"
|
|
5728
|
+
},
|
|
5729
|
+
{
|
|
5730
|
+
name: "data",
|
|
5731
|
+
type: "bytes",
|
|
5732
|
+
internalType: "bytes"
|
|
5733
|
+
},
|
|
5734
|
+
{
|
|
5735
|
+
name: "callAttributes",
|
|
5736
|
+
type: "bytes[]",
|
|
5737
|
+
internalType: "bytes[]"
|
|
5738
|
+
}
|
|
5739
|
+
]
|
|
5684
5740
|
},
|
|
5685
5741
|
{
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5742
|
+
name: "_bundleAttributes",
|
|
5743
|
+
type: "bytes[]",
|
|
5744
|
+
internalType: "bytes[]"
|
|
5745
|
+
}
|
|
5746
|
+
],
|
|
5747
|
+
outputs: [
|
|
5691
5748
|
{
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
type: "bytes[]"
|
|
5749
|
+
name: "bundleHash",
|
|
5750
|
+
type: "bytes32",
|
|
5751
|
+
internalType: "bytes32"
|
|
5696
5752
|
}
|
|
5697
5753
|
],
|
|
5698
|
-
|
|
5699
|
-
type: "event"
|
|
5754
|
+
stateMutability: "payable"
|
|
5700
5755
|
},
|
|
5701
5756
|
{
|
|
5702
|
-
|
|
5757
|
+
type: "function",
|
|
5758
|
+
name: "setInteropFee",
|
|
5703
5759
|
inputs: [
|
|
5704
5760
|
{
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
type: "address"
|
|
5709
|
-
},
|
|
5710
|
-
{
|
|
5711
|
-
indexed: true,
|
|
5712
|
-
internalType: "address",
|
|
5713
|
-
name: "newAssetRouter",
|
|
5714
|
-
type: "address"
|
|
5761
|
+
name: "_fee",
|
|
5762
|
+
type: "uint256",
|
|
5763
|
+
internalType: "uint256"
|
|
5715
5764
|
}
|
|
5716
5765
|
],
|
|
5717
|
-
|
|
5718
|
-
|
|
5766
|
+
outputs: [],
|
|
5767
|
+
stateMutability: "nonpayable"
|
|
5719
5768
|
},
|
|
5720
5769
|
{
|
|
5721
|
-
|
|
5770
|
+
type: "function",
|
|
5771
|
+
name: "unpause",
|
|
5772
|
+
inputs: [],
|
|
5773
|
+
outputs: [],
|
|
5774
|
+
stateMutability: "nonpayable"
|
|
5775
|
+
},
|
|
5776
|
+
{
|
|
5777
|
+
type: "function",
|
|
5778
|
+
name: "updateL2",
|
|
5722
5779
|
inputs: [
|
|
5723
5780
|
{
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
type: "address"
|
|
5781
|
+
name: "_l1ChainId",
|
|
5782
|
+
type: "uint256",
|
|
5783
|
+
internalType: "uint256"
|
|
5728
5784
|
},
|
|
5729
5785
|
{
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
type: "address"
|
|
5786
|
+
name: "_owner",
|
|
5787
|
+
type: "address",
|
|
5788
|
+
internalType: "address"
|
|
5734
5789
|
}
|
|
5735
5790
|
],
|
|
5736
|
-
|
|
5737
|
-
|
|
5791
|
+
outputs: [],
|
|
5792
|
+
stateMutability: "nonpayable"
|
|
5738
5793
|
},
|
|
5739
5794
|
{
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
internalType: "address",
|
|
5745
|
-
name: "previousOwner",
|
|
5746
|
-
type: "address"
|
|
5747
|
-
},
|
|
5795
|
+
type: "function",
|
|
5796
|
+
name: "zkToken",
|
|
5797
|
+
inputs: [],
|
|
5798
|
+
outputs: [
|
|
5748
5799
|
{
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
type: "address"
|
|
5800
|
+
name: "",
|
|
5801
|
+
type: "address",
|
|
5802
|
+
internalType: "contract IERC20"
|
|
5753
5803
|
}
|
|
5754
5804
|
],
|
|
5755
|
-
|
|
5756
|
-
type: "event"
|
|
5805
|
+
stateMutability: "view"
|
|
5757
5806
|
},
|
|
5758
5807
|
{
|
|
5759
|
-
|
|
5808
|
+
type: "event",
|
|
5809
|
+
name: "FixedZKFeesAccumulated",
|
|
5760
5810
|
inputs: [
|
|
5761
5811
|
{
|
|
5812
|
+
name: "payer",
|
|
5813
|
+
type: "address",
|
|
5762
5814
|
indexed: true,
|
|
5763
|
-
internalType: "address"
|
|
5764
|
-
name: "previousOwner",
|
|
5765
|
-
type: "address"
|
|
5815
|
+
internalType: "address"
|
|
5766
5816
|
},
|
|
5767
5817
|
{
|
|
5818
|
+
name: "coinbase",
|
|
5819
|
+
type: "address",
|
|
5768
5820
|
indexed: true,
|
|
5769
|
-
internalType: "address"
|
|
5770
|
-
|
|
5771
|
-
type: "address"
|
|
5772
|
-
}
|
|
5773
|
-
],
|
|
5774
|
-
name: "OwnershipTransferred",
|
|
5775
|
-
type: "event"
|
|
5776
|
-
},
|
|
5777
|
-
{
|
|
5778
|
-
anonymous: false,
|
|
5779
|
-
inputs: [
|
|
5821
|
+
internalType: "address"
|
|
5822
|
+
},
|
|
5780
5823
|
{
|
|
5824
|
+
name: "amount",
|
|
5825
|
+
type: "uint256",
|
|
5781
5826
|
indexed: false,
|
|
5782
|
-
internalType: "
|
|
5783
|
-
name: "account",
|
|
5784
|
-
type: "address"
|
|
5827
|
+
internalType: "uint256"
|
|
5785
5828
|
}
|
|
5786
5829
|
],
|
|
5787
|
-
|
|
5788
|
-
type: "event"
|
|
5830
|
+
anonymous: false
|
|
5789
5831
|
},
|
|
5790
5832
|
{
|
|
5791
|
-
|
|
5833
|
+
type: "event",
|
|
5834
|
+
name: "InteropBundleSent",
|
|
5792
5835
|
inputs: [
|
|
5793
5836
|
{
|
|
5837
|
+
name: "l2l1MsgHash",
|
|
5838
|
+
type: "bytes32",
|
|
5794
5839
|
indexed: false,
|
|
5795
|
-
internalType: "
|
|
5796
|
-
name: "account",
|
|
5797
|
-
type: "address"
|
|
5798
|
-
}
|
|
5799
|
-
],
|
|
5800
|
-
name: "Unpaused",
|
|
5801
|
-
type: "event"
|
|
5802
|
-
},
|
|
5803
|
-
{
|
|
5804
|
-
inputs: [],
|
|
5805
|
-
name: "L1_CHAIN_ID",
|
|
5806
|
-
outputs: [
|
|
5807
|
-
{
|
|
5808
|
-
internalType: "uint256",
|
|
5809
|
-
name: "",
|
|
5810
|
-
type: "uint256"
|
|
5811
|
-
}
|
|
5812
|
-
],
|
|
5813
|
-
stateMutability: "view",
|
|
5814
|
-
type: "function"
|
|
5815
|
-
},
|
|
5816
|
-
{
|
|
5817
|
-
inputs: [],
|
|
5818
|
-
name: "acceptOwnership",
|
|
5819
|
-
outputs: [],
|
|
5820
|
-
stateMutability: "nonpayable",
|
|
5821
|
-
type: "function"
|
|
5822
|
-
},
|
|
5823
|
-
{
|
|
5824
|
-
inputs: [
|
|
5825
|
-
{
|
|
5826
|
-
internalType: "uint256",
|
|
5827
|
-
name: "_chainId",
|
|
5828
|
-
type: "uint256"
|
|
5829
|
-
},
|
|
5830
|
-
{
|
|
5831
|
-
internalType: "bytes32",
|
|
5832
|
-
name: "_canonicalTxHash",
|
|
5833
|
-
type: "bytes32"
|
|
5840
|
+
internalType: "bytes32"
|
|
5834
5841
|
},
|
|
5835
5842
|
{
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5843
|
+
name: "interopBundleHash",
|
|
5844
|
+
type: "bytes32",
|
|
5845
|
+
indexed: false,
|
|
5846
|
+
internalType: "bytes32"
|
|
5839
5847
|
},
|
|
5840
5848
|
{
|
|
5849
|
+
name: "interopBundle",
|
|
5850
|
+
type: "tuple",
|
|
5851
|
+
indexed: false,
|
|
5852
|
+
internalType: "struct InteropBundle",
|
|
5841
5853
|
components: [
|
|
5842
5854
|
{
|
|
5843
|
-
internalType: "bytes1",
|
|
5844
5855
|
name: "version",
|
|
5845
|
-
type: "bytes1"
|
|
5846
|
-
|
|
5847
|
-
{
|
|
5848
|
-
internalType: "address",
|
|
5849
|
-
name: "originToken",
|
|
5850
|
-
type: "address"
|
|
5856
|
+
type: "bytes1",
|
|
5857
|
+
internalType: "bytes1"
|
|
5851
5858
|
},
|
|
5852
5859
|
{
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5860
|
+
name: "sourceChainId",
|
|
5861
|
+
type: "uint256",
|
|
5862
|
+
internalType: "uint256"
|
|
5856
5863
|
},
|
|
5857
5864
|
{
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5865
|
+
name: "destinationChainId",
|
|
5866
|
+
type: "uint256",
|
|
5867
|
+
internalType: "uint256"
|
|
5861
5868
|
},
|
|
5862
5869
|
{
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5870
|
+
name: "interopBundleSalt",
|
|
5871
|
+
type: "bytes32",
|
|
5872
|
+
internalType: "bytes32"
|
|
5866
5873
|
},
|
|
5867
5874
|
{
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5875
|
+
name: "calls",
|
|
5876
|
+
type: "tuple[]",
|
|
5877
|
+
internalType: "struct InteropCall[]",
|
|
5878
|
+
components: [
|
|
5879
|
+
{
|
|
5880
|
+
name: "version",
|
|
5881
|
+
type: "bytes1",
|
|
5882
|
+
internalType: "bytes1"
|
|
5883
|
+
},
|
|
5884
|
+
{
|
|
5885
|
+
name: "shadowAccount",
|
|
5886
|
+
type: "bool",
|
|
5887
|
+
internalType: "bool"
|
|
5888
|
+
},
|
|
5889
|
+
{
|
|
5890
|
+
name: "to",
|
|
5891
|
+
type: "address",
|
|
5892
|
+
internalType: "address"
|
|
5893
|
+
},
|
|
5894
|
+
{
|
|
5895
|
+
name: "from",
|
|
5896
|
+
type: "address",
|
|
5897
|
+
internalType: "address"
|
|
5898
|
+
},
|
|
5899
|
+
{
|
|
5900
|
+
name: "value",
|
|
5901
|
+
type: "uint256",
|
|
5902
|
+
internalType: "uint256"
|
|
5903
|
+
},
|
|
5904
|
+
{
|
|
5905
|
+
name: "data",
|
|
5906
|
+
type: "bytes",
|
|
5907
|
+
internalType: "bytes"
|
|
5908
|
+
}
|
|
5909
|
+
]
|
|
5871
5910
|
},
|
|
5872
5911
|
{
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5912
|
+
name: "bundleAttributes",
|
|
5913
|
+
type: "tuple",
|
|
5914
|
+
internalType: "struct BundleAttributes",
|
|
5915
|
+
components: [
|
|
5916
|
+
{
|
|
5917
|
+
name: "executionAddress",
|
|
5918
|
+
type: "bytes",
|
|
5919
|
+
internalType: "bytes"
|
|
5920
|
+
},
|
|
5921
|
+
{
|
|
5922
|
+
name: "unbundlerAddress",
|
|
5923
|
+
type: "bytes",
|
|
5924
|
+
internalType: "bytes"
|
|
5925
|
+
},
|
|
5926
|
+
{
|
|
5927
|
+
name: "useFixedFee",
|
|
5928
|
+
type: "bool",
|
|
5929
|
+
internalType: "bool"
|
|
5930
|
+
}
|
|
5931
|
+
]
|
|
5876
5932
|
}
|
|
5877
|
-
]
|
|
5878
|
-
internalType: "struct BalanceChange",
|
|
5879
|
-
name: "_balanceChange",
|
|
5880
|
-
type: "tuple"
|
|
5933
|
+
]
|
|
5881
5934
|
}
|
|
5882
5935
|
],
|
|
5883
|
-
|
|
5884
|
-
outputs: [],
|
|
5885
|
-
stateMutability: "nonpayable",
|
|
5886
|
-
type: "function"
|
|
5936
|
+
anonymous: false
|
|
5887
5937
|
},
|
|
5888
5938
|
{
|
|
5939
|
+
type: "event",
|
|
5940
|
+
name: "InteropFeeUpdated",
|
|
5889
5941
|
inputs: [
|
|
5890
5942
|
{
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5943
|
+
name: "oldFee",
|
|
5944
|
+
type: "uint256",
|
|
5945
|
+
indexed: true,
|
|
5946
|
+
internalType: "uint256"
|
|
5894
5947
|
},
|
|
5895
5948
|
{
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5949
|
+
name: "newFee",
|
|
5950
|
+
type: "uint256",
|
|
5951
|
+
indexed: true,
|
|
5952
|
+
internalType: "uint256"
|
|
5899
5953
|
}
|
|
5900
5954
|
],
|
|
5901
|
-
|
|
5902
|
-
outputs: [],
|
|
5903
|
-
stateMutability: "nonpayable",
|
|
5904
|
-
type: "function"
|
|
5955
|
+
anonymous: false
|
|
5905
5956
|
},
|
|
5906
5957
|
{
|
|
5958
|
+
type: "event",
|
|
5959
|
+
name: "NewAssetRouter",
|
|
5907
5960
|
inputs: [
|
|
5908
5961
|
{
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
name: "interopBundleNonce",
|
|
5915
|
-
outputs: [
|
|
5916
|
-
{
|
|
5917
|
-
internalType: "uint256",
|
|
5918
|
-
name: "numberOfBundlesSent",
|
|
5919
|
-
type: "uint256"
|
|
5920
|
-
}
|
|
5921
|
-
],
|
|
5922
|
-
stateMutability: "view",
|
|
5923
|
-
type: "function"
|
|
5924
|
-
},
|
|
5925
|
-
{
|
|
5926
|
-
inputs: [],
|
|
5927
|
-
name: "owner",
|
|
5928
|
-
outputs: [
|
|
5962
|
+
name: "oldAssetRouter",
|
|
5963
|
+
type: "address",
|
|
5964
|
+
indexed: true,
|
|
5965
|
+
internalType: "address"
|
|
5966
|
+
},
|
|
5929
5967
|
{
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5968
|
+
name: "newAssetRouter",
|
|
5969
|
+
type: "address",
|
|
5970
|
+
indexed: true,
|
|
5971
|
+
internalType: "address"
|
|
5933
5972
|
}
|
|
5934
5973
|
],
|
|
5935
|
-
|
|
5936
|
-
type: "function"
|
|
5974
|
+
anonymous: false
|
|
5937
5975
|
},
|
|
5938
5976
|
{
|
|
5977
|
+
type: "event",
|
|
5978
|
+
name: "NewAssetTracker",
|
|
5939
5979
|
inputs: [
|
|
5940
5980
|
{
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
{
|
|
5946
|
-
internalType: "enum IInteropCenter.AttributeParsingRestrictions",
|
|
5947
|
-
name: "_restriction",
|
|
5948
|
-
type: "uint8"
|
|
5949
|
-
}
|
|
5950
|
-
],
|
|
5951
|
-
name: "parseAttributes",
|
|
5952
|
-
outputs: [
|
|
5953
|
-
{
|
|
5954
|
-
components: [
|
|
5955
|
-
{
|
|
5956
|
-
internalType: "uint256",
|
|
5957
|
-
name: "interopCallValue",
|
|
5958
|
-
type: "uint256"
|
|
5959
|
-
},
|
|
5960
|
-
{
|
|
5961
|
-
internalType: "bool",
|
|
5962
|
-
name: "indirectCall",
|
|
5963
|
-
type: "bool"
|
|
5964
|
-
},
|
|
5965
|
-
{
|
|
5966
|
-
internalType: "uint256",
|
|
5967
|
-
name: "indirectCallMessageValue",
|
|
5968
|
-
type: "uint256"
|
|
5969
|
-
}
|
|
5970
|
-
],
|
|
5971
|
-
internalType: "struct CallAttributes",
|
|
5972
|
-
name: "callAttributes",
|
|
5973
|
-
type: "tuple"
|
|
5981
|
+
name: "oldAssetTracker",
|
|
5982
|
+
type: "address",
|
|
5983
|
+
indexed: true,
|
|
5984
|
+
internalType: "address"
|
|
5974
5985
|
},
|
|
5975
5986
|
{
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
type: "bytes"
|
|
5981
|
-
},
|
|
5982
|
-
{
|
|
5983
|
-
internalType: "bytes",
|
|
5984
|
-
name: "unbundlerAddress",
|
|
5985
|
-
type: "bytes"
|
|
5986
|
-
}
|
|
5987
|
-
],
|
|
5988
|
-
internalType: "struct BundleAttributes",
|
|
5989
|
-
name: "bundleAttributes",
|
|
5990
|
-
type: "tuple"
|
|
5991
|
-
}
|
|
5992
|
-
],
|
|
5993
|
-
stateMutability: "pure",
|
|
5994
|
-
type: "function"
|
|
5995
|
-
},
|
|
5996
|
-
{
|
|
5997
|
-
inputs: [],
|
|
5998
|
-
name: "pause",
|
|
5999
|
-
outputs: [],
|
|
6000
|
-
stateMutability: "nonpayable",
|
|
6001
|
-
type: "function"
|
|
6002
|
-
},
|
|
6003
|
-
{
|
|
6004
|
-
inputs: [],
|
|
6005
|
-
name: "paused",
|
|
6006
|
-
outputs: [
|
|
6007
|
-
{
|
|
6008
|
-
internalType: "bool",
|
|
6009
|
-
name: "",
|
|
6010
|
-
type: "bool"
|
|
6011
|
-
}
|
|
6012
|
-
],
|
|
6013
|
-
stateMutability: "view",
|
|
6014
|
-
type: "function"
|
|
6015
|
-
},
|
|
6016
|
-
{
|
|
6017
|
-
inputs: [],
|
|
6018
|
-
name: "pendingOwner",
|
|
6019
|
-
outputs: [
|
|
6020
|
-
{
|
|
6021
|
-
internalType: "address",
|
|
6022
|
-
name: "",
|
|
6023
|
-
type: "address"
|
|
5987
|
+
name: "newAssetTracker",
|
|
5988
|
+
type: "address",
|
|
5989
|
+
indexed: true,
|
|
5990
|
+
internalType: "address"
|
|
6024
5991
|
}
|
|
6025
5992
|
],
|
|
6026
|
-
|
|
6027
|
-
type: "function"
|
|
6028
|
-
},
|
|
6029
|
-
{
|
|
6030
|
-
inputs: [],
|
|
6031
|
-
name: "renounceOwnership",
|
|
6032
|
-
outputs: [],
|
|
6033
|
-
stateMutability: "nonpayable",
|
|
6034
|
-
type: "function"
|
|
5993
|
+
anonymous: false
|
|
6035
5994
|
},
|
|
6036
5995
|
{
|
|
5996
|
+
type: "event",
|
|
5997
|
+
name: "ProtocolFeesAccumulated",
|
|
6037
5998
|
inputs: [
|
|
6038
5999
|
{
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
{
|
|
6044
|
-
components: [
|
|
6045
|
-
{
|
|
6046
|
-
internalType: "bytes",
|
|
6047
|
-
name: "to",
|
|
6048
|
-
type: "bytes"
|
|
6049
|
-
},
|
|
6050
|
-
{
|
|
6051
|
-
internalType: "bytes",
|
|
6052
|
-
name: "data",
|
|
6053
|
-
type: "bytes"
|
|
6054
|
-
},
|
|
6055
|
-
{
|
|
6056
|
-
internalType: "bytes[]",
|
|
6057
|
-
name: "callAttributes",
|
|
6058
|
-
type: "bytes[]"
|
|
6059
|
-
}
|
|
6060
|
-
],
|
|
6061
|
-
internalType: "struct InteropCallStarter[]",
|
|
6062
|
-
name: "_callStarters",
|
|
6063
|
-
type: "tuple[]"
|
|
6000
|
+
name: "coinbase",
|
|
6001
|
+
type: "address",
|
|
6002
|
+
indexed: true,
|
|
6003
|
+
internalType: "address"
|
|
6064
6004
|
},
|
|
6065
6005
|
{
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
],
|
|
6071
|
-
name: "sendBundle",
|
|
6072
|
-
outputs: [
|
|
6073
|
-
{
|
|
6074
|
-
internalType: "bytes32",
|
|
6075
|
-
name: "bundleHash",
|
|
6076
|
-
type: "bytes32"
|
|
6006
|
+
name: "amount",
|
|
6007
|
+
type: "uint256",
|
|
6008
|
+
indexed: false,
|
|
6009
|
+
internalType: "uint256"
|
|
6077
6010
|
}
|
|
6078
6011
|
],
|
|
6079
|
-
|
|
6080
|
-
type: "function"
|
|
6012
|
+
anonymous: false
|
|
6081
6013
|
},
|
|
6082
6014
|
{
|
|
6015
|
+
type: "event",
|
|
6016
|
+
name: "ProtocolFeesClaimed",
|
|
6083
6017
|
inputs: [
|
|
6084
6018
|
{
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6019
|
+
name: "coinbase",
|
|
6020
|
+
type: "address",
|
|
6021
|
+
indexed: true,
|
|
6022
|
+
internalType: "address"
|
|
6088
6023
|
},
|
|
6089
6024
|
{
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6025
|
+
name: "receiver",
|
|
6026
|
+
type: "address",
|
|
6027
|
+
indexed: true,
|
|
6028
|
+
internalType: "address"
|
|
6093
6029
|
},
|
|
6094
6030
|
{
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
],
|
|
6100
|
-
name: "sendMessage",
|
|
6101
|
-
outputs: [
|
|
6102
|
-
{
|
|
6103
|
-
internalType: "bytes32",
|
|
6104
|
-
name: "sendId",
|
|
6105
|
-
type: "bytes32"
|
|
6031
|
+
name: "amount",
|
|
6032
|
+
type: "uint256",
|
|
6033
|
+
indexed: false,
|
|
6034
|
+
internalType: "uint256"
|
|
6106
6035
|
}
|
|
6107
6036
|
],
|
|
6108
|
-
|
|
6109
|
-
type: "function"
|
|
6037
|
+
anonymous: false
|
|
6110
6038
|
},
|
|
6111
6039
|
{
|
|
6040
|
+
type: "event",
|
|
6041
|
+
name: "ZKFeesClaimed",
|
|
6112
6042
|
inputs: [
|
|
6113
6043
|
{
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
name: "supportsAttribute",
|
|
6120
|
-
outputs: [
|
|
6044
|
+
name: "coinbase",
|
|
6045
|
+
type: "address",
|
|
6046
|
+
indexed: true,
|
|
6047
|
+
internalType: "address"
|
|
6048
|
+
},
|
|
6121
6049
|
{
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
stateMutability: "pure",
|
|
6128
|
-
type: "function"
|
|
6129
|
-
},
|
|
6130
|
-
{
|
|
6131
|
-
inputs: [
|
|
6050
|
+
name: "receiver",
|
|
6051
|
+
type: "address",
|
|
6052
|
+
indexed: true,
|
|
6053
|
+
internalType: "address"
|
|
6054
|
+
},
|
|
6132
6055
|
{
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6056
|
+
name: "amount",
|
|
6057
|
+
type: "uint256",
|
|
6058
|
+
indexed: false,
|
|
6059
|
+
internalType: "uint256"
|
|
6136
6060
|
}
|
|
6137
6061
|
],
|
|
6138
|
-
|
|
6139
|
-
outputs: [],
|
|
6140
|
-
stateMutability: "nonpayable",
|
|
6141
|
-
type: "function"
|
|
6142
|
-
},
|
|
6143
|
-
{
|
|
6144
|
-
inputs: [],
|
|
6145
|
-
name: "unpause",
|
|
6146
|
-
outputs: [],
|
|
6147
|
-
stateMutability: "nonpayable",
|
|
6148
|
-
type: "function"
|
|
6062
|
+
anonymous: false
|
|
6149
6063
|
}
|
|
6150
6064
|
];
|
|
6151
|
-
var
|
|
6065
|
+
var IInteropCenter_default = IInteropCenterABI;
|
|
6152
6066
|
|
|
6153
6067
|
// src/core/internal/abis/IInteropHandler.ts
|
|
6154
6068
|
var IInteropHandlerABI = [
|
|
6155
6069
|
{
|
|
6156
|
-
|
|
6157
|
-
|
|
6070
|
+
type: "function",
|
|
6071
|
+
name: "L1_CHAIN_ID",
|
|
6072
|
+
inputs: [],
|
|
6073
|
+
outputs: [
|
|
6158
6074
|
{
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
type: "bytes32"
|
|
6075
|
+
name: "",
|
|
6076
|
+
type: "uint256",
|
|
6077
|
+
internalType: "uint256"
|
|
6163
6078
|
}
|
|
6164
6079
|
],
|
|
6165
|
-
|
|
6166
|
-
type: "event"
|
|
6080
|
+
stateMutability: "view"
|
|
6167
6081
|
},
|
|
6168
6082
|
{
|
|
6169
|
-
|
|
6083
|
+
type: "function",
|
|
6084
|
+
name: "bundleStatus",
|
|
6170
6085
|
inputs: [
|
|
6171
6086
|
{
|
|
6172
|
-
indexed: true,
|
|
6173
|
-
internalType: "bytes32",
|
|
6174
6087
|
name: "bundleHash",
|
|
6175
|
-
type: "bytes32"
|
|
6088
|
+
type: "bytes32",
|
|
6089
|
+
internalType: "bytes32"
|
|
6176
6090
|
}
|
|
6177
6091
|
],
|
|
6178
|
-
|
|
6179
|
-
type: "event"
|
|
6180
|
-
},
|
|
6181
|
-
{
|
|
6182
|
-
anonymous: false,
|
|
6183
|
-
inputs: [
|
|
6092
|
+
outputs: [
|
|
6184
6093
|
{
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
type: "bytes32"
|
|
6094
|
+
name: "",
|
|
6095
|
+
type: "uint8",
|
|
6096
|
+
internalType: "enum BundleStatus"
|
|
6189
6097
|
}
|
|
6190
6098
|
],
|
|
6191
|
-
|
|
6192
|
-
type: "event"
|
|
6099
|
+
stateMutability: "view"
|
|
6193
6100
|
},
|
|
6194
6101
|
{
|
|
6195
|
-
|
|
6102
|
+
type: "function",
|
|
6103
|
+
name: "callStatus",
|
|
6196
6104
|
inputs: [
|
|
6197
6105
|
{
|
|
6198
|
-
indexed: true,
|
|
6199
|
-
internalType: "bytes32",
|
|
6200
6106
|
name: "bundleHash",
|
|
6201
|
-
type: "bytes32"
|
|
6107
|
+
type: "bytes32",
|
|
6108
|
+
internalType: "bytes32"
|
|
6202
6109
|
},
|
|
6203
6110
|
{
|
|
6204
|
-
indexed: true,
|
|
6205
|
-
internalType: "uint256",
|
|
6206
6111
|
name: "callIndex",
|
|
6207
|
-
type: "uint256"
|
|
6208
|
-
|
|
6112
|
+
type: "uint256",
|
|
6113
|
+
internalType: "uint256"
|
|
6114
|
+
}
|
|
6115
|
+
],
|
|
6116
|
+
outputs: [
|
|
6209
6117
|
{
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
type: "uint8"
|
|
6118
|
+
name: "",
|
|
6119
|
+
type: "uint8",
|
|
6120
|
+
internalType: "enum CallStatus"
|
|
6214
6121
|
}
|
|
6215
6122
|
],
|
|
6216
|
-
|
|
6217
|
-
type: "event"
|
|
6123
|
+
stateMutability: "view"
|
|
6218
6124
|
},
|
|
6219
6125
|
{
|
|
6126
|
+
type: "function",
|
|
6127
|
+
name: "executeBundle",
|
|
6220
6128
|
inputs: [
|
|
6221
6129
|
{
|
|
6222
|
-
internalType: "bytes",
|
|
6223
6130
|
name: "_bundle",
|
|
6224
|
-
type: "bytes"
|
|
6131
|
+
type: "bytes",
|
|
6132
|
+
internalType: "bytes"
|
|
6225
6133
|
},
|
|
6226
6134
|
{
|
|
6135
|
+
name: "_proof",
|
|
6136
|
+
type: "tuple",
|
|
6137
|
+
internalType: "struct MessageInclusionProof",
|
|
6227
6138
|
components: [
|
|
6228
6139
|
{
|
|
6229
|
-
internalType: "uint256",
|
|
6230
6140
|
name: "chainId",
|
|
6231
|
-
type: "uint256"
|
|
6141
|
+
type: "uint256",
|
|
6142
|
+
internalType: "uint256"
|
|
6232
6143
|
},
|
|
6233
6144
|
{
|
|
6234
|
-
internalType: "uint256",
|
|
6235
6145
|
name: "l1BatchNumber",
|
|
6236
|
-
type: "uint256"
|
|
6146
|
+
type: "uint256",
|
|
6147
|
+
internalType: "uint256"
|
|
6237
6148
|
},
|
|
6238
6149
|
{
|
|
6239
|
-
internalType: "uint256",
|
|
6240
6150
|
name: "l2MessageIndex",
|
|
6241
|
-
type: "uint256"
|
|
6151
|
+
type: "uint256",
|
|
6152
|
+
internalType: "uint256"
|
|
6242
6153
|
},
|
|
6243
6154
|
{
|
|
6155
|
+
name: "message",
|
|
6156
|
+
type: "tuple",
|
|
6157
|
+
internalType: "struct L2Message",
|
|
6244
6158
|
components: [
|
|
6245
6159
|
{
|
|
6246
|
-
internalType: "uint16",
|
|
6247
6160
|
name: "txNumberInBatch",
|
|
6248
|
-
type: "uint16"
|
|
6161
|
+
type: "uint16",
|
|
6162
|
+
internalType: "uint16"
|
|
6249
6163
|
},
|
|
6250
6164
|
{
|
|
6251
|
-
internalType: "address",
|
|
6252
6165
|
name: "sender",
|
|
6253
|
-
type: "address"
|
|
6166
|
+
type: "address",
|
|
6167
|
+
internalType: "address"
|
|
6254
6168
|
},
|
|
6255
6169
|
{
|
|
6256
|
-
internalType: "bytes",
|
|
6257
6170
|
name: "data",
|
|
6258
|
-
type: "bytes"
|
|
6171
|
+
type: "bytes",
|
|
6172
|
+
internalType: "bytes"
|
|
6259
6173
|
}
|
|
6260
|
-
]
|
|
6261
|
-
internalType: "struct L2Message",
|
|
6262
|
-
name: "message",
|
|
6263
|
-
type: "tuple"
|
|
6174
|
+
]
|
|
6264
6175
|
},
|
|
6265
6176
|
{
|
|
6266
|
-
internalType: "bytes32[]",
|
|
6267
6177
|
name: "proof",
|
|
6268
|
-
type: "bytes32[]"
|
|
6178
|
+
type: "bytes32[]",
|
|
6179
|
+
internalType: "bytes32[]"
|
|
6269
6180
|
}
|
|
6270
|
-
]
|
|
6271
|
-
internalType: "struct MessageInclusionProof",
|
|
6272
|
-
name: "_proof",
|
|
6273
|
-
type: "tuple"
|
|
6181
|
+
]
|
|
6274
6182
|
}
|
|
6275
6183
|
],
|
|
6276
|
-
name: "executeBundle",
|
|
6277
6184
|
outputs: [],
|
|
6278
|
-
stateMutability: "nonpayable"
|
|
6279
|
-
type: "function"
|
|
6185
|
+
stateMutability: "nonpayable"
|
|
6280
6186
|
},
|
|
6281
6187
|
{
|
|
6188
|
+
type: "function",
|
|
6189
|
+
name: "initL2",
|
|
6190
|
+
inputs: [
|
|
6191
|
+
{
|
|
6192
|
+
name: "_l1ChainId",
|
|
6193
|
+
type: "uint256",
|
|
6194
|
+
internalType: "uint256"
|
|
6195
|
+
}
|
|
6196
|
+
],
|
|
6197
|
+
outputs: [],
|
|
6198
|
+
stateMutability: "nonpayable"
|
|
6199
|
+
},
|
|
6200
|
+
{
|
|
6201
|
+
type: "function",
|
|
6202
|
+
name: "unbundleBundle",
|
|
6282
6203
|
inputs: [
|
|
6283
6204
|
{
|
|
6284
|
-
internalType: "uint256",
|
|
6285
6205
|
name: "_sourceChainId",
|
|
6286
|
-
type: "uint256"
|
|
6206
|
+
type: "uint256",
|
|
6207
|
+
internalType: "uint256"
|
|
6287
6208
|
},
|
|
6288
6209
|
{
|
|
6289
|
-
internalType: "bytes",
|
|
6290
6210
|
name: "_bundle",
|
|
6291
|
-
type: "bytes"
|
|
6211
|
+
type: "bytes",
|
|
6212
|
+
internalType: "bytes"
|
|
6292
6213
|
},
|
|
6293
6214
|
{
|
|
6294
|
-
internalType: "enum CallStatus[]",
|
|
6295
6215
|
name: "_callStatus",
|
|
6296
|
-
type: "uint8[]"
|
|
6216
|
+
type: "uint8[]",
|
|
6217
|
+
internalType: "enum CallStatus[]"
|
|
6297
6218
|
}
|
|
6298
6219
|
],
|
|
6299
|
-
name: "unbundleBundle",
|
|
6300
6220
|
outputs: [],
|
|
6301
|
-
stateMutability: "nonpayable"
|
|
6302
|
-
type: "function"
|
|
6221
|
+
stateMutability: "nonpayable"
|
|
6303
6222
|
},
|
|
6304
6223
|
{
|
|
6224
|
+
type: "function",
|
|
6225
|
+
name: "verifyBundle",
|
|
6305
6226
|
inputs: [
|
|
6306
6227
|
{
|
|
6307
|
-
internalType: "bytes",
|
|
6308
6228
|
name: "_bundle",
|
|
6309
|
-
type: "bytes"
|
|
6229
|
+
type: "bytes",
|
|
6230
|
+
internalType: "bytes"
|
|
6310
6231
|
},
|
|
6311
6232
|
{
|
|
6233
|
+
name: "_proof",
|
|
6234
|
+
type: "tuple",
|
|
6235
|
+
internalType: "struct MessageInclusionProof",
|
|
6312
6236
|
components: [
|
|
6313
6237
|
{
|
|
6314
|
-
internalType: "uint256",
|
|
6315
6238
|
name: "chainId",
|
|
6316
|
-
type: "uint256"
|
|
6239
|
+
type: "uint256",
|
|
6240
|
+
internalType: "uint256"
|
|
6317
6241
|
},
|
|
6318
6242
|
{
|
|
6319
|
-
internalType: "uint256",
|
|
6320
6243
|
name: "l1BatchNumber",
|
|
6321
|
-
type: "uint256"
|
|
6244
|
+
type: "uint256",
|
|
6245
|
+
internalType: "uint256"
|
|
6322
6246
|
},
|
|
6323
6247
|
{
|
|
6324
|
-
internalType: "uint256",
|
|
6325
6248
|
name: "l2MessageIndex",
|
|
6326
|
-
type: "uint256"
|
|
6249
|
+
type: "uint256",
|
|
6250
|
+
internalType: "uint256"
|
|
6327
6251
|
},
|
|
6328
6252
|
{
|
|
6253
|
+
name: "message",
|
|
6254
|
+
type: "tuple",
|
|
6255
|
+
internalType: "struct L2Message",
|
|
6329
6256
|
components: [
|
|
6330
6257
|
{
|
|
6331
|
-
internalType: "uint16",
|
|
6332
6258
|
name: "txNumberInBatch",
|
|
6333
|
-
type: "uint16"
|
|
6259
|
+
type: "uint16",
|
|
6260
|
+
internalType: "uint16"
|
|
6334
6261
|
},
|
|
6335
6262
|
{
|
|
6336
|
-
internalType: "address",
|
|
6337
6263
|
name: "sender",
|
|
6338
|
-
type: "address"
|
|
6264
|
+
type: "address",
|
|
6265
|
+
internalType: "address"
|
|
6339
6266
|
},
|
|
6340
6267
|
{
|
|
6341
|
-
internalType: "bytes",
|
|
6342
6268
|
name: "data",
|
|
6343
|
-
type: "bytes"
|
|
6269
|
+
type: "bytes",
|
|
6270
|
+
internalType: "bytes"
|
|
6344
6271
|
}
|
|
6345
|
-
]
|
|
6346
|
-
internalType: "struct L2Message",
|
|
6347
|
-
name: "message",
|
|
6348
|
-
type: "tuple"
|
|
6272
|
+
]
|
|
6349
6273
|
},
|
|
6350
6274
|
{
|
|
6351
|
-
internalType: "bytes32[]",
|
|
6352
6275
|
name: "proof",
|
|
6353
|
-
type: "bytes32[]"
|
|
6276
|
+
type: "bytes32[]",
|
|
6277
|
+
internalType: "bytes32[]"
|
|
6354
6278
|
}
|
|
6355
|
-
]
|
|
6356
|
-
internalType: "struct MessageInclusionProof",
|
|
6357
|
-
name: "_proof",
|
|
6358
|
-
type: "tuple"
|
|
6279
|
+
]
|
|
6359
6280
|
}
|
|
6360
6281
|
],
|
|
6361
|
-
name: "verifyBundle",
|
|
6362
6282
|
outputs: [],
|
|
6363
|
-
stateMutability: "nonpayable"
|
|
6364
|
-
|
|
6283
|
+
stateMutability: "nonpayable"
|
|
6284
|
+
},
|
|
6285
|
+
{
|
|
6286
|
+
type: "event",
|
|
6287
|
+
name: "BundleExecuted",
|
|
6288
|
+
inputs: [
|
|
6289
|
+
{
|
|
6290
|
+
name: "bundleHash",
|
|
6291
|
+
type: "bytes32",
|
|
6292
|
+
indexed: true,
|
|
6293
|
+
internalType: "bytes32"
|
|
6294
|
+
}
|
|
6295
|
+
],
|
|
6296
|
+
anonymous: false
|
|
6297
|
+
},
|
|
6298
|
+
{
|
|
6299
|
+
type: "event",
|
|
6300
|
+
name: "BundleUnbundled",
|
|
6301
|
+
inputs: [
|
|
6302
|
+
{
|
|
6303
|
+
name: "bundleHash",
|
|
6304
|
+
type: "bytes32",
|
|
6305
|
+
indexed: true,
|
|
6306
|
+
internalType: "bytes32"
|
|
6307
|
+
}
|
|
6308
|
+
],
|
|
6309
|
+
anonymous: false
|
|
6310
|
+
},
|
|
6311
|
+
{
|
|
6312
|
+
type: "event",
|
|
6313
|
+
name: "BundleVerified",
|
|
6314
|
+
inputs: [
|
|
6315
|
+
{
|
|
6316
|
+
name: "bundleHash",
|
|
6317
|
+
type: "bytes32",
|
|
6318
|
+
indexed: true,
|
|
6319
|
+
internalType: "bytes32"
|
|
6320
|
+
}
|
|
6321
|
+
],
|
|
6322
|
+
anonymous: false
|
|
6323
|
+
},
|
|
6324
|
+
{
|
|
6325
|
+
type: "event",
|
|
6326
|
+
name: "CallProcessed",
|
|
6327
|
+
inputs: [
|
|
6328
|
+
{
|
|
6329
|
+
name: "bundleHash",
|
|
6330
|
+
type: "bytes32",
|
|
6331
|
+
indexed: true,
|
|
6332
|
+
internalType: "bytes32"
|
|
6333
|
+
},
|
|
6334
|
+
{
|
|
6335
|
+
name: "callIndex",
|
|
6336
|
+
type: "uint256",
|
|
6337
|
+
indexed: true,
|
|
6338
|
+
internalType: "uint256"
|
|
6339
|
+
},
|
|
6340
|
+
{
|
|
6341
|
+
name: "status",
|
|
6342
|
+
type: "uint8",
|
|
6343
|
+
indexed: false,
|
|
6344
|
+
internalType: "enum CallStatus"
|
|
6345
|
+
}
|
|
6346
|
+
],
|
|
6347
|
+
anonymous: false
|
|
6365
6348
|
}
|
|
6366
6349
|
];
|
|
6367
6350
|
var IInteropHandler_default = IInteropHandlerABI;
|
|
6368
6351
|
|
|
6369
|
-
// src/core/internal/abis/
|
|
6352
|
+
// src/core/internal/abis/IInteropRootStorage.ts
|
|
6370
6353
|
var InteropRootStorageABI = [
|
|
6371
6354
|
{
|
|
6355
|
+
type: "function",
|
|
6356
|
+
name: "interopRoots",
|
|
6372
6357
|
inputs: [
|
|
6373
6358
|
{
|
|
6374
|
-
internalType: "uint256",
|
|
6375
6359
|
name: "chainId",
|
|
6376
|
-
type: "uint256"
|
|
6360
|
+
type: "uint256",
|
|
6361
|
+
internalType: "uint256"
|
|
6377
6362
|
},
|
|
6378
6363
|
{
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6364
|
+
name: "blockOrBatchNumber",
|
|
6365
|
+
type: "uint256",
|
|
6366
|
+
internalType: "uint256"
|
|
6382
6367
|
}
|
|
6383
6368
|
],
|
|
6384
|
-
name: "interopRoots",
|
|
6385
6369
|
outputs: [
|
|
6386
6370
|
{
|
|
6387
|
-
internalType: "bytes32",
|
|
6388
6371
|
name: "",
|
|
6389
|
-
type: "bytes32"
|
|
6372
|
+
type: "bytes32",
|
|
6373
|
+
internalType: "bytes32"
|
|
6390
6374
|
}
|
|
6391
6375
|
],
|
|
6392
|
-
stateMutability: "view"
|
|
6393
|
-
|
|
6376
|
+
stateMutability: "view"
|
|
6377
|
+
},
|
|
6378
|
+
{
|
|
6379
|
+
type: "event",
|
|
6380
|
+
name: "InteropRootAdded",
|
|
6381
|
+
inputs: [
|
|
6382
|
+
{
|
|
6383
|
+
name: "chainId",
|
|
6384
|
+
type: "uint256",
|
|
6385
|
+
indexed: true,
|
|
6386
|
+
internalType: "uint256"
|
|
6387
|
+
},
|
|
6388
|
+
{
|
|
6389
|
+
name: "blockNumber",
|
|
6390
|
+
type: "uint256",
|
|
6391
|
+
indexed: true,
|
|
6392
|
+
internalType: "uint256"
|
|
6393
|
+
},
|
|
6394
|
+
{
|
|
6395
|
+
name: "sides",
|
|
6396
|
+
type: "bytes32[]",
|
|
6397
|
+
indexed: false,
|
|
6398
|
+
internalType: "bytes32[]"
|
|
6399
|
+
}
|
|
6400
|
+
],
|
|
6401
|
+
anonymous: false
|
|
6394
6402
|
}
|
|
6395
6403
|
];
|
|
6396
|
-
var
|
|
6404
|
+
var IInteropRootStorage_default = InteropRootStorageABI;
|
|
6397
6405
|
|
|
6398
6406
|
// src/core/internal/abis/L2MessageVerification.ts
|
|
6399
6407
|
var L2MessageVerificationABI = [
|
|
@@ -7030,7 +7038,7 @@ function createEthersClient(args) {
|
|
|
7030
7038
|
l2AssetRouter: new ethers.Contract(a.l2AssetRouter, IL2AssetRouter_default, l2),
|
|
7031
7039
|
l2NativeTokenVault: new ethers.Contract(a.l2NativeTokenVault, L2NativeTokenVault_default, l2),
|
|
7032
7040
|
l2BaseTokenSystem: new ethers.Contract(a.l2BaseTokenSystem, IBaseToken_default, l2),
|
|
7033
|
-
interopCenter: new ethers.Contract(a.interopCenter,
|
|
7041
|
+
interopCenter: new ethers.Contract(a.interopCenter, IInteropCenter_default, l2),
|
|
7034
7042
|
interopHandler: new ethers.Contract(a.interopHandler, IInteropHandler_default, l2),
|
|
7035
7043
|
l2MessageVerification: new ethers.Contract(a.l2MessageVerification, L2MessageVerification_default, l2)
|
|
7036
7044
|
};
|
|
@@ -7492,6 +7500,8 @@ async function quoteL2BaseCost2(input) {
|
|
|
7492
7500
|
}
|
|
7493
7501
|
|
|
7494
7502
|
// src/adapters/ethers/resources/deposits/services/gas.ts
|
|
7503
|
+
var DEFAULT_SAFE_NONBASE_L2_GAS_LIMIT = 3000000n;
|
|
7504
|
+
var ZERO_L2_TOKEN_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
7495
7505
|
async function quoteL1Gas2(input) {
|
|
7496
7506
|
const { ctx, tx, overrides, fallbackGasLimit } = input;
|
|
7497
7507
|
const estimator = ethersToGasEstimator(ctx.client.l1);
|
|
@@ -7515,24 +7525,24 @@ async function quoteL2Gas2(input) {
|
|
|
7515
7525
|
stateOverrides: input.stateOverrides
|
|
7516
7526
|
});
|
|
7517
7527
|
}
|
|
7518
|
-
async function
|
|
7519
|
-
const { ctx, l1Token } = input;
|
|
7520
|
-
const
|
|
7528
|
+
async function determineNonBaseL2Gas(input) {
|
|
7529
|
+
const { ctx, l1Token, route } = input;
|
|
7530
|
+
const fallbackQuote = () => quoteL2Gas2({
|
|
7531
|
+
ctx,
|
|
7532
|
+
route,
|
|
7533
|
+
overrideGasLimit: DEFAULT_SAFE_NONBASE_L2_GAS_LIMIT
|
|
7534
|
+
});
|
|
7521
7535
|
if (ctx.l2GasLimit != null) {
|
|
7522
7536
|
return quoteL2Gas2({
|
|
7523
7537
|
ctx,
|
|
7524
|
-
route
|
|
7538
|
+
route,
|
|
7525
7539
|
overrideGasLimit: ctx.l2GasLimit
|
|
7526
7540
|
});
|
|
7527
7541
|
}
|
|
7528
7542
|
try {
|
|
7529
|
-
const l2TokenAddress = ctx.tokens ? await ctx.tokens.toL2Address(l1Token) : await (await ctx.contracts.l2NativeTokenVault()).l2TokenAddress(l1Token);
|
|
7530
|
-
if (l2TokenAddress ===
|
|
7531
|
-
return
|
|
7532
|
-
ctx,
|
|
7533
|
-
route: "erc20-nonbase",
|
|
7534
|
-
overrideGasLimit: DEFAULT_SAFE_L2_GAS_LIMIT
|
|
7535
|
-
});
|
|
7543
|
+
const l2TokenAddress = input.knownL2Token ?? (ctx.tokens ? await ctx.tokens.toL2Address(l1Token) : await (await ctx.contracts.l2NativeTokenVault()).l2TokenAddress(l1Token));
|
|
7544
|
+
if (l2TokenAddress === ZERO_L2_TOKEN_ADDRESS) {
|
|
7545
|
+
return fallbackQuote();
|
|
7536
7546
|
}
|
|
7537
7547
|
const modelTx = {
|
|
7538
7548
|
to: input.modelTx?.to ?? ctx.sender,
|
|
@@ -7542,26 +7552,34 @@ async function determineErc20L2Gas(input) {
|
|
|
7542
7552
|
};
|
|
7543
7553
|
const gas = await quoteL2Gas2({
|
|
7544
7554
|
ctx,
|
|
7545
|
-
route
|
|
7555
|
+
route,
|
|
7546
7556
|
l2TxForModeling: modelTx
|
|
7547
7557
|
});
|
|
7548
|
-
if (!gas) {
|
|
7549
|
-
return
|
|
7550
|
-
ctx,
|
|
7551
|
-
route: "erc20-nonbase",
|
|
7552
|
-
overrideGasLimit: DEFAULT_SAFE_L2_GAS_LIMIT
|
|
7553
|
-
});
|
|
7558
|
+
if (!gas || gas.gasLimit === 0n) {
|
|
7559
|
+
return fallbackQuote();
|
|
7554
7560
|
}
|
|
7555
7561
|
return gas;
|
|
7556
7562
|
} catch (err) {
|
|
7557
|
-
console.warn("Failed to determine
|
|
7558
|
-
return
|
|
7559
|
-
ctx,
|
|
7560
|
-
route: "erc20-nonbase",
|
|
7561
|
-
overrideGasLimit: DEFAULT_SAFE_L2_GAS_LIMIT
|
|
7562
|
-
});
|
|
7563
|
+
console.warn("Failed to determine non-base deposit L2 gas; defaulting to safe gas limit.", err);
|
|
7564
|
+
return fallbackQuote();
|
|
7563
7565
|
}
|
|
7564
7566
|
}
|
|
7567
|
+
async function determineErc20L2Gas(input) {
|
|
7568
|
+
return determineNonBaseL2Gas({
|
|
7569
|
+
...input,
|
|
7570
|
+
route: "erc20-nonbase",
|
|
7571
|
+
knownL2Token: input.ctx.resolvedToken?.l2
|
|
7572
|
+
});
|
|
7573
|
+
}
|
|
7574
|
+
async function determineEthNonBaseL2Gas(input) {
|
|
7575
|
+
return determineNonBaseL2Gas({
|
|
7576
|
+
ctx: input.ctx,
|
|
7577
|
+
route: "eth-nonbase",
|
|
7578
|
+
l1Token: input.ctx.resolvedToken?.l1 ?? FORMAL_ETH_ADDRESS,
|
|
7579
|
+
knownL2Token: input.ctx.resolvedToken?.l2,
|
|
7580
|
+
modelTx: input.modelTx
|
|
7581
|
+
});
|
|
7582
|
+
}
|
|
7565
7583
|
|
|
7566
7584
|
// src/core/resources/deposits/fee.ts
|
|
7567
7585
|
function buildFeeBreakdown(p) {
|
|
@@ -7876,11 +7894,9 @@ function routeEthNonBase() {
|
|
|
7876
7894
|
data: "0x",
|
|
7877
7895
|
value: 0n
|
|
7878
7896
|
};
|
|
7879
|
-
const l2GasParams = await
|
|
7897
|
+
const l2GasParams = await determineEthNonBaseL2Gas({
|
|
7880
7898
|
ctx,
|
|
7881
|
-
|
|
7882
|
-
l2TxForModeling: l2TxModel,
|
|
7883
|
-
overrideGasLimit: ctx.l2GasLimit
|
|
7899
|
+
modelTx: l2TxModel
|
|
7884
7900
|
});
|
|
7885
7901
|
if (!l2GasParams) throw new Error("Failed to estimate L2 gas parameters.");
|
|
7886
7902
|
const baseCost = await quoteL2BaseCost2({ ctx, l2GasLimit: l2GasParams.gasLimit });
|
|
@@ -7900,7 +7916,7 @@ function routeEthNonBase() {
|
|
|
7900
7916
|
if (allowance < mintValue) {
|
|
7901
7917
|
approvals.push({ token: baseToken, spender: ctx.l1AssetRouter, amount: mintValue });
|
|
7902
7918
|
steps.push({
|
|
7903
|
-
key: `approve:${baseToken}`,
|
|
7919
|
+
key: `approve:${baseToken}:${ctx.l1AssetRouter}`,
|
|
7904
7920
|
kind: "approve",
|
|
7905
7921
|
description: `Approve base token for fees (mintValue)`,
|
|
7906
7922
|
tx: {
|
|
@@ -9107,7 +9123,7 @@ function createFinalizationServices(client) {
|
|
|
9107
9123
|
chainId: BigInt(chainId),
|
|
9108
9124
|
l2BatchNumber: proof.batchNumber,
|
|
9109
9125
|
l2MessageIndex: proof.id,
|
|
9110
|
-
l2Sender:
|
|
9126
|
+
l2Sender: parsed.to,
|
|
9111
9127
|
l2TxNumberInBatch: txIndex,
|
|
9112
9128
|
message,
|
|
9113
9129
|
merkleProof: proof.proof
|
|
@@ -10116,7 +10132,7 @@ async function commonCtx3(dstProvider, params, client, tokens, contracts, attrib
|
|
|
10116
10132
|
client.baseToken(chainId),
|
|
10117
10133
|
client.baseToken(dstChainId)
|
|
10118
10134
|
]);
|
|
10119
|
-
const interopCenterIface = new ethers.Interface(
|
|
10135
|
+
const interopCenterIface = new ethers.Interface(IInteropCenter_default);
|
|
10120
10136
|
const interopHandlerIface = new ethers.Interface(IInteropHandler_default);
|
|
10121
10137
|
const baseMatches = srcBaseToken.toLowerCase() === dstBaseToken.toLowerCase();
|
|
10122
10138
|
return {
|
|
@@ -10141,7 +10157,7 @@ async function commonCtx3(dstProvider, params, client, tokens, contracts, attrib
|
|
|
10141
10157
|
};
|
|
10142
10158
|
}
|
|
10143
10159
|
function getTopics() {
|
|
10144
|
-
const centerIface = new ethers.Interface(
|
|
10160
|
+
const centerIface = new ethers.Interface(IInteropCenter_default);
|
|
10145
10161
|
const handlerIface = new ethers.Interface(IInteropHandler_default);
|
|
10146
10162
|
const topics = {
|
|
10147
10163
|
interopBundleSent: centerIface.getEvent("InteropBundleSent").topicHash,
|
|
@@ -10237,7 +10253,7 @@ async function getInteropRoot(provider, rootChainId, batchNumber) {
|
|
|
10237
10253
|
async () => {
|
|
10238
10254
|
const rootStorage = new ethers.Contract(
|
|
10239
10255
|
L2_INTEROP_ROOT_STORAGE_ADDRESS,
|
|
10240
|
-
|
|
10256
|
+
IInteropRootStorage_default,
|
|
10241
10257
|
provider
|
|
10242
10258
|
);
|
|
10243
10259
|
return await rootStorage.interopRoots(rootChainId, batchNumber);
|