@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.
Files changed (73) hide show
  1. package/dist/cjs/src/index.cjs +1498 -198
  2. package/dist/cjs/test-utils/index.cjs +584 -73
  3. package/dist/esm/src/index.mjs +1462 -143
  4. package/dist/esm/test-utils/index.mjs +566 -36
  5. package/dist/src/Safe.d.ts +125 -3
  6. package/dist/src/Safe.d.ts.map +1 -1
  7. package/dist/src/SafeProvider.d.ts.map +1 -1
  8. package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.d.ts +1 -0
  9. package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.d.ts.map +1 -1
  10. package/dist/src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.d.ts +33 -0
  11. package/dist/src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.d.ts.map +1 -0
  12. package/dist/src/contracts/CreateCall/CreateCallBaseContract.d.ts +1 -0
  13. package/dist/src/contracts/CreateCall/CreateCallBaseContract.d.ts.map +1 -1
  14. package/dist/src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.d.ts +38 -0
  15. package/dist/src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.d.ts.map +1 -0
  16. package/dist/src/contracts/ExtensibleFallbackHandler/ExtensibleFallbackHandlerBaseContract.d.ts +36 -0
  17. package/dist/src/contracts/ExtensibleFallbackHandler/ExtensibleFallbackHandlerBaseContract.d.ts.map +1 -0
  18. package/dist/src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.d.ts +86 -0
  19. package/dist/src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.d.ts.map +1 -0
  20. package/dist/src/contracts/MultiSend/MultiSendBaseContract.d.ts +1 -0
  21. package/dist/src/contracts/MultiSend/MultiSendBaseContract.d.ts.map +1 -1
  22. package/dist/src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.d.ts +26 -0
  23. package/dist/src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.d.ts.map +1 -0
  24. package/dist/src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.d.ts +26 -0
  25. package/dist/src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.d.ts.map +1 -0
  26. package/dist/src/contracts/Safe/SafeBaseContract.d.ts +1 -0
  27. package/dist/src/contracts/Safe/SafeBaseContract.d.ts.map +1 -1
  28. package/dist/src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.d.ts +1 -1
  29. package/dist/src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.d.ts +156 -0
  30. package/dist/src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.d.ts.map +1 -0
  31. package/dist/src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.d.ts +60 -0
  32. package/dist/src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.d.ts.map +1 -0
  33. package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.d.ts +1 -0
  34. package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.d.ts.map +1 -1
  35. package/dist/src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.d.ts +34 -0
  36. package/dist/src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.d.ts.map +1 -0
  37. package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.d.ts +1 -0
  38. package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.d.ts.map +1 -1
  39. package/dist/src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.d.ts +31 -0
  40. package/dist/src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.d.ts.map +1 -0
  41. package/dist/src/contracts/config.d.ts +1 -1
  42. package/dist/src/contracts/config.d.ts.map +1 -1
  43. package/dist/src/contracts/contractInstances.d.ts +18 -8
  44. package/dist/src/contracts/contractInstances.d.ts.map +1 -1
  45. package/dist/src/contracts/index.d.ts +2 -1
  46. package/dist/src/contracts/index.d.ts.map +1 -1
  47. package/dist/src/contracts/safeDeploymentContracts.d.ts +2 -1
  48. package/dist/src/contracts/safeDeploymentContracts.d.ts.map +1 -1
  49. package/dist/src/contracts/utils.d.ts.map +1 -1
  50. package/dist/src/index.d.ts +6 -4
  51. package/dist/src/index.d.ts.map +1 -1
  52. package/dist/src/managers/fallbackHandlerManager.d.ts +1 -0
  53. package/dist/src/managers/fallbackHandlerManager.d.ts.map +1 -1
  54. package/dist/src/managers/moduleManager.d.ts +7 -0
  55. package/dist/src/managers/moduleManager.d.ts.map +1 -1
  56. package/dist/src/types/contracts.d.ts +22 -8
  57. package/dist/src/types/contracts.d.ts.map +1 -1
  58. package/dist/src/types/passkeys.d.ts +13 -2
  59. package/dist/src/types/passkeys.d.ts.map +1 -1
  60. package/dist/src/utils/eip-3770/config.d.ts.map +1 -1
  61. package/dist/src/utils/eip-3770/index.d.ts +1 -0
  62. package/dist/src/utils/eip-3770/index.d.ts.map +1 -1
  63. package/dist/src/utils/passkeys/PasskeyClient.d.ts +1 -1
  64. package/dist/src/utils/passkeys/PasskeyClient.d.ts.map +1 -1
  65. package/dist/src/utils/passkeys/extractPasskeyData.d.ts +8 -11
  66. package/dist/src/utils/passkeys/extractPasskeyData.d.ts.map +1 -1
  67. package/dist/src/utils/passkeys/isSharedSigner.d.ts +1 -1
  68. package/dist/src/utils/passkeys/isSharedSigner.d.ts.map +1 -1
  69. package/dist/src/utils/safeVersions.d.ts +10 -7
  70. package/dist/src/utils/safeVersions.d.ts.map +1 -1
  71. package/dist/test-utils/passkeys.d.ts +2 -2
  72. package/dist/test-utils/passkeys.d.ts.map +1 -1
  73. package/package.json +7 -5
