@safe-global/protocol-kit 6.1.2 → 7.1.0
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/cjs/src/index.cjs +1498 -198
- package/dist/cjs/test-utils/index.cjs +584 -73
- package/dist/esm/src/index.mjs +1462 -143
- package/dist/esm/test-utils/index.mjs +566 -36
- package/dist/src/Safe.d.ts +125 -3
- package/dist/src/Safe.d.ts.map +1 -1
- package/dist/src/SafeProvider.d.ts.map +1 -1
- package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.d.ts +1 -0
- package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.d.ts +33 -0
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/CreateCall/CreateCallBaseContract.d.ts +1 -0
- package/dist/src/contracts/CreateCall/CreateCallBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.d.ts +38 -0
- package/dist/src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/ExtensibleFallbackHandler/ExtensibleFallbackHandlerBaseContract.d.ts +36 -0
- package/dist/src/contracts/ExtensibleFallbackHandler/ExtensibleFallbackHandlerBaseContract.d.ts.map +1 -0
- package/dist/src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.d.ts +86 -0
- package/dist/src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/MultiSend/MultiSendBaseContract.d.ts +1 -0
- package/dist/src/contracts/MultiSend/MultiSendBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.d.ts +26 -0
- package/dist/src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.d.ts +26 -0
- package/dist/src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/Safe/SafeBaseContract.d.ts +1 -0
- package/dist/src/contracts/Safe/SafeBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.d.ts +1 -1
- package/dist/src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.d.ts +156 -0
- package/dist/src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.d.ts +60 -0
- package/dist/src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.d.ts +1 -0
- package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.d.ts +34 -0
- package/dist/src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.d.ts +1 -0
- package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.d.ts +31 -0
- package/dist/src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/config.d.ts +1 -1
- package/dist/src/contracts/config.d.ts.map +1 -1
- package/dist/src/contracts/contractInstances.d.ts +18 -8
- package/dist/src/contracts/contractInstances.d.ts.map +1 -1
- package/dist/src/contracts/index.d.ts +2 -1
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/safeDeploymentContracts.d.ts +2 -1
- package/dist/src/contracts/safeDeploymentContracts.d.ts.map +1 -1
- package/dist/src/contracts/utils.d.ts.map +1 -1
- package/dist/src/index.d.ts +6 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/managers/fallbackHandlerManager.d.ts +1 -0
- package/dist/src/managers/fallbackHandlerManager.d.ts.map +1 -1
- package/dist/src/managers/moduleManager.d.ts +7 -0
- package/dist/src/managers/moduleManager.d.ts.map +1 -1
- package/dist/src/types/contracts.d.ts +22 -8
- package/dist/src/types/contracts.d.ts.map +1 -1
- package/dist/src/types/passkeys.d.ts +13 -2
- package/dist/src/types/passkeys.d.ts.map +1 -1
- package/dist/src/utils/eip-3770/config.d.ts.map +1 -1
- package/dist/src/utils/eip-3770/index.d.ts +1 -0
- package/dist/src/utils/eip-3770/index.d.ts.map +1 -1
- package/dist/src/utils/passkeys/PasskeyClient.d.ts +1 -1
- package/dist/src/utils/passkeys/PasskeyClient.d.ts.map +1 -1
- package/dist/src/utils/passkeys/extractPasskeyData.d.ts +8 -11
- package/dist/src/utils/passkeys/extractPasskeyData.d.ts.map +1 -1
- package/dist/src/utils/passkeys/isSharedSigner.d.ts +1 -1
- package/dist/src/utils/passkeys/isSharedSigner.d.ts.map +1 -1
- package/dist/src/utils/safeVersions.d.ts +10 -7
- package/dist/src/utils/safeVersions.d.ts.map +1 -1
- package/dist/test-utils/passkeys.d.ts +2 -2
- package/dist/test-utils/passkeys.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -299,7 +299,7 @@ var networks = [
|
|
|
299
299
|
{ chainId: 255n, shortName: "kroma" },
|
|
300
300
|
{ chainId: 274n, shortName: "lachain" },
|
|
301
301
|
{ chainId: 280n, shortName: "zksync-goerli" },
|
|
302
|
-
{ chainId: 282n, shortName: "zkTCRO" },
|
|
302
|
+
{ chainId: 282n, shortName: "deprecated-zkTCRO" },
|
|
303
303
|
{ chainId: 288n, shortName: "boba" },
|
|
304
304
|
{ chainId: 291n, shortName: "orderly" },
|
|
305
305
|
{ chainId: 295n, shortName: "hedera-mainnet" },
|
|
@@ -332,6 +332,8 @@ var networks = [
|
|
|
332
332
|
{ chainId: 690n, shortName: "redstone" },
|
|
333
333
|
{ chainId: 698n, shortName: "Matchain" },
|
|
334
334
|
{ chainId: 747n, shortName: "flow-mainnet" },
|
|
335
|
+
{ chainId: 756n, shortName: "capx-testnet" },
|
|
336
|
+
{ chainId: 757n, shortName: "capx" },
|
|
335
337
|
{ chainId: 787n, shortName: "aca" },
|
|
336
338
|
{ chainId: 841n, shortName: "tara" },
|
|
337
339
|
{ chainId: 842n, shortName: "taratest" },
|
|
@@ -377,6 +379,7 @@ var networks = [
|
|
|
377
379
|
{ chainId: 1559n, shortName: "tenet" },
|
|
378
380
|
{ chainId: 1625n, shortName: "gravity" },
|
|
379
381
|
{ chainId: 1663n, shortName: "Gobi" },
|
|
382
|
+
{ chainId: 1672n, shortName: "pharos" },
|
|
380
383
|
{ chainId: 1729n, shortName: "reya" },
|
|
381
384
|
{ chainId: 1740n, shortName: "metall2-testnet" },
|
|
382
385
|
{ chainId: 1750n, shortName: "metall2" },
|
|
@@ -414,9 +417,12 @@ var networks = [
|
|
|
414
417
|
{ chainId: 2442n, shortName: "zkevm-testnet-cardona" },
|
|
415
418
|
{ chainId: 2522n, shortName: "fraxtal-testnet" },
|
|
416
419
|
{ chainId: 2741n, shortName: "abstract" },
|
|
420
|
+
{ chainId: 2787n, shortName: "creator-chain-mainnet" },
|
|
417
421
|
{ chainId: 2810n, shortName: "hmorph" },
|
|
418
422
|
{ chainId: 2818n, shortName: "morph" },
|
|
423
|
+
{ chainId: 2910n, shortName: "morph-hoodi-testnet" },
|
|
419
424
|
{ chainId: 3068n, shortName: "bfc" },
|
|
425
|
+
{ chainId: 3111n, shortName: "alpha" },
|
|
420
426
|
{ chainId: 3338n, shortName: "PEAQ" },
|
|
421
427
|
{ chainId: 3501n, shortName: "JFIN" },
|
|
422
428
|
{ chainId: 3636n, shortName: "BTNXt" },
|
|
@@ -427,14 +433,17 @@ var networks = [
|
|
|
427
433
|
{ chainId: 4061n, shortName: "Nahmii3Mainnet" },
|
|
428
434
|
{ chainId: 4062n, shortName: "Nahmii3Testnet" },
|
|
429
435
|
{ chainId: 4078n, shortName: "muster" },
|
|
436
|
+
{ chainId: 4153n, shortName: "rise" },
|
|
430
437
|
{ chainId: 4157n, shortName: "crossfi-testnet" },
|
|
431
438
|
{ chainId: 4158n, shortName: "crossfi" },
|
|
432
439
|
{ chainId: 4162n, shortName: "SXR" },
|
|
433
440
|
{ chainId: 4202n, shortName: "lisksep" },
|
|
441
|
+
{ chainId: 4217n, shortName: "tempo" },
|
|
434
442
|
{ chainId: 4326n, shortName: "megaeth" },
|
|
435
443
|
{ chainId: 4337n, shortName: "beam" },
|
|
436
444
|
{ chainId: 4460n, shortName: "orderlyl2" },
|
|
437
445
|
{ chainId: 4488n, shortName: "HYDRA" },
|
|
446
|
+
{ chainId: 4509n, shortName: "SC" },
|
|
438
447
|
{ chainId: 4653n, shortName: "gold" },
|
|
439
448
|
{ chainId: 4661n, shortName: "appchaintestnet" },
|
|
440
449
|
{ chainId: 4689n, shortName: "iotex-mainnet" },
|
|
@@ -470,13 +479,18 @@ var networks = [
|
|
|
470
479
|
{ chainId: 7070n, shortName: "planq" },
|
|
471
480
|
{ chainId: 7171n, shortName: "bitrock" },
|
|
472
481
|
{ chainId: 7200n, shortName: "xsat" },
|
|
482
|
+
{ chainId: 7208n, shortName: "nxra-mainnet" },
|
|
473
483
|
{ chainId: 7332n, shortName: "EON" },
|
|
484
|
+
{ chainId: 7336n, shortName: "pruvtestnet" },
|
|
485
|
+
{ chainId: 7337n, shortName: "pruvmainnet" },
|
|
474
486
|
{ chainId: 7341n, shortName: "shyft" },
|
|
475
487
|
{ chainId: 7560n, shortName: "cyeth" },
|
|
476
488
|
{ chainId: 7700n, shortName: "canto" },
|
|
477
489
|
{ chainId: 7771n, shortName: "tbitrock" },
|
|
478
490
|
{ chainId: 7897n, shortName: "arena-z" },
|
|
491
|
+
{ chainId: 7979n, shortName: "dos" },
|
|
479
492
|
{ chainId: 8008n, shortName: "polynomial" },
|
|
493
|
+
{ chainId: 8150n, shortName: "alpen" },
|
|
480
494
|
{ chainId: 8192n, shortName: "tqf" },
|
|
481
495
|
{ chainId: 8194n, shortName: "ttqf" },
|
|
482
496
|
{ chainId: 8217n, shortName: "kaia-mainnet" },
|
|
@@ -485,6 +499,7 @@ var networks = [
|
|
|
485
499
|
{ chainId: 8408n, shortName: "zentest" },
|
|
486
500
|
{ chainId: 8453n, shortName: "base" },
|
|
487
501
|
{ chainId: 8700n, shortName: "ACN" },
|
|
502
|
+
{ chainId: 8765n, shortName: "ward" },
|
|
488
503
|
{ chainId: 8801n, shortName: "okto-testnet" },
|
|
489
504
|
{ chainId: 8822n, shortName: "iotaevm" },
|
|
490
505
|
{ chainId: 8844n, shortName: "THYDRA" },
|
|
@@ -510,6 +525,7 @@ var networks = [
|
|
|
510
525
|
{ chainId: 11111n, shortName: "WAGMI" },
|
|
511
526
|
{ chainId: 11124n, shortName: "abstract-sepolia" },
|
|
512
527
|
{ chainId: 11235n, shortName: "islm" },
|
|
528
|
+
{ chainId: 11417n, shortName: "anq-testnet" },
|
|
513
529
|
{ chainId: 11437n, shortName: "shyftt" },
|
|
514
530
|
{ chainId: 11501n, shortName: "bevm" },
|
|
515
531
|
{ chainId: 11503n, shortName: "bevm-test" },
|
|
@@ -521,6 +537,7 @@ var networks = [
|
|
|
521
537
|
{ chainId: 12553n, shortName: "rss3" },
|
|
522
538
|
{ chainId: 13337n, shortName: "beam-testnet" },
|
|
523
539
|
{ chainId: 13371n, shortName: "imx" },
|
|
540
|
+
{ chainId: 13441n, shortName: "bridgeless" },
|
|
524
541
|
{ chainId: 13473n, shortName: "imx-testnet" },
|
|
525
542
|
{ chainId: 13505n, shortName: "gravitysep" },
|
|
526
543
|
{ chainId: 13746n, shortName: "g7t" },
|
|
@@ -539,11 +556,14 @@ var networks = [
|
|
|
539
556
|
{ chainId: 23295n, shortName: "sapphire-testnet" },
|
|
540
557
|
{ chainId: 24101n, shortName: "incentiv" },
|
|
541
558
|
{ chainId: 25327n, shortName: "Everclear" },
|
|
559
|
+
{ chainId: 25363n, shortName: "fluent" },
|
|
542
560
|
{ chainId: 26888n, shortName: "tABCore" },
|
|
543
561
|
{ chainId: 28802n, shortName: "tcent" },
|
|
544
562
|
{ chainId: 28882n, shortName: "BobaSepolia" },
|
|
545
563
|
{ chainId: 28979n, shortName: "kimbonet-testnet" },
|
|
546
|
-
{ chainId:
|
|
564
|
+
{ chainId: 30303n, shortName: "Ethiq" },
|
|
565
|
+
{ chainId: 31611n, shortName: "mezo-testnet" },
|
|
566
|
+
{ chainId: 31612n, shortName: "mezo" },
|
|
547
567
|
{ chainId: 32323n, shortName: "basedai" },
|
|
548
568
|
{ chainId: 32380n, shortName: "paix" },
|
|
549
569
|
{ chainId: 32769n, shortName: "zil" },
|
|
@@ -556,6 +576,7 @@ var networks = [
|
|
|
556
576
|
{ chainId: 35441n, shortName: "q" },
|
|
557
577
|
{ chainId: 35443n, shortName: "q-testnet" },
|
|
558
578
|
{ chainId: 36888n, shortName: "abcore" },
|
|
579
|
+
{ chainId: 36900n, shortName: "adi" },
|
|
559
580
|
{ chainId: 37111n, shortName: "lens-sepolia" },
|
|
560
581
|
{ chainId: 41455n, shortName: "aleph-zero" },
|
|
561
582
|
{ chainId: 41923n, shortName: "edu-chain" },
|
|
@@ -563,6 +584,7 @@ var networks = [
|
|
|
563
584
|
{ chainId: 42170n, shortName: "arb-nova" },
|
|
564
585
|
{ chainId: 42220n, shortName: "celo" },
|
|
565
586
|
{ chainId: 42421n, shortName: "rwa" },
|
|
587
|
+
{ chainId: 42431n, shortName: "tempo-moderato" },
|
|
566
588
|
{ chainId: 42793n, shortName: "etlk" },
|
|
567
589
|
{ chainId: 43111n, shortName: "hemi" },
|
|
568
590
|
{ chainId: 43113n, shortName: "fuji" },
|
|
@@ -580,6 +602,7 @@ var networks = [
|
|
|
580
602
|
{ chainId: 49321n, shortName: "Stork" },
|
|
581
603
|
{ chainId: 50104n, shortName: "sophon" },
|
|
582
604
|
{ chainId: 50312n, shortName: "SomniaTestnet" },
|
|
605
|
+
{ chainId: 52924n, shortName: "lazai" },
|
|
583
606
|
{ chainId: 53302n, shortName: "seedsep" },
|
|
584
607
|
{ chainId: 53456n, shortName: "birdlayer" },
|
|
585
608
|
{ chainId: 53457n, shortName: "dodochain" },
|
|
@@ -614,6 +637,8 @@ var networks = [
|
|
|
614
637
|
{ chainId: 84532n, shortName: "basesep" },
|
|
615
638
|
{ chainId: 88811n, shortName: "unit0-mainnet" },
|
|
616
639
|
{ chainId: 88817n, shortName: "unit0-testnet" },
|
|
640
|
+
{ chainId: 88882n, shortName: "chzspicy" },
|
|
641
|
+
{ chainId: 88888n, shortName: "chiliz" },
|
|
617
642
|
{ chainId: 90001n, shortName: "dhobyghaut" },
|
|
618
643
|
{ chainId: 91342n, shortName: "giwasepolia" },
|
|
619
644
|
{ chainId: 97435n, shortName: "sling" },
|
|
@@ -621,7 +646,9 @@ var networks = [
|
|
|
621
646
|
{ chainId: 98865n, shortName: "plume" },
|
|
622
647
|
{ chainId: 98866n, shortName: "plume-mainnet" },
|
|
623
648
|
{ chainId: 98867n, shortName: "plume-testnet" },
|
|
649
|
+
{ chainId: 98875n, shortName: "nil" },
|
|
624
650
|
{ chainId: 98985n, shortName: "superposition-testnet" },
|
|
651
|
+
{ chainId: 102030n, shortName: "ctc" },
|
|
625
652
|
{ chainId: 103454n, shortName: "masatest" },
|
|
626
653
|
{ chainId: 105105n, shortName: "stratis" },
|
|
627
654
|
{ chainId: 111188n, shortName: "re-al" },
|
|
@@ -630,6 +657,7 @@ var networks = [
|
|
|
630
657
|
{ chainId: 167000n, shortName: "tko-mainnet" },
|
|
631
658
|
{ chainId: 167008n, shortName: "tko-katla" },
|
|
632
659
|
{ chainId: 167009n, shortName: "tko-hekla" },
|
|
660
|
+
{ chainId: 167013n, shortName: "tko-hoodi" },
|
|
633
661
|
{ chainId: 175188n, shortName: "lpy" },
|
|
634
662
|
{ chainId: 181228n, shortName: "hpp-sepolia" },
|
|
635
663
|
{ chainId: 190415n, shortName: "hpp-mainnet" },
|
|
@@ -640,16 +668,19 @@ var networks = [
|
|
|
640
668
|
{ chainId: 205205n, shortName: "auroria" },
|
|
641
669
|
{ chainId: 210425n, shortName: "platon" },
|
|
642
670
|
{ chainId: 222888n, shortName: "mocat" },
|
|
671
|
+
{ chainId: 278701n, shortName: "creator-chain-testnet" },
|
|
643
672
|
{ chainId: 314159n, shortName: "filecoin-calibration" },
|
|
644
673
|
{ chainId: 325000n, shortName: "CampV2" },
|
|
645
674
|
{ chainId: 328527n, shortName: "nal" },
|
|
646
675
|
{ chainId: 333999n, shortName: "olympus" },
|
|
676
|
+
{ chainId: 369369n, shortName: "den-mainnet" },
|
|
647
677
|
{ chainId: 381931n, shortName: "metal" },
|
|
648
678
|
{ chainId: 421611n, shortName: "arb-rinkeby" },
|
|
649
679
|
{ chainId: 421613n, shortName: "arb-goerli" },
|
|
650
680
|
{ chainId: 421614n, shortName: "arb-sep" },
|
|
651
681
|
{ chainId: 444444n, shortName: "syndr" },
|
|
652
682
|
{ chainId: 490000n, shortName: "ATN" },
|
|
683
|
+
{ chainId: 511111n, shortName: "alpha-testnet" },
|
|
653
684
|
{ chainId: 534351n, shortName: "scr-sepolia" },
|
|
654
685
|
{ chainId: 534352n, shortName: "scr" },
|
|
655
686
|
{ chainId: 534353n, shortName: "scr-alpha" },
|
|
@@ -673,6 +704,7 @@ var networks = [
|
|
|
673
704
|
{ chainId: 808813n, shortName: "bob-sepolia" },
|
|
674
705
|
{ chainId: 810180n, shortName: "zklink-nova" },
|
|
675
706
|
{ chainId: 839999n, shortName: "txsat" },
|
|
707
|
+
{ chainId: 853211n, shortName: "haqq-testethiq" },
|
|
676
708
|
{ chainId: 978657n, shortName: "treasure-ruby" },
|
|
677
709
|
{ chainId: 984122n, shortName: "forma" },
|
|
678
710
|
{ chainId: 1000101n, shortName: "xo" },
|
|
@@ -683,8 +715,10 @@ var networks = [
|
|
|
683
715
|
{ chainId: 2632500n, shortName: "coti" },
|
|
684
716
|
{ chainId: 3441006n, shortName: "mantaSepoliaTestnet" },
|
|
685
717
|
{ chainId: 4457845n, shortName: "zero-sepolia" },
|
|
718
|
+
{ chainId: 5042002n, shortName: "arc-testnet" },
|
|
686
719
|
{ chainId: 5064014n, shortName: "ethereal" },
|
|
687
720
|
{ chainId: 6038361n, shortName: "azkyt" },
|
|
721
|
+
{ chainId: 6281971n, shortName: "dogeos-chykyu" },
|
|
688
722
|
{ chainId: 6985385n, shortName: "hp" },
|
|
689
723
|
{ chainId: 7225878n, shortName: "saakuru" },
|
|
690
724
|
{ chainId: 7777777n, shortName: "zora" },
|
|
@@ -696,6 +730,7 @@ var networks = [
|
|
|
696
730
|
{ chainId: 12227332n, shortName: "neox-t4" },
|
|
697
731
|
{ chainId: 13374202n, shortName: "ethereal-testnet-0" },
|
|
698
732
|
{ chainId: 13863860n, shortName: "sis" },
|
|
733
|
+
{ chainId: 20250407n, shortName: "platondev3" },
|
|
699
734
|
{ chainId: 21000000n, shortName: "corn" },
|
|
700
735
|
{ chainId: 52164803n, shortName: "fluence-testnet" },
|
|
701
736
|
{ chainId: 65100004n, shortName: "piccadilly-04" },
|
|
@@ -727,8 +762,10 @@ var networks = [
|
|
|
727
762
|
{ chainId: 1666700000n, shortName: "hmy-b-s0" },
|
|
728
763
|
{ chainId: 1952959480n, shortName: "lumiatestnet" },
|
|
729
764
|
{ chainId: 2030232745n, shortName: "lumia-beam-testnet" },
|
|
765
|
+
{ chainId: 3735928814n, shortName: "edent" },
|
|
730
766
|
{ chainId: 11297108099n, shortName: "tpalm" },
|
|
731
767
|
{ chainId: 11297108109n, shortName: "palm" },
|
|
768
|
+
{ chainId: 30143370385n, shortName: "BUB" },
|
|
732
769
|
{ chainId: 37714555429n, shortName: "xaitestnet" },
|
|
733
770
|
{ chainId: 88153591557n, shortName: "arb-blueberry" },
|
|
734
771
|
{ chainId: 123420000220n, shortName: "fluence-stage" },
|
|
@@ -1040,7 +1077,8 @@ var SAFE_FEATURES_BY_VERSION = {
|
|
|
1040
1077
|
["REQUIRED_TXGAS" /* REQUIRED_TXGAS */]: "<=1.2.0",
|
|
1041
1078
|
["SIMULATE_AND_REVERT" /* SIMULATE_AND_REVERT */]: ">=1.3.0",
|
|
1042
1079
|
["PASSKEY_SIGNER" /* PASSKEY_SIGNER */]: ">=1.3.0",
|
|
1043
|
-
["SAFE_L2_CONTRACTS" /* SAFE_L2_CONTRACTS */]: ">=1.3.0"
|
|
1080
|
+
["SAFE_L2_CONTRACTS" /* SAFE_L2_CONTRACTS */]: ">=1.3.0",
|
|
1081
|
+
["SAFE_MODULE_GUARD" /* SAFE_MODULE_GUARD */]: ">=1.5.0"
|
|
1044
1082
|
};
|
|
1045
1083
|
var hasSafeFeature = (feature, version) => {
|
|
1046
1084
|
if (!(feature in SAFE_FEATURES_BY_VERSION)) {
|
|
@@ -1071,6 +1109,7 @@ import { estimateContractGas, getTransactionReceipt } from "viem/actions";
|
|
|
1071
1109
|
import {
|
|
1072
1110
|
getCompatibilityFallbackHandlerDeployments,
|
|
1073
1111
|
getCreateCallDeployments,
|
|
1112
|
+
getExtensibleFallbackHandlerDeployments,
|
|
1074
1113
|
getMultiSendCallOnlyDeployments,
|
|
1075
1114
|
getMultiSendDeployments,
|
|
1076
1115
|
getProxyFactoryDeployments,
|
|
@@ -1083,8 +1122,22 @@ import {
|
|
|
1083
1122
|
getSafeWebAuthnSignerFactoryDeployment,
|
|
1084
1123
|
getSafeWebAuthnShareSignerDeployment
|
|
1085
1124
|
} from "@safe-global/safe-modules-deployments";
|
|
1086
|
-
var DEFAULT_SAFE_VERSION = "1.
|
|
1125
|
+
var DEFAULT_SAFE_VERSION = "1.4.1";
|
|
1087
1126
|
var safeDeploymentsVersions = {
|
|
1127
|
+
"1.5.0": {
|
|
1128
|
+
safeSingletonVersion: "1.5.0",
|
|
1129
|
+
safeSingletonL2Version: "1.5.0",
|
|
1130
|
+
safeProxyFactoryVersion: "1.5.0",
|
|
1131
|
+
compatibilityFallbackHandler: "1.5.0",
|
|
1132
|
+
extensibleFallbackHandler: "1.5.0",
|
|
1133
|
+
multiSendVersion: "1.5.0",
|
|
1134
|
+
multiSendCallOnlyVersion: "1.5.0",
|
|
1135
|
+
signMessageLibVersion: "1.5.0",
|
|
1136
|
+
createCallVersion: "1.5.0",
|
|
1137
|
+
simulateTxAccessorVersion: "1.5.0",
|
|
1138
|
+
safeWebAuthnSignerFactoryVersion: "0.2.1",
|
|
1139
|
+
safeWebAuthnSharedSignerVersion: "0.2.1"
|
|
1140
|
+
},
|
|
1088
1141
|
"1.4.1": {
|
|
1089
1142
|
safeSingletonVersion: "1.4.1",
|
|
1090
1143
|
safeSingletonL2Version: "1.4.1",
|
|
@@ -1157,6 +1210,7 @@ var contractFunctions = {
|
|
|
1157
1210
|
safeSingletonL2Version: getSafeL2SingletonDeployments,
|
|
1158
1211
|
safeProxyFactoryVersion: getProxyFactoryDeployments,
|
|
1159
1212
|
compatibilityFallbackHandler: getCompatibilityFallbackHandlerDeployments,
|
|
1213
|
+
extensibleFallbackHandler: getExtensibleFallbackHandlerDeployments,
|
|
1160
1214
|
multiSendVersion: getMultiSendDeployments,
|
|
1161
1215
|
multiSendCallOnlyVersion: getMultiSendCallOnlyDeployments,
|
|
1162
1216
|
signMessageLibVersion: getSignMessageLibDeployments,
|
|
@@ -1365,7 +1419,7 @@ import { isAddress as isAddress2 } from "viem";
|
|
|
1365
1419
|
|
|
1366
1420
|
// src/utils/passkeys/extractPasskeyData.ts
|
|
1367
1421
|
import { Buffer as Buffer2 } from "buffer";
|
|
1368
|
-
import {
|
|
1422
|
+
import { getDaimoP256VerifierDeployment } from "@safe-global/safe-modules-deployments";
|
|
1369
1423
|
async function decodePublicKeyForWeb(publicKey) {
|
|
1370
1424
|
const algorithm = {
|
|
1371
1425
|
name: "ECDSA",
|
|
@@ -1383,21 +1437,6 @@ async function decodePublicKeyForWeb(publicKey) {
|
|
|
1383
1437
|
y: "0x" + Buffer2.from(y, "base64").toString("hex")
|
|
1384
1438
|
};
|
|
1385
1439
|
}
|
|
1386
|
-
function getDefaultFCLP256VerifierAddress(chainId) {
|
|
1387
|
-
const FCLP256VerifierDeployment = getFCLP256VerifierDeployment({
|
|
1388
|
-
version: "0.2.1",
|
|
1389
|
-
released: true,
|
|
1390
|
-
network: chainId
|
|
1391
|
-
});
|
|
1392
|
-
if (!FCLP256VerifierDeployment) {
|
|
1393
|
-
throw new Error(`Failed to load FCLP256Verifier deployment for chain ID ${chainId}`);
|
|
1394
|
-
}
|
|
1395
|
-
const verifierAddress = FCLP256VerifierDeployment.networkAddresses[chainId];
|
|
1396
|
-
if (!verifierAddress) {
|
|
1397
|
-
throw new Error(`FCLP256Verifier address not found for chain ID ${chainId}`);
|
|
1398
|
-
}
|
|
1399
|
-
return verifierAddress;
|
|
1400
|
-
}
|
|
1401
1440
|
|
|
1402
1441
|
// src/utils/passkeys/PasskeyClient.ts
|
|
1403
1442
|
import {
|
|
@@ -1419,15 +1458,14 @@ import {
|
|
|
1419
1458
|
} from "viem";
|
|
1420
1459
|
|
|
1421
1460
|
// src/utils/passkeys/isSharedSigner.ts
|
|
1422
|
-
async function isSharedSigner(passkey, safeWebAuthnSharedSignerContract, safeAddress, owners
|
|
1461
|
+
async function isSharedSigner(passkey, safeWebAuthnSharedSignerContract, safeAddress, owners) {
|
|
1423
1462
|
const sharedSignerContractAddress = safeWebAuthnSharedSignerContract.contractAddress;
|
|
1424
1463
|
if (safeAddress && owners.includes(sharedSignerContractAddress)) {
|
|
1425
1464
|
const [sharedSignerSlot] = await safeWebAuthnSharedSignerContract.getConfiguration([
|
|
1426
1465
|
asHex(safeAddress)
|
|
1427
1466
|
]);
|
|
1428
1467
|
const { x, y, verifiers } = sharedSignerSlot;
|
|
1429
|
-
const
|
|
1430
|
-
const isSharedSigner2 = BigInt(passkey.coordinates.x) === x && BigInt(passkey.coordinates.y) === y && BigInt(verifierAddress) === verifiers;
|
|
1468
|
+
const isSharedSigner2 = BigInt(passkey.coordinates.x) === x && BigInt(passkey.coordinates.y) === y && BigInt(passkey.verifierAddress) === verifiers;
|
|
1431
1469
|
return isSharedSigner2;
|
|
1432
1470
|
}
|
|
1433
1471
|
return false;
|
|
@@ -1463,16 +1501,14 @@ var signTransaction = () => {
|
|
|
1463
1501
|
var signTypedData = () => {
|
|
1464
1502
|
throw new Error("Passkey Signers cannot sign signTypedData, they can only sign data.");
|
|
1465
1503
|
};
|
|
1466
|
-
var createPasskeyClient = async (passkey, safeWebAuthnSignerFactoryContract, safeWebAuthnSharedSignerContract, provider, safeAddress, owners
|
|
1467
|
-
const { rawId, coordinates,
|
|
1504
|
+
var createPasskeyClient = async (passkey, safeWebAuthnSignerFactoryContract, safeWebAuthnSharedSignerContract, provider, safeAddress, owners) => {
|
|
1505
|
+
const { rawId, coordinates, verifierAddress } = passkey;
|
|
1468
1506
|
const passkeyRawId = hexToBytes(asHex(rawId));
|
|
1469
|
-
const verifierAddress = customVerifierAddress || getDefaultFCLP256VerifierAddress(chainId);
|
|
1470
1507
|
const isPasskeySharedSigner = await isSharedSigner_default(
|
|
1471
1508
|
passkey,
|
|
1472
1509
|
safeWebAuthnSharedSignerContract,
|
|
1473
1510
|
safeAddress,
|
|
1474
|
-
owners
|
|
1475
|
-
chainId
|
|
1511
|
+
owners
|
|
1476
1512
|
);
|
|
1477
1513
|
let signerAddress;
|
|
1478
1514
|
if (isPasskeySharedSigner) {
|
|
@@ -1640,8 +1676,7 @@ var SafeProvider = class _SafeProvider {
|
|
|
1640
1676
|
safeWebAuthnSharedSignerContract,
|
|
1641
1677
|
safeProvider.getExternalProvider(),
|
|
1642
1678
|
safeAddress || "",
|
|
1643
|
-
owners || []
|
|
1644
|
-
chainId.toString()
|
|
1679
|
+
owners || []
|
|
1645
1680
|
);
|
|
1646
1681
|
} else {
|
|
1647
1682
|
passkeySigner = signer;
|
|
@@ -1921,6 +1956,11 @@ import {
|
|
|
1921
1956
|
createCall_1_4_1_ContractArtifacts
|
|
1922
1957
|
} from "@safe-global/types-kit";
|
|
1923
1958
|
|
|
1959
|
+
// src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.ts
|
|
1960
|
+
import {
|
|
1961
|
+
createCall_1_5_0_ContractArtifacts
|
|
1962
|
+
} from "@safe-global/types-kit";
|
|
1963
|
+
|
|
1924
1964
|
// src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.ts
|
|
1925
1965
|
import {
|
|
1926
1966
|
multisend_1_1_1_ContractArtifacts
|
|
@@ -1936,6 +1976,11 @@ import {
|
|
|
1936
1976
|
multisend_1_4_1_ContractArtifacts
|
|
1937
1977
|
} from "@safe-global/types-kit";
|
|
1938
1978
|
|
|
1979
|
+
// src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.ts
|
|
1980
|
+
import {
|
|
1981
|
+
multisend_1_5_0_ContractArtifacts
|
|
1982
|
+
} from "@safe-global/types-kit";
|
|
1983
|
+
|
|
1939
1984
|
// src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.ts
|
|
1940
1985
|
import {
|
|
1941
1986
|
multiSendCallOnly_1_3_0_ContractArtifacts
|
|
@@ -1946,6 +1991,11 @@ import {
|
|
|
1946
1991
|
multiSendCallOnly_1_4_1_ContractArtifacts
|
|
1947
1992
|
} from "@safe-global/types-kit";
|
|
1948
1993
|
|
|
1994
|
+
// src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.ts
|
|
1995
|
+
import {
|
|
1996
|
+
multiSendCallOnly_1_5_0_ContractArtifacts
|
|
1997
|
+
} from "@safe-global/types-kit";
|
|
1998
|
+
|
|
1949
1999
|
// src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.ts
|
|
1950
2000
|
import {
|
|
1951
2001
|
signMessageLib_1_3_0_ContractArtifacts
|
|
@@ -1956,6 +2006,11 @@ import {
|
|
|
1956
2006
|
signMessageLib_1_4_1_ContractArtifacts
|
|
1957
2007
|
} from "@safe-global/types-kit";
|
|
1958
2008
|
|
|
2009
|
+
// src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.ts
|
|
2010
|
+
import {
|
|
2011
|
+
signMessageLib_1_5_0_ContractArtifacts
|
|
2012
|
+
} from "@safe-global/types-kit";
|
|
2013
|
+
|
|
1959
2014
|
// src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.ts
|
|
1960
2015
|
import { simulateContract } from "viem/actions";
|
|
1961
2016
|
|
|
@@ -3161,7 +3216,7 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
|
|
|
3161
3216
|
return [await this.read("getOwners")];
|
|
3162
3217
|
};
|
|
3163
3218
|
/**
|
|
3164
|
-
* Reads `length` bytes of storage in the
|
|
3219
|
+
* Reads `length` bytes of storage in the current contract
|
|
3165
3220
|
* @param args - Array[offset, length]
|
|
3166
3221
|
* @returns Array[storage]
|
|
3167
3222
|
*/
|
|
@@ -3344,6 +3399,330 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
|
|
|
3344
3399
|
};
|
|
3345
3400
|
var SafeContract_v1_4_1_default = SafeContract_v1_4_1;
|
|
3346
3401
|
|
|
3402
|
+
// src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.ts
|
|
3403
|
+
import { readContract as readContract2, simulateContract as simulateContract6 } from "viem/actions";
|
|
3404
|
+
import {
|
|
3405
|
+
safe_1_5_0_ContractArtifacts
|
|
3406
|
+
} from "@safe-global/types-kit";
|
|
3407
|
+
var SafeContract_v1_5_0 = class extends SafeBaseContract_default {
|
|
3408
|
+
/**
|
|
3409
|
+
* Constructs an instance of SafeContract_v1_5_0
|
|
3410
|
+
*
|
|
3411
|
+
* @param chainId - The chain ID where the contract resides.
|
|
3412
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
3413
|
+
* @param isL1SafeSingleton - A flag indicating if the contract is a L1 Safe Singleton.
|
|
3414
|
+
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the Safe deployments based on the chainId and safeVersion.
|
|
3415
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
3416
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
3417
|
+
*/
|
|
3418
|
+
constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
|
|
3419
|
+
const safeVersion = "1.5.0";
|
|
3420
|
+
const defaultAbi = safe_1_5_0_ContractArtifacts.abi;
|
|
3421
|
+
super(
|
|
3422
|
+
chainId,
|
|
3423
|
+
safeProvider,
|
|
3424
|
+
defaultAbi,
|
|
3425
|
+
safeVersion,
|
|
3426
|
+
isL1SafeSingleton,
|
|
3427
|
+
customContractAddress,
|
|
3428
|
+
customContractAbi,
|
|
3429
|
+
deploymentType
|
|
3430
|
+
);
|
|
3431
|
+
/**
|
|
3432
|
+
* @returns Array[safeContractVersion]
|
|
3433
|
+
*/
|
|
3434
|
+
this.VERSION = async () => {
|
|
3435
|
+
return [await this.read("VERSION")];
|
|
3436
|
+
};
|
|
3437
|
+
/**
|
|
3438
|
+
* @param args - Array[owner, txHash]
|
|
3439
|
+
* @returns Array[approvedHashes]
|
|
3440
|
+
*/
|
|
3441
|
+
this.approvedHashes = async (args) => {
|
|
3442
|
+
return [await this.read("approvedHashes", args)];
|
|
3443
|
+
};
|
|
3444
|
+
/**
|
|
3445
|
+
* Checks whether the signature provided is valid for the provided data, hash and number of required signatures.
|
|
3446
|
+
* Will revert otherwise.
|
|
3447
|
+
* @param args - Array[dataHash, data, signatures, requiredSignatures]
|
|
3448
|
+
* @returns Empty array
|
|
3449
|
+
*/
|
|
3450
|
+
this.checkNSignatures = async (args) => {
|
|
3451
|
+
await this.read("checkNSignatures", args);
|
|
3452
|
+
return [];
|
|
3453
|
+
};
|
|
3454
|
+
/**
|
|
3455
|
+
* New in v1.5.0: overload of checkNSignatures that accepts an explicit executor address.
|
|
3456
|
+
* Allows modules to pass msg.sender explicitly rather than relying on the contract's own context.
|
|
3457
|
+
* Will revert otherwise.
|
|
3458
|
+
* @param args - Array[executor, dataHash, signatures, requiredSignatures]
|
|
3459
|
+
* @returns Empty array
|
|
3460
|
+
*/
|
|
3461
|
+
this.checkNSignaturesWithExecutor = async (args) => {
|
|
3462
|
+
await readContract2(this.runner, {
|
|
3463
|
+
address: this.contractAddress,
|
|
3464
|
+
functionName: "checkNSignatures",
|
|
3465
|
+
abi: [
|
|
3466
|
+
{
|
|
3467
|
+
inputs: [
|
|
3468
|
+
{ internalType: "address", name: "executor", type: "address" },
|
|
3469
|
+
{ internalType: "bytes32", name: "dataHash", type: "bytes32" },
|
|
3470
|
+
{ internalType: "bytes", name: "signatures", type: "bytes" },
|
|
3471
|
+
{ internalType: "uint256", name: "requiredSignatures", type: "uint256" }
|
|
3472
|
+
],
|
|
3473
|
+
name: "checkNSignatures",
|
|
3474
|
+
outputs: [],
|
|
3475
|
+
stateMutability: "view",
|
|
3476
|
+
type: "function"
|
|
3477
|
+
}
|
|
3478
|
+
],
|
|
3479
|
+
args
|
|
3480
|
+
});
|
|
3481
|
+
return [];
|
|
3482
|
+
};
|
|
3483
|
+
/**
|
|
3484
|
+
* Checks whether the signature provided is valid for the provided data and hash. Will revert otherwise.
|
|
3485
|
+
* @param args - Array[dataHash, data, signatures]
|
|
3486
|
+
* @returns Empty array
|
|
3487
|
+
*/
|
|
3488
|
+
this.checkSignatures = async (args) => {
|
|
3489
|
+
await this.read("checkSignatures", args);
|
|
3490
|
+
return [];
|
|
3491
|
+
};
|
|
3492
|
+
/**
|
|
3493
|
+
* New in v1.5.0: overload of checkSignatures that accepts an explicit executor address.
|
|
3494
|
+
* Allows modules to pass msg.sender explicitly rather than relying on the contract's own context.
|
|
3495
|
+
* Will revert otherwise.
|
|
3496
|
+
* @param args - Array[executor, dataHash, signatures]
|
|
3497
|
+
* @returns Empty array
|
|
3498
|
+
*/
|
|
3499
|
+
this.checkSignaturesWithExecutor = async (args) => {
|
|
3500
|
+
await readContract2(this.runner, {
|
|
3501
|
+
address: this.contractAddress,
|
|
3502
|
+
functionName: "checkSignatures",
|
|
3503
|
+
abi: [
|
|
3504
|
+
{
|
|
3505
|
+
inputs: [
|
|
3506
|
+
{ internalType: "address", name: "executor", type: "address" },
|
|
3507
|
+
{ internalType: "bytes32", name: "dataHash", type: "bytes32" },
|
|
3508
|
+
{ internalType: "bytes", name: "signatures", type: "bytes" }
|
|
3509
|
+
],
|
|
3510
|
+
name: "checkSignatures",
|
|
3511
|
+
outputs: [],
|
|
3512
|
+
stateMutability: "view",
|
|
3513
|
+
type: "function"
|
|
3514
|
+
}
|
|
3515
|
+
],
|
|
3516
|
+
args
|
|
3517
|
+
});
|
|
3518
|
+
return [];
|
|
3519
|
+
};
|
|
3520
|
+
/**
|
|
3521
|
+
* @returns Array[domainSeparator]
|
|
3522
|
+
*/
|
|
3523
|
+
this.domainSeparator = async () => {
|
|
3524
|
+
return [await this.read("domainSeparator")];
|
|
3525
|
+
};
|
|
3526
|
+
/**
|
|
3527
|
+
* Returns array of modules.
|
|
3528
|
+
* @param args - Array[start, pageSize]
|
|
3529
|
+
* @returns Array[Array[modules], next]
|
|
3530
|
+
*/
|
|
3531
|
+
this.getModulesPaginated = async (args) => {
|
|
3532
|
+
const [array, next] = await this.read("getModulesPaginated", args);
|
|
3533
|
+
return [array, next];
|
|
3534
|
+
};
|
|
3535
|
+
/**
|
|
3536
|
+
* Returns the list of Safe owner accounts.
|
|
3537
|
+
* @returns Array[Array[owners]]
|
|
3538
|
+
*/
|
|
3539
|
+
this.getOwners = async () => {
|
|
3540
|
+
return [await this.read("getOwners")];
|
|
3541
|
+
};
|
|
3542
|
+
/**
|
|
3543
|
+
* Reads `length` bytes of storage in the current contract
|
|
3544
|
+
* @param args - Array[offset, length]
|
|
3545
|
+
* @returns Array[storage]
|
|
3546
|
+
*/
|
|
3547
|
+
this.getStorageAt = async (args) => {
|
|
3548
|
+
return [await this.read("getStorageAt", args)];
|
|
3549
|
+
};
|
|
3550
|
+
/**
|
|
3551
|
+
* Returns the Safe threshold.
|
|
3552
|
+
* @returns Array[threshold]
|
|
3553
|
+
*/
|
|
3554
|
+
this.getThreshold = async () => {
|
|
3555
|
+
return [await this.read("getThreshold")];
|
|
3556
|
+
};
|
|
3557
|
+
/**
|
|
3558
|
+
* Returns hash to be signed by owners.
|
|
3559
|
+
* @param args - Array[to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce]
|
|
3560
|
+
* @returns Array[transactionHash]
|
|
3561
|
+
*/
|
|
3562
|
+
this.getTransactionHash = async (args) => {
|
|
3563
|
+
return [await this.read("getTransactionHash", args)];
|
|
3564
|
+
};
|
|
3565
|
+
/**
|
|
3566
|
+
* Checks if a specific Safe module is enabled for the current Safe.
|
|
3567
|
+
* @param args - Array[moduleAddress]
|
|
3568
|
+
* @returns Array[isEnabled]
|
|
3569
|
+
*/
|
|
3570
|
+
this.isModuleEnabled = async (args) => {
|
|
3571
|
+
return [await this.read("isModuleEnabled", args)];
|
|
3572
|
+
};
|
|
3573
|
+
/**
|
|
3574
|
+
* Checks if a specific address is an owner of the current Safe.
|
|
3575
|
+
* @param args - Array[address]
|
|
3576
|
+
* @returns Array[isOwner]
|
|
3577
|
+
*/
|
|
3578
|
+
this.isOwner = async (args) => {
|
|
3579
|
+
return [await this.read("isOwner", args)];
|
|
3580
|
+
};
|
|
3581
|
+
/**
|
|
3582
|
+
* Returns the Safe nonce.
|
|
3583
|
+
* @returns Array[nonce]
|
|
3584
|
+
*/
|
|
3585
|
+
this.nonce = async () => {
|
|
3586
|
+
return [await this.read("nonce")];
|
|
3587
|
+
};
|
|
3588
|
+
/**
|
|
3589
|
+
* @param args - Array[messageHash]
|
|
3590
|
+
* @returns Array[signedMessages]
|
|
3591
|
+
*/
|
|
3592
|
+
this.signedMessages = async (args) => {
|
|
3593
|
+
return [await this.read("signedMessages", args)];
|
|
3594
|
+
};
|
|
3595
|
+
}
|
|
3596
|
+
/**
|
|
3597
|
+
* Checks whether a given Safe transaction can be executed successfully with no errors.
|
|
3598
|
+
* @param safeTransaction - The Safe transaction to check.
|
|
3599
|
+
* @param options - Optional transaction options.
|
|
3600
|
+
* @returns True, if the given transactions is valid.
|
|
3601
|
+
*/
|
|
3602
|
+
async isValidTransaction(safeTransaction, options = {}) {
|
|
3603
|
+
try {
|
|
3604
|
+
const gasLimit = options?.gasLimit || await this.estimateGas(
|
|
3605
|
+
"execTransaction",
|
|
3606
|
+
[
|
|
3607
|
+
safeTransaction.data.to,
|
|
3608
|
+
BigInt(safeTransaction.data.value),
|
|
3609
|
+
asHex(safeTransaction.data.data),
|
|
3610
|
+
safeTransaction.data.operation,
|
|
3611
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3612
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3613
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3614
|
+
safeTransaction.data.gasToken,
|
|
3615
|
+
safeTransaction.data.refundReceiver,
|
|
3616
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3617
|
+
],
|
|
3618
|
+
options
|
|
3619
|
+
);
|
|
3620
|
+
const converted = this.convertOptions({ ...options, gasLimit });
|
|
3621
|
+
const txResult = await simulateContract6(this.runner, {
|
|
3622
|
+
address: this.contractAddress,
|
|
3623
|
+
functionName: "execTransaction",
|
|
3624
|
+
abi: this.contractAbi,
|
|
3625
|
+
args: [
|
|
3626
|
+
safeTransaction.data.to,
|
|
3627
|
+
BigInt(safeTransaction.data.value),
|
|
3628
|
+
asHex(safeTransaction.data.data),
|
|
3629
|
+
safeTransaction.data.operation,
|
|
3630
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3631
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3632
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3633
|
+
safeTransaction.data.gasToken,
|
|
3634
|
+
safeTransaction.data.refundReceiver,
|
|
3635
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3636
|
+
],
|
|
3637
|
+
...converted
|
|
3638
|
+
});
|
|
3639
|
+
return txResult.result;
|
|
3640
|
+
} catch (error) {
|
|
3641
|
+
return false;
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3644
|
+
/**
|
|
3645
|
+
* Executes a transaction.
|
|
3646
|
+
* @param safeTransaction - The Safe transaction to execute.
|
|
3647
|
+
* @param options - Transaction options.
|
|
3648
|
+
* @returns Transaction result.
|
|
3649
|
+
*/
|
|
3650
|
+
async execTransaction(safeTransaction, options) {
|
|
3651
|
+
const gasLimit = options?.gasLimit || await this.estimateGas(
|
|
3652
|
+
"execTransaction",
|
|
3653
|
+
[
|
|
3654
|
+
safeTransaction.data.to,
|
|
3655
|
+
BigInt(safeTransaction.data.value),
|
|
3656
|
+
asHex(safeTransaction.data.data),
|
|
3657
|
+
safeTransaction.data.operation,
|
|
3658
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3659
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3660
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3661
|
+
safeTransaction.data.gasToken,
|
|
3662
|
+
safeTransaction.data.refundReceiver,
|
|
3663
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3664
|
+
],
|
|
3665
|
+
options
|
|
3666
|
+
);
|
|
3667
|
+
const args = [
|
|
3668
|
+
safeTransaction.data.to,
|
|
3669
|
+
BigInt(safeTransaction.data.value),
|
|
3670
|
+
asHex(safeTransaction.data.data),
|
|
3671
|
+
safeTransaction.data.operation,
|
|
3672
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3673
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3674
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3675
|
+
safeTransaction.data.gasToken,
|
|
3676
|
+
safeTransaction.data.refundReceiver,
|
|
3677
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3678
|
+
];
|
|
3679
|
+
return toTxResult(
|
|
3680
|
+
this.runner,
|
|
3681
|
+
await this.write("execTransaction", args, { ...options, gasLimit }),
|
|
3682
|
+
options
|
|
3683
|
+
);
|
|
3684
|
+
}
|
|
3685
|
+
/**
|
|
3686
|
+
* Returns array of first 10 modules.
|
|
3687
|
+
* @returns Array[modules]
|
|
3688
|
+
*/
|
|
3689
|
+
async getModules() {
|
|
3690
|
+
const [modules] = await this.getModulesPaginated([SENTINEL_ADDRESS, BigInt(10)]);
|
|
3691
|
+
return [modules.map((module) => module)];
|
|
3692
|
+
}
|
|
3693
|
+
/**
|
|
3694
|
+
* Marks a hash as approved. This can be used to validate a hash that is used by a signature.
|
|
3695
|
+
* @param hash - The hash that should be marked as approved for signatures that are verified by this contract.
|
|
3696
|
+
* @param options - Optional transaction options.
|
|
3697
|
+
* @returns Transaction result.
|
|
3698
|
+
*/
|
|
3699
|
+
async approveHash(hash, options) {
|
|
3700
|
+
const gasLimit = options?.gasLimit || await this.estimateGas("approveHash", [asHash(hash)], options);
|
|
3701
|
+
return toTxResult(
|
|
3702
|
+
this.runner,
|
|
3703
|
+
await this.write("approveHash", [asHash(hash)], { ...options, gasLimit }),
|
|
3704
|
+
options
|
|
3705
|
+
);
|
|
3706
|
+
}
|
|
3707
|
+
/**
|
|
3708
|
+
* Returns the chain id of the Safe contract. (Custom method - not defined in the Safe Contract)
|
|
3709
|
+
* @returns Array[chainId]
|
|
3710
|
+
*/
|
|
3711
|
+
async getChainId() {
|
|
3712
|
+
return [await Promise.resolve(this.chainId)];
|
|
3713
|
+
}
|
|
3714
|
+
/**
|
|
3715
|
+
* returns the nonce of the Safe contract.
|
|
3716
|
+
*
|
|
3717
|
+
* @returns {Promise<bigint>} A promise that resolves to the nonce of the Safe contract.
|
|
3718
|
+
*/
|
|
3719
|
+
async getNonce() {
|
|
3720
|
+
const [nonce] = await this.nonce();
|
|
3721
|
+
return nonce;
|
|
3722
|
+
}
|
|
3723
|
+
};
|
|
3724
|
+
var SafeContract_v1_5_0_default = SafeContract_v1_5_0;
|
|
3725
|
+
|
|
3347
3726
|
// src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.ts
|
|
3348
3727
|
var SafeProxyFactoryBaseContract = class extends BaseContract_default {
|
|
3349
3728
|
/**
|
|
@@ -3656,6 +4035,82 @@ var SafeProxyFactoryContract_v1_4_1 = class extends SafeProxyFactoryBaseContract
|
|
|
3656
4035
|
};
|
|
3657
4036
|
var SafeProxyFactoryContract_v1_4_1_default = SafeProxyFactoryContract_v1_4_1;
|
|
3658
4037
|
|
|
4038
|
+
// src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.ts
|
|
4039
|
+
import {
|
|
4040
|
+
safeProxyFactory_1_5_0_ContractArtifacts
|
|
4041
|
+
} from "@safe-global/types-kit";
|
|
4042
|
+
var SafeProxyFactoryContract_v1_5_0 = class extends SafeProxyFactoryBaseContract_default {
|
|
4043
|
+
/**
|
|
4044
|
+
* Constructs an instance of SafeProxyFactoryContract_v1_5_0
|
|
4045
|
+
*
|
|
4046
|
+
* @param chainId - The chain ID where the contract resides.
|
|
4047
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
4048
|
+
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the Safe deployments based on the chainId and safeVersion.
|
|
4049
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
4050
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
4051
|
+
*/
|
|
4052
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
4053
|
+
const safeVersion = "1.5.0";
|
|
4054
|
+
const defaultAbi = safeProxyFactory_1_5_0_ContractArtifacts.abi;
|
|
4055
|
+
super(
|
|
4056
|
+
chainId,
|
|
4057
|
+
safeProvider,
|
|
4058
|
+
defaultAbi,
|
|
4059
|
+
safeVersion,
|
|
4060
|
+
customContractAddress,
|
|
4061
|
+
customContractAbi,
|
|
4062
|
+
deploymentType
|
|
4063
|
+
);
|
|
4064
|
+
/**
|
|
4065
|
+
* Returns the ID of the chain the contract is currently deployed on.
|
|
4066
|
+
* @returns Array[chainId]
|
|
4067
|
+
*/
|
|
4068
|
+
this.getChainId = async () => {
|
|
4069
|
+
return [await this.read("getChainId")];
|
|
4070
|
+
};
|
|
4071
|
+
/**
|
|
4072
|
+
* Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
|
|
4073
|
+
* @returns Array[creationCode]
|
|
4074
|
+
*/
|
|
4075
|
+
this.proxyCreationCode = async () => {
|
|
4076
|
+
return [await this.read("proxyCreationCode")];
|
|
4077
|
+
};
|
|
4078
|
+
/**
|
|
4079
|
+
* Deploys a new chain-specific proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4080
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4081
|
+
* @returns Array[proxy]
|
|
4082
|
+
*/
|
|
4083
|
+
this.createChainSpecificProxyWithNonce = async (args) => {
|
|
4084
|
+
return [await this.write("createChainSpecificProxyWithNonce", args)];
|
|
4085
|
+
};
|
|
4086
|
+
/**
|
|
4087
|
+
* Deploys a new chain-specific proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4088
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4089
|
+
* @returns Array[proxy]
|
|
4090
|
+
*/
|
|
4091
|
+
this.createChainSpecificProxyWithNonceL2 = async (args) => {
|
|
4092
|
+
return [await this.write("createChainSpecificProxyWithNonceL2", args)];
|
|
4093
|
+
};
|
|
4094
|
+
/**
|
|
4095
|
+
* Deploys a new proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4096
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4097
|
+
* @returns Array[proxy]
|
|
4098
|
+
*/
|
|
4099
|
+
this.createProxyWithNonce = async (args) => {
|
|
4100
|
+
return [await this.write("createProxyWithNonce", args)];
|
|
4101
|
+
};
|
|
4102
|
+
/**
|
|
4103
|
+
* Deploys a new proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4104
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4105
|
+
* @returns Array[proxy]
|
|
4106
|
+
*/
|
|
4107
|
+
this.createProxyWithNonceL2 = async (args) => {
|
|
4108
|
+
return [await this.write("createProxyWithNonceL2", args)];
|
|
4109
|
+
};
|
|
4110
|
+
}
|
|
4111
|
+
};
|
|
4112
|
+
var SafeProxyFactoryContract_v1_5_0_default = SafeProxyFactoryContract_v1_5_0;
|
|
4113
|
+
|
|
3659
4114
|
// src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.ts
|
|
3660
4115
|
import {
|
|
3661
4116
|
simulateTxAccessor_1_3_0_ContractArtifacts
|
|
@@ -3666,6 +4121,11 @@ import {
|
|
|
3666
4121
|
simulateTxAccessor_1_4_1_ContractArtifacts
|
|
3667
4122
|
} from "@safe-global/types-kit";
|
|
3668
4123
|
|
|
4124
|
+
// src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.ts
|
|
4125
|
+
import {
|
|
4126
|
+
simulateTxAccessor_1_5_0_ContractArtifacts
|
|
4127
|
+
} from "@safe-global/types-kit";
|
|
4128
|
+
|
|
3669
4129
|
// src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.ts
|
|
3670
4130
|
var CompatibilityFallbackHandlerBaseContract = class extends BaseContract_default {
|
|
3671
4131
|
/**
|
|
@@ -3757,6 +4217,50 @@ var CompatibilityFallbackHandlerContract_v1_4_1 = class extends CompatibilityFal
|
|
|
3757
4217
|
};
|
|
3758
4218
|
var CompatibilityFallbackHandlerContract_v1_4_1_default = CompatibilityFallbackHandlerContract_v1_4_1;
|
|
3759
4219
|
|
|
4220
|
+
// src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.ts
|
|
4221
|
+
import {
|
|
4222
|
+
compatibilityFallbackHandler_1_5_0_ContractArtifacts
|
|
4223
|
+
} from "@safe-global/types-kit";
|
|
4224
|
+
var CompatibilityFallbackHandlerContract_v1_5_0 = class extends CompatibilityFallbackHandlerBaseContract_default {
|
|
4225
|
+
/**
|
|
4226
|
+
* Constructs an instance of CompatibilityFallbackHandlerContract_v1_5_0
|
|
4227
|
+
*
|
|
4228
|
+
* @param chainId - The chain ID where the contract resides.
|
|
4229
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
4230
|
+
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the CompatibilityFallbackHandler deployments based on the chainId and safeVersion.
|
|
4231
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
4232
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
4233
|
+
*/
|
|
4234
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
4235
|
+
const safeVersion = "1.5.0";
|
|
4236
|
+
const defaultAbi = compatibilityFallbackHandler_1_5_0_ContractArtifacts.abi;
|
|
4237
|
+
super(
|
|
4238
|
+
chainId,
|
|
4239
|
+
safeProvider,
|
|
4240
|
+
defaultAbi,
|
|
4241
|
+
safeVersion,
|
|
4242
|
+
customContractAddress,
|
|
4243
|
+
customContractAbi,
|
|
4244
|
+
deploymentType
|
|
4245
|
+
);
|
|
4246
|
+
/**
|
|
4247
|
+
* New in v1.5.0: encodeTransactionData was moved from the Safe contract to CompatibilityFallbackHandler
|
|
4248
|
+
* to preserve backwards compatibility for existing integrations.
|
|
4249
|
+
* @param args - Array[to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, nonce]
|
|
4250
|
+
* @returns Array[encodedData]
|
|
4251
|
+
*/
|
|
4252
|
+
this.encodeTransactionData = async (args) => {
|
|
4253
|
+
return [await this.read("encodeTransactionData", args)];
|
|
4254
|
+
};
|
|
4255
|
+
}
|
|
4256
|
+
};
|
|
4257
|
+
var CompatibilityFallbackHandlerContract_v1_5_0_default = CompatibilityFallbackHandlerContract_v1_5_0;
|
|
4258
|
+
|
|
4259
|
+
// src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.ts
|
|
4260
|
+
import {
|
|
4261
|
+
extensibleFallbackHandler_1_5_0_ContractArtifacts
|
|
4262
|
+
} from "@safe-global/types-kit";
|
|
4263
|
+
|
|
3760
4264
|
// src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.ts
|
|
3761
4265
|
var SafeWebAuthnSignerFactoryBaseContract = class extends BaseContract_default {
|
|
3762
4266
|
/**
|
|
@@ -3929,6 +4433,16 @@ async function getSafeContractInstance(safeVersion, safeProvider, contractAddres
|
|
|
3929
4433
|
const chainId = await safeProvider.getChainId();
|
|
3930
4434
|
let safeContractInstance;
|
|
3931
4435
|
switch (safeVersion) {
|
|
4436
|
+
case "1.5.0":
|
|
4437
|
+
safeContractInstance = new SafeContract_v1_5_0_default(
|
|
4438
|
+
chainId,
|
|
4439
|
+
safeProvider,
|
|
4440
|
+
isL1SafeSingleton,
|
|
4441
|
+
contractAddress,
|
|
4442
|
+
customContractAbi,
|
|
4443
|
+
deploymentType
|
|
4444
|
+
);
|
|
4445
|
+
break;
|
|
3932
4446
|
case "1.4.1":
|
|
3933
4447
|
safeContractInstance = new SafeContract_v1_4_1_default(
|
|
3934
4448
|
chainId,
|
|
@@ -3989,6 +4503,15 @@ async function getCompatibilityFallbackHandlerContractInstance(safeVersion, safe
|
|
|
3989
4503
|
const chainId = await safeProvider.getChainId();
|
|
3990
4504
|
let compatibilityFallbackHandlerInstance;
|
|
3991
4505
|
switch (safeVersion) {
|
|
4506
|
+
case "1.5.0":
|
|
4507
|
+
compatibilityFallbackHandlerInstance = new CompatibilityFallbackHandlerContract_v1_5_0_default(
|
|
4508
|
+
chainId,
|
|
4509
|
+
safeProvider,
|
|
4510
|
+
contractAddress,
|
|
4511
|
+
customContractAbi,
|
|
4512
|
+
deploymentType
|
|
4513
|
+
);
|
|
4514
|
+
break;
|
|
3992
4515
|
case "1.4.1":
|
|
3993
4516
|
compatibilityFallbackHandlerInstance = new CompatibilityFallbackHandlerContract_v1_4_1_default(
|
|
3994
4517
|
chainId,
|
|
@@ -4019,6 +4542,15 @@ async function getSafeProxyFactoryContractInstance(safeVersion, safeProvider, co
|
|
|
4019
4542
|
const chainId = await safeProvider.getChainId();
|
|
4020
4543
|
let safeProxyFactoryContractInstance;
|
|
4021
4544
|
switch (safeVersion) {
|
|
4545
|
+
case "1.5.0":
|
|
4546
|
+
safeProxyFactoryContractInstance = new SafeProxyFactoryContract_v1_5_0_default(
|
|
4547
|
+
chainId,
|
|
4548
|
+
safeProvider,
|
|
4549
|
+
contractAddress,
|
|
4550
|
+
customContractAbi,
|
|
4551
|
+
deploymentType
|
|
4552
|
+
);
|
|
4553
|
+
break;
|
|
4022
4554
|
case "1.4.1":
|
|
4023
4555
|
safeProxyFactoryContractInstance = new SafeProxyFactoryContract_v1_4_1_default(
|
|
4024
4556
|
chainId,
|
|
@@ -4065,6 +4597,7 @@ async function getSafeProxyFactoryContractInstance(safeVersion, safeProvider, co
|
|
|
4065
4597
|
async function getSafeWebAuthnSignerFactoryContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
|
|
4066
4598
|
const chainId = await safeProvider.getChainId();
|
|
4067
4599
|
switch (safeVersion) {
|
|
4600
|
+
case "1.5.0":
|
|
4068
4601
|
case "1.4.1":
|
|
4069
4602
|
case "1.3.0":
|
|
4070
4603
|
const safeWebAuthnSignerFactoryContractInstance = new SafeWebAuthnSignerFactoryContract_v0_2_1_default(
|
|
@@ -4084,6 +4617,7 @@ async function getSafeWebAuthnSignerFactoryContractInstance(safeVersion, safePro
|
|
|
4084
4617
|
async function getSafeWebAuthnSharedSignerContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
|
|
4085
4618
|
const chainId = await safeProvider.getChainId();
|
|
4086
4619
|
switch (safeVersion) {
|
|
4620
|
+
case "1.5.0":
|
|
4087
4621
|
case "1.4.1":
|
|
4088
4622
|
case "1.3.0":
|
|
4089
4623
|
const safeWebAuthnSharedSignerContractInstance = new SafeWebAuthnSharedSignerContract_v0_2_1_default(
|
|
@@ -4345,11 +4879,7 @@ async function createMockPasskey(name, webAuthnCredentials) {
|
|
|
4345
4879
|
const exportedPublicKey = await crypto.subtle.exportKey("spki", key);
|
|
4346
4880
|
const rawId = Buffer.from(passkeyCredential.rawId).toString("hex");
|
|
4347
4881
|
const coordinates = await decodePublicKeyForWeb(exportedPublicKey);
|
|
4348
|
-
|
|
4349
|
-
rawId,
|
|
4350
|
-
coordinates
|
|
4351
|
-
};
|
|
4352
|
-
return passkey;
|
|
4882
|
+
return { rawId, coordinates };
|
|
4353
4883
|
}
|
|
4354
4884
|
export {
|
|
4355
4885
|
WebAuthnCredentials,
|