@@ -48,11 +48,15 @@ __export(src_exports, {
48
48
  MultiSendCallOnlyBaseContract: () => MultiSendCallOnlyBaseContract_default,
49
49
  PREDETERMINED_SALT_NONCE: () => PREDETERMINED_SALT_NONCE,
50
50
  SafeBaseContract: () => SafeBaseContract_default,
51
+ SafeFeature: () => SafeFeature,
51
52
  SafeProvider: () => SafeProvider_default,
52
53
  SafeProxyFactoryBaseContract: () => SafeProxyFactoryBaseContract_default,
53
54
  SignMessageLibBaseContract: () => SignMessageLibBaseContract_default,
55
+ adjustVInSignature: () => adjustVInSignature,
54
56
  buildContractSignature: () => buildContractSignature,
55
57
  buildSignatureBytes: () => buildSignatureBytes,
58
+ calculateSafeMessageHash: () => calculateSafeMessageHash,
59
+ calculateSafeTransactionHash: () => calculateSafeTransactionHash,
56
60
  createERC20TokenTransferTransaction: () => createERC20TokenTransferTransaction,
57
61
  createPasskeyClient: () => createPasskeyClient,
58
62
  decodeMultiSendData: () => decodeMultiSendData,
@@ -67,15 +71,20 @@ __export(src_exports, {
67
71
  extractPasskeyData: () => extractPasskeyData,
68
72
  generateEIP712Signature: () => generateEIP712Signature,
69
73
  generateOnChainIdentifier: () => generateOnChainIdentifier_default,
74
+ generatePreValidatedSignature: () => generatePreValidatedSignature,
70
75
  generateSignature: () => generateSignature,
71
76
  generateTypedData: () => generateTypedData,
77
+ getChainIdFromEip3770NetworkPrefix: () => getChainIdFromEip3770NetworkPrefix,
72
78
  getCompatibilityFallbackHandlerContract: () => getCompatibilityFallbackHandlerContract,
73
79
  getCreateCallContract: () => getCreateCallContract,
74
80
  getERC20Decimals: () => getERC20Decimals,
81
+ getEip3770NetworkPrefixFromChainId: () => getEip3770NetworkPrefixFromChainId,
75
82
  getEip712MessageTypes: () => getEip712MessageTypes,
76
83
  getEip712TxTypes: () => getEip712TxTypes,
84
+ getExtensibleFallbackHandlerContract: () => getExtensibleFallbackHandlerContract,
77
85
  getMultiSendCallOnlyContract: () => getMultiSendCallOnlyContract,
78
86
  getMultiSendContract: () => getMultiSendContract,
87
+ getP256VerifierAddress: () => getP256VerifierAddress,
79
88
  getPasskeyOwnerAddress: () => getPasskeyOwnerAddress_default,
80
89
  getPredictedSafeAddressInitCode: () => getPredictedSafeAddressInitCode,
81
90
  getSafeAddressFromDeploymentTx: () => getSafeAddressFromDeploymentTx,
@@ -84,6 +93,7 @@ __export(src_exports, {
84
93
  getSafeWebAuthnSharedSignerContract: () => getSafeWebAuthnSharedSignerContract,
85
94
  getSafeWebAuthnSignerFactoryContract: () => getSafeWebAuthnSignerFactoryContract,
86
95
  getSignMessageLibContract: () => getSignMessageLibContract,
96
+ hasSafeFeature: () => hasSafeFeature,
87
97
  hashSafeMessage: () => hashSafeMessage,
88
98
  isGasTokenCompatibleWithHandlePayment: () => isGasTokenCompatibleWithHandlePayment,
89
99
  predictSafeAddress: () => predictSafeAddress,
@@ -96,17 +106,31 @@ __export(src_exports, {
96
106
  module.exports = __toCommonJS(src_exports);
97
107
 
98
108
  // src/Safe.ts
99
- var import_types_kit28 = require("@safe-global/types-kit");
109
+ var import_types_kit37 = require("@safe-global/types-kit");
100
110
 
101
111
  // src/contracts/utils.ts
102
112
  var import_viem13 = require("viem");
103
- var import_actions9 = require("viem/actions");
113
+ var import_actions10 = require("viem/actions");
104
114
 
105
115
  // src/contracts/config.ts
106
116
  var import_safe_deployments = require("@safe-global/safe-deployments");
107
117
  var import_safe_modules_deployments = require("@safe-global/safe-modules-deployments");
108
- var DEFAULT_SAFE_VERSION = "1.3.0";
118
+ var DEFAULT_SAFE_VERSION = "1.4.1";
109
119
  var safeDeploymentsVersions = {
120
+ "1.5.0": {
121
+ safeSingletonVersion: "1.5.0",
122
+ safeSingletonL2Version: "1.5.0",
123
+ safeProxyFactoryVersion: "1.5.0",
124
+ compatibilityFallbackHandler: "1.5.0",
125
+ extensibleFallbackHandler: "1.5.0",
126
+ multiSendVersion: "1.5.0",
127
+ multiSendCallOnlyVersion: "1.5.0",
128
+ signMessageLibVersion: "1.5.0",
129
+ createCallVersion: "1.5.0",
130
+ simulateTxAccessorVersion: "1.5.0",
131
+ safeWebAuthnSignerFactoryVersion: "0.2.1",
132
+ safeWebAuthnSharedSignerVersion: "0.2.1"
133
+ },
110
134
  "1.4.1": {
111
135
  safeSingletonVersion: "1.4.1",
112
136
  safeSingletonL2Version: "1.4.1",
@@ -179,6 +203,7 @@ var contractFunctions = {
179
203
  safeSingletonL2Version: import_safe_deployments.getSafeL2SingletonDeployments,
180
204
  safeProxyFactoryVersion: import_safe_deployments.getProxyFactoryDeployments,
181
205
  compatibilityFallbackHandler: import_safe_deployments.getCompatibilityFallbackHandlerDeployments,
206
+ extensibleFallbackHandler: import_safe_deployments.getExtensibleFallbackHandlerDeployments,
182
207
  multiSendVersion: import_safe_deployments.getMultiSendDeployments,
183
208
  multiSendCallOnlyVersion: import_safe_deployments.getMultiSendCallOnlyDeployments,
184
209
  signMessageLibVersion: import_safe_deployments.getSignMessageLibDeployments,
@@ -328,7 +353,7 @@ var networks = [
328
353
  { chainId: 255n, shortName: "kroma" },
329
354
  { chainId: 274n, shortName: "lachain" },
330
355
  { chainId: 280n, shortName: "zksync-goerli" },
331
- { chainId: 282n, shortName: "zkTCRO" },
356
+ { chainId: 282n, shortName: "deprecated-zkTCRO" },
332
357
  { chainId: 288n, shortName: "boba" },
333
358
  { chainId: 291n, shortName: "orderly" },
334
359
  { chainId: 295n, shortName: "hedera-mainnet" },
@@ -361,6 +386,8 @@ var networks = [
361
386
  { chainId: 690n, shortName: "redstone" },
362
387
  { chainId: 698n, shortName: "Matchain" },
363
388
  { chainId: 747n, shortName: "flow-mainnet" },
389
+ { chainId: 756n, shortName: "capx-testnet" },
390
+ { chainId: 757n, shortName: "capx" },
364
391
  { chainId: 787n, shortName: "aca" },
365
392
  { chainId: 841n, shortName: "tara" },
366
393
  { chainId: 842n, shortName: "taratest" },
@@ -406,6 +433,7 @@ var networks = [
406
433
  { chainId: 1559n, shortName: "tenet" },
407
434
  { chainId: 1625n, shortName: "gravity" },
408
435
  { chainId: 1663n, shortName: "Gobi" },
436
+ { chainId: 1672n, shortName: "pharos" },
409
437
  { chainId: 1729n, shortName: "reya" },
410
438
  { chainId: 1740n, shortName: "metall2-testnet" },
411
439
  { chainId: 1750n, shortName: "metall2" },
@@ -443,9 +471,12 @@ var networks = [
443
471
  { chainId: 2442n, shortName: "zkevm-testnet-cardona" },
444
472
  { chainId: 2522n, shortName: "fraxtal-testnet" },
445
473
  { chainId: 2741n, shortName: "abstract" },
474
+ { chainId: 2787n, shortName: "creator-chain-mainnet" },
446
475
  { chainId: 2810n, shortName: "hmorph" },
447
476
  { chainId: 2818n, shortName: "morph" },
477
+ { chainId: 2910n, shortName: "morph-hoodi-testnet" },
448
478
  { chainId: 3068n, shortName: "bfc" },
479
+ { chainId: 3111n, shortName: "alpha" },
449
480
  { chainId: 3338n, shortName: "PEAQ" },
450
481
  { chainId: 3501n, shortName: "JFIN" },
451
482
  { chainId: 3636n, shortName: "BTNXt" },
@@ -456,14 +487,17 @@ var networks = [
456
487
  { chainId: 4061n, shortName: "Nahmii3Mainnet" },
457
488
  { chainId: 4062n, shortName: "Nahmii3Testnet" },
458
489
  { chainId: 4078n, shortName: "muster" },
490
+ { chainId: 4153n, shortName: "rise" },
459
491
  { chainId: 4157n, shortName: "crossfi-testnet" },
460
492
  { chainId: 4158n, shortName: "crossfi" },
461
493
  { chainId: 4162n, shortName: "SXR" },
462
494
  { chainId: 4202n, shortName: "lisksep" },
495
+ { chainId: 4217n, shortName: "tempo" },
463
496
  { chainId: 4326n, shortName: "megaeth" },
464
497
  { chainId: 4337n, shortName: "beam" },
465
498
  { chainId: 4460n, shortName: "orderlyl2" },
466
499
  { chainId: 4488n, shortName: "HYDRA" },
500
+ { chainId: 4509n, shortName: "SC" },
467
501
  { chainId: 4653n, shortName: "gold" },
468
502
  { chainId: 4661n, shortName: "appchaintestnet" },
469
503
  { chainId: 4689n, shortName: "iotex-mainnet" },
@@ -499,13 +533,18 @@ var networks = [
499
533
  { chainId: 7070n, shortName: "planq" },
500
534
  { chainId: 7171n, shortName: "bitrock" },
501
535
  { chainId: 7200n, shortName: "xsat" },
536
+ { chainId: 7208n, shortName: "nxra-mainnet" },
502
537
  { chainId: 7332n, shortName: "EON" },
538
+ { chainId: 7336n, shortName: "pruvtestnet" },
539
+ { chainId: 7337n, shortName: "pruvmainnet" },
503
540
  { chainId: 7341n, shortName: "shyft" },
504
541
  { chainId: 7560n, shortName: "cyeth" },
505
542
  { chainId: 7700n, shortName: "canto" },
506
543
  { chainId: 7771n, shortName: "tbitrock" },
507
544
  { chainId: 7897n, shortName: "arena-z" },
545
+ { chainId: 7979n, shortName: "dos" },
508
546
  { chainId: 8008n, shortName: "polynomial" },
547
+ { chainId: 8150n, shortName: "alpen" },
509
548
  { chainId: 8192n, shortName: "tqf" },
510
549
  { chainId: 8194n, shortName: "ttqf" },
511
550
  { chainId: 8217n, shortName: "kaia-mainnet" },
@@ -514,6 +553,7 @@ var networks = [
514
553
  { chainId: 8408n, shortName: "zentest" },
515
554
  { chainId: 8453n, shortName: "base" },
516
555
  { chainId: 8700n, shortName: "ACN" },
556
+ { chainId: 8765n, shortName: "ward" },
517
557
  { chainId: 8801n, shortName: "okto-testnet" },
518
558
  { chainId: 8822n, shortName: "iotaevm" },
519
559
  { chainId: 8844n, shortName: "THYDRA" },
@@ -539,6 +579,7 @@ var networks = [
539
579
  { chainId: 11111n, shortName: "WAGMI" },
540
580
  { chainId: 11124n, shortName: "abstract-sepolia" },
541
581
  { chainId: 11235n, shortName: "islm" },
582
+ { chainId: 11417n, shortName: "anq-testnet" },
542
583
  { chainId: 11437n, shortName: "shyftt" },
543
584
  { chainId: 11501n, shortName: "bevm" },
544
585
  { chainId: 11503n, shortName: "bevm-test" },
@@ -550,6 +591,7 @@ var networks = [
550
591
  { chainId: 12553n, shortName: "rss3" },
551
592
  { chainId: 13337n, shortName: "beam-testnet" },
552
593
  { chainId: 13371n, shortName: "imx" },
594
+ { chainId: 13441n, shortName: "bridgeless" },
553
595
  { chainId: 13473n, shortName: "imx-testnet" },
554
596
  { chainId: 13505n, shortName: "gravitysep" },
555
597
  { chainId: 13746n, shortName: "g7t" },
@@ -568,11 +610,14 @@ var networks = [
568
610
  { chainId: 23295n, shortName: "sapphire-testnet" },
569
611
  { chainId: 24101n, shortName: "incentiv" },
570
612
  { chainId: 25327n, shortName: "Everclear" },
613
+ { chainId: 25363n, shortName: "fluent" },
571
614
  { chainId: 26888n, shortName: "tABCore" },
572
615
  { chainId: 28802n, shortName: "tcent" },
573
616
  { chainId: 28882n, shortName: "BobaSepolia" },
574
617
  { chainId: 28979n, shortName: "kimbonet-testnet" },
575
- { chainId: 31611n, shortName: "mezo" },
618
+ { chainId: 30303n, shortName: "Ethiq" },
619
+ { chainId: 31611n, shortName: "mezo-testnet" },
620
+ { chainId: 31612n, shortName: "mezo" },
576
621
  { chainId: 32323n, shortName: "basedai" },
577
622
  { chainId: 32380n, shortName: "paix" },
578
623
  { chainId: 32769n, shortName: "zil" },
@@ -585,6 +630,7 @@ var networks = [
585
630
  { chainId: 35441n, shortName: "q" },
586
631
  { chainId: 35443n, shortName: "q-testnet" },
587
632
  { chainId: 36888n, shortName: "abcore" },
633
+ { chainId: 36900n, shortName: "adi" },
588
634
  { chainId: 37111n, shortName: "lens-sepolia" },
589
635
  { chainId: 41455n, shortName: "aleph-zero" },
590
636
  { chainId: 41923n, shortName: "edu-chain" },
@@ -592,6 +638,7 @@ var networks = [
592
638
  { chainId: 42170n, shortName: "arb-nova" },
593
639
  { chainId: 42220n, shortName: "celo" },
594
640
  { chainId: 42421n, shortName: "rwa" },
641
+ { chainId: 42431n, shortName: "tempo-moderato" },
595
642
  { chainId: 42793n, shortName: "etlk" },
596
643
  { chainId: 43111n, shortName: "hemi" },
597
644
  { chainId: 43113n, shortName: "fuji" },
@@ -609,6 +656,7 @@ var networks = [
609
656
  { chainId: 49321n, shortName: "Stork" },
610
657
  { chainId: 50104n, shortName: "sophon" },
611
658
  { chainId: 50312n, shortName: "SomniaTestnet" },
659
+ { chainId: 52924n, shortName: "lazai" },
612
660
  { chainId: 53302n, shortName: "seedsep" },
613
661
  { chainId: 53456n, shortName: "birdlayer" },
614
662
  { chainId: 53457n, shortName: "dodochain" },
@@ -643,6 +691,8 @@ var networks = [
643
691
  { chainId: 84532n, shortName: "basesep" },
644
692
  { chainId: 88811n, shortName: "unit0-mainnet" },
645
693
  { chainId: 88817n, shortName: "unit0-testnet" },
694
+ { chainId: 88882n, shortName: "chzspicy" },
695
+ { chainId: 88888n, shortName: "chiliz" },
646
696
  { chainId: 90001n, shortName: "dhobyghaut" },
647
697
  { chainId: 91342n, shortName: "giwasepolia" },
648
698
  { chainId: 97435n, shortName: "sling" },
@@ -650,7 +700,9 @@ var networks = [
650
700
  { chainId: 98865n, shortName: "plume" },
651
701
  { chainId: 98866n, shortName: "plume-mainnet" },
652
702
  { chainId: 98867n, shortName: "plume-testnet" },
703
+ { chainId: 98875n, shortName: "nil" },
653
704
  { chainId: 98985n, shortName: "superposition-testnet" },
705
+ { chainId: 102030n, shortName: "ctc" },
654
706
  { chainId: 103454n, shortName: "masatest" },
655
707
  { chainId: 105105n, shortName: "stratis" },
656
708
  { chainId: 111188n, shortName: "re-al" },
@@ -659,6 +711,7 @@ var networks = [
659
711
  { chainId: 167000n, shortName: "tko-mainnet" },
660
712
  { chainId: 167008n, shortName: "tko-katla" },
661
713
  { chainId: 167009n, shortName: "tko-hekla" },
714
+ { chainId: 167013n, shortName: "tko-hoodi" },
662
715
  { chainId: 175188n, shortName: "lpy" },
663
716
  { chainId: 181228n, shortName: "hpp-sepolia" },
664
717
  { chainId: 190415n, shortName: "hpp-mainnet" },
@@ -669,16 +722,19 @@ var networks = [
669
722
  { chainId: 205205n, shortName: "auroria" },
670
723
  { chainId: 210425n, shortName: "platon" },
671
724
  { chainId: 222888n, shortName: "mocat" },
725
+ { chainId: 278701n, shortName: "creator-chain-testnet" },
672
726
  { chainId: 314159n, shortName: "filecoin-calibration" },
673
727
  { chainId: 325000n, shortName: "CampV2" },
674
728
  { chainId: 328527n, shortName: "nal" },
675
729
  { chainId: 333999n, shortName: "olympus" },
730
+ { chainId: 369369n, shortName: "den-mainnet" },
676
731
  { chainId: 381931n, shortName: "metal" },
677
732
  { chainId: 421611n, shortName: "arb-rinkeby" },
678
733
  { chainId: 421613n, shortName: "arb-goerli" },
679
734
  { chainId: 421614n, shortName: "arb-sep" },
680
735
  { chainId: 444444n, shortName: "syndr" },
681
736
  { chainId: 490000n, shortName: "ATN" },
737
+ { chainId: 511111n, shortName: "alpha-testnet" },
682
738
  { chainId: 534351n, shortName: "scr-sepolia" },
683
739
  { chainId: 534352n, shortName: "scr" },
684
740
  { chainId: 534353n, shortName: "scr-alpha" },
@@ -702,6 +758,7 @@ var networks = [
702
758
  { chainId: 808813n, shortName: "bob-sepolia" },
703
759
  { chainId: 810180n, shortName: "zklink-nova" },
704
760
  { chainId: 839999n, shortName: "txsat" },
761
+ { chainId: 853211n, shortName: "haqq-testethiq" },
705
762
  { chainId: 978657n, shortName: "treasure-ruby" },
706
763
  { chainId: 984122n, shortName: "forma" },
707
764
  { chainId: 1000101n, shortName: "xo" },
@@ -712,8 +769,10 @@ var networks = [
712
769
  { chainId: 2632500n, shortName: "coti" },
713
770
  { chainId: 3441006n, shortName: "mantaSepoliaTestnet" },
714
771
  { chainId: 4457845n, shortName: "zero-sepolia" },
772
+ { chainId: 5042002n, shortName: "arc-testnet" },
715
773
  { chainId: 5064014n, shortName: "ethereal" },
716
774
  { chainId: 6038361n, shortName: "azkyt" },
775
+ { chainId: 6281971n, shortName: "dogeos-chykyu" },
717
776
  { chainId: 6985385n, shortName: "hp" },
718
777
  { chainId: 7225878n, shortName: "saakuru" },
719
778
  { chainId: 7777777n, shortName: "zora" },
@@ -725,6 +784,7 @@ var networks = [
725
784
  { chainId: 12227332n, shortName: "neox-t4" },
726
785
  { chainId: 13374202n, shortName: "ethereal-testnet-0" },
727
786
  { chainId: 13863860n, shortName: "sis" },
787
+ { chainId: 20250407n, shortName: "platondev3" },
728
788
  { chainId: 21000000n, shortName: "corn" },
729
789
  { chainId: 52164803n, shortName: "fluence-testnet" },
730
790
  { chainId: 65100004n, shortName: "piccadilly-04" },
@@ -756,8 +816,10 @@ var networks = [
756
816
  { chainId: 1666700000n, shortName: "hmy-b-s0" },
757
817
  { chainId: 1952959480n, shortName: "lumiatestnet" },
758
818
  { chainId: 2030232745n, shortName: "lumia-beam-testnet" },
819
+ { chainId: 3735928814n, shortName: "edent" },
759
820
  { chainId: 11297108099n, shortName: "tpalm" },
760
821
  { chainId: 11297108109n, shortName: "palm" },
822
+ { chainId: 30143370385n, shortName: "BUB" },
761
823
  { chainId: 37714555429n, shortName: "xaitestnet" },
762
824
  { chainId: 88153591557n, shortName: "arb-blueberry" },
763
825
  { chainId: 123420000220n, shortName: "fluence-stage" },
@@ -784,6 +846,13 @@ function getEip3770NetworkPrefixFromChainId(chainId) {
784
846
  }
785
847
  return network.shortName;
786
848
  }
849
+ function getChainIdFromEip3770NetworkPrefix(prefix) {
850
+ const network = networks.find(({ shortName }) => shortName === prefix);
851
+ if (!network) {
852
+ throw new Error("No chainId found for the given network prefix");
853
+ }
854
+ return network.chainId;
855
+ }
787
856
  function isValidEip3770NetworkPrefix(prefix) {
788
857
  return networks.some(({ shortName }) => shortName === prefix);
789
858
  }
@@ -1089,6 +1158,19 @@ function generateTypedData({
1089
1158
 
1090
1159
  // src/utils/safeVersions.ts
1091
1160
  var import_satisfies2 = __toESM(require("semver/functions/satisfies.js"));
1161
+ var SafeFeature = /* @__PURE__ */ ((SafeFeature2) => {
1162
+ SafeFeature2["SAFE_TX_GAS_OPTIONAL"] = "SAFE_TX_GAS_OPTIONAL";
1163
+ SafeFeature2["SAFE_TX_GUARDS"] = "SAFE_TX_GUARDS";
1164
+ SafeFeature2["SAFE_FALLBACK_HANDLER"] = "SAFE_FALLBACK_HANDLER";
1165
+ SafeFeature2["ETH_SIGN"] = "ETH_SIGN";
1166
+ SafeFeature2["ACCOUNT_ABSTRACTION"] = "ACCOUNT_ABSTRACTION";
1167
+ SafeFeature2["REQUIRED_TXGAS"] = "REQUIRED_TXGAS";
1168
+ SafeFeature2["SIMULATE_AND_REVERT"] = "SIMULATE_AND_REVERT";
1169
+ SafeFeature2["PASSKEY_SIGNER"] = "PASSKEY_SIGNER";
1170
+ SafeFeature2["SAFE_L2_CONTRACTS"] = "SAFE_L2_CONTRACTS";
1171
+ SafeFeature2["SAFE_MODULE_GUARD"] = "SAFE_MODULE_GUARD";
1172
+ return SafeFeature2;
1173
+ })(SafeFeature || {});
1092
1174
  var SAFE_FEATURES_BY_VERSION = {
1093
1175
  ["SAFE_TX_GAS_OPTIONAL" /* SAFE_TX_GAS_OPTIONAL */]: ">=1.3.0",
1094
1176
  ["SAFE_TX_GUARDS" /* SAFE_TX_GUARDS */]: ">=1.3.0",
@@ -1098,7 +1180,8 @@ var SAFE_FEATURES_BY_VERSION = {
1098
1180
  ["REQUIRED_TXGAS" /* REQUIRED_TXGAS */]: "<=1.2.0",
1099
1181
  ["SIMULATE_AND_REVERT" /* SIMULATE_AND_REVERT */]: ">=1.3.0",
1100
1182
  ["PASSKEY_SIGNER" /* PASSKEY_SIGNER */]: ">=1.3.0",
1101
- ["SAFE_L2_CONTRACTS" /* SAFE_L2_CONTRACTS */]: ">=1.3.0"
1183
+ ["SAFE_L2_CONTRACTS" /* SAFE_L2_CONTRACTS */]: ">=1.3.0",
1184
+ ["SAFE_MODULE_GUARD" /* SAFE_MODULE_GUARD */]: ">=1.5.0"
1102
1185
  };
1103
1186
  var hasSafeFeature = (feature, version) => {
1104
1187
  if (!(feature in SAFE_FEATURES_BY_VERSION)) {
@@ -1294,7 +1377,7 @@ var calculateSafeMessageHash = (safeAddress, message, safeVersion, chainId) => {
1294
1377
 
1295
1378
  // src/utils/transactions/gas.ts
1296
1379
  var import_viem8 = require("viem");
1297
- var import_types_kit26 = require("@safe-global/types-kit");
1380
+ var import_types_kit35 = require("@safe-global/types-kit");
1298
1381
  var import_satisfies4 = __toESM(require("semver/functions/satisfies.js"));
1299
1382
 
1300
1383
  // src/contracts/BaseContract.ts
@@ -1555,6 +1638,56 @@ var CreateCallContract_v1_4_1 = class extends CreateCallBaseContract_default {
1555
1638
  };
1556
1639
  var CreateCallContract_v1_4_1_default = CreateCallContract_v1_4_1;
1557
1640
 
1641
+ // src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.ts
1642
+ var import_types_kit4 = require("@safe-global/types-kit");
1643
+ var CreateCallContract_v1_5_0 = class extends CreateCallBaseContract_default {
1644
+ /**
1645
+ * Constructs an instance of CreateCallContract_v1_5_0
1646
+ *
1647
+ * @param chainId - The chain ID where the contract resides.
1648
+ * @param safeProvider - An instance of SafeProvider.
1649
+ * @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the CreateCall deployments based on the chainId and safeVersion.
1650
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
1651
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
1652
+ */
1653
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1654
+ const safeVersion = "1.5.0";
1655
+ const defaultAbi = import_types_kit4.createCall_1_5_0_ContractArtifacts.abi;
1656
+ super(
1657
+ chainId,
1658
+ safeProvider,
1659
+ defaultAbi,
1660
+ safeVersion,
1661
+ customContractAddress,
1662
+ customContractAbi,
1663
+ deploymentType
1664
+ );
1665
+ /**
1666
+ * @param args - Array[value, deploymentData]
1667
+ * @param options - TransactionOptions
1668
+ * @returns Promise<TransactionResult>
1669
+ */
1670
+ this.performCreate = async (args, options) => {
1671
+ if (options && !options.gasLimit) {
1672
+ options.gasLimit = (await this.estimateGas("performCreate", args, options)).toString();
1673
+ }
1674
+ return toTxResult(this.runner, await this.write("performCreate", args, options), options);
1675
+ };
1676
+ /**
1677
+ * @param args - Array[value, deploymentData, salt]
1678
+ * @param options - TransactionOptions
1679
+ * @returns Promise<TransactionResult>
1680
+ */
1681
+ this.performCreate2 = async (args, options) => {
1682
+ if (options && !options.gasLimit) {
1683
+ options.gasLimit = (await this.estimateGas("performCreate2", [...args], { ...options })).toString();
1684
+ }
1685
+ return toTxResult(this.runner, await this.write("performCreate2", args, options), options);
1686
+ };
1687
+ }
1688
+ };
1689
+ var CreateCallContract_v1_5_0_default = CreateCallContract_v1_5_0;
1690
+
1558
1691
  // src/contracts/MultiSend/MultiSendBaseContract.ts
1559
1692
  var MultiSendBaseContract = class extends BaseContract_default {
1560
1693
  /**
@@ -1587,7 +1720,7 @@ var MultiSendBaseContract = class extends BaseContract_default {
1587
1720
  var MultiSendBaseContract_default = MultiSendBaseContract;
1588
1721
 
1589
1722
  // src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.ts
1590
- var import_types_kit4 = require("@safe-global/types-kit");
1723
+ var import_types_kit5 = require("@safe-global/types-kit");
1591
1724
  var MultiSendContract_v1_1_1 = class extends MultiSendBaseContract_default {
1592
1725
  /**
1593
1726
  * Constructs an instance of MultiSendContract_v1_1_1
@@ -1600,7 +1733,7 @@ var MultiSendContract_v1_1_1 = class extends MultiSendBaseContract_default {
1600
1733
  */
1601
1734
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1602
1735
  const safeVersion = "1.1.1";
1603
- const defaultAbi = import_types_kit4.multisend_1_1_1_ContractArtifacts.abi;
1736
+ const defaultAbi = import_types_kit5.multisend_1_1_1_ContractArtifacts.abi;
1604
1737
  super(
1605
1738
  chainId,
1606
1739
  safeProvider,
@@ -1615,7 +1748,7 @@ var MultiSendContract_v1_1_1 = class extends MultiSendBaseContract_default {
1615
1748
  var MultiSendContract_v1_1_1_default = MultiSendContract_v1_1_1;
1616
1749
 
1617
1750
  // src/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0.ts
1618
- var import_types_kit5 = require("@safe-global/types-kit");
1751
+ var import_types_kit6 = require("@safe-global/types-kit");
1619
1752
  var MultiSendContract_v1_3_0 = class extends MultiSendBaseContract_default {
1620
1753
  /**
1621
1754
  * Constructs an instance of MultiSendContract_v1_3_0
@@ -1628,7 +1761,7 @@ var MultiSendContract_v1_3_0 = class extends MultiSendBaseContract_default {
1628
1761
  */
1629
1762
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1630
1763
  const safeVersion = "1.3.0";
1631
- const defaultAbi = import_types_kit5.multisend_1_3_0_ContractArtifacts.abi;
1764
+ const defaultAbi = import_types_kit6.multisend_1_3_0_ContractArtifacts.abi;
1632
1765
  super(
1633
1766
  chainId,
1634
1767
  safeProvider,
@@ -1643,7 +1776,7 @@ var MultiSendContract_v1_3_0 = class extends MultiSendBaseContract_default {
1643
1776
  var MultiSendContract_v1_3_0_default = MultiSendContract_v1_3_0;
1644
1777
 
1645
1778
  // src/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1.ts
1646
- var import_types_kit6 = require("@safe-global/types-kit");
1779
+ var import_types_kit7 = require("@safe-global/types-kit");
1647
1780
  var MultiSendContract_v1_4_1 = class extends MultiSendBaseContract_default {
1648
1781
  /**
1649
1782
  * Constructs an instance of MultiSendContract_v1_4_1
@@ -1656,7 +1789,7 @@ var MultiSendContract_v1_4_1 = class extends MultiSendBaseContract_default {
1656
1789
  */
1657
1790
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1658
1791
  const safeVersion = "1.4.1";
1659
- const defaultAbi = import_types_kit6.multisend_1_4_1_ContractArtifacts.abi;
1792
+ const defaultAbi = import_types_kit7.multisend_1_4_1_ContractArtifacts.abi;
1660
1793
  super(
1661
1794
  chainId,
1662
1795
  safeProvider,
@@ -1670,6 +1803,34 @@ var MultiSendContract_v1_4_1 = class extends MultiSendBaseContract_default {
1670
1803
  };
1671
1804
  var MultiSendContract_v1_4_1_default = MultiSendContract_v1_4_1;
1672
1805
 
1806
+ // src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.ts
1807
+ var import_types_kit8 = require("@safe-global/types-kit");
1808
+ var MultiSendContract_v1_5_0 = class extends MultiSendBaseContract_default {
1809
+ /**
1810
+ * Constructs an instance of MultiSendContract_v1_5_0
1811
+ *
1812
+ * @param chainId - The chain ID where the contract resides.
1813
+ * @param safeProvider - An instance of SafeProvider.
1814
+ * @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the MultiSend deployments based on the chainId and safeVersion.
1815
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
1816
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
1817
+ */
1818
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1819
+ const safeVersion = "1.5.0";
1820
+ const defaultAbi = import_types_kit8.multisend_1_5_0_ContractArtifacts.abi;
1821
+ super(
1822
+ chainId,
1823
+ safeProvider,
1824
+ defaultAbi,
1825
+ safeVersion,
1826
+ customContractAddress,
1827
+ customContractAbi,
1828
+ deploymentType
1829
+ );
1830
+ }
1831
+ };
1832
+ var MultiSendContract_v1_5_0_default = MultiSendContract_v1_5_0;
1833
+
1673
1834
  // src/contracts/MultiSend/MultiSendCallOnlyBaseContract.ts
1674
1835
  var MultiSendCallOnlyBaseContract = class extends BaseContract_default {
1675
1836
  /**
@@ -1702,7 +1863,7 @@ var MultiSendCallOnlyBaseContract = class extends BaseContract_default {
1702
1863
  var MultiSendCallOnlyBaseContract_default = MultiSendCallOnlyBaseContract;
1703
1864
 
1704
1865
  // src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.ts
1705
- var import_types_kit7 = require("@safe-global/types-kit");
1866
+ var import_types_kit9 = require("@safe-global/types-kit");
1706
1867
  var MultiSendCallOnlyContract_v1_3_0 = class extends MultiSendCallOnlyBaseContract_default {
1707
1868
  /**
1708
1869
  * Constructs an instance of MultiSendCallOnlyContract_v1_3_0
@@ -1715,7 +1876,7 @@ var MultiSendCallOnlyContract_v1_3_0 = class extends MultiSendCallOnlyBaseContra
1715
1876
  */
1716
1877
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1717
1878
  const safeVersion = "1.3.0";
1718
- const defaultAbi = import_types_kit7.multiSendCallOnly_1_3_0_ContractArtifacts.abi;
1879
+ const defaultAbi = import_types_kit9.multiSendCallOnly_1_3_0_ContractArtifacts.abi;
1719
1880
  super(
1720
1881
  chainId,
1721
1882
  safeProvider,
@@ -1730,7 +1891,7 @@ var MultiSendCallOnlyContract_v1_3_0 = class extends MultiSendCallOnlyBaseContra
1730
1891
  var MultiSendCallOnlyContract_v1_3_0_default = MultiSendCallOnlyContract_v1_3_0;
1731
1892
 
1732
1893
  // src/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1.ts
1733
- var import_types_kit8 = require("@safe-global/types-kit");
1894
+ var import_types_kit10 = require("@safe-global/types-kit");
1734
1895
  var MultiSendCallOnlyContract_v1_4_1 = class extends MultiSendCallOnlyBaseContract_default {
1735
1896
  /**
1736
1897
  * Constructs an instance of MultiSendCallOnlyContract_v1_4_1
@@ -1743,7 +1904,7 @@ var MultiSendCallOnlyContract_v1_4_1 = class extends MultiSendCallOnlyBaseContra
1743
1904
  */
1744
1905
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1745
1906
  const safeVersion = "1.4.1";
1746
- const defaultAbi = import_types_kit8.multiSendCallOnly_1_4_1_ContractArtifacts.abi;
1907
+ const defaultAbi = import_types_kit10.multiSendCallOnly_1_4_1_ContractArtifacts.abi;
1747
1908
  super(
1748
1909
  chainId,
1749
1910
  safeProvider,
@@ -1757,6 +1918,34 @@ var MultiSendCallOnlyContract_v1_4_1 = class extends MultiSendCallOnlyBaseContra
1757
1918
  };
1758
1919
  var MultiSendCallOnlyContract_v1_4_1_default = MultiSendCallOnlyContract_v1_4_1;
1759
1920
 
1921
+ // src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.ts
1922
+ var import_types_kit11 = require("@safe-global/types-kit");
1923
+ var MultiSendCallOnlyContract_v1_5_0 = class extends MultiSendCallOnlyBaseContract_default {
1924
+ /**
1925
+ * Constructs an instance of MultiSendCallOnlyContract_v1_5_0
1926
+ *
1927
+ * @param chainId - The chain ID where the contract resides.
1928
+ * @param safeProvider - An instance of SafeProvider.
1929
+ * @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the MultiSendCallOnly deployments based on the chainId and safeVersion.
1930
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
1931
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
1932
+ */
1933
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1934
+ const safeVersion = "1.5.0";
1935
+ const defaultAbi = import_types_kit11.multiSendCallOnly_1_5_0_ContractArtifacts.abi;
1936
+ super(
1937
+ chainId,
1938
+ safeProvider,
1939
+ defaultAbi,
1940
+ safeVersion,
1941
+ customContractAddress,
1942
+ customContractAbi,
1943
+ deploymentType
1944
+ );
1945
+ }
1946
+ };
1947
+ var MultiSendCallOnlyContract_v1_5_0_default = MultiSendCallOnlyContract_v1_5_0;
1948
+
1760
1949
  // src/contracts/SignMessageLib/SignMessageLibBaseContract.ts
1761
1950
  var SignMessageLibBaseContract = class extends BaseContract_default {
1762
1951
  /**
@@ -1789,7 +1978,7 @@ var SignMessageLibBaseContract = class extends BaseContract_default {
1789
1978
  var SignMessageLibBaseContract_default = SignMessageLibBaseContract;
1790
1979
 
1791
1980
  // src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.ts
1792
- var import_types_kit9 = require("@safe-global/types-kit");
1981
+ var import_types_kit12 = require("@safe-global/types-kit");
1793
1982
  var SignMessageLibContract_v1_3_0 = class extends SignMessageLibBaseContract_default {
1794
1983
  /**
1795
1984
  * Constructs an instance of SignMessageLibContract_v1_3_0
@@ -1802,7 +1991,7 @@ var SignMessageLibContract_v1_3_0 = class extends SignMessageLibBaseContract_def
1802
1991
  */
1803
1992
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1804
1993
  const safeVersion = "1.3.0";
1805
- const defaultAbi = import_types_kit9.signMessageLib_1_3_0_ContractArtifacts.abi;
1994
+ const defaultAbi = import_types_kit12.signMessageLib_1_3_0_ContractArtifacts.abi;
1806
1995
  super(
1807
1996
  chainId,
1808
1997
  safeProvider,
@@ -1832,7 +2021,7 @@ var SignMessageLibContract_v1_3_0 = class extends SignMessageLibBaseContract_def
1832
2021
  var SignMessageLibContract_v1_3_0_default = SignMessageLibContract_v1_3_0;
1833
2022
 
1834
2023
  // src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.ts
1835
- var import_types_kit10 = require("@safe-global/types-kit");
2024
+ var import_types_kit13 = require("@safe-global/types-kit");
1836
2025
  var SignMessageLibContract_v1_4_1 = class extends SignMessageLibBaseContract_default {
1837
2026
  /**
1838
2027
  * Constructs an instance of SignMessageLibContract_v1_4_1
@@ -1845,7 +2034,7 @@ var SignMessageLibContract_v1_4_1 = class extends SignMessageLibBaseContract_def
1845
2034
  */
1846
2035
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
1847
2036
  const safeVersion = "1.4.1";
1848
- const defaultAbi = import_types_kit10.signMessageLib_1_4_1_ContractArtifacts.abi;
2037
+ const defaultAbi = import_types_kit13.signMessageLib_1_4_1_ContractArtifacts.abi;
1849
2038
  super(
1850
2039
  chainId,
1851
2040
  safeProvider,
@@ -1874,6 +2063,49 @@ var SignMessageLibContract_v1_4_1 = class extends SignMessageLibBaseContract_def
1874
2063
  };
1875
2064
  var SignMessageLibContract_v1_4_1_default = SignMessageLibContract_v1_4_1;
1876
2065
 
2066
+ // src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.ts
2067
+ var import_types_kit14 = require("@safe-global/types-kit");
2068
+ var SignMessageLibContract_v1_5_0 = class extends SignMessageLibBaseContract_default {
2069
+ /**
2070
+ * Constructs an instance of SignMessageLibContract_v1_5_0
2071
+ *
2072
+ * @param chainId - The chain ID where the contract resides.
2073
+ * @param safeProvider - An instance of SafeProvider.
2074
+ * @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the SignMessageLib deployments based on the chainId and safeVersion.
2075
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
2076
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
2077
+ */
2078
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
2079
+ const safeVersion = "1.5.0";
2080
+ const defaultAbi = import_types_kit14.signMessageLib_1_5_0_ContractArtifacts.abi;
2081
+ super(
2082
+ chainId,
2083
+ safeProvider,
2084
+ defaultAbi,
2085
+ safeVersion,
2086
+ customContractAddress,
2087
+ customContractAbi,
2088
+ deploymentType
2089
+ );
2090
+ /**
2091
+ * @param args - Array[message]
2092
+ */
2093
+ this.getMessageHash = async (args) => {
2094
+ return [await this.read("getMessageHash", args)];
2095
+ };
2096
+ /**
2097
+ * @param args - Array[data]
2098
+ */
2099
+ this.signMessage = async (data, options) => {
2100
+ if (options && !options.gasLimit) {
2101
+ options.gasLimit = Number(await this.estimateGas("signMessage", data, { ...options }));
2102
+ }
2103
+ return toTxResult(this.runner, await this.write("signMessage", data, options), options);
2104
+ };
2105
+ }
2106
+ };
2107
+ var SignMessageLibContract_v1_5_0_default = SignMessageLibContract_v1_5_0;
2108
+
1877
2109
  // src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.ts
1878
2110
  var import_actions2 = require("viem/actions");
1879
2111
 
@@ -1911,7 +2143,7 @@ var SafeBaseContract = class extends BaseContract_default {
1911
2143
  var SafeBaseContract_default = SafeBaseContract;
1912
2144
 
1913
2145
  // src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.ts
1914
- var import_types_kit11 = require("@safe-global/types-kit");
2146
+ var import_types_kit15 = require("@safe-global/types-kit");
1915
2147
  var SafeContract_v1_0_0 = class extends SafeBaseContract_default {
1916
2148
  /**
1917
2149
  * Constructs an instance of SafeContract_v1_0_0
@@ -1925,7 +2157,7 @@ var SafeContract_v1_0_0 = class extends SafeBaseContract_default {
1925
2157
  */
1926
2158
  constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
1927
2159
  const safeVersion = "1.0.0";
1928
- const defaultAbi = import_types_kit11.safe_1_0_0_ContractArtifacts.abi;
2160
+ const defaultAbi = import_types_kit15.safe_1_0_0_ContractArtifacts.abi;
1929
2161
  super(
1930
2162
  chainId,
1931
2163
  safeProvider,
@@ -2192,7 +2424,7 @@ var SafeContract_v1_0_0_default = SafeContract_v1_0_0;
2192
2424
 
2193
2425
  // src/contracts/Safe/v1.1.1/SafeContract_v1_1_1.ts
2194
2426
  var import_actions3 = require("viem/actions");
2195
- var import_types_kit12 = require("@safe-global/types-kit");
2427
+ var import_types_kit16 = require("@safe-global/types-kit");
2196
2428
  var SafeContract_v1_1_1 = class extends SafeBaseContract_default {
2197
2429
  /**
2198
2430
  * Constructs an instance of SafeContract_v1_1_1
@@ -2206,7 +2438,7 @@ var SafeContract_v1_1_1 = class extends SafeBaseContract_default {
2206
2438
  */
2207
2439
  constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
2208
2440
  const safeVersion = "1.1.1";
2209
- const defaultAbi = import_types_kit12.safe_1_1_1_ContractArtifacts.abi;
2441
+ const defaultAbi = import_types_kit16.safe_1_1_1_ContractArtifacts.abi;
2210
2442
  super(
2211
2443
  chainId,
2212
2444
  safeProvider,
@@ -2448,7 +2680,7 @@ var SafeContract_v1_1_1_default = SafeContract_v1_1_1;
2448
2680
 
2449
2681
  // src/contracts/Safe/v1.2.0/SafeContract_v1_2_0.ts
2450
2682
  var import_actions4 = require("viem/actions");
2451
- var import_types_kit13 = require("@safe-global/types-kit");
2683
+ var import_types_kit17 = require("@safe-global/types-kit");
2452
2684
  var SafeContract_v1_2_0 = class extends SafeBaseContract_default {
2453
2685
  /**
2454
2686
  * Constructs an instance of SafeContract_v1_2_0
@@ -2462,7 +2694,7 @@ var SafeContract_v1_2_0 = class extends SafeBaseContract_default {
2462
2694
  */
2463
2695
  constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
2464
2696
  const safeVersion = "1.2.0";
2465
- const defaultAbi = import_types_kit13.safe_1_2_0_ContractArtifacts.abi;
2697
+ const defaultAbi = import_types_kit17.safe_1_2_0_ContractArtifacts.abi;
2466
2698
  super(
2467
2699
  chainId,
2468
2700
  safeProvider,
@@ -2708,7 +2940,7 @@ var SafeContract_v1_2_0_default = SafeContract_v1_2_0;
2708
2940
 
2709
2941
  // src/contracts/Safe/v1.3.0/SafeContract_v1_3_0.ts
2710
2942
  var import_actions5 = require("viem/actions");
2711
- var import_types_kit14 = require("@safe-global/types-kit");
2943
+ var import_types_kit18 = require("@safe-global/types-kit");
2712
2944
  var SafeContract_v1_3_0 = class extends SafeBaseContract_default {
2713
2945
  /**
2714
2946
  * Constructs an instance of SafeContract_v1_3_0
@@ -2722,7 +2954,7 @@ var SafeContract_v1_3_0 = class extends SafeBaseContract_default {
2722
2954
  */
2723
2955
  constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
2724
2956
  const safeVersion = "1.3.0";
2725
- const defaultAbi = import_types_kit14.safe_1_3_0_ContractArtifacts.abi;
2957
+ const defaultAbi = import_types_kit18.safe_1_3_0_ContractArtifacts.abi;
2726
2958
  super(
2727
2959
  chainId,
2728
2960
  safeProvider,
@@ -2981,7 +3213,7 @@ var SafeContract_v1_3_0_default = SafeContract_v1_3_0;
2981
3213
 
2982
3214
  // src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.ts
2983
3215
  var import_actions6 = require("viem/actions");
2984
- var import_types_kit15 = require("@safe-global/types-kit");
3216
+ var import_types_kit19 = require("@safe-global/types-kit");
2985
3217
  var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
2986
3218
  /**
2987
3219
  * Constructs an instance of SafeContract_v1_4_1
@@ -2995,7 +3227,7 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
2995
3227
  */
2996
3228
  constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
2997
3229
  const safeVersion = "1.4.1";
2998
- const defaultAbi = import_types_kit15.safe_1_4_1_ContractArtifacts.abi;
3230
+ const defaultAbi = import_types_kit19.safe_1_4_1_ContractArtifacts.abi;
2999
3231
  super(
3000
3232
  chainId,
3001
3233
  safeProvider,
@@ -3069,7 +3301,7 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
3069
3301
  return [await this.read("getOwners")];
3070
3302
  };
3071
3303
  /**
3072
- * Reads `length` bytes of storage in the currents contract
3304
+ * Reads `length` bytes of storage in the current contract
3073
3305
  * @param args - Array[offset, length]
3074
3306
  * @returns Array[storage]
3075
3307
  */
@@ -3252,110 +3484,432 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
3252
3484
  };
3253
3485
  var SafeContract_v1_4_1_default = SafeContract_v1_4_1;
3254
3486
 
3255
- // src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.ts
3256
- var SafeProxyFactoryBaseContract = class extends BaseContract_default {
3257
- /**
3258
- * @constructor
3259
- * Constructs an instance of SafeProxyFactoryBaseContract.
3260
- *
3261
- * @param chainId - The chain ID of the contract.
3262
- * @param safeProvider - An instance of SafeProvider.
3263
- * @param defaultAbi - The default ABI for the Safe contract. It should be compatible with the specific version of the contract.
3264
- * @param safeVersion - The version of the Safe contract.
3265
- * @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.
3266
- * @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
3267
- * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
3268
- */
3269
- constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
3270
- const contractName3 = "safeProxyFactoryVersion";
3271
- super(
3272
- contractName3,
3273
- chainId,
3274
- safeProvider,
3275
- defaultAbi,
3276
- safeVersion,
3277
- customContractAddress,
3278
- customContractAbi,
3279
- deploymentType
3280
- );
3281
- this.contractName = contractName3;
3282
- }
3283
- };
3284
- var SafeProxyFactoryBaseContract_default = SafeProxyFactoryBaseContract;
3285
-
3286
- // src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.ts
3287
- var import_types_kit16 = require("@safe-global/types-kit");
3288
- var SafeProxyFactoryContract_v1_0_0 = class extends SafeProxyFactoryBaseContract_default {
3487
+ // src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.ts
3488
+ var import_actions7 = require("viem/actions");
3489
+ var import_types_kit20 = require("@safe-global/types-kit");
3490
+ var SafeContract_v1_5_0 = class extends SafeBaseContract_default {
3289
3491
  /**
3290
- * Constructs an instance of SafeProxyFactoryContract_v1_0_0
3492
+ * Constructs an instance of SafeContract_v1_5_0
3291
3493
  *
3292
3494
  * @param chainId - The chain ID where the contract resides.
3293
3495
  * @param safeProvider - An instance of SafeProvider.
3496
+ * @param isL1SafeSingleton - A flag indicating if the contract is a L1 Safe Singleton.
3294
3497
  * @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.
3295
- * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.0.0 is used.
3498
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
3296
3499
  * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
3297
3500
  */
3298
- constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3299
- const safeVersion = "1.0.0";
3300
- const defaultAbi = import_types_kit16.safeProxyFactory_1_0_0_ContractArtifacts.abi;
3501
+ constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
3502
+ const safeVersion = "1.5.0";
3503
+ const defaultAbi = import_types_kit20.safe_1_5_0_ContractArtifacts.abi;
3301
3504
  super(
3302
3505
  chainId,
3303
3506
  safeProvider,
3304
3507
  defaultAbi,
3305
3508
  safeVersion,
3509
+ isL1SafeSingleton,
3306
3510
  customContractAddress,
3307
3511
  customContractAbi,
3308
3512
  deploymentType
3309
3513
  );
3310
3514
  /**
3311
- * Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
3312
- * @returns Array[creationCode]
3515
+ * @returns Array[safeContractVersion]
3313
3516
  */
3314
- this.proxyCreationCode = async () => {
3315
- return [await this.read("proxyCreationCode")];
3517
+ this.VERSION = async () => {
3518
+ return [await this.read("VERSION")];
3316
3519
  };
3317
3520
  /**
3318
- * Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
3319
- * @returns Array[runtimeCode]
3521
+ * @param args - Array[owner, txHash]
3522
+ * @returns Array[approvedHashes]
3320
3523
  */
3321
- this.proxyRuntimeCode = async () => {
3322
- return [await this.read("proxyRuntimeCode")];
3524
+ this.approvedHashes = async (args) => {
3525
+ return [await this.read("approvedHashes", args)];
3323
3526
  };
3324
3527
  /**
3325
- * Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
3326
- * @param args - Array[masterCopy, data]
3327
- * @returns Array[proxyAddress]
3528
+ * Checks whether the signature provided is valid for the provided data, hash and number of required signatures.
3529
+ * Will revert otherwise.
3530
+ * @param args - Array[dataHash, data, signatures, requiredSignatures]
3531
+ * @returns Empty array
3328
3532
  */
3329
- this.createProxy = async (args) => {
3330
- return [await this.write("createProxy", args)];
3533
+ this.checkNSignatures = async (args) => {
3534
+ await this.read("checkNSignatures", args);
3535
+ return [];
3331
3536
  };
3332
3537
  /**
3333
- * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
3334
- * @param args - Array[masterCopy, initializer, saltNonce]
3335
- * @returns Array[proxyAddress]
3538
+ * New in v1.5.0: overload of checkNSignatures that accepts an explicit executor address.
3539
+ * Allows modules to pass msg.sender explicitly rather than relying on the contract's own context.
3540
+ * Will revert otherwise.
3541
+ * @param args - Array[executor, dataHash, signatures, requiredSignatures]
3542
+ * @returns Empty array
3336
3543
  */
3337
- this.createProxyWithNonce = async (args) => {
3338
- return [await this.write("createProxyWithNonce", args)];
3544
+ this.checkNSignaturesWithExecutor = async (args) => {
3545
+ await (0, import_actions7.readContract)(this.runner, {
3546
+ address: this.contractAddress,
3547
+ functionName: "checkNSignatures",
3548
+ abi: [
3549
+ {
3550
+ inputs: [
3551
+ { internalType: "address", name: "executor", type: "address" },
3552
+ { internalType: "bytes32", name: "dataHash", type: "bytes32" },
3553
+ { internalType: "bytes", name: "signatures", type: "bytes" },
3554
+ { internalType: "uint256", name: "requiredSignatures", type: "uint256" }
3555
+ ],
3556
+ name: "checkNSignatures",
3557
+ outputs: [],
3558
+ stateMutability: "view",
3559
+ type: "function"
3560
+ }
3561
+ ],
3562
+ args
3563
+ });
3564
+ return [];
3339
3565
  };
3340
- }
3341
- };
3342
- var SafeProxyFactoryContract_v1_0_0_default = SafeProxyFactoryContract_v1_0_0;
3343
-
3344
- // src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.ts
3345
- var import_types_kit17 = require("@safe-global/types-kit");
3346
- var SafeProxyFactoryContract_v1_1_1 = class extends SafeProxyFactoryBaseContract_default {
3347
- /**
3348
- * Constructs an instance of SafeProxyFactoryContract_v1_1_1
3349
- *
3350
- * @param chainId - The chain ID where the contract resides.
3351
- * @param safeProvider - An instance of SafeProvider.
3352
- * @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.
3353
- * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.1.1 is used.
3354
- * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
3355
- */
3356
- constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3357
- const safeVersion = "1.1.1";
3358
- const defaultAbi = import_types_kit17.safeProxyFactory_1_1_1_ContractArtifacts.abi;
3566
+ /**
3567
+ * Checks whether the signature provided is valid for the provided data and hash. Will revert otherwise.
3568
+ * @param args - Array[dataHash, data, signatures]
3569
+ * @returns Empty array
3570
+ */
3571
+ this.checkSignatures = async (args) => {
3572
+ await this.read("checkSignatures", args);
3573
+ return [];
3574
+ };
3575
+ /**
3576
+ * New in v1.5.0: overload of checkSignatures that accepts an explicit executor address.
3577
+ * Allows modules to pass msg.sender explicitly rather than relying on the contract's own context.
3578
+ * Will revert otherwise.
3579
+ * @param args - Array[executor, dataHash, signatures]
3580
+ * @returns Empty array
3581
+ */
3582
+ this.checkSignaturesWithExecutor = async (args) => {
3583
+ await (0, import_actions7.readContract)(this.runner, {
3584
+ address: this.contractAddress,
3585
+ functionName: "checkSignatures",
3586
+ abi: [
3587
+ {
3588
+ inputs: [
3589
+ { internalType: "address", name: "executor", type: "address" },
3590
+ { internalType: "bytes32", name: "dataHash", type: "bytes32" },
3591
+ { internalType: "bytes", name: "signatures", type: "bytes" }
3592
+ ],
3593
+ name: "checkSignatures",
3594
+ outputs: [],
3595
+ stateMutability: "view",
3596
+ type: "function"
3597
+ }
3598
+ ],
3599
+ args
3600
+ });
3601
+ return [];
3602
+ };
3603
+ /**
3604
+ * @returns Array[domainSeparator]
3605
+ */
3606
+ this.domainSeparator = async () => {
3607
+ return [await this.read("domainSeparator")];
3608
+ };
3609
+ /**
3610
+ * Returns array of modules.
3611
+ * @param args - Array[start, pageSize]
3612
+ * @returns Array[Array[modules], next]
3613
+ */
3614
+ this.getModulesPaginated = async (args) => {
3615
+ const [array, next] = await this.read("getModulesPaginated", args);
3616
+ return [array, next];
3617
+ };
3618
+ /**
3619
+ * Returns the list of Safe owner accounts.
3620
+ * @returns Array[Array[owners]]
3621
+ */
3622
+ this.getOwners = async () => {
3623
+ return [await this.read("getOwners")];
3624
+ };
3625
+ /**
3626
+ * Reads `length` bytes of storage in the current contract
3627
+ * @param args - Array[offset, length]
3628
+ * @returns Array[storage]
3629
+ */
3630
+ this.getStorageAt = async (args) => {
3631
+ return [await this.read("getStorageAt", args)];
3632
+ };
3633
+ /**
3634
+ * Returns the Safe threshold.
3635
+ * @returns Array[threshold]
3636
+ */
3637
+ this.getThreshold = async () => {
3638
+ return [await this.read("getThreshold")];
3639
+ };
3640
+ /**
3641
+ * Returns hash to be signed by owners.
3642
+ * @param args - Array[to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce]
3643
+ * @returns Array[transactionHash]
3644
+ */
3645
+ this.getTransactionHash = async (args) => {
3646
+ return [await this.read("getTransactionHash", args)];
3647
+ };
3648
+ /**
3649
+ * Checks if a specific Safe module is enabled for the current Safe.
3650
+ * @param args - Array[moduleAddress]
3651
+ * @returns Array[isEnabled]
3652
+ */
3653
+ this.isModuleEnabled = async (args) => {
3654
+ return [await this.read("isModuleEnabled", args)];
3655
+ };
3656
+ /**
3657
+ * Checks if a specific address is an owner of the current Safe.
3658
+ * @param args - Array[address]
3659
+ * @returns Array[isOwner]
3660
+ */
3661
+ this.isOwner = async (args) => {
3662
+ return [await this.read("isOwner", args)];
3663
+ };
3664
+ /**
3665
+ * Returns the Safe nonce.
3666
+ * @returns Array[nonce]
3667
+ */
3668
+ this.nonce = async () => {
3669
+ return [await this.read("nonce")];
3670
+ };
3671
+ /**
3672
+ * @param args - Array[messageHash]
3673
+ * @returns Array[signedMessages]
3674
+ */
3675
+ this.signedMessages = async (args) => {
3676
+ return [await this.read("signedMessages", args)];
3677
+ };
3678
+ }
3679
+ /**
3680
+ * Checks whether a given Safe transaction can be executed successfully with no errors.
3681
+ * @param safeTransaction - The Safe transaction to check.
3682
+ * @param options - Optional transaction options.
3683
+ * @returns True, if the given transactions is valid.
3684
+ */
3685
+ async isValidTransaction(safeTransaction, options = {}) {
3686
+ try {
3687
+ const gasLimit = options?.gasLimit || await this.estimateGas(
3688
+ "execTransaction",
3689
+ [
3690
+ safeTransaction.data.to,
3691
+ BigInt(safeTransaction.data.value),
3692
+ asHex(safeTransaction.data.data),
3693
+ safeTransaction.data.operation,
3694
+ BigInt(safeTransaction.data.safeTxGas),
3695
+ BigInt(safeTransaction.data.baseGas),
3696
+ BigInt(safeTransaction.data.gasPrice),
3697
+ safeTransaction.data.gasToken,
3698
+ safeTransaction.data.refundReceiver,
3699
+ asHex(safeTransaction.encodedSignatures())
3700
+ ],
3701
+ options
3702
+ );
3703
+ const converted = this.convertOptions({ ...options, gasLimit });
3704
+ const txResult = await (0, import_actions7.simulateContract)(this.runner, {
3705
+ address: this.contractAddress,
3706
+ functionName: "execTransaction",
3707
+ abi: this.contractAbi,
3708
+ args: [
3709
+ safeTransaction.data.to,
3710
+ BigInt(safeTransaction.data.value),
3711
+ asHex(safeTransaction.data.data),
3712
+ safeTransaction.data.operation,
3713
+ BigInt(safeTransaction.data.safeTxGas),
3714
+ BigInt(safeTransaction.data.baseGas),
3715
+ BigInt(safeTransaction.data.gasPrice),
3716
+ safeTransaction.data.gasToken,
3717
+ safeTransaction.data.refundReceiver,
3718
+ asHex(safeTransaction.encodedSignatures())
3719
+ ],
3720
+ ...converted
3721
+ });
3722
+ return txResult.result;
3723
+ } catch (error) {
3724
+ return false;
3725
+ }
3726
+ }
3727
+ /**
3728
+ * Executes a transaction.
3729
+ * @param safeTransaction - The Safe transaction to execute.
3730
+ * @param options - Transaction options.
3731
+ * @returns Transaction result.
3732
+ */
3733
+ async execTransaction(safeTransaction, options) {
3734
+ const gasLimit = options?.gasLimit || await this.estimateGas(
3735
+ "execTransaction",
3736
+ [
3737
+ safeTransaction.data.to,
3738
+ BigInt(safeTransaction.data.value),
3739
+ asHex(safeTransaction.data.data),
3740
+ safeTransaction.data.operation,
3741
+ BigInt(safeTransaction.data.safeTxGas),
3742
+ BigInt(safeTransaction.data.baseGas),
3743
+ BigInt(safeTransaction.data.gasPrice),
3744
+ safeTransaction.data.gasToken,
3745
+ safeTransaction.data.refundReceiver,
3746
+ asHex(safeTransaction.encodedSignatures())
3747
+ ],
3748
+ options
3749
+ );
3750
+ const args = [
3751
+ safeTransaction.data.to,
3752
+ BigInt(safeTransaction.data.value),
3753
+ asHex(safeTransaction.data.data),
3754
+ safeTransaction.data.operation,
3755
+ BigInt(safeTransaction.data.safeTxGas),
3756
+ BigInt(safeTransaction.data.baseGas),
3757
+ BigInt(safeTransaction.data.gasPrice),
3758
+ safeTransaction.data.gasToken,
3759
+ safeTransaction.data.refundReceiver,
3760
+ asHex(safeTransaction.encodedSignatures())
3761
+ ];
3762
+ return toTxResult(
3763
+ this.runner,
3764
+ await this.write("execTransaction", args, { ...options, gasLimit }),
3765
+ options
3766
+ );
3767
+ }
3768
+ /**
3769
+ * Returns array of first 10 modules.
3770
+ * @returns Array[modules]
3771
+ */
3772
+ async getModules() {
3773
+ const [modules] = await this.getModulesPaginated([SENTINEL_ADDRESS, BigInt(10)]);
3774
+ return [modules.map((module2) => module2)];
3775
+ }
3776
+ /**
3777
+ * Marks a hash as approved. This can be used to validate a hash that is used by a signature.
3778
+ * @param hash - The hash that should be marked as approved for signatures that are verified by this contract.
3779
+ * @param options - Optional transaction options.
3780
+ * @returns Transaction result.
3781
+ */
3782
+ async approveHash(hash, options) {
3783
+ const gasLimit = options?.gasLimit || await this.estimateGas("approveHash", [asHash(hash)], options);
3784
+ return toTxResult(
3785
+ this.runner,
3786
+ await this.write("approveHash", [asHash(hash)], { ...options, gasLimit }),
3787
+ options
3788
+ );
3789
+ }
3790
+ /**
3791
+ * Returns the chain id of the Safe contract. (Custom method - not defined in the Safe Contract)
3792
+ * @returns Array[chainId]
3793
+ */
3794
+ async getChainId() {
3795
+ return [await Promise.resolve(this.chainId)];
3796
+ }
3797
+ /**
3798
+ * returns the nonce of the Safe contract.
3799
+ *
3800
+ * @returns {Promise<bigint>} A promise that resolves to the nonce of the Safe contract.
3801
+ */
3802
+ async getNonce() {
3803
+ const [nonce] = await this.nonce();
3804
+ return nonce;
3805
+ }
3806
+ };
3807
+ var SafeContract_v1_5_0_default = SafeContract_v1_5_0;
3808
+
3809
+ // src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.ts
3810
+ var SafeProxyFactoryBaseContract = class extends BaseContract_default {
3811
+ /**
3812
+ * @constructor
3813
+ * Constructs an instance of SafeProxyFactoryBaseContract.
3814
+ *
3815
+ * @param chainId - The chain ID of the contract.
3816
+ * @param safeProvider - An instance of SafeProvider.
3817
+ * @param defaultAbi - The default ABI for the Safe contract. It should be compatible with the specific version of the contract.
3818
+ * @param safeVersion - The version of the Safe contract.
3819
+ * @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.
3820
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
3821
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
3822
+ */
3823
+ constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
3824
+ const contractName3 = "safeProxyFactoryVersion";
3825
+ super(
3826
+ contractName3,
3827
+ chainId,
3828
+ safeProvider,
3829
+ defaultAbi,
3830
+ safeVersion,
3831
+ customContractAddress,
3832
+ customContractAbi,
3833
+ deploymentType
3834
+ );
3835
+ this.contractName = contractName3;
3836
+ }
3837
+ };
3838
+ var SafeProxyFactoryBaseContract_default = SafeProxyFactoryBaseContract;
3839
+
3840
+ // src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.ts
3841
+ var import_types_kit21 = require("@safe-global/types-kit");
3842
+ var SafeProxyFactoryContract_v1_0_0 = class extends SafeProxyFactoryBaseContract_default {
3843
+ /**
3844
+ * Constructs an instance of SafeProxyFactoryContract_v1_0_0
3845
+ *
3846
+ * @param chainId - The chain ID where the contract resides.
3847
+ * @param safeProvider - An instance of SafeProvider.
3848
+ * @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.
3849
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.0.0 is used.
3850
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
3851
+ */
3852
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3853
+ const safeVersion = "1.0.0";
3854
+ const defaultAbi = import_types_kit21.safeProxyFactory_1_0_0_ContractArtifacts.abi;
3855
+ super(
3856
+ chainId,
3857
+ safeProvider,
3858
+ defaultAbi,
3859
+ safeVersion,
3860
+ customContractAddress,
3861
+ customContractAbi,
3862
+ deploymentType
3863
+ );
3864
+ /**
3865
+ * Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
3866
+ * @returns Array[creationCode]
3867
+ */
3868
+ this.proxyCreationCode = async () => {
3869
+ return [await this.read("proxyCreationCode")];
3870
+ };
3871
+ /**
3872
+ * Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
3873
+ * @returns Array[runtimeCode]
3874
+ */
3875
+ this.proxyRuntimeCode = async () => {
3876
+ return [await this.read("proxyRuntimeCode")];
3877
+ };
3878
+ /**
3879
+ * Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
3880
+ * @param args - Array[masterCopy, data]
3881
+ * @returns Array[proxyAddress]
3882
+ */
3883
+ this.createProxy = async (args) => {
3884
+ return [await this.write("createProxy", args)];
3885
+ };
3886
+ /**
3887
+ * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
3888
+ * @param args - Array[masterCopy, initializer, saltNonce]
3889
+ * @returns Array[proxyAddress]
3890
+ */
3891
+ this.createProxyWithNonce = async (args) => {
3892
+ return [await this.write("createProxyWithNonce", args)];
3893
+ };
3894
+ }
3895
+ };
3896
+ var SafeProxyFactoryContract_v1_0_0_default = SafeProxyFactoryContract_v1_0_0;
3897
+
3898
+ // src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.ts
3899
+ var import_types_kit22 = require("@safe-global/types-kit");
3900
+ var SafeProxyFactoryContract_v1_1_1 = class extends SafeProxyFactoryBaseContract_default {
3901
+ /**
3902
+ * Constructs an instance of SafeProxyFactoryContract_v1_1_1
3903
+ *
3904
+ * @param chainId - The chain ID where the contract resides.
3905
+ * @param safeProvider - An instance of SafeProvider.
3906
+ * @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.
3907
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.1.1 is used.
3908
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
3909
+ */
3910
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3911
+ const safeVersion = "1.1.1";
3912
+ const defaultAbi = import_types_kit22.safeProxyFactory_1_1_1_ContractArtifacts.abi;
3359
3913
  super(
3360
3914
  chainId,
3361
3915
  safeProvider,
@@ -3416,7 +3970,7 @@ var SafeProxyFactoryContract_v1_1_1 = class extends SafeProxyFactoryBaseContract
3416
3970
  var SafeProxyFactoryContract_v1_1_1_default = SafeProxyFactoryContract_v1_1_1;
3417
3971
 
3418
3972
  // src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.ts
3419
- var import_types_kit18 = require("@safe-global/types-kit");
3973
+ var import_types_kit23 = require("@safe-global/types-kit");
3420
3974
  var SafeProxyFactoryContract_v1_3_0 = class extends SafeProxyFactoryBaseContract_default {
3421
3975
  /**
3422
3976
  * Constructs an instance of SafeProxyFactoryContract_v1_3_0
@@ -3429,7 +3983,7 @@ var SafeProxyFactoryContract_v1_3_0 = class extends SafeProxyFactoryBaseContract
3429
3983
  */
3430
3984
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3431
3985
  const safeVersion = "1.3.0";
3432
- const defaultAbi = import_types_kit18.safeProxyFactory_1_3_0_ContractArtifacts.abi;
3986
+ const defaultAbi = import_types_kit23.safeProxyFactory_1_3_0_ContractArtifacts.abi;
3433
3987
  super(
3434
3988
  chainId,
3435
3989
  safeProvider,
@@ -3490,7 +4044,7 @@ var SafeProxyFactoryContract_v1_3_0 = class extends SafeProxyFactoryBaseContract
3490
4044
  var SafeProxyFactoryContract_v1_3_0_default = SafeProxyFactoryContract_v1_3_0;
3491
4045
 
3492
4046
  // src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.ts
3493
- var import_types_kit19 = require("@safe-global/types-kit");
4047
+ var import_types_kit24 = require("@safe-global/types-kit");
3494
4048
  var SafeProxyFactoryContract_v1_4_1 = class extends SafeProxyFactoryBaseContract_default {
3495
4049
  /**
3496
4050
  * Constructs an instance of SafeProxyFactoryContract_v1_4_1
@@ -3503,7 +4057,7 @@ var SafeProxyFactoryContract_v1_4_1 = class extends SafeProxyFactoryBaseContract
3503
4057
  */
3504
4058
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3505
4059
  const safeVersion = "1.4.1";
3506
- const defaultAbi = import_types_kit19.safeProxyFactory_1_4_1_ContractArtifacts.abi;
4060
+ const defaultAbi = import_types_kit24.safeProxyFactory_1_4_1_ContractArtifacts.abi;
3507
4061
  super(
3508
4062
  chainId,
3509
4063
  safeProvider,
@@ -3556,6 +4110,80 @@ var SafeProxyFactoryContract_v1_4_1 = class extends SafeProxyFactoryBaseContract
3556
4110
  };
3557
4111
  var SafeProxyFactoryContract_v1_4_1_default = SafeProxyFactoryContract_v1_4_1;
3558
4112
 
4113
+ // src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.ts
4114
+ var import_types_kit25 = require("@safe-global/types-kit");
4115
+ var SafeProxyFactoryContract_v1_5_0 = class extends SafeProxyFactoryBaseContract_default {
4116
+ /**
4117
+ * Constructs an instance of SafeProxyFactoryContract_v1_5_0
4118
+ *
4119
+ * @param chainId - The chain ID where the contract resides.
4120
+ * @param safeProvider - An instance of SafeProvider.
4121
+ * @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.
4122
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
4123
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
4124
+ */
4125
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
4126
+ const safeVersion = "1.5.0";
4127
+ const defaultAbi = import_types_kit25.safeProxyFactory_1_5_0_ContractArtifacts.abi;
4128
+ super(
4129
+ chainId,
4130
+ safeProvider,
4131
+ defaultAbi,
4132
+ safeVersion,
4133
+ customContractAddress,
4134
+ customContractAbi,
4135
+ deploymentType
4136
+ );
4137
+ /**
4138
+ * Returns the ID of the chain the contract is currently deployed on.
4139
+ * @returns Array[chainId]
4140
+ */
4141
+ this.getChainId = async () => {
4142
+ return [await this.read("getChainId")];
4143
+ };
4144
+ /**
4145
+ * Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
4146
+ * @returns Array[creationCode]
4147
+ */
4148
+ this.proxyCreationCode = async () => {
4149
+ return [await this.read("proxyCreationCode")];
4150
+ };
4151
+ /**
4152
+ * Deploys a new chain-specific proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
4153
+ * @param args - Array[singleton, initializer, saltNonce]
4154
+ * @returns Array[proxy]
4155
+ */
4156
+ this.createChainSpecificProxyWithNonce = async (args) => {
4157
+ return [await this.write("createChainSpecificProxyWithNonce", args)];
4158
+ };
4159
+ /**
4160
+ * Deploys a new chain-specific proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
4161
+ * @param args - Array[singleton, initializer, saltNonce]
4162
+ * @returns Array[proxy]
4163
+ */
4164
+ this.createChainSpecificProxyWithNonceL2 = async (args) => {
4165
+ return [await this.write("createChainSpecificProxyWithNonceL2", args)];
4166
+ };
4167
+ /**
4168
+ * Deploys a new proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
4169
+ * @param args - Array[singleton, initializer, saltNonce]
4170
+ * @returns Array[proxy]
4171
+ */
4172
+ this.createProxyWithNonce = async (args) => {
4173
+ return [await this.write("createProxyWithNonce", args)];
4174
+ };
4175
+ /**
4176
+ * Deploys a new proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
4177
+ * @param args - Array[singleton, initializer, saltNonce]
4178
+ * @returns Array[proxy]
4179
+ */
4180
+ this.createProxyWithNonceL2 = async (args) => {
4181
+ return [await this.write("createProxyWithNonceL2", args)];
4182
+ };
4183
+ }
4184
+ };
4185
+ var SafeProxyFactoryContract_v1_5_0_default = SafeProxyFactoryContract_v1_5_0;
4186
+
3559
4187
  // src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.ts
3560
4188
  var SimulateTxAccessorBaseContract = class extends BaseContract_default {
3561
4189
  /**
@@ -3588,7 +4216,7 @@ var SimulateTxAccessorBaseContract = class extends BaseContract_default {
3588
4216
  var SimulateTxAccessorBaseContract_default = SimulateTxAccessorBaseContract;
3589
4217
 
3590
4218
  // src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.ts
3591
- var import_types_kit20 = require("@safe-global/types-kit");
4219
+ var import_types_kit26 = require("@safe-global/types-kit");
3592
4220
  var SimulateTxAccessorContract_v1_3_0 = class extends SimulateTxAccessorBaseContract_default {
3593
4221
  /**
3594
4222
  * Constructs an instance of SimulateTxAccessorContract_v1_3_0
@@ -3601,7 +4229,7 @@ var SimulateTxAccessorContract_v1_3_0 = class extends SimulateTxAccessorBaseCont
3601
4229
  */
3602
4230
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3603
4231
  const safeVersion = "1.3.0";
3604
- const defaultAbi = import_types_kit20.simulateTxAccessor_1_3_0_ContractArtifacts.abi;
4232
+ const defaultAbi = import_types_kit26.simulateTxAccessor_1_3_0_ContractArtifacts.abi;
3605
4233
  super(
3606
4234
  chainId,
3607
4235
  safeProvider,
@@ -3624,7 +4252,7 @@ var SimulateTxAccessorContract_v1_3_0 = class extends SimulateTxAccessorBaseCont
3624
4252
  var SimulateTxAccessorContract_v1_3_0_default = SimulateTxAccessorContract_v1_3_0;
3625
4253
 
3626
4254
  // src/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1.ts
3627
- var import_types_kit21 = require("@safe-global/types-kit");
4255
+ var import_types_kit27 = require("@safe-global/types-kit");
3628
4256
  var SimulateTxAccessorContract_v1_4_1 = class extends SimulateTxAccessorBaseContract_default {
3629
4257
  /**
3630
4258
  * Constructs an instance of SimulateTxAccessorContract_v1_4_1
@@ -3637,7 +4265,7 @@ var SimulateTxAccessorContract_v1_4_1 = class extends SimulateTxAccessorBaseCont
3637
4265
  */
3638
4266
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3639
4267
  const safeVersion = "1.4.1";
3640
- const defaultAbi = import_types_kit21.simulateTxAccessor_1_4_1_ContractArtifacts.abi;
4268
+ const defaultAbi = import_types_kit27.simulateTxAccessor_1_4_1_ContractArtifacts.abi;
3641
4269
  super(
3642
4270
  chainId,
3643
4271
  safeProvider,
@@ -3659,6 +4287,42 @@ var SimulateTxAccessorContract_v1_4_1 = class extends SimulateTxAccessorBaseCont
3659
4287
  };
3660
4288
  var SimulateTxAccessorContract_v1_4_1_default = SimulateTxAccessorContract_v1_4_1;
3661
4289
 
4290
+ // src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.ts
4291
+ var import_types_kit28 = require("@safe-global/types-kit");
4292
+ var SimulateTxAccessorContract_v1_5_0 = class extends SimulateTxAccessorBaseContract_default {
4293
+ /**
4294
+ * Constructs an instance of SimulateTxAccessorContract_v1_5_0
4295
+ *
4296
+ * @param chainId - The chain ID where the contract resides.
4297
+ * @param safeProvider - An instance of SafeProvider.
4298
+ * @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the SimulateTxAccessor deployments based on the chainId and safeVersion.
4299
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
4300
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
4301
+ */
4302
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
4303
+ const safeVersion = "1.5.0";
4304
+ const defaultAbi = import_types_kit28.simulateTxAccessor_1_5_0_ContractArtifacts.abi;
4305
+ super(
4306
+ chainId,
4307
+ safeProvider,
4308
+ defaultAbi,
4309
+ safeVersion,
4310
+ customContractAddress,
4311
+ customContractAbi,
4312
+ deploymentType
4313
+ );
4314
+ /**
4315
+ * @param args - Array[to, value, data, operation]
4316
+ * @returns Array[estimate, success, returnData]
4317
+ */
4318
+ this.simulate = async (args) => {
4319
+ const [estimate, success, returnData] = await this.write("simulate", args);
4320
+ return [BigInt(estimate), !!success, asHex(returnData)];
4321
+ };
4322
+ }
4323
+ };
4324
+ var SimulateTxAccessorContract_v1_5_0_default = SimulateTxAccessorContract_v1_5_0;
4325
+
3662
4326
  // src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.ts
3663
4327
  var CompatibilityFallbackHandlerBaseContract = class extends BaseContract_default {
3664
4328
  /**
@@ -3691,7 +4355,7 @@ var CompatibilityFallbackHandlerBaseContract = class extends BaseContract_defaul
3691
4355
  var CompatibilityFallbackHandlerBaseContract_default = CompatibilityFallbackHandlerBaseContract;
3692
4356
 
3693
4357
  // src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.ts
3694
- var import_types_kit22 = require("@safe-global/types-kit");
4358
+ var import_types_kit29 = require("@safe-global/types-kit");
3695
4359
  var CompatibilityFallbackHandlerContract_v1_3_0 = class extends CompatibilityFallbackHandlerBaseContract_default {
3696
4360
  /**
3697
4361
  * Constructs an instance of CompatibilityFallbackHandlerContract_v1_3_0
@@ -3704,7 +4368,7 @@ var CompatibilityFallbackHandlerContract_v1_3_0 = class extends CompatibilityFal
3704
4368
  */
3705
4369
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3706
4370
  const safeVersion = "1.3.0";
3707
- const defaultAbi = import_types_kit22.compatibilityFallbackHandler_1_3_0_ContractArtifacts.abi;
4371
+ const defaultAbi = import_types_kit29.compatibilityFallbackHandler_1_3_0_ContractArtifacts.abi;
3708
4372
  super(
3709
4373
  chainId,
3710
4374
  safeProvider,
@@ -3719,7 +4383,7 @@ var CompatibilityFallbackHandlerContract_v1_3_0 = class extends CompatibilityFal
3719
4383
  var CompatibilityFallbackHandlerContract_v1_3_0_default = CompatibilityFallbackHandlerContract_v1_3_0;
3720
4384
 
3721
4385
  // src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.ts
3722
- var import_types_kit23 = require("@safe-global/types-kit");
4386
+ var import_types_kit30 = require("@safe-global/types-kit");
3723
4387
  var CompatibilityFallbackHandlerContract_v1_4_1 = class extends CompatibilityFallbackHandlerBaseContract_default {
3724
4388
  /**
3725
4389
  * Constructs an instance of CompatibilityFallbackHandlerContract_v1_4_1
@@ -3732,7 +4396,103 @@ var CompatibilityFallbackHandlerContract_v1_4_1 = class extends CompatibilityFal
3732
4396
  */
3733
4397
  constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
3734
4398
  const safeVersion = "1.4.1";
3735
- const defaultAbi = import_types_kit23.compatibilityFallbackHandler_1_4_1_ContractArtifacts.abi;
4399
+ const defaultAbi = import_types_kit30.compatibilityFallbackHandler_1_4_1_ContractArtifacts.abi;
4400
+ super(
4401
+ chainId,
4402
+ safeProvider,
4403
+ defaultAbi,
4404
+ safeVersion,
4405
+ customContractAddress,
4406
+ customContractAbi,
4407
+ deploymentType
4408
+ );
4409
+ }
4410
+ };
4411
+ var CompatibilityFallbackHandlerContract_v1_4_1_default = CompatibilityFallbackHandlerContract_v1_4_1;
4412
+
4413
+ // src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.ts
4414
+ var import_types_kit31 = require("@safe-global/types-kit");
4415
+ var CompatibilityFallbackHandlerContract_v1_5_0 = class extends CompatibilityFallbackHandlerBaseContract_default {
4416
+ /**
4417
+ * Constructs an instance of CompatibilityFallbackHandlerContract_v1_5_0
4418
+ *
4419
+ * @param chainId - The chain ID where the contract resides.
4420
+ * @param safeProvider - An instance of SafeProvider.
4421
+ * @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.
4422
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
4423
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
4424
+ */
4425
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
4426
+ const safeVersion = "1.5.0";
4427
+ const defaultAbi = import_types_kit31.compatibilityFallbackHandler_1_5_0_ContractArtifacts.abi;
4428
+ super(
4429
+ chainId,
4430
+ safeProvider,
4431
+ defaultAbi,
4432
+ safeVersion,
4433
+ customContractAddress,
4434
+ customContractAbi,
4435
+ deploymentType
4436
+ );
4437
+ /**
4438
+ * New in v1.5.0: encodeTransactionData was moved from the Safe contract to CompatibilityFallbackHandler
4439
+ * to preserve backwards compatibility for existing integrations.
4440
+ * @param args - Array[to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, nonce]
4441
+ * @returns Array[encodedData]
4442
+ */
4443
+ this.encodeTransactionData = async (args) => {
4444
+ return [await this.read("encodeTransactionData", args)];
4445
+ };
4446
+ }
4447
+ };
4448
+ var CompatibilityFallbackHandlerContract_v1_5_0_default = CompatibilityFallbackHandlerContract_v1_5_0;
4449
+
4450
+ // src/contracts/ExtensibleFallbackHandler/ExtensibleFallbackHandlerBaseContract.ts
4451
+ var ExtensibleFallbackHandlerBaseContract = class extends BaseContract_default {
4452
+ /**
4453
+ * @constructor
4454
+ * Constructs an instance of ExtensibleFallbackHandlerBaseContract.
4455
+ *
4456
+ * @param chainId - The chain ID of the contract.
4457
+ * @param safeProvider - An instance of SafeProvider.
4458
+ * @param defaultAbi - The default ABI for the ExtensibleFallbackHandler contract. It should be compatible with the specific version of the contract.
4459
+ * @param safeVersion - The version of the Safe contract.
4460
+ * @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.
4461
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
4462
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
4463
+ */
4464
+ constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
4465
+ const contractName3 = "extensibleFallbackHandler";
4466
+ super(
4467
+ contractName3,
4468
+ chainId,
4469
+ safeProvider,
4470
+ defaultAbi,
4471
+ safeVersion,
4472
+ customContractAddress,
4473
+ customContractAbi,
4474
+ deploymentType
4475
+ );
4476
+ this.contractName = contractName3;
4477
+ }
4478
+ };
4479
+ var ExtensibleFallbackHandlerBaseContract_default = ExtensibleFallbackHandlerBaseContract;
4480
+
4481
+ // src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.ts
4482
+ var import_types_kit32 = require("@safe-global/types-kit");
4483
+ var ExtensibleFallbackHandlerContract_v1_5_0 = class extends ExtensibleFallbackHandlerBaseContract_default {
4484
+ /**
4485
+ * Constructs an instance of ExtensibleFallbackHandlerContract_v1_5_0
4486
+ *
4487
+ * @param chainId - The chain ID where the contract resides.
4488
+ * @param safeProvider - An instance of SafeProvider.
4489
+ * @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the ExtensibleFallbackHandler deployments based on the chainId and safeVersion.
4490
+ * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
4491
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
4492
+ */
4493
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
4494
+ const safeVersion = "1.5.0";
4495
+ const defaultAbi = import_types_kit32.extensibleFallbackHandler_1_5_0_ContractArtifacts.abi;
3736
4496
  super(
3737
4497
  chainId,
3738
4498
  safeProvider,
@@ -3742,9 +4502,130 @@ var CompatibilityFallbackHandlerContract_v1_4_1 = class extends CompatibilityFal
3742
4502
  customContractAbi,
3743
4503
  deploymentType
3744
4504
  );
4505
+ // Read methods
4506
+ /**
4507
+ * @param args - Array[safe, domainSeparator]
4508
+ * @returns Array[verifier]
4509
+ */
4510
+ this.domainVerifiers = async (args) => {
4511
+ return [await this.read("domainVerifiers", args)];
4512
+ };
4513
+ /**
4514
+ * @param args - Array[_hash, signature]
4515
+ * @returns Array[magic]
4516
+ */
4517
+ this.isValidSignature = async (args) => {
4518
+ return [await this.read("isValidSignature", args)];
4519
+ };
4520
+ /**
4521
+ * @param args - Array[safe, interfaceId]
4522
+ * @returns Array[isSupported]
4523
+ */
4524
+ this.safeInterfaces = async (args) => {
4525
+ return [await this.read("safeInterfaces", args)];
4526
+ };
4527
+ /**
4528
+ * @param args - Array[safe, selector]
4529
+ * @returns Array[handler]
4530
+ */
4531
+ this.safeMethods = async (args) => {
4532
+ return [await this.read("safeMethods", args)];
4533
+ };
4534
+ /**
4535
+ * @param args - Array[interfaceId]
4536
+ * @returns Array[isSupported]
4537
+ */
4538
+ this.supportsInterface = async (args) => {
4539
+ return [await this.read("supportsInterface", args)];
4540
+ };
4541
+ /**
4542
+ * @param args - Array[operator, from, tokenId, data]
4543
+ * @returns Array[bytes4]
4544
+ */
4545
+ this.onERC721Received = async (args) => {
4546
+ return [await this.read("onERC721Received", args)];
4547
+ };
4548
+ /**
4549
+ * @param args - Array[operator, from, id, value, data]
4550
+ * @returns Array[bytes4]
4551
+ */
4552
+ this.onERC1155Received = async (args) => {
4553
+ return [await this.read("onERC1155Received", args)];
4554
+ };
4555
+ /**
4556
+ * @param args - Array[operator, from, ids, values, data]
4557
+ * @returns Array[bytes4]
4558
+ */
4559
+ this.onERC1155BatchReceived = async (args) => {
4560
+ return [await this.read("onERC1155BatchReceived", args)];
4561
+ };
4562
+ // Write methods (must be called via Safe transactions since msg.sender = Safe address)
4563
+ /**
4564
+ * @param args - Array[_interfaceId, handlerWithSelectors]
4565
+ */
4566
+ this.addSupportedInterfaceBatch = async (args, options) => {
4567
+ if (options && !options.gasLimit) {
4568
+ options.gasLimit = Number(
4569
+ await this.estimateGas("addSupportedInterfaceBatch", args, { ...options })
4570
+ );
4571
+ }
4572
+ return toTxResult(
4573
+ this.runner,
4574
+ await this.write("addSupportedInterfaceBatch", args, options),
4575
+ options
4576
+ );
4577
+ };
4578
+ /**
4579
+ * @param args - Array[_interfaceId, selectors]
4580
+ */
4581
+ this.removeSupportedInterfaceBatch = async (args, options) => {
4582
+ if (options && !options.gasLimit) {
4583
+ options.gasLimit = Number(
4584
+ await this.estimateGas("removeSupportedInterfaceBatch", args, { ...options })
4585
+ );
4586
+ }
4587
+ return toTxResult(
4588
+ this.runner,
4589
+ await this.write("removeSupportedInterfaceBatch", args, options),
4590
+ options
4591
+ );
4592
+ };
4593
+ /**
4594
+ * @param args - Array[domainSeparator, newVerifier]
4595
+ */
4596
+ this.setDomainVerifier = async (args, options) => {
4597
+ if (options && !options.gasLimit) {
4598
+ options.gasLimit = Number(await this.estimateGas("setDomainVerifier", args, { ...options }));
4599
+ }
4600
+ return toTxResult(this.runner, await this.write("setDomainVerifier", args, options), options);
4601
+ };
4602
+ /**
4603
+ * @param args - Array[selector, newMethod]
4604
+ */
4605
+ this.setSafeMethod = async (args, options) => {
4606
+ if (options && !options.gasLimit) {
4607
+ options.gasLimit = Number(await this.estimateGas("setSafeMethod", args, { ...options }));
4608
+ }
4609
+ return toTxResult(this.runner, await this.write("setSafeMethod", args, options), options);
4610
+ };
4611
+ /**
4612
+ * @param args - Array[interfaceId, supported]
4613
+ */
4614
+ this.setSupportedInterface = async (args, options) => {
4615
+ if (options && !options.gasLimit) {
4616
+ options.gasLimit = Number(
4617
+ await this.estimateGas("setSupportedInterface", args, { ...options })
4618
+ );
4619
+ }
4620
+ return toTxResult(
4621
+ this.runner,
4622
+ await this.write("setSupportedInterface", args, options),
4623
+ options
4624
+ );
4625
+ };
3745
4626
  }
3746
4627
  };
3747
- var CompatibilityFallbackHandlerContract_v1_4_1_default = CompatibilityFallbackHandlerContract_v1_4_1;
4628
+ var ExtensibleFallbackHandlerContract_v1_5_0_default = ExtensibleFallbackHandlerContract_v1_5_0;
3748
4629
 
3749
4630
  // src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.ts
3750
4631
  var SafeWebAuthnSignerFactoryBaseContract = class extends BaseContract_default {
@@ -3778,7 +4659,7 @@ var SafeWebAuthnSignerFactoryBaseContract = class extends BaseContract_default {
3778
4659
  var SafeWebAuthnSignerFactoryBaseContract_default = SafeWebAuthnSignerFactoryBaseContract;
3779
4660
 
3780
4661
  // src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.ts
3781
- var import_types_kit24 = require("@safe-global/types-kit");
4662
+ var import_types_kit33 = require("@safe-global/types-kit");
3782
4663
  var SafeWebAuthnSignerFactoryContract_v0_2_1 = class extends SafeWebAuthnSignerFactoryBaseContract_default {
3783
4664
  /**
3784
4665
  * Constructs an instance of SafeWebAuthnSignerFactoryContract_v0_2_1
@@ -3791,7 +4672,7 @@ var SafeWebAuthnSignerFactoryContract_v0_2_1 = class extends SafeWebAuthnSignerF
3791
4672
  * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
3792
4673
  */
3793
4674
  constructor(chainId, safeProvider, safeVersion, customContractAddress, customContractAbi, deploymentType) {
3794
- const defaultAbi = import_types_kit24.SafeWebAuthnSignerFactory_0_2_1_ContractArtifacts.abi;
4675
+ const defaultAbi = import_types_kit33.SafeWebAuthnSignerFactory_0_2_1_ContractArtifacts.abi;
3795
4676
  super(
3796
4677
  chainId,
3797
4678
  safeProvider,
@@ -3856,7 +4737,7 @@ var SafeWebAuthnSharedSignerBaseContract = class extends BaseContract_default {
3856
4737
  var SafeWebAuthnSharedSignerBaseContract_default = SafeWebAuthnSharedSignerBaseContract;
3857
4738
 
3858
4739
  // src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.ts
3859
- var import_types_kit25 = require("@safe-global/types-kit");
4740
+ var import_types_kit34 = require("@safe-global/types-kit");
3860
4741
  var SafeWebAuthnSharedSignerContract_v0_2_1 = class extends SafeWebAuthnSharedSignerBaseContract_default {
3861
4742
  /**
3862
4743
  * Constructs an instance of SafeWebAuthnSharedSignerContract_v0_2_1
@@ -3869,7 +4750,7 @@ var SafeWebAuthnSharedSignerContract_v0_2_1 = class extends SafeWebAuthnSharedSi
3869
4750
  * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
3870
4751
  */
3871
4752
  constructor(chainId, safeProvider, safeVersion, customContractAddress, customContractAbi, deploymentType) {
3872
- const defaultAbi = import_types_kit25.SafeWebAuthnSharedSigner_0_2_1_ContractArtifacts.abi;
4753
+ const defaultAbi = import_types_kit34.SafeWebAuthnSharedSigner_0_2_1_ContractArtifacts.abi;
3873
4754
  super(
3874
4755
  chainId,
3875
4756
  safeProvider,
@@ -3914,6 +4795,16 @@ async function getSafeContractInstance(safeVersion, safeProvider, contractAddres
3914
4795
  const chainId = await safeProvider.getChainId();
3915
4796
  let safeContractInstance;
3916
4797
  switch (safeVersion) {
4798
+ case "1.5.0":
4799
+ safeContractInstance = new SafeContract_v1_5_0_default(
4800
+ chainId,
4801
+ safeProvider,
4802
+ isL1SafeSingleton,
4803
+ contractAddress,
4804
+ customContractAbi,
4805
+ deploymentType
4806
+ );
4807
+ break;
3917
4808
  case "1.4.1":
3918
4809
  safeContractInstance = new SafeContract_v1_4_1_default(
3919
4810
  chainId,
@@ -3974,6 +4865,15 @@ async function getCompatibilityFallbackHandlerContractInstance(safeVersion, safe
3974
4865
  const chainId = await safeProvider.getChainId();
3975
4866
  let compatibilityFallbackHandlerInstance;
3976
4867
  switch (safeVersion) {
4868
+ case "1.5.0":
4869
+ compatibilityFallbackHandlerInstance = new CompatibilityFallbackHandlerContract_v1_5_0_default(
4870
+ chainId,
4871
+ safeProvider,
4872
+ contractAddress,
4873
+ customContractAbi,
4874
+ deploymentType
4875
+ );
4876
+ break;
3977
4877
  case "1.4.1":
3978
4878
  compatibilityFallbackHandlerInstance = new CompatibilityFallbackHandlerContract_v1_4_1_default(
3979
4879
  chainId,
@@ -4004,6 +4904,15 @@ async function getMultiSendContractInstance(safeVersion, safeProvider, contractA
4004
4904
  const chainId = await safeProvider.getChainId();
4005
4905
  let multiSendContractInstance;
4006
4906
  switch (safeVersion) {
4907
+ case "1.5.0":
4908
+ multiSendContractInstance = new MultiSendContract_v1_5_0_default(
4909
+ chainId,
4910
+ safeProvider,
4911
+ contractAddress,
4912
+ customContractAbi,
4913
+ deploymentType
4914
+ );
4915
+ break;
4007
4916
  case "1.4.1":
4008
4917
  multiSendContractInstance = new MultiSendContract_v1_4_1_default(
4009
4918
  chainId,
@@ -4043,6 +4952,15 @@ async function getMultiSendCallOnlyContractInstance(safeVersion, safeProvider, c
4043
4952
  const chainId = await safeProvider.getChainId();
4044
4953
  let multiSendCallOnlyContractInstance;
4045
4954
  switch (safeVersion) {
4955
+ case "1.5.0":
4956
+ multiSendCallOnlyContractInstance = new MultiSendCallOnlyContract_v1_5_0_default(
4957
+ chainId,
4958
+ safeProvider,
4959
+ contractAddress,
4960
+ customContractAbi,
4961
+ deploymentType
4962
+ );
4963
+ break;
4046
4964
  case "1.4.1":
4047
4965
  multiSendCallOnlyContractInstance = new MultiSendCallOnlyContract_v1_4_1_default(
4048
4966
  chainId,
@@ -4074,6 +4992,15 @@ async function getSafeProxyFactoryContractInstance(safeVersion, safeProvider, co
4074
4992
  const chainId = await safeProvider.getChainId();
4075
4993
  let safeProxyFactoryContractInstance;
4076
4994
  switch (safeVersion) {
4995
+ case "1.5.0":
4996
+ safeProxyFactoryContractInstance = new SafeProxyFactoryContract_v1_5_0_default(
4997
+ chainId,
4998
+ safeProvider,
4999
+ contractAddress,
5000
+ customContractAbi,
5001
+ deploymentType
5002
+ );
5003
+ break;
4077
5004
  case "1.4.1":
4078
5005
  safeProxyFactoryContractInstance = new SafeProxyFactoryContract_v1_4_1_default(
4079
5006
  chainId,
@@ -4121,6 +5048,15 @@ async function getSignMessageLibContractInstance(safeVersion, safeProvider, cont
4121
5048
  const chainId = await safeProvider.getChainId();
4122
5049
  let signMessageLibContractInstance;
4123
5050
  switch (safeVersion) {
5051
+ case "1.5.0":
5052
+ signMessageLibContractInstance = new SignMessageLibContract_v1_5_0_default(
5053
+ chainId,
5054
+ safeProvider,
5055
+ contractAddress,
5056
+ customContractAbi,
5057
+ deploymentType
5058
+ );
5059
+ break;
4124
5060
  case "1.4.1":
4125
5061
  signMessageLibContractInstance = new SignMessageLibContract_v1_4_1_default(
4126
5062
  chainId,
@@ -4149,6 +5085,15 @@ async function getCreateCallContractInstance(safeVersion, safeProvider, contract
4149
5085
  const chainId = await safeProvider.getChainId();
4150
5086
  let createCallContractInstance;
4151
5087
  switch (safeVersion) {
5088
+ case "1.5.0":
5089
+ createCallContractInstance = new CreateCallContract_v1_5_0_default(
5090
+ chainId,
5091
+ safeProvider,
5092
+ contractAddress,
5093
+ customContractAbi,
5094
+ deploymentType
5095
+ );
5096
+ break;
4152
5097
  case "1.4.1":
4153
5098
  createCallContractInstance = new CreateCallContract_v1_4_1_default(
4154
5099
  chainId,
@@ -4180,6 +5125,15 @@ async function getSimulateTxAccessorContractInstance(safeVersion, safeProvider,
4180
5125
  const chainId = await safeProvider.getChainId();
4181
5126
  let simulateTxAccessorContractInstance;
4182
5127
  switch (safeVersion) {
5128
+ case "1.5.0":
5129
+ simulateTxAccessorContractInstance = new SimulateTxAccessorContract_v1_5_0_default(
5130
+ chainId,
5131
+ safeProvider,
5132
+ contractAddress,
5133
+ customContractAbi,
5134
+ deploymentType
5135
+ );
5136
+ break;
4183
5137
  case "1.4.1":
4184
5138
  simulateTxAccessorContractInstance = new SimulateTxAccessorContract_v1_4_1_default(
4185
5139
  chainId,
@@ -4207,6 +5161,7 @@ async function getSimulateTxAccessorContractInstance(safeVersion, safeProvider,
4207
5161
  async function getSafeWebAuthnSignerFactoryContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
4208
5162
  const chainId = await safeProvider.getChainId();
4209
5163
  switch (safeVersion) {
5164
+ case "1.5.0":
4210
5165
  case "1.4.1":
4211
5166
  case "1.3.0":
4212
5167
  const safeWebAuthnSignerFactoryContractInstance = new SafeWebAuthnSignerFactoryContract_v0_2_1_default(
@@ -4226,6 +5181,7 @@ async function getSafeWebAuthnSignerFactoryContractInstance(safeVersion, safePro
4226
5181
  async function getSafeWebAuthnSharedSignerContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
4227
5182
  const chainId = await safeProvider.getChainId();
4228
5183
  switch (safeVersion) {
5184
+ case "1.5.0":
4229
5185
  case "1.4.1":
4230
5186
  case "1.3.0":
4231
5187
  const safeWebAuthnSharedSignerContractInstance = new SafeWebAuthnSharedSignerContract_v0_2_1_default(
@@ -4242,6 +5198,23 @@ async function getSafeWebAuthnSharedSignerContractInstance(safeVersion, safeProv
4242
5198
  throw new Error("Invalid Safe version");
4243
5199
  }
4244
5200
  }
5201
+ async function getExtensibleFallbackHandlerContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
5202
+ const chainId = await safeProvider.getChainId();
5203
+ switch (safeVersion) {
5204
+ case "1.5.0":
5205
+ const extensibleFallbackHandlerContractInstance = new ExtensibleFallbackHandlerContract_v1_5_0_default(
5206
+ chainId,
5207
+ safeProvider,
5208
+ contractAddress,
5209
+ customContractAbi,
5210
+ deploymentType
5211
+ );
5212
+ await extensibleFallbackHandlerContractInstance.init();
5213
+ return extensibleFallbackHandlerContractInstance;
5214
+ default:
5215
+ throw new Error("Invalid Safe version");
5216
+ }
5217
+ }
4245
5218
 
4246
5219
  // src/contracts/safeDeploymentContracts.ts
4247
5220
  async function getSafeContract({
@@ -4451,6 +5424,27 @@ async function getSafeWebAuthnSharedSignerContract({
4451
5424
  }
4452
5425
  return safeWebAuthnSharedSignerContract;
4453
5426
  }
5427
+ async function getExtensibleFallbackHandlerContract({
5428
+ safeProvider,
5429
+ safeVersion,
5430
+ customContracts,
5431
+ deploymentType
5432
+ }) {
5433
+ const extensibleFallbackHandlerContract = await getExtensibleFallbackHandlerContractInstance(
5434
+ safeVersion,
5435
+ safeProvider,
5436
+ customContracts?.extensibleFallbackHandlerAddress,
5437
+ customContracts?.extensibleFallbackHandlerAbi,
5438
+ deploymentType
5439
+ );
5440
+ const isContractDeployed = await safeProvider.isContractDeployed(
5441
+ extensibleFallbackHandlerContract.getAddress()
5442
+ );
5443
+ if (!isContractDeployed) {
5444
+ throw new Error("ExtensibleFallbackHandler contract is not deployed on the current network");
5445
+ }
5446
+ return extensibleFallbackHandlerContract;
5447
+ }
4454
5448
 
4455
5449
  // src/utils/transactions/gas.ts
4456
5450
  var CALL_DATA_ZERO_BYTE_GAS_COST = 4;
@@ -4516,7 +5510,7 @@ async function estimateTxGas(safeContract, safeProvider, to, valueInWei, data, o
4516
5510
  });
4517
5511
  return estimateGas3;
4518
5512
  } catch (error) {
4519
- if (operation === import_types_kit26.OperationType.DelegateCall) {
5513
+ if (operation === import_types_kit35.OperationType.DelegateCall) {
4520
5514
  return "0";
4521
5515
  }
4522
5516
  return Promise.reject(error);
@@ -4740,14 +5734,14 @@ var EthSafeTransaction = class {
4740
5734
  var SafeTransaction_default = EthSafeTransaction;
4741
5735
 
4742
5736
  // src/utils/transactions/utils.ts
4743
- var import_types_kit27 = require("@safe-global/types-kit");
5737
+ var import_types_kit36 = require("@safe-global/types-kit");
4744
5738
  var import_satisfies5 = __toESM(require("semver/functions/satisfies.js"));
4745
5739
  var import_viem9 = require("viem");
4746
- var import_actions7 = require("viem/actions");
5740
+ var import_actions8 = require("viem/actions");
4747
5741
  function standardizeMetaTransactionData(tx) {
4748
5742
  const standardizedTxs = {
4749
5743
  ...tx,
4750
- operation: tx.operation ?? import_types_kit27.OperationType.Call
5744
+ operation: tx.operation ?? import_types_kit36.OperationType.Call
4751
5745
  };
4752
5746
  return standardizedTxs;
4753
5747
  }
@@ -4762,7 +5756,7 @@ async function standardizeSafeTransactionData({
4762
5756
  to: tx.to,
4763
5757
  value: tx.value,
4764
5758
  data: tx.data,
4765
- operation: tx.operation ?? import_types_kit27.OperationType.Call,
5759
+ operation: tx.operation ?? import_types_kit36.OperationType.Call,
4766
5760
  baseGas: tx.baseGas ?? "0",
4767
5761
  gasPrice: tx.gasPrice ?? "0",
4768
5762
  gasToken: tx.gasToken || ZERO_ADDRESS,
@@ -4827,7 +5821,7 @@ function encodeMetaTransaction(tx) {
4827
5821
  const encoded = (0, import_viem9.encodePacked)(
4828
5822
  ["uint8", "address", "uint256", "uint256", "bytes"],
4829
5823
  [
4830
- tx.operation ?? import_types_kit27.OperationType.Call,
5824
+ tx.operation ?? import_types_kit36.OperationType.Call,
4831
5825
  tx.to,
4832
5826
  BigInt(tx.value),
4833
5827
  BigInt(data.length),
@@ -4943,7 +5937,7 @@ function createTxOptions(options) {
4943
5937
  }
4944
5938
  function hasDelegateCalls(transactions) {
4945
5939
  return transactions.some(
4946
- (transaction) => transaction.operation && transaction.operation === import_types_kit27.OperationType.DelegateCall
5940
+ (transaction) => transaction.operation && transaction.operation === import_types_kit36.OperationType.DelegateCall
4947
5941
  );
4948
5942
  }
4949
5943
 
@@ -5059,18 +6053,18 @@ async function extractPasskeyData(passkeyCredential) {
5059
6053
  coordinates
5060
6054
  };
5061
6055
  }
5062
- function getDefaultFCLP256VerifierAddress(chainId) {
5063
- const FCLP256VerifierDeployment = (0, import_safe_modules_deployments2.getFCLP256VerifierDeployment)({
6056
+ function getP256VerifierAddress(chainId) {
6057
+ const deployment = (0, import_safe_modules_deployments2.getDaimoP256VerifierDeployment)({
5064
6058
  version: "0.2.1",
5065
6059
  released: true,
5066
6060
  network: chainId
5067
6061
  });
5068
- if (!FCLP256VerifierDeployment) {
5069
- throw new Error(`Failed to load FCLP256Verifier deployment for chain ID ${chainId}`);
6062
+ if (!deployment) {
6063
+ throw new Error(`Failed to load DaimoP256Verifier deployment for chain ID ${chainId}`);
5070
6064
  }
5071
- const verifierAddress = FCLP256VerifierDeployment.networkAddresses[chainId];
6065
+ const verifierAddress = deployment.networkAddresses[chainId];
5072
6066
  if (!verifierAddress) {
5073
- throw new Error(`FCLP256Verifier address not found for chain ID ${chainId}`);
6067
+ throw new Error(`DaimoP256Verifier address not found for chain ID ${chainId}`);
5074
6068
  }
5075
6069
  return verifierAddress;
5076
6070
  }
@@ -5079,15 +6073,14 @@ function getDefaultFCLP256VerifierAddress(chainId) {
5079
6073
  var import_viem10 = require("viem");
5080
6074
 
5081
6075
  // src/utils/passkeys/isSharedSigner.ts
5082
- async function isSharedSigner(passkey, safeWebAuthnSharedSignerContract, safeAddress, owners, chainId) {
6076
+ async function isSharedSigner(passkey, safeWebAuthnSharedSignerContract, safeAddress, owners) {
5083
6077
  const sharedSignerContractAddress = safeWebAuthnSharedSignerContract.contractAddress;
5084
6078
  if (safeAddress && owners.includes(sharedSignerContractAddress)) {
5085
6079
  const [sharedSignerSlot] = await safeWebAuthnSharedSignerContract.getConfiguration([
5086
6080
  asHex(safeAddress)
5087
6081
  ]);
5088
6082
  const { x, y, verifiers } = sharedSignerSlot;
5089
- const verifierAddress = passkey.customVerifierAddress || getDefaultFCLP256VerifierAddress(chainId);
5090
- const isSharedSigner2 = BigInt(passkey.coordinates.x) === x && BigInt(passkey.coordinates.y) === y && BigInt(verifierAddress) === verifiers;
6083
+ const isSharedSigner2 = BigInt(passkey.coordinates.x) === x && BigInt(passkey.coordinates.y) === y && BigInt(passkey.verifierAddress) === verifiers;
5091
6084
  return isSharedSigner2;
5092
6085
  }
5093
6086
  return false;
@@ -5123,16 +6116,14 @@ var signTransaction = () => {
5123
6116
  var signTypedData = () => {
5124
6117
  throw new Error("Passkey Signers cannot sign signTypedData, they can only sign data.");
5125
6118
  };
5126
- var createPasskeyClient = async (passkey, safeWebAuthnSignerFactoryContract, safeWebAuthnSharedSignerContract, provider, safeAddress, owners, chainId) => {
5127
- const { rawId, coordinates, customVerifierAddress } = passkey;
6119
+ var createPasskeyClient = async (passkey, safeWebAuthnSignerFactoryContract, safeWebAuthnSharedSignerContract, provider, safeAddress, owners) => {
6120
+ const { rawId, coordinates, verifierAddress } = passkey;
5128
6121
  const passkeyRawId = (0, import_viem10.hexToBytes)(asHex(rawId));
5129
- const verifierAddress = customVerifierAddress || getDefaultFCLP256VerifierAddress(chainId);
5130
6122
  const isPasskeySharedSigner = await isSharedSigner_default(
5131
6123
  passkey,
5132
6124
  safeWebAuthnSharedSignerContract,
5133
6125
  safeAddress,
5134
- owners,
5135
- chainId
6126
+ owners
5136
6127
  );
5137
6128
  let signerAddress;
5138
6129
  if (isPasskeySharedSigner) {
@@ -5272,7 +6263,7 @@ function blockTag(blockTag2) {
5272
6263
  // src/SafeProvider.ts
5273
6264
  var import_viem12 = require("viem");
5274
6265
  var import_accounts = require("viem/accounts");
5275
- var import_actions8 = require("viem/actions");
6266
+ var import_actions9 = require("viem/actions");
5276
6267
 
5277
6268
  // src/utils/provider.ts
5278
6269
  var import_viem11 = require("viem");
@@ -5336,8 +6327,7 @@ var SafeProvider = class _SafeProvider {
5336
6327
  safeWebAuthnSharedSignerContract,
5337
6328
  safeProvider.getExternalProvider(),
5338
6329
  safeAddress || "",
5339
- owners || [],
5340
- chainId.toString()
6330
+ owners || []
5341
6331
  );
5342
6332
  } else {
5343
6333
  passkeySigner = signer;
@@ -5403,13 +6393,13 @@ var SafeProvider = class _SafeProvider {
5403
6393
  return validateEip3770Address(fullAddress, chainId);
5404
6394
  }
5405
6395
  async getBalance(address, blockTag2) {
5406
- return (0, import_actions8.getBalance)(this.#externalProvider, {
6396
+ return (0, import_actions9.getBalance)(this.#externalProvider, {
5407
6397
  address,
5408
6398
  ...asBlockId(blockTag2)
5409
6399
  });
5410
6400
  }
5411
6401
  async getNonce(address, blockTag2) {
5412
- return (0, import_actions8.getTransactionCount)(this.#externalProvider, {
6402
+ return (0, import_actions9.getTransactionCount)(this.#externalProvider, {
5413
6403
  address,
5414
6404
  ...asBlockId(blockTag2)
5415
6405
  });
@@ -5422,21 +6412,21 @@ var SafeProvider = class _SafeProvider {
5422
6412
  return (0, import_viem12.getAddress)(address);
5423
6413
  }
5424
6414
  async getContractCode(address, blockTag2) {
5425
- const res = await (0, import_actions8.getCode)(this.#externalProvider, {
6415
+ const res = await (0, import_actions9.getCode)(this.#externalProvider, {
5426
6416
  address,
5427
6417
  ...asBlockId(blockTag2)
5428
6418
  });
5429
6419
  return res ?? "0x";
5430
6420
  }
5431
6421
  async isContractDeployed(address, blockTag2) {
5432
- const contractCode = await (0, import_actions8.getCode)(this.#externalProvider, {
6422
+ const contractCode = await (0, import_actions9.getCode)(this.#externalProvider, {
5433
6423
  address,
5434
6424
  ...asBlockId(blockTag2)
5435
6425
  });
5436
6426
  return !!contractCode;
5437
6427
  }
5438
6428
  async getStorageAt(address, position) {
5439
- const content = await (0, import_actions8.getStorageAt)(this.#externalProvider, {
6429
+ const content = await (0, import_actions9.getStorageAt)(this.#externalProvider, {
5440
6430
  address,
5441
6431
  slot: asHex(position)
5442
6432
  });
@@ -5444,7 +6434,7 @@ var SafeProvider = class _SafeProvider {
5444
6434
  return decodedContent[0];
5445
6435
  }
5446
6436
  async getTransaction(transactionHash) {
5447
- return (0, import_actions8.getTransaction)(this.#externalProvider, {
6437
+ return (0, import_actions9.getTransaction)(this.#externalProvider, {
5448
6438
  hash: asHash(transactionHash)
5449
6439
  });
5450
6440
  }
@@ -5491,18 +6481,18 @@ var SafeProvider = class _SafeProvider {
5491
6481
  }
5492
6482
  async estimateGas(transaction) {
5493
6483
  const converted = toEstimateGasParameters(transaction);
5494
- return (await (0, import_actions8.estimateGas)(this.#externalProvider, converted)).toString();
6484
+ return (await (0, import_actions9.estimateGas)(this.#externalProvider, converted)).toString();
5495
6485
  }
5496
6486
  async call(transaction, blockTag2) {
5497
6487
  const converted = toTransactionRequest(transaction);
5498
- const { data } = await (0, import_actions8.call)(this.#externalProvider, {
6488
+ const { data } = await (0, import_actions9.call)(this.#externalProvider, {
5499
6489
  ...converted,
5500
6490
  ...asBlockId(blockTag2)
5501
6491
  });
5502
6492
  return data ?? "0x";
5503
6493
  }
5504
6494
  async readContract(args) {
5505
- return (0, import_actions8.readContract)(this.#externalProvider, args);
6495
+ return (0, import_actions9.readContract)(this.#externalProvider, args);
5506
6496
  }
5507
6497
  // TODO: fix anys
5508
6498
  encodeParameters(types, values) {
@@ -5785,7 +6775,7 @@ async function predictSafeAddress({
5785
6775
  const salt = (0, import_viem13.keccak256)((0, import_viem13.concat)([initializerHash, encodedNonce]));
5786
6776
  const input = safeProvider.encodeParameters("address", [safeContract.getAddress()]);
5787
6777
  const from = safeProxyFactoryContract.getAddress();
5788
- const isZkSyncChain = [ZKSYNC_MAINNET, ZKSYNC_TESTNET, ZKSYNC_LENS].includes(chainId);
6778
+ const isZkSyncChain = [ZKSYNC_MAINNET, ZKSYNC_TESTNET, ZKSYNC_LENS].includes(chainId) && (0, import_satisfies6.default)(safeVersion, "<=1.4.1");
5789
6779
  if (isZkSyncChain) {
5790
6780
  const proxyAddress2 = zkSyncCreate2Address(from, safeVersion, salt, asHex(input));
5791
6781
  return safeProvider.getChecksummedAddress(proxyAddress2);
@@ -5850,7 +6840,7 @@ function toTxResult(runner, hash, options) {
5850
6840
  hash,
5851
6841
  options,
5852
6842
  transactionResponse: {
5853
- wait: async () => (0, import_actions9.waitForTransactionReceipt)(runner, { hash })
6843
+ wait: async () => (0, import_actions10.waitForTransactionReceipt)(runner, { hash })
5854
6844
  }
5855
6845
  };
5856
6846
  }
@@ -5963,6 +6953,10 @@ var FallbackHandlerManager = class {
5963
6953
  }
5964
6954
  return this.#safeContract;
5965
6955
  }
6956
+ encodeSetFallbackHandler(safeContract, handler) {
6957
+ const encode = safeContract.encode;
6958
+ return encode("setFallbackHandler", [asHex(handler)]);
6959
+ }
5966
6960
  async getFallbackHandler() {
5967
6961
  const safeContract = await this.isFallbackHandlerCompatible();
5968
6962
  return this.#safeProvider.getStorageAt(safeContract.getAddress(), this.#slot);
@@ -5972,13 +6966,13 @@ var FallbackHandlerManager = class {
5972
6966
  this.validateFallbackHandlerAddress(fallbackHandlerAddress);
5973
6967
  const currentFallbackHandler = await this.getFallbackHandler();
5974
6968
  this.validateFallbackHandlerIsNotEnabled(currentFallbackHandler, fallbackHandlerAddress);
5975
- return safeContract.encode("setFallbackHandler", [asHex(fallbackHandlerAddress)]);
6969
+ return this.encodeSetFallbackHandler(safeContract, fallbackHandlerAddress);
5976
6970
  }
5977
6971
  async encodeDisableFallbackHandlerData() {
5978
6972
  const safeContract = await this.isFallbackHandlerCompatible();
5979
6973
  const currentFallbackHandler = await this.getFallbackHandler();
5980
6974
  this.validateFallbackHandlerIsEnabled(currentFallbackHandler);
5981
- return safeContract.encode("setFallbackHandler", [asHex(ZERO_ADDRESS)]);
6975
+ return this.encodeSetFallbackHandler(safeContract, ZERO_ADDRESS);
5982
6976
  }
5983
6977
  };
5984
6978
  var fallbackHandlerManager_default = FallbackHandlerManager;
@@ -6045,6 +7039,8 @@ var guardManager_default = GuardManager;
6045
7039
  var ModuleManager = class {
6046
7040
  #safeProvider;
6047
7041
  #safeContract;
7042
+ // keccak256("module_manager.module_guard.address")
7043
+ #moduleGuardSlot = "0xb104e0b93118902c651344349b610029d694cfdec91c589c91ebafbcd0289947";
6048
7044
  constructor(safeProvider, safeContract) {
6049
7045
  this.#safeProvider = safeProvider;
6050
7046
  this.#safeContract = safeContract;
@@ -6110,6 +7106,49 @@ var ModuleManager = class {
6110
7106
  const prevModuleAddress = moduleIndex === 0 ? SENTINEL_ADDRESS : modules[moduleIndex - 1];
6111
7107
  return this.#safeContract.encode("disableModule", [prevModuleAddress, moduleAddress]);
6112
7108
  }
7109
+ validateModuleGuardAddress(moduleGuardAddress) {
7110
+ const isValidAddress = this.#safeProvider.isAddress(moduleGuardAddress);
7111
+ if (!isValidAddress || isZeroAddress(moduleGuardAddress)) {
7112
+ throw new Error("Invalid module guard address provided");
7113
+ }
7114
+ }
7115
+ validateModuleGuardIsNotEnabled(currentModuleGuard, newModuleGuardAddress) {
7116
+ if (sameString(currentModuleGuard, newModuleGuardAddress)) {
7117
+ throw new Error("Module guard provided is already enabled");
7118
+ }
7119
+ }
7120
+ validateModuleGuardIsEnabled(moduleGuardAddress) {
7121
+ if (isZeroAddress(moduleGuardAddress)) {
7122
+ throw new Error("There is no module guard enabled yet");
7123
+ }
7124
+ }
7125
+ async isModuleGuardCompatible() {
7126
+ if (!this.#safeContract) {
7127
+ throw new Error("Safe is not deployed");
7128
+ }
7129
+ const safeVersion = this.#safeContract.safeVersion;
7130
+ if (!hasSafeFeature("SAFE_MODULE_GUARD" /* SAFE_MODULE_GUARD */, safeVersion)) {
7131
+ throw new Error("Current version of the Safe does not support module guard functionality");
7132
+ }
7133
+ return this.#safeContract;
7134
+ }
7135
+ async getModuleGuard() {
7136
+ const safeContract = await this.isModuleGuardCompatible();
7137
+ return this.#safeProvider.getStorageAt(safeContract.getAddress(), this.#moduleGuardSlot);
7138
+ }
7139
+ async encodeEnableModuleGuardData(moduleGuardAddress) {
7140
+ const safeContract = await this.isModuleGuardCompatible();
7141
+ this.validateModuleGuardAddress(moduleGuardAddress);
7142
+ const currentModuleGuard = await this.getModuleGuard();
7143
+ this.validateModuleGuardIsNotEnabled(currentModuleGuard, moduleGuardAddress);
7144
+ return safeContract.encode("setModuleGuard", [asHex(moduleGuardAddress)]);
7145
+ }
7146
+ async encodeDisableModuleGuardData() {
7147
+ const safeContract = await this.isModuleGuardCompatible();
7148
+ const currentModuleGuard = await this.getModuleGuard();
7149
+ this.validateModuleGuardIsEnabled(currentModuleGuard);
7150
+ return safeContract.encode("setModuleGuard", [asHex(ZERO_ADDRESS)]);
7151
+ }
6113
7152
  };
6114
7153
  var moduleManager_default = ModuleManager;
6115
7154
 
@@ -6296,9 +7335,10 @@ function generateOnChainIdentifier({
6296
7335
  var generateOnChainIdentifier_default = generateOnChainIdentifier;
6297
7336
 
6298
7337
  // src/utils/getProtocolKitVersion.ts
6299
- var getProtocolKitVersion = () => "6.1.2";
7338
+ var getProtocolKitVersion = () => "7.1.0";
6300
7339
 
6301
7340
  // src/Safe.ts
7341
+ var EQ_OR_GT_1_5_0 = ">=1.5.0";
6302
7342
  var EQ_OR_GT_1_4_1 = ">=1.4.1";
6303
7343
  var EQ_OR_GT_1_3_03 = ">=1.3.0";
6304
7344
  var Safe = class _Safe {
@@ -6334,31 +7374,27 @@ var Safe = class _Safe {
6334
7374
  this.isValidSignature = async (messageHash, signature = "0x") => {
6335
7375
  const safeAddress = await this.getAddress();
6336
7376
  const fallbackHandler = await this.#getFallbackHandlerContract();
7377
+ const safeVersion = this.getContractVersion();
6337
7378
  const signatureToCheck = signature && Array.isArray(signature) ? buildSignatureBytes(signature) : signature;
6338
7379
  const bytes32Tuple = [
6339
7380
  asHash(messageHash),
6340
7381
  asHex(signatureToCheck)
6341
7382
  ];
6342
7383
  const data = fallbackHandler.encode("isValidSignature", bytes32Tuple);
6343
- const bytesTuple = [
6344
- asHash(messageHash),
6345
- asHex(signatureToCheck)
6346
- ];
6347
- const bytesData = fallbackHandler.encode("isValidSignature", bytesTuple);
7384
+ const callParams = { from: safeAddress, to: safeAddress };
7385
+ const calls = [this.#safeProvider.call({ ...callParams, data })];
7386
+ if (!(0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_5_0)) {
7387
+ const bytesTuple = [
7388
+ asHash(messageHash),
7389
+ asHex(signatureToCheck)
7390
+ ];
7391
+ const bytesData = fallbackHandler.encode("isValidSignature", bytesTuple);
7392
+ calls.push(this.#safeProvider.call({ ...callParams, data: bytesData }));
7393
+ }
6348
7394
  try {
6349
- const isValidSignatureResponse = await Promise.all([
6350
- this.#safeProvider.call({
6351
- from: safeAddress,
6352
- to: safeAddress,
6353
- data
6354
- }),
6355
- this.#safeProvider.call({
6356
- from: safeAddress,
6357
- to: safeAddress,
6358
- data: bytesData
6359
- })
6360
- ]);
6361
- return !!isValidSignatureResponse.length && (isValidSignatureResponse[0].slice(0, 10).toLowerCase() === this.#MAGIC_VALUE || isValidSignatureResponse[1].slice(0, 10).toLowerCase() === this.#MAGIC_VALUE_BYTES);
7395
+ const responses = await Promise.all(calls);
7396
+ const magicValues = [this.#MAGIC_VALUE, this.#MAGIC_VALUE_BYTES];
7397
+ return responses.some((response, i) => response.slice(0, 10).toLowerCase() === magicValues[i]);
6362
7398
  } catch (error) {
6363
7399
  return false;
6364
7400
  }
@@ -6717,6 +7753,15 @@ var Safe = class _Safe {
6717
7753
  async isModuleEnabled(moduleAddress) {
6718
7754
  return this.#moduleManager.isModuleEnabled(moduleAddress);
6719
7755
  }
7756
+ /**
7757
+ * Returns the enabled Safe module guard or 0x address if no module guard is enabled.
7758
+ *
7759
+ * @returns The address of the enabled Safe module guard
7760
+ * @throws "Current version of the Safe does not support module guard functionality"
7761
+ */
7762
+ async getModuleGuard() {
7763
+ return this.#moduleManager.getModuleGuard();
7764
+ }
6720
7765
  /**
6721
7766
  * Checks if a specific address is an owner of the current Safe.
6722
7767
  *
@@ -6773,7 +7818,7 @@ var Safe = class _Safe {
6773
7818
  to: multiSendContract.getAddress(),
6774
7819
  value: "0",
6775
7820
  data: multiSendContract.encode("multiSend", [asHex(multiSendData)]),
6776
- operation: import_types_kit28.OperationType.DelegateCall
7821
+ operation: import_types_kit37.OperationType.DelegateCall
6777
7822
  };
6778
7823
  newTransaction = multiSendTransaction;
6779
7824
  } else {
@@ -6865,7 +7910,7 @@ var Safe = class _Safe {
6865
7910
  const signerAddress = await this.#safeProvider.getSignerAddress();
6866
7911
  if (isPasskeySigner && signerAddress) {
6867
7912
  let signature2 = await this.#safeProvider.signMessage(hash);
6868
- signature2 = await adjustVInSignature(import_types_kit28.SigningMethod.ETH_SIGN, signature2, hash, signerAddress);
7913
+ signature2 = await adjustVInSignature(import_types_kit37.SigningMethod.ETH_SIGN, signature2, hash, signerAddress);
6869
7914
  const safeSignature = new EthSafeSignature(signerAddress, signature2, true);
6870
7915
  return safeSignature;
6871
7916
  }
@@ -6892,7 +7937,7 @@ var Safe = class _Safe {
6892
7937
  * https://github.com/safe-global/safe-contracts/blob/192c7dc67290940fcbc75165522bb86a37187069/test/core/Safe.Signatures.spec.ts#L229-L233
6893
7938
  * @returns The signed Safe message
6894
7939
  */
6895
- async signMessage(message, signingMethod = import_types_kit28.SigningMethod.ETH_SIGN_TYPED_DATA_V4, preimageSafeAddress) {
7940
+ async signMessage(message, signingMethod = import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V4, preimageSafeAddress) {
6896
7941
  const signerAddress = await this.#safeProvider.getSignerAddress();
6897
7942
  if (!signerAddress) {
6898
7943
  throw new Error("The protocol-kit requires a signer to use this method");
@@ -6902,15 +7947,15 @@ var Safe = class _Safe {
6902
7947
  throw new Error("Messages can only be signed by Safe owners");
6903
7948
  }
6904
7949
  const safeVersion = this.getContractVersion();
6905
- if (signingMethod === import_types_kit28.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_4_1) && !preimageSafeAddress) {
7950
+ if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_4_1) && !preimageSafeAddress) {
6906
7951
  throw new Error("The parent Safe account address is mandatory for contract signatures");
6907
7952
  }
6908
7953
  let signature;
6909
- if (signingMethod === import_types_kit28.SigningMethod.ETH_SIGN_TYPED_DATA_V4) {
7954
+ if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V4) {
6910
7955
  signature = await this.signTypedData(message, "v4");
6911
- } else if (signingMethod === import_types_kit28.SigningMethod.ETH_SIGN_TYPED_DATA_V3) {
7956
+ } else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V3) {
6912
7957
  signature = await this.signTypedData(message, "v3");
6913
- } else if (signingMethod === import_types_kit28.SigningMethod.ETH_SIGN_TYPED_DATA) {
7958
+ } else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA) {
6914
7959
  signature = await this.signTypedData(message, void 0);
6915
7960
  } else {
6916
7961
  const chainId = await this.getChainId();
@@ -6918,7 +7963,15 @@ var Safe = class _Safe {
6918
7963
  throw new Error("eth_sign is only supported by Safes >= v1.1.0");
6919
7964
  }
6920
7965
  let safeMessageHash;
6921
- if (signingMethod === import_types_kit28.SigningMethod.SAFE_SIGNATURE && preimageSafeAddress && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_4_1)) {
7966
+ if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && preimageSafeAddress && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_5_0)) {
7967
+ const parentSafeMessageHash = calculateSafeMessageHash(
7968
+ preimageSafeAddress,
7969
+ hashSafeMessage(message.data),
7970
+ safeVersion,
7971
+ chainId
7972
+ );
7973
+ safeMessageHash = await this.getSafeMessageHash(parentSafeMessageHash);
7974
+ } else if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && preimageSafeAddress && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_4_1)) {
6922
7975
  const messageHashData = preimageSafeMessageHash(
6923
7976
  preimageSafeAddress,
6924
7977
  hashSafeMessage(message.data),
@@ -6966,7 +8019,7 @@ var Safe = class _Safe {
6966
8019
  * @returns The signed Safe transaction
6967
8020
  * @throws "Transactions can only be signed by Safe owners"
6968
8021
  */
6969
- async signTransaction(safeTransaction, signingMethod = import_types_kit28.SigningMethod.ETH_SIGN_TYPED_DATA_V4, preimageSafeAddress) {
8022
+ async signTransaction(safeTransaction, signingMethod = import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V4, preimageSafeAddress) {
6970
8023
  const transaction = isSafeMultisigTransactionResponse(safeTransaction) ? await this.toSafeTransactionType(safeTransaction) : safeTransaction;
6971
8024
  const signerAddress = await this.#safeProvider.getSignerAddress();
6972
8025
  if (!signerAddress) {
@@ -6977,7 +8030,7 @@ var Safe = class _Safe {
6977
8030
  throw new Error("Transactions can only be signed by Safe owners");
6978
8031
  }
6979
8032
  const safeVersion = this.getContractVersion();
6980
- if (signingMethod === import_types_kit28.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_3_03) && !preimageSafeAddress) {
8033
+ if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_3_03) && !preimageSafeAddress) {
6981
8034
  throw new Error("The parent Safe account address is mandatory for contract signatures");
6982
8035
  }
6983
8036
  let signature;
@@ -6985,11 +8038,11 @@ var Safe = class _Safe {
6985
8038
  if (isPasskeySigner) {
6986
8039
  const txHash = await this.getTransactionHash(transaction);
6987
8040
  signature = await this.signHash(txHash);
6988
- } else if (signingMethod === import_types_kit28.SigningMethod.ETH_SIGN_TYPED_DATA_V4) {
8041
+ } else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V4) {
6989
8042
  signature = await this.signTypedData(transaction, "v4");
6990
- } else if (signingMethod === import_types_kit28.SigningMethod.ETH_SIGN_TYPED_DATA_V3) {
8043
+ } else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V3) {
6991
8044
  signature = await this.signTypedData(transaction, "v3");
6992
- } else if (signingMethod === import_types_kit28.SigningMethod.ETH_SIGN_TYPED_DATA) {
8045
+ } else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA) {
6993
8046
  signature = await this.signTypedData(transaction, void 0);
6994
8047
  } else {
6995
8048
  const safeVersion2 = this.getContractVersion();
@@ -6998,7 +8051,15 @@ var Safe = class _Safe {
6998
8051
  throw new Error("eth_sign is only supported by Safes >= v1.1.0");
6999
8052
  }
7000
8053
  let txHash;
7001
- if (signingMethod === import_types_kit28.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion2, EQ_OR_GT_1_3_03) && preimageSafeAddress) {
8054
+ if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion2, EQ_OR_GT_1_5_0) && preimageSafeAddress) {
8055
+ const txHashData = calculateSafeTransactionHash(
8056
+ preimageSafeAddress,
8057
+ transaction.data,
8058
+ safeVersion2,
8059
+ chainId
8060
+ );
8061
+ txHash = await this.getSafeMessageHash(txHashData);
8062
+ } else if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion2, EQ_OR_GT_1_3_03) && preimageSafeAddress) {
7002
8063
  const txHashData = preimageSafeTransactionHash(
7003
8064
  preimageSafeAddress,
7004
8065
  safeTransaction.data,
@@ -7120,6 +8181,203 @@ var Safe = class _Safe {
7120
8181
  });
7121
8182
  return safeTransaction;
7122
8183
  }
8184
+ // ---------------------------------------------------------------------------
8185
+ // ExtensibleFallbackHandler helpers
8186
+ // ---------------------------------------------------------------------------
8187
+ /**
8188
+ * Returns an instance of the ExtensibleFallbackHandler contract for the current chain.
8189
+ * Used internally to compose read queries and Safe transactions against the EFH.
8190
+ * @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
8191
+ */
8192
+ async #getExtensibleFallbackHandlerContract() {
8193
+ const safeVersion = this.getContractVersion();
8194
+ if (!(0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_5_0)) {
8195
+ throw new Error("ExtensibleFallbackHandler is only available for Safe >= v1.5.0");
8196
+ }
8197
+ const chainId = await this.getChainId();
8198
+ const customContracts = this.#contractManager.contractNetworks?.[chainId.toString()];
8199
+ return getExtensibleFallbackHandlerContract({
8200
+ safeProvider: this.#safeProvider,
8201
+ safeVersion,
8202
+ customContracts
8203
+ });
8204
+ }
8205
+ // ----- Read helpers -----
8206
+ /**
8207
+ * Returns the bytes32-encoded handler registered for the given 4-byte selector on
8208
+ * the ExtensibleFallbackHandler for this Safe.
8209
+ * Only available for Safe >= v1.5.0.
8210
+ *
8211
+ * @param selector - The 4-byte function selector (e.g. '0xaabbccdd')
8212
+ * @returns The bytes32 handler entry, or the zero bytes32 if unregistered
8213
+ * @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
8214
+ */
8215
+ async getSafeMethod(selector) {
8216
+ const safeAddress = await this.getAddress();
8217
+ const efhContract = await this.#getExtensibleFallbackHandlerContract();
8218
+ const [method] = await efhContract.safeMethods([
8219
+ safeAddress,
8220
+ selector
8221
+ ]);
8222
+ return method;
8223
+ }
8224
+ /**
8225
+ * Returns the ISafeSignatureVerifier address registered for the given domain separator
8226
+ * on the ExtensibleFallbackHandler for this Safe.
8227
+ * Only available for Safe >= v1.5.0.
8228
+ *
8229
+ * @param domainSeparator - 32-byte domain separator
8230
+ * @returns The verifier address, or the zero address if unregistered
8231
+ * @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
8232
+ */
8233
+ async getDomainVerifier(domainSeparator) {
8234
+ const safeAddress = await this.getAddress();
8235
+ const efhContract = await this.#getExtensibleFallbackHandlerContract();
8236
+ const [verifier] = await efhContract.domainVerifiers([
8237
+ safeAddress,
8238
+ domainSeparator
8239
+ ]);
8240
+ return verifier;
8241
+ }
8242
+ /**
8243
+ * Returns whether the given ERC-165 interface ID is marked as supported for this Safe
8244
+ * on the ExtensibleFallbackHandler.
8245
+ * Only available for Safe >= v1.5.0.
8246
+ *
8247
+ * @param interfaceId - 4-byte ERC-165 interface ID
8248
+ * @returns true if supported, false otherwise
8249
+ * @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
8250
+ */
8251
+ async isSafeInterfaceSupported(interfaceId) {
8252
+ const safeAddress = await this.getAddress();
8253
+ const efhContract = await this.#getExtensibleFallbackHandlerContract();
8254
+ const [isSupported] = await efhContract.safeInterfaces([
8255
+ safeAddress,
8256
+ interfaceId
8257
+ ]);
8258
+ return isSupported;
8259
+ }
8260
+ // ----- Write transaction builders -----
8261
+ /**
8262
+ * Returns a Safe transaction that calls setSafeMethod on the ExtensibleFallbackHandler.
8263
+ * Because the EFH uses msg.sender as the Safe address, this must be executed through
8264
+ * the Safe itself.
8265
+ * Only available for Safe >= v1.5.0.
8266
+ *
8267
+ * @param selector - The 4-byte function selector to handle
8268
+ * @param newMethod - bytes32-packed handler address (address right-aligned, 12 leading zero bytes)
8269
+ * @param options - Optional Safe transaction properties
8270
+ * @returns The Safe transaction ready to be signed
8271
+ * @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
8272
+ */
8273
+ async createSetSafeMethodTx(selector, newMethod, options) {
8274
+ const efhContract = await this.#getExtensibleFallbackHandlerContract();
8275
+ const safeAddress = await this.getAddress();
8276
+ const data = efhContract.encode("setSafeMethod", [
8277
+ selector,
8278
+ newMethod
8279
+ ]);
8280
+ return this.createTransaction({
8281
+ transactions: [{ to: safeAddress, value: "0", data }],
8282
+ options
8283
+ });
8284
+ }
8285
+ /**
8286
+ * Returns a Safe transaction that calls setDomainVerifier on the ExtensibleFallbackHandler.
8287
+ * Registers an ISafeSignatureVerifier for EIP-712 domain-based signature validation.
8288
+ * Only available for Safe >= v1.5.0.
8289
+ *
8290
+ * @param domainSeparator - 32-byte EIP-712 domain separator
8291
+ * @param verifier - Address of the ISafeSignatureVerifier contract
8292
+ * @param options - Optional Safe transaction properties
8293
+ * @returns The Safe transaction ready to be signed
8294
+ * @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
8295
+ */
8296
+ async createSetDomainVerifierTx(domainSeparator, verifier, options) {
8297
+ const efhContract = await this.#getExtensibleFallbackHandlerContract();
8298
+ const safeAddress = await this.getAddress();
8299
+ const data = efhContract.encode("setDomainVerifier", [
8300
+ domainSeparator,
8301
+ verifier
8302
+ ]);
8303
+ return this.createTransaction({
8304
+ transactions: [{ to: safeAddress, value: "0", data }],
8305
+ options
8306
+ });
8307
+ }
8308
+ /**
8309
+ * Returns a Safe transaction that calls setSupportedInterface on the ExtensibleFallbackHandler.
8310
+ * Marks (or un-marks) an ERC-165 interface as supported for this Safe.
8311
+ * Only available for Safe >= v1.5.0.
8312
+ *
8313
+ * @param interfaceId - 4-byte ERC-165 interface ID
8314
+ * @param supported - true to add support, false to remove it
8315
+ * @param options - Optional Safe transaction properties
8316
+ * @returns The Safe transaction ready to be signed
8317
+ * @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
8318
+ */
8319
+ async createSetSupportedInterfaceTx(interfaceId, supported, options) {
8320
+ const efhContract = await this.#getExtensibleFallbackHandlerContract();
8321
+ const safeAddress = await this.getAddress();
8322
+ const data = efhContract.encode("setSupportedInterface", [
8323
+ interfaceId,
8324
+ supported
8325
+ ]);
8326
+ return this.createTransaction({
8327
+ transactions: [{ to: safeAddress, value: "0", data }],
8328
+ options
8329
+ });
8330
+ }
8331
+ /**
8332
+ * Returns a Safe transaction that calls addSupportedInterfaceBatch on the ExtensibleFallbackHandler.
8333
+ * Atomically registers an interface and multiple method handlers in a single call.
8334
+ * Only available for Safe >= v1.5.0.
8335
+ *
8336
+ * Each entry in handlerWithSelectors is a bytes32 value encoding both the handler address
8337
+ * and the 4-byte method selector: first 4 bytes = selector, next 8 bytes = zero padding,
8338
+ * last 20 bytes = handler address.
8339
+ *
8340
+ * @param interfaceId - 4-byte ERC-165 interface ID to mark as supported
8341
+ * @param handlerWithSelectors - Array of packed selector+handler bytes32 values
8342
+ * @param options - Optional Safe transaction properties
8343
+ * @returns The Safe transaction ready to be signed
8344
+ * @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
8345
+ */
8346
+ async createAddSupportedInterfaceBatchTx(interfaceId, handlerWithSelectors, options) {
8347
+ const efhContract = await this.#getExtensibleFallbackHandlerContract();
8348
+ const safeAddress = await this.getAddress();
8349
+ const data = efhContract.encode("addSupportedInterfaceBatch", [
8350
+ interfaceId,
8351
+ handlerWithSelectors
8352
+ ]);
8353
+ return this.createTransaction({
8354
+ transactions: [{ to: safeAddress, value: "0", data }],
8355
+ options
8356
+ });
8357
+ }
8358
+ /**
8359
+ * Returns a Safe transaction that calls removeSupportedInterfaceBatch on the ExtensibleFallbackHandler.
8360
+ * Atomically un-registers an interface and removes the given method handlers in a single call.
8361
+ * Only available for Safe >= v1.5.0.
8362
+ *
8363
+ * @param interfaceId - 4-byte ERC-165 interface ID to remove
8364
+ * @param selectors - Array of 4-byte function selectors to un-register
8365
+ * @param options - Optional Safe transaction properties
8366
+ * @returns The Safe transaction ready to be signed
8367
+ * @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
8368
+ */
8369
+ async createRemoveSupportedInterfaceBatchTx(interfaceId, selectors, options) {
8370
+ const efhContract = await this.#getExtensibleFallbackHandlerContract();
8371
+ const safeAddress = await this.getAddress();
8372
+ const data = efhContract.encode("removeSupportedInterfaceBatch", [
8373
+ interfaceId,
8374
+ selectors
8375
+ ]);
8376
+ return this.createTransaction({
8377
+ transactions: [{ to: safeAddress, value: "0", data }],
8378
+ options
8379
+ });
8380
+ }
7123
8381
  /**
7124
8382
  * Returns the Safe transaction to enable a Safe guard.
7125
8383
  *
@@ -7162,6 +8420,48 @@ var Safe = class _Safe {
7162
8420
  });
7163
8421
  return safeTransaction;
7164
8422
  }
8423
+ /**
8424
+ * Returns the Safe transaction to enable a Safe module guard.
8425
+ *
8426
+ * @param moduleGuardAddress - The desired module guard address
8427
+ * @param options - The transaction optional properties
8428
+ * @returns The Safe transaction ready to be signed
8429
+ * @throws "Invalid module guard address provided"
8430
+ * @throws "Module guard provided is already enabled"
8431
+ * @throws "Current version of the Safe does not support module guard functionality"
8432
+ */
8433
+ async createEnableModuleGuardTx(moduleGuardAddress, options) {
8434
+ const safeTransactionData = {
8435
+ to: await this.getAddress(),
8436
+ value: "0",
8437
+ data: await this.#moduleManager.encodeEnableModuleGuardData(moduleGuardAddress)
8438
+ };
8439
+ const safeTransaction = await this.createTransaction({
8440
+ transactions: [safeTransactionData],
8441
+ options
8442
+ });
8443
+ return safeTransaction;
8444
+ }
8445
+ /**
8446
+ * Returns the Safe transaction to disable a Safe module guard.
8447
+ *
8448
+ * @param options - The transaction optional properties
8449
+ * @returns The Safe transaction ready to be signed
8450
+ * @throws "There is no module guard enabled yet"
8451
+ * @throws "Current version of the Safe does not support module guard functionality"
8452
+ */
8453
+ async createDisableModuleGuardTx(options) {
8454
+ const safeTransactionData = {
8455
+ to: await this.getAddress(),
8456
+ value: "0",
8457
+ data: await this.#moduleManager.encodeDisableModuleGuardData()
8458
+ };
8459
+ const safeTransaction = await this.createTransaction({
8460
+ transactions: [safeTransactionData],
8461
+ options
8462
+ });
8463
+ return safeTransaction;
8464
+ }
7165
8465
  /**
7166
8466
  * Returns the Safe transaction to enable a Safe module.
7167
8467
  *
@@ -7541,13 +8841,13 @@ var Safe = class _Safe {
7541
8841
  to: safeDeploymentTransaction.to,
7542
8842
  value: safeDeploymentTransaction.value,
7543
8843
  data: safeDeploymentTransaction.data,
7544
- operation: import_types_kit28.OperationType.Call
8844
+ operation: import_types_kit37.OperationType.Call
7545
8845
  };
7546
8846
  const safeBatchTransaction = {
7547
8847
  to: await this.getAddress(),
7548
8848
  value: "0",
7549
8849
  data: await this.getEncodedTransaction(safeTransaction),
7550
- operation: import_types_kit28.OperationType.Call
8850
+ operation: import_types_kit37.OperationType.Call
7551
8851
  };
7552
8852
  const transactions = [safeDeploymentBatchTransaction, safeBatchTransaction];
7553
8853
  const safeDeploymentBatch = await this.createTransactionBatch(
@@ -7674,7 +8974,7 @@ var Safe = class _Safe {
7674
8974
  /**
7675
8975
  * This method creates a signer to be used with the init method
7676
8976
  * @param {Credential} credential - The credential to be used to create the signer. Can be generated in the web with navigator.credentials.create
7677
- * @returns {PasskeyArgType} - The signer to be used with the init method
8977
+ * @returns {ExtractedPasskeyData} - The extracted passkey data. Combine with a verifierAddress to build a PasskeyArgType.
7678
8978
  */
7679
8979
  this.createPasskeySigner = async (credential) => {
7680
8980
  return extractPasskeyData(credential);