@safe-global/protocol-kit 6.1.1 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/index.cjs +1538 -203
- package/dist/cjs/test-utils/index.cjs +622 -75
- package/dist/esm/src/index.mjs +1500 -146
- package/dist/esm/test-utils/index.mjs +604 -38
- package/dist/src/Safe.d.ts +125 -3
- package/dist/src/Safe.d.ts.map +1 -1
- package/dist/src/SafeProvider.d.ts.map +1 -1
- package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.d.ts +1 -0
- package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.d.ts +33 -0
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/CreateCall/CreateCallBaseContract.d.ts +1 -0
- package/dist/src/contracts/CreateCall/CreateCallBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.d.ts +38 -0
- package/dist/src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/ExtensibleFallbackHandler/ExtensibleFallbackHandlerBaseContract.d.ts +36 -0
- package/dist/src/contracts/ExtensibleFallbackHandler/ExtensibleFallbackHandlerBaseContract.d.ts.map +1 -0
- package/dist/src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.d.ts +86 -0
- package/dist/src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/MultiSend/MultiSendBaseContract.d.ts +1 -0
- package/dist/src/contracts/MultiSend/MultiSendBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.d.ts +26 -0
- package/dist/src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.d.ts +26 -0
- package/dist/src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/Safe/SafeBaseContract.d.ts +1 -0
- package/dist/src/contracts/Safe/SafeBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.d.ts +1 -1
- package/dist/src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.d.ts +156 -0
- package/dist/src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.d.ts +60 -0
- package/dist/src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.d.ts +1 -0
- package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.d.ts +34 -0
- package/dist/src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.d.ts +1 -0
- package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.d.ts.map +1 -1
- package/dist/src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.d.ts +31 -0
- package/dist/src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.d.ts.map +1 -0
- package/dist/src/contracts/config.d.ts +1 -1
- package/dist/src/contracts/config.d.ts.map +1 -1
- package/dist/src/contracts/contractInstances.d.ts +18 -8
- package/dist/src/contracts/contractInstances.d.ts.map +1 -1
- package/dist/src/contracts/index.d.ts +2 -1
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/safeDeploymentContracts.d.ts +2 -1
- package/dist/src/contracts/safeDeploymentContracts.d.ts.map +1 -1
- package/dist/src/contracts/utils.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/managers/fallbackHandlerManager.d.ts +1 -0
- package/dist/src/managers/fallbackHandlerManager.d.ts.map +1 -1
- package/dist/src/managers/moduleManager.d.ts +7 -0
- package/dist/src/managers/moduleManager.d.ts.map +1 -1
- package/dist/src/types/contracts.d.ts +22 -8
- package/dist/src/types/contracts.d.ts.map +1 -1
- package/dist/src/types/passkeys.d.ts +13 -2
- package/dist/src/types/passkeys.d.ts.map +1 -1
- package/dist/src/utils/eip-3770/config.d.ts.map +1 -1
- package/dist/src/utils/passkeys/PasskeyClient.d.ts +1 -1
- package/dist/src/utils/passkeys/PasskeyClient.d.ts.map +1 -1
- package/dist/src/utils/passkeys/extractPasskeyData.d.ts +8 -11
- package/dist/src/utils/passkeys/extractPasskeyData.d.ts.map +1 -1
- package/dist/src/utils/passkeys/isSharedSigner.d.ts +1 -1
- package/dist/src/utils/passkeys/isSharedSigner.d.ts.map +1 -1
- package/dist/src/utils/safeVersions.d.ts +8 -5
- package/dist/src/utils/safeVersions.d.ts.map +1 -1
- package/dist/test-utils/passkeys.d.ts +2 -2
- package/dist/test-utils/passkeys.d.ts.map +1 -1
- package/package.json +7 -5
package/dist/cjs/src/index.cjs
CHANGED
|
@@ -55,6 +55,7 @@ __export(src_exports, {
|
|
|
55
55
|
buildSignatureBytes: () => buildSignatureBytes,
|
|
56
56
|
createERC20TokenTransferTransaction: () => createERC20TokenTransferTransaction,
|
|
57
57
|
createPasskeyClient: () => createPasskeyClient,
|
|
58
|
+
decodeMultiSendData: () => decodeMultiSendData,
|
|
58
59
|
default: () => src_default,
|
|
59
60
|
encodeCreateProxyWithNonce: () => encodeCreateProxyWithNonce,
|
|
60
61
|
encodeMultiSendData: () => encodeMultiSendData,
|
|
@@ -73,8 +74,10 @@ __export(src_exports, {
|
|
|
73
74
|
getERC20Decimals: () => getERC20Decimals,
|
|
74
75
|
getEip712MessageTypes: () => getEip712MessageTypes,
|
|
75
76
|
getEip712TxTypes: () => getEip712TxTypes,
|
|
77
|
+
getExtensibleFallbackHandlerContract: () => getExtensibleFallbackHandlerContract,
|
|
76
78
|
getMultiSendCallOnlyContract: () => getMultiSendCallOnlyContract,
|
|
77
79
|
getMultiSendContract: () => getMultiSendContract,
|
|
80
|
+
getP256VerifierAddress: () => getP256VerifierAddress,
|
|
78
81
|
getPasskeyOwnerAddress: () => getPasskeyOwnerAddress_default,
|
|
79
82
|
getPredictedSafeAddressInitCode: () => getPredictedSafeAddressInitCode,
|
|
80
83
|
getSafeAddressFromDeploymentTx: () => getSafeAddressFromDeploymentTx,
|
|
@@ -95,17 +98,31 @@ __export(src_exports, {
|
|
|
95
98
|
module.exports = __toCommonJS(src_exports);
|
|
96
99
|
|
|
97
100
|
// src/Safe.ts
|
|
98
|
-
var
|
|
101
|
+
var import_types_kit37 = require("@safe-global/types-kit");
|
|
99
102
|
|
|
100
103
|
// src/contracts/utils.ts
|
|
101
104
|
var import_viem13 = require("viem");
|
|
102
|
-
var
|
|
105
|
+
var import_actions10 = require("viem/actions");
|
|
103
106
|
|
|
104
107
|
// src/contracts/config.ts
|
|
105
108
|
var import_safe_deployments = require("@safe-global/safe-deployments");
|
|
106
109
|
var import_safe_modules_deployments = require("@safe-global/safe-modules-deployments");
|
|
107
|
-
var DEFAULT_SAFE_VERSION = "1.
|
|
110
|
+
var DEFAULT_SAFE_VERSION = "1.4.1";
|
|
108
111
|
var safeDeploymentsVersions = {
|
|
112
|
+
"1.5.0": {
|
|
113
|
+
safeSingletonVersion: "1.5.0",
|
|
114
|
+
safeSingletonL2Version: "1.5.0",
|
|
115
|
+
safeProxyFactoryVersion: "1.5.0",
|
|
116
|
+
compatibilityFallbackHandler: "1.5.0",
|
|
117
|
+
extensibleFallbackHandler: "1.5.0",
|
|
118
|
+
multiSendVersion: "1.5.0",
|
|
119
|
+
multiSendCallOnlyVersion: "1.5.0",
|
|
120
|
+
signMessageLibVersion: "1.5.0",
|
|
121
|
+
createCallVersion: "1.5.0",
|
|
122
|
+
simulateTxAccessorVersion: "1.5.0",
|
|
123
|
+
safeWebAuthnSignerFactoryVersion: "0.2.1",
|
|
124
|
+
safeWebAuthnSharedSignerVersion: "0.2.1"
|
|
125
|
+
},
|
|
109
126
|
"1.4.1": {
|
|
110
127
|
safeSingletonVersion: "1.4.1",
|
|
111
128
|
safeSingletonL2Version: "1.4.1",
|
|
@@ -178,6 +195,7 @@ var contractFunctions = {
|
|
|
178
195
|
safeSingletonL2Version: import_safe_deployments.getSafeL2SingletonDeployments,
|
|
179
196
|
safeProxyFactoryVersion: import_safe_deployments.getProxyFactoryDeployments,
|
|
180
197
|
compatibilityFallbackHandler: import_safe_deployments.getCompatibilityFallbackHandlerDeployments,
|
|
198
|
+
extensibleFallbackHandler: import_safe_deployments.getExtensibleFallbackHandlerDeployments,
|
|
181
199
|
multiSendVersion: import_safe_deployments.getMultiSendDeployments,
|
|
182
200
|
multiSendCallOnlyVersion: import_safe_deployments.getMultiSendCallOnlyDeployments,
|
|
183
201
|
signMessageLibVersion: import_safe_deployments.getSignMessageLibDeployments,
|
|
@@ -305,6 +323,8 @@ var networks = [
|
|
|
305
323
|
{ chainId: 146n, shortName: "sonic" },
|
|
306
324
|
{ chainId: 148n, shortName: "shimmerevm" },
|
|
307
325
|
{ chainId: 150n, shortName: "sixt" },
|
|
326
|
+
{ chainId: 151n, shortName: "rbn" },
|
|
327
|
+
{ chainId: 153n, shortName: "rbn-testnet" },
|
|
308
328
|
{ chainId: 155n, shortName: "tenet-testnet" },
|
|
309
329
|
{ chainId: 169n, shortName: "manta" },
|
|
310
330
|
{ chainId: 173n, shortName: "eni" },
|
|
@@ -325,7 +345,7 @@ var networks = [
|
|
|
325
345
|
{ chainId: 255n, shortName: "kroma" },
|
|
326
346
|
{ chainId: 274n, shortName: "lachain" },
|
|
327
347
|
{ chainId: 280n, shortName: "zksync-goerli" },
|
|
328
|
-
{ chainId: 282n, shortName: "zkTCRO" },
|
|
348
|
+
{ chainId: 282n, shortName: "deprecated-zkTCRO" },
|
|
329
349
|
{ chainId: 288n, shortName: "boba" },
|
|
330
350
|
{ chainId: 291n, shortName: "orderly" },
|
|
331
351
|
{ chainId: 295n, shortName: "hedera-mainnet" },
|
|
@@ -358,7 +378,10 @@ var networks = [
|
|
|
358
378
|
{ chainId: 690n, shortName: "redstone" },
|
|
359
379
|
{ chainId: 698n, shortName: "Matchain" },
|
|
360
380
|
{ chainId: 747n, shortName: "flow-mainnet" },
|
|
381
|
+
{ chainId: 756n, shortName: "capx-testnet" },
|
|
382
|
+
{ chainId: 757n, shortName: "capx" },
|
|
361
383
|
{ chainId: 787n, shortName: "aca" },
|
|
384
|
+
{ chainId: 841n, shortName: "tara" },
|
|
362
385
|
{ chainId: 842n, shortName: "taratest" },
|
|
363
386
|
{ chainId: 870n, shortName: "AMN" },
|
|
364
387
|
{ chainId: 919n, shortName: "modesep" },
|
|
@@ -366,8 +389,9 @@ var networks = [
|
|
|
366
389
|
{ chainId: 943n, shortName: "t4pls" },
|
|
367
390
|
{ chainId: 964n, shortName: "bittensor-evm-mainnet" },
|
|
368
391
|
{ chainId: 970n, shortName: "ccn" },
|
|
392
|
+
{ chainId: 988n, shortName: "stable" },
|
|
369
393
|
{ chainId: 995n, shortName: "5ire" },
|
|
370
|
-
{ chainId: 999n, shortName: "
|
|
394
|
+
{ chainId: 999n, shortName: "hyper_evm" },
|
|
371
395
|
{ chainId: 1001n, shortName: "kaia-kairos" },
|
|
372
396
|
{ chainId: 1008n, shortName: "eun" },
|
|
373
397
|
{ chainId: 1030n, shortName: "cfx" },
|
|
@@ -401,9 +425,11 @@ var networks = [
|
|
|
401
425
|
{ chainId: 1559n, shortName: "tenet" },
|
|
402
426
|
{ chainId: 1625n, shortName: "gravity" },
|
|
403
427
|
{ chainId: 1663n, shortName: "Gobi" },
|
|
428
|
+
{ chainId: 1672n, shortName: "pharos" },
|
|
404
429
|
{ chainId: 1729n, shortName: "reya" },
|
|
405
430
|
{ chainId: 1740n, shortName: "metall2-testnet" },
|
|
406
431
|
{ chainId: 1750n, shortName: "metall2" },
|
|
432
|
+
{ chainId: 1776n, shortName: "injective" },
|
|
407
433
|
{ chainId: 1807n, shortName: "rana" },
|
|
408
434
|
{ chainId: 1811n, shortName: "lif3-testnet" },
|
|
409
435
|
{ chainId: 1868n, shortName: "soneium" },
|
|
@@ -425,6 +451,7 @@ var networks = [
|
|
|
425
451
|
{ chainId: 2039n, shortName: "aleph" },
|
|
426
452
|
{ chainId: 2187n, shortName: "g7" },
|
|
427
453
|
{ chainId: 2192n, shortName: "snax" },
|
|
454
|
+
{ chainId: 2201n, shortName: "stable-testnet" },
|
|
428
455
|
{ chainId: 2221n, shortName: "tkava" },
|
|
429
456
|
{ chainId: 2222n, shortName: "kava" },
|
|
430
457
|
{ chainId: 2331n, shortName: "rss3-testnet" },
|
|
@@ -434,10 +461,14 @@ var networks = [
|
|
|
434
461
|
{ chainId: 2391n, shortName: "tacchain_2391-1" },
|
|
435
462
|
{ chainId: 2424n, shortName: "inevm-testnet" },
|
|
436
463
|
{ chainId: 2442n, shortName: "zkevm-testnet-cardona" },
|
|
464
|
+
{ chainId: 2522n, shortName: "fraxtal-testnet" },
|
|
437
465
|
{ chainId: 2741n, shortName: "abstract" },
|
|
466
|
+
{ chainId: 2787n, shortName: "creator-chain-mainnet" },
|
|
438
467
|
{ chainId: 2810n, shortName: "hmorph" },
|
|
439
468
|
{ chainId: 2818n, shortName: "morph" },
|
|
469
|
+
{ chainId: 2910n, shortName: "morph-hoodi-testnet" },
|
|
440
470
|
{ chainId: 3068n, shortName: "bfc" },
|
|
471
|
+
{ chainId: 3111n, shortName: "alpha" },
|
|
441
472
|
{ chainId: 3338n, shortName: "PEAQ" },
|
|
442
473
|
{ chainId: 3501n, shortName: "JFIN" },
|
|
443
474
|
{ chainId: 3636n, shortName: "BTNXt" },
|
|
@@ -452,23 +483,30 @@ var networks = [
|
|
|
452
483
|
{ chainId: 4158n, shortName: "crossfi" },
|
|
453
484
|
{ chainId: 4162n, shortName: "SXR" },
|
|
454
485
|
{ chainId: 4202n, shortName: "lisksep" },
|
|
486
|
+
{ chainId: 4326n, shortName: "megaeth" },
|
|
455
487
|
{ chainId: 4337n, shortName: "beam" },
|
|
456
488
|
{ chainId: 4460n, shortName: "orderlyl2" },
|
|
457
489
|
{ chainId: 4488n, shortName: "HYDRA" },
|
|
490
|
+
{ chainId: 4509n, shortName: "SC" },
|
|
458
491
|
{ chainId: 4653n, shortName: "gold" },
|
|
459
492
|
{ chainId: 4661n, shortName: "appchaintestnet" },
|
|
460
493
|
{ chainId: 4689n, shortName: "iotex-mainnet" },
|
|
494
|
+
{ chainId: 4801n, shortName: "wcsep" },
|
|
461
495
|
{ chainId: 4918n, shortName: "txvm" },
|
|
462
496
|
{ chainId: 4919n, shortName: "xvm" },
|
|
463
497
|
{ chainId: 5000n, shortName: "mantle" },
|
|
464
498
|
{ chainId: 5001n, shortName: "mantle-testnet" },
|
|
465
499
|
{ chainId: 5003n, shortName: "mnt-sep" },
|
|
500
|
+
{ chainId: 5031n, shortName: "Somnia" },
|
|
466
501
|
{ chainId: 5115n, shortName: "citrea-testnet" },
|
|
467
502
|
{ chainId: 5165n, shortName: "ftn" },
|
|
468
503
|
{ chainId: 5330n, shortName: "sseed" },
|
|
504
|
+
{ chainId: 5464n, shortName: "saga" },
|
|
469
505
|
{ chainId: 5611n, shortName: "obnbt" },
|
|
470
506
|
{ chainId: 5700n, shortName: "tsys" },
|
|
471
507
|
{ chainId: 5851n, shortName: "OntologyTestnet" },
|
|
508
|
+
{ chainId: 5887n, shortName: "dukong" },
|
|
509
|
+
{ chainId: 5888n, shortName: "mantrachain" },
|
|
472
510
|
{ chainId: 6001n, shortName: "bouncebit-mainnet" },
|
|
473
511
|
{ chainId: 6102n, shortName: "cascadia" },
|
|
474
512
|
{ chainId: 6321n, shortName: "eaura" },
|
|
@@ -485,13 +523,17 @@ var networks = [
|
|
|
485
523
|
{ chainId: 7070n, shortName: "planq" },
|
|
486
524
|
{ chainId: 7171n, shortName: "bitrock" },
|
|
487
525
|
{ chainId: 7200n, shortName: "xsat" },
|
|
526
|
+
{ chainId: 7208n, shortName: "nxra-mainnet" },
|
|
488
527
|
{ chainId: 7332n, shortName: "EON" },
|
|
528
|
+
{ chainId: 7336n, shortName: "pruvtestnet" },
|
|
529
|
+
{ chainId: 7337n, shortName: "pruvmainnet" },
|
|
489
530
|
{ chainId: 7341n, shortName: "shyft" },
|
|
490
531
|
{ chainId: 7560n, shortName: "cyeth" },
|
|
491
532
|
{ chainId: 7700n, shortName: "canto" },
|
|
492
533
|
{ chainId: 7771n, shortName: "tbitrock" },
|
|
493
534
|
{ chainId: 7897n, shortName: "arena-z" },
|
|
494
535
|
{ chainId: 8008n, shortName: "polynomial" },
|
|
536
|
+
{ chainId: 8150n, shortName: "alpen" },
|
|
495
537
|
{ chainId: 8192n, shortName: "tqf" },
|
|
496
538
|
{ chainId: 8194n, shortName: "ttqf" },
|
|
497
539
|
{ chainId: 8217n, shortName: "kaia-mainnet" },
|
|
@@ -499,6 +541,8 @@ var networks = [
|
|
|
499
541
|
{ chainId: 8333n, shortName: "b3" },
|
|
500
542
|
{ chainId: 8408n, shortName: "zentest" },
|
|
501
543
|
{ chainId: 8453n, shortName: "base" },
|
|
544
|
+
{ chainId: 8700n, shortName: "ACN" },
|
|
545
|
+
{ chainId: 8765n, shortName: "ward" },
|
|
502
546
|
{ chainId: 8801n, shortName: "okto-testnet" },
|
|
503
547
|
{ chainId: 8822n, shortName: "iotaevm" },
|
|
504
548
|
{ chainId: 8844n, shortName: "THYDRA" },
|
|
@@ -509,7 +553,8 @@ var networks = [
|
|
|
509
553
|
{ chainId: 9369n, shortName: "z" },
|
|
510
554
|
{ chainId: 9700n, shortName: "MainnetDev" },
|
|
511
555
|
{ chainId: 9728n, shortName: "boba-testnet" },
|
|
512
|
-
{ chainId:
|
|
556
|
+
{ chainId: 9745n, shortName: "plasma" },
|
|
557
|
+
{ chainId: 9746n, shortName: "plasma-testnet" },
|
|
513
558
|
{ chainId: 10000n, shortName: "smartbch" },
|
|
514
559
|
{ chainId: 10001n, shortName: "smartbchtest" },
|
|
515
560
|
{ chainId: 10081n, shortName: "joct" },
|
|
@@ -523,6 +568,7 @@ var networks = [
|
|
|
523
568
|
{ chainId: 11111n, shortName: "WAGMI" },
|
|
524
569
|
{ chainId: 11124n, shortName: "abstract-sepolia" },
|
|
525
570
|
{ chainId: 11235n, shortName: "islm" },
|
|
571
|
+
{ chainId: 11417n, shortName: "anq-testnet" },
|
|
526
572
|
{ chainId: 11437n, shortName: "shyftt" },
|
|
527
573
|
{ chainId: 11501n, shortName: "bevm" },
|
|
528
574
|
{ chainId: 11503n, shortName: "bevm-test" },
|
|
@@ -534,33 +580,44 @@ var networks = [
|
|
|
534
580
|
{ chainId: 12553n, shortName: "rss3" },
|
|
535
581
|
{ chainId: 13337n, shortName: "beam-testnet" },
|
|
536
582
|
{ chainId: 13371n, shortName: "imx" },
|
|
583
|
+
{ chainId: 13441n, shortName: "bridgeless" },
|
|
537
584
|
{ chainId: 13473n, shortName: "imx-testnet" },
|
|
538
585
|
{ chainId: 13505n, shortName: "gravitysep" },
|
|
539
586
|
{ chainId: 13746n, shortName: "g7t" },
|
|
587
|
+
{ chainId: 14601n, shortName: "sonic-testnet" },
|
|
540
588
|
{ chainId: 14800n, shortName: "vana-moksha" },
|
|
589
|
+
{ chainId: 16661n, shortName: "0g" },
|
|
541
590
|
{ chainId: 17000n, shortName: "holesky" },
|
|
542
591
|
{ chainId: 17069n, shortName: "garnet" },
|
|
543
592
|
{ chainId: 17172n, shortName: "eclipse" },
|
|
544
593
|
{ chainId: 18231n, shortName: "unreal-old" },
|
|
545
594
|
{ chainId: 18233n, shortName: "unreal" },
|
|
546
595
|
{ chainId: 18880n, shortName: "expchain" },
|
|
596
|
+
{ chainId: 20994n, shortName: "fluent-testnet" },
|
|
547
597
|
{ chainId: 22776n, shortName: "mapo" },
|
|
548
598
|
{ chainId: 23294n, shortName: "sapphire" },
|
|
549
599
|
{ chainId: 23295n, shortName: "sapphire-testnet" },
|
|
600
|
+
{ chainId: 24101n, shortName: "incentiv" },
|
|
550
601
|
{ chainId: 25327n, shortName: "Everclear" },
|
|
602
|
+
{ chainId: 26888n, shortName: "tABCore" },
|
|
603
|
+
{ chainId: 28802n, shortName: "tcent" },
|
|
551
604
|
{ chainId: 28882n, shortName: "BobaSepolia" },
|
|
552
605
|
{ chainId: 28979n, shortName: "kimbonet-testnet" },
|
|
606
|
+
{ chainId: 30303n, shortName: "Ethiq" },
|
|
553
607
|
{ chainId: 31611n, shortName: "mezo" },
|
|
554
608
|
{ chainId: 32323n, shortName: "basedai" },
|
|
555
609
|
{ chainId: 32380n, shortName: "paix" },
|
|
556
610
|
{ chainId: 32769n, shortName: "zil" },
|
|
557
611
|
{ chainId: 32770n, shortName: "zq2-proto-mainnet" },
|
|
558
612
|
{ chainId: 33101n, shortName: "zil-testnet" },
|
|
613
|
+
{ chainId: 33111n, shortName: "curtis" },
|
|
559
614
|
{ chainId: 33139n, shortName: "apechain" },
|
|
560
615
|
{ chainId: 33401n, shortName: "slingshot" },
|
|
561
616
|
{ chainId: 34443n, shortName: "mode" },
|
|
562
617
|
{ chainId: 35441n, shortName: "q" },
|
|
563
618
|
{ chainId: 35443n, shortName: "q-testnet" },
|
|
619
|
+
{ chainId: 36888n, shortName: "abcore" },
|
|
620
|
+
{ chainId: 36900n, shortName: "adi" },
|
|
564
621
|
{ chainId: 37111n, shortName: "lens-sepolia" },
|
|
565
622
|
{ chainId: 41455n, shortName: "aleph-zero" },
|
|
566
623
|
{ chainId: 41923n, shortName: "edu-chain" },
|
|
@@ -568,6 +625,7 @@ var networks = [
|
|
|
568
625
|
{ chainId: 42170n, shortName: "arb-nova" },
|
|
569
626
|
{ chainId: 42220n, shortName: "celo" },
|
|
570
627
|
{ chainId: 42421n, shortName: "rwa" },
|
|
628
|
+
{ chainId: 42431n, shortName: "tempo-moderato" },
|
|
571
629
|
{ chainId: 42793n, shortName: "etlk" },
|
|
572
630
|
{ chainId: 43111n, shortName: "hemi" },
|
|
573
631
|
{ chainId: 43113n, shortName: "fuji" },
|
|
@@ -585,6 +643,7 @@ var networks = [
|
|
|
585
643
|
{ chainId: 49321n, shortName: "Stork" },
|
|
586
644
|
{ chainId: 50104n, shortName: "sophon" },
|
|
587
645
|
{ chainId: 50312n, shortName: "SomniaTestnet" },
|
|
646
|
+
{ chainId: 52924n, shortName: "lazai" },
|
|
588
647
|
{ chainId: 53302n, shortName: "seedsep" },
|
|
589
648
|
{ chainId: 53456n, shortName: "birdlayer" },
|
|
590
649
|
{ chainId: 53457n, shortName: "dodochain" },
|
|
@@ -619,35 +678,49 @@ var networks = [
|
|
|
619
678
|
{ chainId: 84532n, shortName: "basesep" },
|
|
620
679
|
{ chainId: 88811n, shortName: "unit0-mainnet" },
|
|
621
680
|
{ chainId: 88817n, shortName: "unit0-testnet" },
|
|
681
|
+
{ chainId: 88882n, shortName: "chzspicy" },
|
|
682
|
+
{ chainId: 88888n, shortName: "chiliz" },
|
|
622
683
|
{ chainId: 90001n, shortName: "dhobyghaut" },
|
|
684
|
+
{ chainId: 91342n, shortName: "giwasepolia" },
|
|
623
685
|
{ chainId: 97435n, shortName: "sling" },
|
|
624
686
|
{ chainId: 98864n, shortName: "plume-devnet" },
|
|
625
687
|
{ chainId: 98865n, shortName: "plume" },
|
|
688
|
+
{ chainId: 98866n, shortName: "plume-mainnet" },
|
|
626
689
|
{ chainId: 98867n, shortName: "plume-testnet" },
|
|
690
|
+
{ chainId: 98985n, shortName: "superposition-testnet" },
|
|
691
|
+
{ chainId: 102030n, shortName: "ctc" },
|
|
627
692
|
{ chainId: 103454n, shortName: "masatest" },
|
|
628
693
|
{ chainId: 105105n, shortName: "stratis" },
|
|
629
694
|
{ chainId: 111188n, shortName: "re-al" },
|
|
695
|
+
{ chainId: 127823n, shortName: "etls" },
|
|
630
696
|
{ chainId: 128123n, shortName: "etlt" },
|
|
631
697
|
{ chainId: 167000n, shortName: "tko-mainnet" },
|
|
632
698
|
{ chainId: 167008n, shortName: "tko-katla" },
|
|
633
699
|
{ chainId: 167009n, shortName: "tko-hekla" },
|
|
700
|
+
{ chainId: 167013n, shortName: "tko-hoodi" },
|
|
634
701
|
{ chainId: 175188n, shortName: "lpy" },
|
|
702
|
+
{ chainId: 181228n, shortName: "hpp-sepolia" },
|
|
703
|
+
{ chainId: 190415n, shortName: "hpp-mainnet" },
|
|
635
704
|
{ chainId: 200101n, shortName: "milktada" },
|
|
636
705
|
{ chainId: 200202n, shortName: "milktalgo" },
|
|
637
706
|
{ chainId: 200810n, shortName: "btrt" },
|
|
638
707
|
{ chainId: 200901n, shortName: "btr" },
|
|
639
708
|
{ chainId: 205205n, shortName: "auroria" },
|
|
640
709
|
{ chainId: 210425n, shortName: "platon" },
|
|
710
|
+
{ chainId: 222888n, shortName: "mocat" },
|
|
711
|
+
{ chainId: 278701n, shortName: "creator-chain-testnet" },
|
|
641
712
|
{ chainId: 314159n, shortName: "filecoin-calibration" },
|
|
642
713
|
{ chainId: 325000n, shortName: "CampV2" },
|
|
643
714
|
{ chainId: 328527n, shortName: "nal" },
|
|
644
715
|
{ chainId: 333999n, shortName: "olympus" },
|
|
716
|
+
{ chainId: 369369n, shortName: "den-mainnet" },
|
|
645
717
|
{ chainId: 381931n, shortName: "metal" },
|
|
646
718
|
{ chainId: 421611n, shortName: "arb-rinkeby" },
|
|
647
719
|
{ chainId: 421613n, shortName: "arb-goerli" },
|
|
648
720
|
{ chainId: 421614n, shortName: "arb-sep" },
|
|
649
721
|
{ chainId: 444444n, shortName: "syndr" },
|
|
650
722
|
{ chainId: 490000n, shortName: "ATN" },
|
|
723
|
+
{ chainId: 511111n, shortName: "alpha-testnet" },
|
|
651
724
|
{ chainId: 534351n, shortName: "scr-sepolia" },
|
|
652
725
|
{ chainId: 534352n, shortName: "scr" },
|
|
653
726
|
{ chainId: 534353n, shortName: "scr-alpha" },
|
|
@@ -660,37 +733,51 @@ var networks = [
|
|
|
660
733
|
{ chainId: 660279n, shortName: "xai" },
|
|
661
734
|
{ chainId: 668668n, shortName: "cnw" },
|
|
662
735
|
{ chainId: 688688n, shortName: "pharos-testnet" },
|
|
736
|
+
{ chainId: 688689n, shortName: "pharos-atlantic" },
|
|
663
737
|
{ chainId: 695569n, shortName: "pyrope" },
|
|
664
738
|
{ chainId: 713715n, shortName: "sei-devnet" },
|
|
665
739
|
{ chainId: 743111n, shortName: "hemi-sep" },
|
|
666
740
|
{ chainId: 747474n, shortName: "katana" },
|
|
667
741
|
{ chainId: 763373n, shortName: "inksepolia" },
|
|
742
|
+
{ chainId: 763375n, shortName: "surge-testnet" },
|
|
668
743
|
{ chainId: 764984n, shortName: "lamina1test" },
|
|
669
744
|
{ chainId: 808813n, shortName: "bob-sepolia" },
|
|
670
745
|
{ chainId: 810180n, shortName: "zklink-nova" },
|
|
671
746
|
{ chainId: 839999n, shortName: "txsat" },
|
|
747
|
+
{ chainId: 853211n, shortName: "haqq-testethiq" },
|
|
672
748
|
{ chainId: 978657n, shortName: "treasure-ruby" },
|
|
673
749
|
{ chainId: 984122n, shortName: "forma" },
|
|
750
|
+
{ chainId: 1000101n, shortName: "xo" },
|
|
751
|
+
{ chainId: 1440000n, shortName: "xrplevm" },
|
|
752
|
+
{ chainId: 1449000n, shortName: "xrplevmtestnet" },
|
|
674
753
|
{ chainId: 1501869n, shortName: "water9" },
|
|
675
754
|
{ chainId: 2206132n, shortName: "platondev2" },
|
|
676
755
|
{ chainId: 2632500n, shortName: "coti" },
|
|
677
756
|
{ chainId: 3441006n, shortName: "mantaSepoliaTestnet" },
|
|
678
757
|
{ chainId: 4457845n, shortName: "zero-sepolia" },
|
|
758
|
+
{ chainId: 5042002n, shortName: "arc-testnet" },
|
|
759
|
+
{ chainId: 5064014n, shortName: "ethereal" },
|
|
679
760
|
{ chainId: 6038361n, shortName: "azkyt" },
|
|
761
|
+
{ chainId: 6281971n, shortName: "dogeos-chykyu" },
|
|
762
|
+
{ chainId: 6985385n, shortName: "hp" },
|
|
680
763
|
{ chainId: 7225878n, shortName: "saakuru" },
|
|
681
764
|
{ chainId: 7777777n, shortName: "zora" },
|
|
682
765
|
{ chainId: 9999999n, shortName: "fluence" },
|
|
766
|
+
{ chainId: 11142220n, shortName: "celo-sep" },
|
|
683
767
|
{ chainId: 11155111n, shortName: "sep" },
|
|
684
768
|
{ chainId: 11155420n, shortName: "opsep" },
|
|
685
769
|
{ chainId: 11155931n, shortName: "rise-testnet" },
|
|
686
770
|
{ chainId: 12227332n, shortName: "neox-t4" },
|
|
771
|
+
{ chainId: 13374202n, shortName: "ethereal-testnet-0" },
|
|
772
|
+
{ chainId: 13863860n, shortName: "sis" },
|
|
773
|
+
{ chainId: 20250407n, shortName: "platondev3" },
|
|
687
774
|
{ chainId: 21000000n, shortName: "corn" },
|
|
688
775
|
{ chainId: 52164803n, shortName: "fluence-testnet" },
|
|
689
776
|
{ chainId: 65100004n, shortName: "piccadilly-04" },
|
|
690
777
|
{ chainId: 94204209n, shortName: "polygon-blackberry" },
|
|
691
778
|
{ chainId: 111557560n, shortName: "cysep" },
|
|
692
779
|
{ chainId: 123420111n, shortName: "opcelestia-raspberry" },
|
|
693
|
-
{ chainId: 161221135n, shortName: "plume-testnet" },
|
|
780
|
+
{ chainId: 161221135n, shortName: "plume-testnet-legacy" },
|
|
694
781
|
{ chainId: 168587773n, shortName: "blastsepolia" },
|
|
695
782
|
{ chainId: 222000222n, shortName: "kanazawa" },
|
|
696
783
|
{ chainId: 245022926n, shortName: "neonevm-devnet" },
|
|
@@ -700,6 +787,7 @@ var networks = [
|
|
|
700
787
|
{ chainId: 333000333n, shortName: "meld" },
|
|
701
788
|
{ chainId: 476462898n, shortName: "Skopje" },
|
|
702
789
|
{ chainId: 531050104n, shortName: "sophon-testnet" },
|
|
790
|
+
{ chainId: 531050204n, shortName: "sophon-os-testnet" },
|
|
703
791
|
{ chainId: 666666666n, shortName: "degen-chain" },
|
|
704
792
|
{ chainId: 888888888n, shortName: "ancient8" },
|
|
705
793
|
{ chainId: 994873017n, shortName: "lumia-mainnet" },
|
|
@@ -713,8 +801,11 @@ var networks = [
|
|
|
713
801
|
{ chainId: 1666600000n, shortName: "hmy-s0" },
|
|
714
802
|
{ chainId: 1666700000n, shortName: "hmy-b-s0" },
|
|
715
803
|
{ chainId: 1952959480n, shortName: "lumiatestnet" },
|
|
804
|
+
{ chainId: 2030232745n, shortName: "lumia-beam-testnet" },
|
|
805
|
+
{ chainId: 3735928814n, shortName: "edent" },
|
|
716
806
|
{ chainId: 11297108099n, shortName: "tpalm" },
|
|
717
807
|
{ chainId: 11297108109n, shortName: "palm" },
|
|
808
|
+
{ chainId: 30143370385n, shortName: "BUB" },
|
|
718
809
|
{ chainId: 37714555429n, shortName: "xaitestnet" },
|
|
719
810
|
{ chainId: 88153591557n, shortName: "arb-blueberry" },
|
|
720
811
|
{ chainId: 123420000220n, shortName: "fluence-stage" },
|
|
@@ -1055,7 +1146,8 @@ var SAFE_FEATURES_BY_VERSION = {
|
|
|
1055
1146
|
["REQUIRED_TXGAS" /* REQUIRED_TXGAS */]: "<=1.2.0",
|
|
1056
1147
|
["SIMULATE_AND_REVERT" /* SIMULATE_AND_REVERT */]: ">=1.3.0",
|
|
1057
1148
|
["PASSKEY_SIGNER" /* PASSKEY_SIGNER */]: ">=1.3.0",
|
|
1058
|
-
["SAFE_L2_CONTRACTS" /* SAFE_L2_CONTRACTS */]: ">=1.3.0"
|
|
1149
|
+
["SAFE_L2_CONTRACTS" /* SAFE_L2_CONTRACTS */]: ">=1.3.0",
|
|
1150
|
+
["SAFE_MODULE_GUARD" /* SAFE_MODULE_GUARD */]: ">=1.5.0"
|
|
1059
1151
|
};
|
|
1060
1152
|
var hasSafeFeature = (feature, version) => {
|
|
1061
1153
|
if (!(feature in SAFE_FEATURES_BY_VERSION)) {
|
|
@@ -1251,7 +1343,7 @@ var calculateSafeMessageHash = (safeAddress, message, safeVersion, chainId) => {
|
|
|
1251
1343
|
|
|
1252
1344
|
// src/utils/transactions/gas.ts
|
|
1253
1345
|
var import_viem8 = require("viem");
|
|
1254
|
-
var
|
|
1346
|
+
var import_types_kit35 = require("@safe-global/types-kit");
|
|
1255
1347
|
var import_satisfies4 = __toESM(require("semver/functions/satisfies.js"));
|
|
1256
1348
|
|
|
1257
1349
|
// src/contracts/BaseContract.ts
|
|
@@ -1512,6 +1604,56 @@ var CreateCallContract_v1_4_1 = class extends CreateCallBaseContract_default {
|
|
|
1512
1604
|
};
|
|
1513
1605
|
var CreateCallContract_v1_4_1_default = CreateCallContract_v1_4_1;
|
|
1514
1606
|
|
|
1607
|
+
// src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.ts
|
|
1608
|
+
var import_types_kit4 = require("@safe-global/types-kit");
|
|
1609
|
+
var CreateCallContract_v1_5_0 = class extends CreateCallBaseContract_default {
|
|
1610
|
+
/**
|
|
1611
|
+
* Constructs an instance of CreateCallContract_v1_5_0
|
|
1612
|
+
*
|
|
1613
|
+
* @param chainId - The chain ID where the contract resides.
|
|
1614
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
1615
|
+
* @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.
|
|
1616
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
1617
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
1618
|
+
*/
|
|
1619
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1620
|
+
const safeVersion = "1.5.0";
|
|
1621
|
+
const defaultAbi = import_types_kit4.createCall_1_5_0_ContractArtifacts.abi;
|
|
1622
|
+
super(
|
|
1623
|
+
chainId,
|
|
1624
|
+
safeProvider,
|
|
1625
|
+
defaultAbi,
|
|
1626
|
+
safeVersion,
|
|
1627
|
+
customContractAddress,
|
|
1628
|
+
customContractAbi,
|
|
1629
|
+
deploymentType
|
|
1630
|
+
);
|
|
1631
|
+
/**
|
|
1632
|
+
* @param args - Array[value, deploymentData]
|
|
1633
|
+
* @param options - TransactionOptions
|
|
1634
|
+
* @returns Promise<TransactionResult>
|
|
1635
|
+
*/
|
|
1636
|
+
this.performCreate = async (args, options) => {
|
|
1637
|
+
if (options && !options.gasLimit) {
|
|
1638
|
+
options.gasLimit = (await this.estimateGas("performCreate", args, options)).toString();
|
|
1639
|
+
}
|
|
1640
|
+
return toTxResult(this.runner, await this.write("performCreate", args, options), options);
|
|
1641
|
+
};
|
|
1642
|
+
/**
|
|
1643
|
+
* @param args - Array[value, deploymentData, salt]
|
|
1644
|
+
* @param options - TransactionOptions
|
|
1645
|
+
* @returns Promise<TransactionResult>
|
|
1646
|
+
*/
|
|
1647
|
+
this.performCreate2 = async (args, options) => {
|
|
1648
|
+
if (options && !options.gasLimit) {
|
|
1649
|
+
options.gasLimit = (await this.estimateGas("performCreate2", [...args], { ...options })).toString();
|
|
1650
|
+
}
|
|
1651
|
+
return toTxResult(this.runner, await this.write("performCreate2", args, options), options);
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
};
|
|
1655
|
+
var CreateCallContract_v1_5_0_default = CreateCallContract_v1_5_0;
|
|
1656
|
+
|
|
1515
1657
|
// src/contracts/MultiSend/MultiSendBaseContract.ts
|
|
1516
1658
|
var MultiSendBaseContract = class extends BaseContract_default {
|
|
1517
1659
|
/**
|
|
@@ -1544,7 +1686,7 @@ var MultiSendBaseContract = class extends BaseContract_default {
|
|
|
1544
1686
|
var MultiSendBaseContract_default = MultiSendBaseContract;
|
|
1545
1687
|
|
|
1546
1688
|
// src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.ts
|
|
1547
|
-
var
|
|
1689
|
+
var import_types_kit5 = require("@safe-global/types-kit");
|
|
1548
1690
|
var MultiSendContract_v1_1_1 = class extends MultiSendBaseContract_default {
|
|
1549
1691
|
/**
|
|
1550
1692
|
* Constructs an instance of MultiSendContract_v1_1_1
|
|
@@ -1557,7 +1699,7 @@ var MultiSendContract_v1_1_1 = class extends MultiSendBaseContract_default {
|
|
|
1557
1699
|
*/
|
|
1558
1700
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1559
1701
|
const safeVersion = "1.1.1";
|
|
1560
|
-
const defaultAbi =
|
|
1702
|
+
const defaultAbi = import_types_kit5.multisend_1_1_1_ContractArtifacts.abi;
|
|
1561
1703
|
super(
|
|
1562
1704
|
chainId,
|
|
1563
1705
|
safeProvider,
|
|
@@ -1572,7 +1714,7 @@ var MultiSendContract_v1_1_1 = class extends MultiSendBaseContract_default {
|
|
|
1572
1714
|
var MultiSendContract_v1_1_1_default = MultiSendContract_v1_1_1;
|
|
1573
1715
|
|
|
1574
1716
|
// src/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0.ts
|
|
1575
|
-
var
|
|
1717
|
+
var import_types_kit6 = require("@safe-global/types-kit");
|
|
1576
1718
|
var MultiSendContract_v1_3_0 = class extends MultiSendBaseContract_default {
|
|
1577
1719
|
/**
|
|
1578
1720
|
* Constructs an instance of MultiSendContract_v1_3_0
|
|
@@ -1585,7 +1727,7 @@ var MultiSendContract_v1_3_0 = class extends MultiSendBaseContract_default {
|
|
|
1585
1727
|
*/
|
|
1586
1728
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1587
1729
|
const safeVersion = "1.3.0";
|
|
1588
|
-
const defaultAbi =
|
|
1730
|
+
const defaultAbi = import_types_kit6.multisend_1_3_0_ContractArtifacts.abi;
|
|
1589
1731
|
super(
|
|
1590
1732
|
chainId,
|
|
1591
1733
|
safeProvider,
|
|
@@ -1600,7 +1742,7 @@ var MultiSendContract_v1_3_0 = class extends MultiSendBaseContract_default {
|
|
|
1600
1742
|
var MultiSendContract_v1_3_0_default = MultiSendContract_v1_3_0;
|
|
1601
1743
|
|
|
1602
1744
|
// src/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1.ts
|
|
1603
|
-
var
|
|
1745
|
+
var import_types_kit7 = require("@safe-global/types-kit");
|
|
1604
1746
|
var MultiSendContract_v1_4_1 = class extends MultiSendBaseContract_default {
|
|
1605
1747
|
/**
|
|
1606
1748
|
* Constructs an instance of MultiSendContract_v1_4_1
|
|
@@ -1613,7 +1755,7 @@ var MultiSendContract_v1_4_1 = class extends MultiSendBaseContract_default {
|
|
|
1613
1755
|
*/
|
|
1614
1756
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1615
1757
|
const safeVersion = "1.4.1";
|
|
1616
|
-
const defaultAbi =
|
|
1758
|
+
const defaultAbi = import_types_kit7.multisend_1_4_1_ContractArtifacts.abi;
|
|
1617
1759
|
super(
|
|
1618
1760
|
chainId,
|
|
1619
1761
|
safeProvider,
|
|
@@ -1627,6 +1769,34 @@ var MultiSendContract_v1_4_1 = class extends MultiSendBaseContract_default {
|
|
|
1627
1769
|
};
|
|
1628
1770
|
var MultiSendContract_v1_4_1_default = MultiSendContract_v1_4_1;
|
|
1629
1771
|
|
|
1772
|
+
// src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.ts
|
|
1773
|
+
var import_types_kit8 = require("@safe-global/types-kit");
|
|
1774
|
+
var MultiSendContract_v1_5_0 = class extends MultiSendBaseContract_default {
|
|
1775
|
+
/**
|
|
1776
|
+
* Constructs an instance of MultiSendContract_v1_5_0
|
|
1777
|
+
*
|
|
1778
|
+
* @param chainId - The chain ID where the contract resides.
|
|
1779
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
1780
|
+
* @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.
|
|
1781
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
1782
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
1783
|
+
*/
|
|
1784
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1785
|
+
const safeVersion = "1.5.0";
|
|
1786
|
+
const defaultAbi = import_types_kit8.multisend_1_5_0_ContractArtifacts.abi;
|
|
1787
|
+
super(
|
|
1788
|
+
chainId,
|
|
1789
|
+
safeProvider,
|
|
1790
|
+
defaultAbi,
|
|
1791
|
+
safeVersion,
|
|
1792
|
+
customContractAddress,
|
|
1793
|
+
customContractAbi,
|
|
1794
|
+
deploymentType
|
|
1795
|
+
);
|
|
1796
|
+
}
|
|
1797
|
+
};
|
|
1798
|
+
var MultiSendContract_v1_5_0_default = MultiSendContract_v1_5_0;
|
|
1799
|
+
|
|
1630
1800
|
// src/contracts/MultiSend/MultiSendCallOnlyBaseContract.ts
|
|
1631
1801
|
var MultiSendCallOnlyBaseContract = class extends BaseContract_default {
|
|
1632
1802
|
/**
|
|
@@ -1659,7 +1829,7 @@ var MultiSendCallOnlyBaseContract = class extends BaseContract_default {
|
|
|
1659
1829
|
var MultiSendCallOnlyBaseContract_default = MultiSendCallOnlyBaseContract;
|
|
1660
1830
|
|
|
1661
1831
|
// src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.ts
|
|
1662
|
-
var
|
|
1832
|
+
var import_types_kit9 = require("@safe-global/types-kit");
|
|
1663
1833
|
var MultiSendCallOnlyContract_v1_3_0 = class extends MultiSendCallOnlyBaseContract_default {
|
|
1664
1834
|
/**
|
|
1665
1835
|
* Constructs an instance of MultiSendCallOnlyContract_v1_3_0
|
|
@@ -1672,7 +1842,7 @@ var MultiSendCallOnlyContract_v1_3_0 = class extends MultiSendCallOnlyBaseContra
|
|
|
1672
1842
|
*/
|
|
1673
1843
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1674
1844
|
const safeVersion = "1.3.0";
|
|
1675
|
-
const defaultAbi =
|
|
1845
|
+
const defaultAbi = import_types_kit9.multiSendCallOnly_1_3_0_ContractArtifacts.abi;
|
|
1676
1846
|
super(
|
|
1677
1847
|
chainId,
|
|
1678
1848
|
safeProvider,
|
|
@@ -1687,7 +1857,7 @@ var MultiSendCallOnlyContract_v1_3_0 = class extends MultiSendCallOnlyBaseContra
|
|
|
1687
1857
|
var MultiSendCallOnlyContract_v1_3_0_default = MultiSendCallOnlyContract_v1_3_0;
|
|
1688
1858
|
|
|
1689
1859
|
// src/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1.ts
|
|
1690
|
-
var
|
|
1860
|
+
var import_types_kit10 = require("@safe-global/types-kit");
|
|
1691
1861
|
var MultiSendCallOnlyContract_v1_4_1 = class extends MultiSendCallOnlyBaseContract_default {
|
|
1692
1862
|
/**
|
|
1693
1863
|
* Constructs an instance of MultiSendCallOnlyContract_v1_4_1
|
|
@@ -1700,7 +1870,7 @@ var MultiSendCallOnlyContract_v1_4_1 = class extends MultiSendCallOnlyBaseContra
|
|
|
1700
1870
|
*/
|
|
1701
1871
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1702
1872
|
const safeVersion = "1.4.1";
|
|
1703
|
-
const defaultAbi =
|
|
1873
|
+
const defaultAbi = import_types_kit10.multiSendCallOnly_1_4_1_ContractArtifacts.abi;
|
|
1704
1874
|
super(
|
|
1705
1875
|
chainId,
|
|
1706
1876
|
safeProvider,
|
|
@@ -1714,6 +1884,34 @@ var MultiSendCallOnlyContract_v1_4_1 = class extends MultiSendCallOnlyBaseContra
|
|
|
1714
1884
|
};
|
|
1715
1885
|
var MultiSendCallOnlyContract_v1_4_1_default = MultiSendCallOnlyContract_v1_4_1;
|
|
1716
1886
|
|
|
1887
|
+
// src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.ts
|
|
1888
|
+
var import_types_kit11 = require("@safe-global/types-kit");
|
|
1889
|
+
var MultiSendCallOnlyContract_v1_5_0 = class extends MultiSendCallOnlyBaseContract_default {
|
|
1890
|
+
/**
|
|
1891
|
+
* Constructs an instance of MultiSendCallOnlyContract_v1_5_0
|
|
1892
|
+
*
|
|
1893
|
+
* @param chainId - The chain ID where the contract resides.
|
|
1894
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
1895
|
+
* @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.
|
|
1896
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
1897
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
1898
|
+
*/
|
|
1899
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1900
|
+
const safeVersion = "1.5.0";
|
|
1901
|
+
const defaultAbi = import_types_kit11.multiSendCallOnly_1_5_0_ContractArtifacts.abi;
|
|
1902
|
+
super(
|
|
1903
|
+
chainId,
|
|
1904
|
+
safeProvider,
|
|
1905
|
+
defaultAbi,
|
|
1906
|
+
safeVersion,
|
|
1907
|
+
customContractAddress,
|
|
1908
|
+
customContractAbi,
|
|
1909
|
+
deploymentType
|
|
1910
|
+
);
|
|
1911
|
+
}
|
|
1912
|
+
};
|
|
1913
|
+
var MultiSendCallOnlyContract_v1_5_0_default = MultiSendCallOnlyContract_v1_5_0;
|
|
1914
|
+
|
|
1717
1915
|
// src/contracts/SignMessageLib/SignMessageLibBaseContract.ts
|
|
1718
1916
|
var SignMessageLibBaseContract = class extends BaseContract_default {
|
|
1719
1917
|
/**
|
|
@@ -1746,7 +1944,7 @@ var SignMessageLibBaseContract = class extends BaseContract_default {
|
|
|
1746
1944
|
var SignMessageLibBaseContract_default = SignMessageLibBaseContract;
|
|
1747
1945
|
|
|
1748
1946
|
// src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.ts
|
|
1749
|
-
var
|
|
1947
|
+
var import_types_kit12 = require("@safe-global/types-kit");
|
|
1750
1948
|
var SignMessageLibContract_v1_3_0 = class extends SignMessageLibBaseContract_default {
|
|
1751
1949
|
/**
|
|
1752
1950
|
* Constructs an instance of SignMessageLibContract_v1_3_0
|
|
@@ -1759,7 +1957,7 @@ var SignMessageLibContract_v1_3_0 = class extends SignMessageLibBaseContract_def
|
|
|
1759
1957
|
*/
|
|
1760
1958
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1761
1959
|
const safeVersion = "1.3.0";
|
|
1762
|
-
const defaultAbi =
|
|
1960
|
+
const defaultAbi = import_types_kit12.signMessageLib_1_3_0_ContractArtifacts.abi;
|
|
1763
1961
|
super(
|
|
1764
1962
|
chainId,
|
|
1765
1963
|
safeProvider,
|
|
@@ -1789,7 +1987,7 @@ var SignMessageLibContract_v1_3_0 = class extends SignMessageLibBaseContract_def
|
|
|
1789
1987
|
var SignMessageLibContract_v1_3_0_default = SignMessageLibContract_v1_3_0;
|
|
1790
1988
|
|
|
1791
1989
|
// src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.ts
|
|
1792
|
-
var
|
|
1990
|
+
var import_types_kit13 = require("@safe-global/types-kit");
|
|
1793
1991
|
var SignMessageLibContract_v1_4_1 = class extends SignMessageLibBaseContract_default {
|
|
1794
1992
|
/**
|
|
1795
1993
|
* Constructs an instance of SignMessageLibContract_v1_4_1
|
|
@@ -1802,7 +2000,7 @@ var SignMessageLibContract_v1_4_1 = class extends SignMessageLibBaseContract_def
|
|
|
1802
2000
|
*/
|
|
1803
2001
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
1804
2002
|
const safeVersion = "1.4.1";
|
|
1805
|
-
const defaultAbi =
|
|
2003
|
+
const defaultAbi = import_types_kit13.signMessageLib_1_4_1_ContractArtifacts.abi;
|
|
1806
2004
|
super(
|
|
1807
2005
|
chainId,
|
|
1808
2006
|
safeProvider,
|
|
@@ -1831,6 +2029,49 @@ var SignMessageLibContract_v1_4_1 = class extends SignMessageLibBaseContract_def
|
|
|
1831
2029
|
};
|
|
1832
2030
|
var SignMessageLibContract_v1_4_1_default = SignMessageLibContract_v1_4_1;
|
|
1833
2031
|
|
|
2032
|
+
// src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.ts
|
|
2033
|
+
var import_types_kit14 = require("@safe-global/types-kit");
|
|
2034
|
+
var SignMessageLibContract_v1_5_0 = class extends SignMessageLibBaseContract_default {
|
|
2035
|
+
/**
|
|
2036
|
+
* Constructs an instance of SignMessageLibContract_v1_5_0
|
|
2037
|
+
*
|
|
2038
|
+
* @param chainId - The chain ID where the contract resides.
|
|
2039
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
2040
|
+
* @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.
|
|
2041
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
2042
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
2043
|
+
*/
|
|
2044
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
2045
|
+
const safeVersion = "1.5.0";
|
|
2046
|
+
const defaultAbi = import_types_kit14.signMessageLib_1_5_0_ContractArtifacts.abi;
|
|
2047
|
+
super(
|
|
2048
|
+
chainId,
|
|
2049
|
+
safeProvider,
|
|
2050
|
+
defaultAbi,
|
|
2051
|
+
safeVersion,
|
|
2052
|
+
customContractAddress,
|
|
2053
|
+
customContractAbi,
|
|
2054
|
+
deploymentType
|
|
2055
|
+
);
|
|
2056
|
+
/**
|
|
2057
|
+
* @param args - Array[message]
|
|
2058
|
+
*/
|
|
2059
|
+
this.getMessageHash = async (args) => {
|
|
2060
|
+
return [await this.read("getMessageHash", args)];
|
|
2061
|
+
};
|
|
2062
|
+
/**
|
|
2063
|
+
* @param args - Array[data]
|
|
2064
|
+
*/
|
|
2065
|
+
this.signMessage = async (data, options) => {
|
|
2066
|
+
if (options && !options.gasLimit) {
|
|
2067
|
+
options.gasLimit = Number(await this.estimateGas("signMessage", data, { ...options }));
|
|
2068
|
+
}
|
|
2069
|
+
return toTxResult(this.runner, await this.write("signMessage", data, options), options);
|
|
2070
|
+
};
|
|
2071
|
+
}
|
|
2072
|
+
};
|
|
2073
|
+
var SignMessageLibContract_v1_5_0_default = SignMessageLibContract_v1_5_0;
|
|
2074
|
+
|
|
1834
2075
|
// src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.ts
|
|
1835
2076
|
var import_actions2 = require("viem/actions");
|
|
1836
2077
|
|
|
@@ -1868,7 +2109,7 @@ var SafeBaseContract = class extends BaseContract_default {
|
|
|
1868
2109
|
var SafeBaseContract_default = SafeBaseContract;
|
|
1869
2110
|
|
|
1870
2111
|
// src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.ts
|
|
1871
|
-
var
|
|
2112
|
+
var import_types_kit15 = require("@safe-global/types-kit");
|
|
1872
2113
|
var SafeContract_v1_0_0 = class extends SafeBaseContract_default {
|
|
1873
2114
|
/**
|
|
1874
2115
|
* Constructs an instance of SafeContract_v1_0_0
|
|
@@ -1882,7 +2123,7 @@ var SafeContract_v1_0_0 = class extends SafeBaseContract_default {
|
|
|
1882
2123
|
*/
|
|
1883
2124
|
constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
|
|
1884
2125
|
const safeVersion = "1.0.0";
|
|
1885
|
-
const defaultAbi =
|
|
2126
|
+
const defaultAbi = import_types_kit15.safe_1_0_0_ContractArtifacts.abi;
|
|
1886
2127
|
super(
|
|
1887
2128
|
chainId,
|
|
1888
2129
|
safeProvider,
|
|
@@ -2149,7 +2390,7 @@ var SafeContract_v1_0_0_default = SafeContract_v1_0_0;
|
|
|
2149
2390
|
|
|
2150
2391
|
// src/contracts/Safe/v1.1.1/SafeContract_v1_1_1.ts
|
|
2151
2392
|
var import_actions3 = require("viem/actions");
|
|
2152
|
-
var
|
|
2393
|
+
var import_types_kit16 = require("@safe-global/types-kit");
|
|
2153
2394
|
var SafeContract_v1_1_1 = class extends SafeBaseContract_default {
|
|
2154
2395
|
/**
|
|
2155
2396
|
* Constructs an instance of SafeContract_v1_1_1
|
|
@@ -2163,7 +2404,7 @@ var SafeContract_v1_1_1 = class extends SafeBaseContract_default {
|
|
|
2163
2404
|
*/
|
|
2164
2405
|
constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
|
|
2165
2406
|
const safeVersion = "1.1.1";
|
|
2166
|
-
const defaultAbi =
|
|
2407
|
+
const defaultAbi = import_types_kit16.safe_1_1_1_ContractArtifacts.abi;
|
|
2167
2408
|
super(
|
|
2168
2409
|
chainId,
|
|
2169
2410
|
safeProvider,
|
|
@@ -2405,7 +2646,7 @@ var SafeContract_v1_1_1_default = SafeContract_v1_1_1;
|
|
|
2405
2646
|
|
|
2406
2647
|
// src/contracts/Safe/v1.2.0/SafeContract_v1_2_0.ts
|
|
2407
2648
|
var import_actions4 = require("viem/actions");
|
|
2408
|
-
var
|
|
2649
|
+
var import_types_kit17 = require("@safe-global/types-kit");
|
|
2409
2650
|
var SafeContract_v1_2_0 = class extends SafeBaseContract_default {
|
|
2410
2651
|
/**
|
|
2411
2652
|
* Constructs an instance of SafeContract_v1_2_0
|
|
@@ -2419,7 +2660,7 @@ var SafeContract_v1_2_0 = class extends SafeBaseContract_default {
|
|
|
2419
2660
|
*/
|
|
2420
2661
|
constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
|
|
2421
2662
|
const safeVersion = "1.2.0";
|
|
2422
|
-
const defaultAbi =
|
|
2663
|
+
const defaultAbi = import_types_kit17.safe_1_2_0_ContractArtifacts.abi;
|
|
2423
2664
|
super(
|
|
2424
2665
|
chainId,
|
|
2425
2666
|
safeProvider,
|
|
@@ -2665,7 +2906,7 @@ var SafeContract_v1_2_0_default = SafeContract_v1_2_0;
|
|
|
2665
2906
|
|
|
2666
2907
|
// src/contracts/Safe/v1.3.0/SafeContract_v1_3_0.ts
|
|
2667
2908
|
var import_actions5 = require("viem/actions");
|
|
2668
|
-
var
|
|
2909
|
+
var import_types_kit18 = require("@safe-global/types-kit");
|
|
2669
2910
|
var SafeContract_v1_3_0 = class extends SafeBaseContract_default {
|
|
2670
2911
|
/**
|
|
2671
2912
|
* Constructs an instance of SafeContract_v1_3_0
|
|
@@ -2679,7 +2920,7 @@ var SafeContract_v1_3_0 = class extends SafeBaseContract_default {
|
|
|
2679
2920
|
*/
|
|
2680
2921
|
constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
|
|
2681
2922
|
const safeVersion = "1.3.0";
|
|
2682
|
-
const defaultAbi =
|
|
2923
|
+
const defaultAbi = import_types_kit18.safe_1_3_0_ContractArtifacts.abi;
|
|
2683
2924
|
super(
|
|
2684
2925
|
chainId,
|
|
2685
2926
|
safeProvider,
|
|
@@ -2938,7 +3179,7 @@ var SafeContract_v1_3_0_default = SafeContract_v1_3_0;
|
|
|
2938
3179
|
|
|
2939
3180
|
// src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.ts
|
|
2940
3181
|
var import_actions6 = require("viem/actions");
|
|
2941
|
-
var
|
|
3182
|
+
var import_types_kit19 = require("@safe-global/types-kit");
|
|
2942
3183
|
var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
|
|
2943
3184
|
/**
|
|
2944
3185
|
* Constructs an instance of SafeContract_v1_4_1
|
|
@@ -2952,7 +3193,7 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
|
|
|
2952
3193
|
*/
|
|
2953
3194
|
constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
|
|
2954
3195
|
const safeVersion = "1.4.1";
|
|
2955
|
-
const defaultAbi =
|
|
3196
|
+
const defaultAbi = import_types_kit19.safe_1_4_1_ContractArtifacts.abi;
|
|
2956
3197
|
super(
|
|
2957
3198
|
chainId,
|
|
2958
3199
|
safeProvider,
|
|
@@ -3026,7 +3267,7 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
|
|
|
3026
3267
|
return [await this.read("getOwners")];
|
|
3027
3268
|
};
|
|
3028
3269
|
/**
|
|
3029
|
-
* Reads `length` bytes of storage in the
|
|
3270
|
+
* Reads `length` bytes of storage in the current contract
|
|
3030
3271
|
* @param args - Array[offset, length]
|
|
3031
3272
|
* @returns Array[storage]
|
|
3032
3273
|
*/
|
|
@@ -3209,113 +3450,435 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
|
|
|
3209
3450
|
};
|
|
3210
3451
|
var SafeContract_v1_4_1_default = SafeContract_v1_4_1;
|
|
3211
3452
|
|
|
3212
|
-
// src/contracts/
|
|
3213
|
-
var
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
* Constructs an instance of SafeProxyFactoryBaseContract.
|
|
3217
|
-
*
|
|
3218
|
-
* @param chainId - The chain ID of the contract.
|
|
3219
|
-
* @param safeProvider - An instance of SafeProvider.
|
|
3220
|
-
* @param defaultAbi - The default ABI for the Safe contract. It should be compatible with the specific version of the contract.
|
|
3221
|
-
* @param safeVersion - The version of the Safe contract.
|
|
3222
|
-
* @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.
|
|
3223
|
-
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
|
|
3224
|
-
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
3225
|
-
*/
|
|
3226
|
-
constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
|
|
3227
|
-
const contractName3 = "safeProxyFactoryVersion";
|
|
3228
|
-
super(
|
|
3229
|
-
contractName3,
|
|
3230
|
-
chainId,
|
|
3231
|
-
safeProvider,
|
|
3232
|
-
defaultAbi,
|
|
3233
|
-
safeVersion,
|
|
3234
|
-
customContractAddress,
|
|
3235
|
-
customContractAbi,
|
|
3236
|
-
deploymentType
|
|
3237
|
-
);
|
|
3238
|
-
this.contractName = contractName3;
|
|
3239
|
-
}
|
|
3240
|
-
};
|
|
3241
|
-
var SafeProxyFactoryBaseContract_default = SafeProxyFactoryBaseContract;
|
|
3242
|
-
|
|
3243
|
-
// src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.ts
|
|
3244
|
-
var import_types_kit16 = require("@safe-global/types-kit");
|
|
3245
|
-
var SafeProxyFactoryContract_v1_0_0 = class extends SafeProxyFactoryBaseContract_default {
|
|
3453
|
+
// src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.ts
|
|
3454
|
+
var import_actions7 = require("viem/actions");
|
|
3455
|
+
var import_types_kit20 = require("@safe-global/types-kit");
|
|
3456
|
+
var SafeContract_v1_5_0 = class extends SafeBaseContract_default {
|
|
3246
3457
|
/**
|
|
3247
|
-
* Constructs an instance of
|
|
3458
|
+
* Constructs an instance of SafeContract_v1_5_0
|
|
3248
3459
|
*
|
|
3249
3460
|
* @param chainId - The chain ID where the contract resides.
|
|
3250
3461
|
* @param safeProvider - An instance of SafeProvider.
|
|
3462
|
+
* @param isL1SafeSingleton - A flag indicating if the contract is a L1 Safe Singleton.
|
|
3251
3463
|
* @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.
|
|
3252
|
-
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.
|
|
3464
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
3253
3465
|
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
3254
3466
|
*/
|
|
3255
|
-
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
3256
|
-
const safeVersion = "1.
|
|
3257
|
-
const defaultAbi =
|
|
3467
|
+
constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
|
|
3468
|
+
const safeVersion = "1.5.0";
|
|
3469
|
+
const defaultAbi = import_types_kit20.safe_1_5_0_ContractArtifacts.abi;
|
|
3258
3470
|
super(
|
|
3259
3471
|
chainId,
|
|
3260
3472
|
safeProvider,
|
|
3261
3473
|
defaultAbi,
|
|
3262
3474
|
safeVersion,
|
|
3475
|
+
isL1SafeSingleton,
|
|
3263
3476
|
customContractAddress,
|
|
3264
3477
|
customContractAbi,
|
|
3265
3478
|
deploymentType
|
|
3266
3479
|
);
|
|
3267
3480
|
/**
|
|
3268
|
-
*
|
|
3269
|
-
* @returns Array[creationCode]
|
|
3481
|
+
* @returns Array[safeContractVersion]
|
|
3270
3482
|
*/
|
|
3271
|
-
this.
|
|
3272
|
-
return [await this.read("
|
|
3483
|
+
this.VERSION = async () => {
|
|
3484
|
+
return [await this.read("VERSION")];
|
|
3273
3485
|
};
|
|
3274
3486
|
/**
|
|
3275
|
-
*
|
|
3276
|
-
* @returns Array[
|
|
3487
|
+
* @param args - Array[owner, txHash]
|
|
3488
|
+
* @returns Array[approvedHashes]
|
|
3277
3489
|
*/
|
|
3278
|
-
this.
|
|
3279
|
-
return [await this.read("
|
|
3490
|
+
this.approvedHashes = async (args) => {
|
|
3491
|
+
return [await this.read("approvedHashes", args)];
|
|
3280
3492
|
};
|
|
3281
3493
|
/**
|
|
3282
|
-
*
|
|
3283
|
-
*
|
|
3284
|
-
* @
|
|
3494
|
+
* Checks whether the signature provided is valid for the provided data, hash and number of required signatures.
|
|
3495
|
+
* Will revert otherwise.
|
|
3496
|
+
* @param args - Array[dataHash, data, signatures, requiredSignatures]
|
|
3497
|
+
* @returns Empty array
|
|
3285
3498
|
*/
|
|
3286
|
-
this.
|
|
3287
|
-
|
|
3499
|
+
this.checkNSignatures = async (args) => {
|
|
3500
|
+
await this.read("checkNSignatures", args);
|
|
3501
|
+
return [];
|
|
3288
3502
|
};
|
|
3289
3503
|
/**
|
|
3290
|
-
*
|
|
3291
|
-
*
|
|
3292
|
-
*
|
|
3504
|
+
* New in v1.5.0: overload of checkNSignatures that accepts an explicit executor address.
|
|
3505
|
+
* Allows modules to pass msg.sender explicitly rather than relying on the contract's own context.
|
|
3506
|
+
* Will revert otherwise.
|
|
3507
|
+
* @param args - Array[executor, dataHash, signatures, requiredSignatures]
|
|
3508
|
+
* @returns Empty array
|
|
3293
3509
|
*/
|
|
3294
|
-
this.
|
|
3295
|
-
|
|
3510
|
+
this.checkNSignaturesWithExecutor = async (args) => {
|
|
3511
|
+
await (0, import_actions7.readContract)(this.runner, {
|
|
3512
|
+
address: this.contractAddress,
|
|
3513
|
+
functionName: "checkNSignatures",
|
|
3514
|
+
abi: [
|
|
3515
|
+
{
|
|
3516
|
+
inputs: [
|
|
3517
|
+
{ internalType: "address", name: "executor", type: "address" },
|
|
3518
|
+
{ internalType: "bytes32", name: "dataHash", type: "bytes32" },
|
|
3519
|
+
{ internalType: "bytes", name: "signatures", type: "bytes" },
|
|
3520
|
+
{ internalType: "uint256", name: "requiredSignatures", type: "uint256" }
|
|
3521
|
+
],
|
|
3522
|
+
name: "checkNSignatures",
|
|
3523
|
+
outputs: [],
|
|
3524
|
+
stateMutability: "view",
|
|
3525
|
+
type: "function"
|
|
3526
|
+
}
|
|
3527
|
+
],
|
|
3528
|
+
args
|
|
3529
|
+
});
|
|
3530
|
+
return [];
|
|
3296
3531
|
};
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3532
|
+
/**
|
|
3533
|
+
* Checks whether the signature provided is valid for the provided data and hash. Will revert otherwise.
|
|
3534
|
+
* @param args - Array[dataHash, data, signatures]
|
|
3535
|
+
* @returns Empty array
|
|
3536
|
+
*/
|
|
3537
|
+
this.checkSignatures = async (args) => {
|
|
3538
|
+
await this.read("checkSignatures", args);
|
|
3539
|
+
return [];
|
|
3540
|
+
};
|
|
3541
|
+
/**
|
|
3542
|
+
* New in v1.5.0: overload of checkSignatures that accepts an explicit executor address.
|
|
3543
|
+
* Allows modules to pass msg.sender explicitly rather than relying on the contract's own context.
|
|
3544
|
+
* Will revert otherwise.
|
|
3545
|
+
* @param args - Array[executor, dataHash, signatures]
|
|
3546
|
+
* @returns Empty array
|
|
3547
|
+
*/
|
|
3548
|
+
this.checkSignaturesWithExecutor = async (args) => {
|
|
3549
|
+
await (0, import_actions7.readContract)(this.runner, {
|
|
3550
|
+
address: this.contractAddress,
|
|
3551
|
+
functionName: "checkSignatures",
|
|
3552
|
+
abi: [
|
|
3553
|
+
{
|
|
3554
|
+
inputs: [
|
|
3555
|
+
{ internalType: "address", name: "executor", type: "address" },
|
|
3556
|
+
{ internalType: "bytes32", name: "dataHash", type: "bytes32" },
|
|
3557
|
+
{ internalType: "bytes", name: "signatures", type: "bytes" }
|
|
3558
|
+
],
|
|
3559
|
+
name: "checkSignatures",
|
|
3560
|
+
outputs: [],
|
|
3561
|
+
stateMutability: "view",
|
|
3562
|
+
type: "function"
|
|
3563
|
+
}
|
|
3564
|
+
],
|
|
3565
|
+
args
|
|
3566
|
+
});
|
|
3567
|
+
return [];
|
|
3568
|
+
};
|
|
3569
|
+
/**
|
|
3570
|
+
* @returns Array[domainSeparator]
|
|
3571
|
+
*/
|
|
3572
|
+
this.domainSeparator = async () => {
|
|
3573
|
+
return [await this.read("domainSeparator")];
|
|
3574
|
+
};
|
|
3575
|
+
/**
|
|
3576
|
+
* Returns array of modules.
|
|
3577
|
+
* @param args - Array[start, pageSize]
|
|
3578
|
+
* @returns Array[Array[modules], next]
|
|
3579
|
+
*/
|
|
3580
|
+
this.getModulesPaginated = async (args) => {
|
|
3581
|
+
const [array, next] = await this.read("getModulesPaginated", args);
|
|
3582
|
+
return [array, next];
|
|
3583
|
+
};
|
|
3584
|
+
/**
|
|
3585
|
+
* Returns the list of Safe owner accounts.
|
|
3586
|
+
* @returns Array[Array[owners]]
|
|
3587
|
+
*/
|
|
3588
|
+
this.getOwners = async () => {
|
|
3589
|
+
return [await this.read("getOwners")];
|
|
3590
|
+
};
|
|
3591
|
+
/**
|
|
3592
|
+
* Reads `length` bytes of storage in the current contract
|
|
3593
|
+
* @param args - Array[offset, length]
|
|
3594
|
+
* @returns Array[storage]
|
|
3595
|
+
*/
|
|
3596
|
+
this.getStorageAt = async (args) => {
|
|
3597
|
+
return [await this.read("getStorageAt", args)];
|
|
3598
|
+
};
|
|
3599
|
+
/**
|
|
3600
|
+
* Returns the Safe threshold.
|
|
3601
|
+
* @returns Array[threshold]
|
|
3602
|
+
*/
|
|
3603
|
+
this.getThreshold = async () => {
|
|
3604
|
+
return [await this.read("getThreshold")];
|
|
3605
|
+
};
|
|
3606
|
+
/**
|
|
3607
|
+
* Returns hash to be signed by owners.
|
|
3608
|
+
* @param args - Array[to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce]
|
|
3609
|
+
* @returns Array[transactionHash]
|
|
3610
|
+
*/
|
|
3611
|
+
this.getTransactionHash = async (args) => {
|
|
3612
|
+
return [await this.read("getTransactionHash", args)];
|
|
3613
|
+
};
|
|
3614
|
+
/**
|
|
3615
|
+
* Checks if a specific Safe module is enabled for the current Safe.
|
|
3616
|
+
* @param args - Array[moduleAddress]
|
|
3617
|
+
* @returns Array[isEnabled]
|
|
3618
|
+
*/
|
|
3619
|
+
this.isModuleEnabled = async (args) => {
|
|
3620
|
+
return [await this.read("isModuleEnabled", args)];
|
|
3621
|
+
};
|
|
3622
|
+
/**
|
|
3623
|
+
* Checks if a specific address is an owner of the current Safe.
|
|
3624
|
+
* @param args - Array[address]
|
|
3625
|
+
* @returns Array[isOwner]
|
|
3626
|
+
*/
|
|
3627
|
+
this.isOwner = async (args) => {
|
|
3628
|
+
return [await this.read("isOwner", args)];
|
|
3629
|
+
};
|
|
3630
|
+
/**
|
|
3631
|
+
* Returns the Safe nonce.
|
|
3632
|
+
* @returns Array[nonce]
|
|
3633
|
+
*/
|
|
3634
|
+
this.nonce = async () => {
|
|
3635
|
+
return [await this.read("nonce")];
|
|
3636
|
+
};
|
|
3637
|
+
/**
|
|
3638
|
+
* @param args - Array[messageHash]
|
|
3639
|
+
* @returns Array[signedMessages]
|
|
3640
|
+
*/
|
|
3641
|
+
this.signedMessages = async (args) => {
|
|
3642
|
+
return [await this.read("signedMessages", args)];
|
|
3643
|
+
};
|
|
3644
|
+
}
|
|
3645
|
+
/**
|
|
3646
|
+
* Checks whether a given Safe transaction can be executed successfully with no errors.
|
|
3647
|
+
* @param safeTransaction - The Safe transaction to check.
|
|
3648
|
+
* @param options - Optional transaction options.
|
|
3649
|
+
* @returns True, if the given transactions is valid.
|
|
3650
|
+
*/
|
|
3651
|
+
async isValidTransaction(safeTransaction, options = {}) {
|
|
3652
|
+
try {
|
|
3653
|
+
const gasLimit = options?.gasLimit || await this.estimateGas(
|
|
3654
|
+
"execTransaction",
|
|
3655
|
+
[
|
|
3656
|
+
safeTransaction.data.to,
|
|
3657
|
+
BigInt(safeTransaction.data.value),
|
|
3658
|
+
asHex(safeTransaction.data.data),
|
|
3659
|
+
safeTransaction.data.operation,
|
|
3660
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3661
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3662
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3663
|
+
safeTransaction.data.gasToken,
|
|
3664
|
+
safeTransaction.data.refundReceiver,
|
|
3665
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3666
|
+
],
|
|
3667
|
+
options
|
|
3668
|
+
);
|
|
3669
|
+
const converted = this.convertOptions({ ...options, gasLimit });
|
|
3670
|
+
const txResult = await (0, import_actions7.simulateContract)(this.runner, {
|
|
3671
|
+
address: this.contractAddress,
|
|
3672
|
+
functionName: "execTransaction",
|
|
3673
|
+
abi: this.contractAbi,
|
|
3674
|
+
args: [
|
|
3675
|
+
safeTransaction.data.to,
|
|
3676
|
+
BigInt(safeTransaction.data.value),
|
|
3677
|
+
asHex(safeTransaction.data.data),
|
|
3678
|
+
safeTransaction.data.operation,
|
|
3679
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3680
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3681
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3682
|
+
safeTransaction.data.gasToken,
|
|
3683
|
+
safeTransaction.data.refundReceiver,
|
|
3684
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3685
|
+
],
|
|
3686
|
+
...converted
|
|
3687
|
+
});
|
|
3688
|
+
return txResult.result;
|
|
3689
|
+
} catch (error) {
|
|
3690
|
+
return false;
|
|
3691
|
+
}
|
|
3692
|
+
}
|
|
3693
|
+
/**
|
|
3694
|
+
* Executes a transaction.
|
|
3695
|
+
* @param safeTransaction - The Safe transaction to execute.
|
|
3696
|
+
* @param options - Transaction options.
|
|
3697
|
+
* @returns Transaction result.
|
|
3698
|
+
*/
|
|
3699
|
+
async execTransaction(safeTransaction, options) {
|
|
3700
|
+
const gasLimit = options?.gasLimit || await this.estimateGas(
|
|
3701
|
+
"execTransaction",
|
|
3702
|
+
[
|
|
3703
|
+
safeTransaction.data.to,
|
|
3704
|
+
BigInt(safeTransaction.data.value),
|
|
3705
|
+
asHex(safeTransaction.data.data),
|
|
3706
|
+
safeTransaction.data.operation,
|
|
3707
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3708
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3709
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3710
|
+
safeTransaction.data.gasToken,
|
|
3711
|
+
safeTransaction.data.refundReceiver,
|
|
3712
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3713
|
+
],
|
|
3714
|
+
options
|
|
3715
|
+
);
|
|
3716
|
+
const args = [
|
|
3717
|
+
safeTransaction.data.to,
|
|
3718
|
+
BigInt(safeTransaction.data.value),
|
|
3719
|
+
asHex(safeTransaction.data.data),
|
|
3720
|
+
safeTransaction.data.operation,
|
|
3721
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3722
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3723
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3724
|
+
safeTransaction.data.gasToken,
|
|
3725
|
+
safeTransaction.data.refundReceiver,
|
|
3726
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3727
|
+
];
|
|
3728
|
+
return toTxResult(
|
|
3729
|
+
this.runner,
|
|
3730
|
+
await this.write("execTransaction", args, { ...options, gasLimit }),
|
|
3731
|
+
options
|
|
3732
|
+
);
|
|
3733
|
+
}
|
|
3734
|
+
/**
|
|
3735
|
+
* Returns array of first 10 modules.
|
|
3736
|
+
* @returns Array[modules]
|
|
3737
|
+
*/
|
|
3738
|
+
async getModules() {
|
|
3739
|
+
const [modules] = await this.getModulesPaginated([SENTINEL_ADDRESS, BigInt(10)]);
|
|
3740
|
+
return [modules.map((module2) => module2)];
|
|
3741
|
+
}
|
|
3742
|
+
/**
|
|
3743
|
+
* Marks a hash as approved. This can be used to validate a hash that is used by a signature.
|
|
3744
|
+
* @param hash - The hash that should be marked as approved for signatures that are verified by this contract.
|
|
3745
|
+
* @param options - Optional transaction options.
|
|
3746
|
+
* @returns Transaction result.
|
|
3747
|
+
*/
|
|
3748
|
+
async approveHash(hash, options) {
|
|
3749
|
+
const gasLimit = options?.gasLimit || await this.estimateGas("approveHash", [asHash(hash)], options);
|
|
3750
|
+
return toTxResult(
|
|
3751
|
+
this.runner,
|
|
3752
|
+
await this.write("approveHash", [asHash(hash)], { ...options, gasLimit }),
|
|
3753
|
+
options
|
|
3754
|
+
);
|
|
3755
|
+
}
|
|
3756
|
+
/**
|
|
3757
|
+
* Returns the chain id of the Safe contract. (Custom method - not defined in the Safe Contract)
|
|
3758
|
+
* @returns Array[chainId]
|
|
3759
|
+
*/
|
|
3760
|
+
async getChainId() {
|
|
3761
|
+
return [await Promise.resolve(this.chainId)];
|
|
3762
|
+
}
|
|
3763
|
+
/**
|
|
3764
|
+
* returns the nonce of the Safe contract.
|
|
3765
|
+
*
|
|
3766
|
+
* @returns {Promise<bigint>} A promise that resolves to the nonce of the Safe contract.
|
|
3767
|
+
*/
|
|
3768
|
+
async getNonce() {
|
|
3769
|
+
const [nonce] = await this.nonce();
|
|
3770
|
+
return nonce;
|
|
3771
|
+
}
|
|
3772
|
+
};
|
|
3773
|
+
var SafeContract_v1_5_0_default = SafeContract_v1_5_0;
|
|
3774
|
+
|
|
3775
|
+
// src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.ts
|
|
3776
|
+
var SafeProxyFactoryBaseContract = class extends BaseContract_default {
|
|
3777
|
+
/**
|
|
3778
|
+
* @constructor
|
|
3779
|
+
* Constructs an instance of SafeProxyFactoryBaseContract.
|
|
3780
|
+
*
|
|
3781
|
+
* @param chainId - The chain ID of the contract.
|
|
3782
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
3783
|
+
* @param defaultAbi - The default ABI for the Safe contract. It should be compatible with the specific version of the contract.
|
|
3784
|
+
* @param safeVersion - The version of the Safe contract.
|
|
3785
|
+
* @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.
|
|
3786
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
|
|
3787
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
3788
|
+
*/
|
|
3789
|
+
constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
|
|
3790
|
+
const contractName3 = "safeProxyFactoryVersion";
|
|
3791
|
+
super(
|
|
3792
|
+
contractName3,
|
|
3793
|
+
chainId,
|
|
3794
|
+
safeProvider,
|
|
3795
|
+
defaultAbi,
|
|
3796
|
+
safeVersion,
|
|
3797
|
+
customContractAddress,
|
|
3798
|
+
customContractAbi,
|
|
3799
|
+
deploymentType
|
|
3800
|
+
);
|
|
3801
|
+
this.contractName = contractName3;
|
|
3802
|
+
}
|
|
3803
|
+
};
|
|
3804
|
+
var SafeProxyFactoryBaseContract_default = SafeProxyFactoryBaseContract;
|
|
3805
|
+
|
|
3806
|
+
// src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.ts
|
|
3807
|
+
var import_types_kit21 = require("@safe-global/types-kit");
|
|
3808
|
+
var SafeProxyFactoryContract_v1_0_0 = class extends SafeProxyFactoryBaseContract_default {
|
|
3809
|
+
/**
|
|
3810
|
+
* Constructs an instance of SafeProxyFactoryContract_v1_0_0
|
|
3811
|
+
*
|
|
3812
|
+
* @param chainId - The chain ID where the contract resides.
|
|
3813
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
3814
|
+
* @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.
|
|
3815
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.0.0 is used.
|
|
3816
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
3817
|
+
*/
|
|
3818
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
3819
|
+
const safeVersion = "1.0.0";
|
|
3820
|
+
const defaultAbi = import_types_kit21.safeProxyFactory_1_0_0_ContractArtifacts.abi;
|
|
3821
|
+
super(
|
|
3822
|
+
chainId,
|
|
3823
|
+
safeProvider,
|
|
3824
|
+
defaultAbi,
|
|
3825
|
+
safeVersion,
|
|
3826
|
+
customContractAddress,
|
|
3827
|
+
customContractAbi,
|
|
3828
|
+
deploymentType
|
|
3829
|
+
);
|
|
3830
|
+
/**
|
|
3831
|
+
* Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
|
|
3832
|
+
* @returns Array[creationCode]
|
|
3833
|
+
*/
|
|
3834
|
+
this.proxyCreationCode = async () => {
|
|
3835
|
+
return [await this.read("proxyCreationCode")];
|
|
3836
|
+
};
|
|
3837
|
+
/**
|
|
3838
|
+
* Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
|
|
3839
|
+
* @returns Array[runtimeCode]
|
|
3840
|
+
*/
|
|
3841
|
+
this.proxyRuntimeCode = async () => {
|
|
3842
|
+
return [await this.read("proxyRuntimeCode")];
|
|
3843
|
+
};
|
|
3844
|
+
/**
|
|
3845
|
+
* Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
|
|
3846
|
+
* @param args - Array[masterCopy, data]
|
|
3847
|
+
* @returns Array[proxyAddress]
|
|
3848
|
+
*/
|
|
3849
|
+
this.createProxy = async (args) => {
|
|
3850
|
+
return [await this.write("createProxy", args)];
|
|
3851
|
+
};
|
|
3852
|
+
/**
|
|
3853
|
+
* Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
|
|
3854
|
+
* @param args - Array[masterCopy, initializer, saltNonce]
|
|
3855
|
+
* @returns Array[proxyAddress]
|
|
3856
|
+
*/
|
|
3857
|
+
this.createProxyWithNonce = async (args) => {
|
|
3858
|
+
return [await this.write("createProxyWithNonce", args)];
|
|
3859
|
+
};
|
|
3860
|
+
}
|
|
3861
|
+
};
|
|
3862
|
+
var SafeProxyFactoryContract_v1_0_0_default = SafeProxyFactoryContract_v1_0_0;
|
|
3863
|
+
|
|
3864
|
+
// src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.ts
|
|
3865
|
+
var import_types_kit22 = require("@safe-global/types-kit");
|
|
3866
|
+
var SafeProxyFactoryContract_v1_1_1 = class extends SafeProxyFactoryBaseContract_default {
|
|
3867
|
+
/**
|
|
3868
|
+
* Constructs an instance of SafeProxyFactoryContract_v1_1_1
|
|
3869
|
+
*
|
|
3870
|
+
* @param chainId - The chain ID where the contract resides.
|
|
3871
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
3872
|
+
* @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.
|
|
3873
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.1.1 is used.
|
|
3874
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
3875
|
+
*/
|
|
3876
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
3877
|
+
const safeVersion = "1.1.1";
|
|
3878
|
+
const defaultAbi = import_types_kit22.safeProxyFactory_1_1_1_ContractArtifacts.abi;
|
|
3879
|
+
super(
|
|
3880
|
+
chainId,
|
|
3881
|
+
safeProvider,
|
|
3319
3882
|
defaultAbi,
|
|
3320
3883
|
safeVersion,
|
|
3321
3884
|
customContractAddress,
|
|
@@ -3373,7 +3936,7 @@ var SafeProxyFactoryContract_v1_1_1 = class extends SafeProxyFactoryBaseContract
|
|
|
3373
3936
|
var SafeProxyFactoryContract_v1_1_1_default = SafeProxyFactoryContract_v1_1_1;
|
|
3374
3937
|
|
|
3375
3938
|
// src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.ts
|
|
3376
|
-
var
|
|
3939
|
+
var import_types_kit23 = require("@safe-global/types-kit");
|
|
3377
3940
|
var SafeProxyFactoryContract_v1_3_0 = class extends SafeProxyFactoryBaseContract_default {
|
|
3378
3941
|
/**
|
|
3379
3942
|
* Constructs an instance of SafeProxyFactoryContract_v1_3_0
|
|
@@ -3386,7 +3949,7 @@ var SafeProxyFactoryContract_v1_3_0 = class extends SafeProxyFactoryBaseContract
|
|
|
3386
3949
|
*/
|
|
3387
3950
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
3388
3951
|
const safeVersion = "1.3.0";
|
|
3389
|
-
const defaultAbi =
|
|
3952
|
+
const defaultAbi = import_types_kit23.safeProxyFactory_1_3_0_ContractArtifacts.abi;
|
|
3390
3953
|
super(
|
|
3391
3954
|
chainId,
|
|
3392
3955
|
safeProvider,
|
|
@@ -3447,7 +4010,7 @@ var SafeProxyFactoryContract_v1_3_0 = class extends SafeProxyFactoryBaseContract
|
|
|
3447
4010
|
var SafeProxyFactoryContract_v1_3_0_default = SafeProxyFactoryContract_v1_3_0;
|
|
3448
4011
|
|
|
3449
4012
|
// src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.ts
|
|
3450
|
-
var
|
|
4013
|
+
var import_types_kit24 = require("@safe-global/types-kit");
|
|
3451
4014
|
var SafeProxyFactoryContract_v1_4_1 = class extends SafeProxyFactoryBaseContract_default {
|
|
3452
4015
|
/**
|
|
3453
4016
|
* Constructs an instance of SafeProxyFactoryContract_v1_4_1
|
|
@@ -3460,7 +4023,7 @@ var SafeProxyFactoryContract_v1_4_1 = class extends SafeProxyFactoryBaseContract
|
|
|
3460
4023
|
*/
|
|
3461
4024
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
3462
4025
|
const safeVersion = "1.4.1";
|
|
3463
|
-
const defaultAbi =
|
|
4026
|
+
const defaultAbi = import_types_kit24.safeProxyFactory_1_4_1_ContractArtifacts.abi;
|
|
3464
4027
|
super(
|
|
3465
4028
|
chainId,
|
|
3466
4029
|
safeProvider,
|
|
@@ -3513,6 +4076,80 @@ var SafeProxyFactoryContract_v1_4_1 = class extends SafeProxyFactoryBaseContract
|
|
|
3513
4076
|
};
|
|
3514
4077
|
var SafeProxyFactoryContract_v1_4_1_default = SafeProxyFactoryContract_v1_4_1;
|
|
3515
4078
|
|
|
4079
|
+
// src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.ts
|
|
4080
|
+
var import_types_kit25 = require("@safe-global/types-kit");
|
|
4081
|
+
var SafeProxyFactoryContract_v1_5_0 = class extends SafeProxyFactoryBaseContract_default {
|
|
4082
|
+
/**
|
|
4083
|
+
* Constructs an instance of SafeProxyFactoryContract_v1_5_0
|
|
4084
|
+
*
|
|
4085
|
+
* @param chainId - The chain ID where the contract resides.
|
|
4086
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
4087
|
+
* @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.
|
|
4088
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
4089
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
4090
|
+
*/
|
|
4091
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
4092
|
+
const safeVersion = "1.5.0";
|
|
4093
|
+
const defaultAbi = import_types_kit25.safeProxyFactory_1_5_0_ContractArtifacts.abi;
|
|
4094
|
+
super(
|
|
4095
|
+
chainId,
|
|
4096
|
+
safeProvider,
|
|
4097
|
+
defaultAbi,
|
|
4098
|
+
safeVersion,
|
|
4099
|
+
customContractAddress,
|
|
4100
|
+
customContractAbi,
|
|
4101
|
+
deploymentType
|
|
4102
|
+
);
|
|
4103
|
+
/**
|
|
4104
|
+
* Returns the ID of the chain the contract is currently deployed on.
|
|
4105
|
+
* @returns Array[chainId]
|
|
4106
|
+
*/
|
|
4107
|
+
this.getChainId = async () => {
|
|
4108
|
+
return [await this.read("getChainId")];
|
|
4109
|
+
};
|
|
4110
|
+
/**
|
|
4111
|
+
* Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
|
|
4112
|
+
* @returns Array[creationCode]
|
|
4113
|
+
*/
|
|
4114
|
+
this.proxyCreationCode = async () => {
|
|
4115
|
+
return [await this.read("proxyCreationCode")];
|
|
4116
|
+
};
|
|
4117
|
+
/**
|
|
4118
|
+
* Deploys a new chain-specific proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4119
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4120
|
+
* @returns Array[proxy]
|
|
4121
|
+
*/
|
|
4122
|
+
this.createChainSpecificProxyWithNonce = async (args) => {
|
|
4123
|
+
return [await this.write("createChainSpecificProxyWithNonce", args)];
|
|
4124
|
+
};
|
|
4125
|
+
/**
|
|
4126
|
+
* Deploys a new chain-specific proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4127
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4128
|
+
* @returns Array[proxy]
|
|
4129
|
+
*/
|
|
4130
|
+
this.createChainSpecificProxyWithNonceL2 = async (args) => {
|
|
4131
|
+
return [await this.write("createChainSpecificProxyWithNonceL2", args)];
|
|
4132
|
+
};
|
|
4133
|
+
/**
|
|
4134
|
+
* Deploys a new proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4135
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4136
|
+
* @returns Array[proxy]
|
|
4137
|
+
*/
|
|
4138
|
+
this.createProxyWithNonce = async (args) => {
|
|
4139
|
+
return [await this.write("createProxyWithNonce", args)];
|
|
4140
|
+
};
|
|
4141
|
+
/**
|
|
4142
|
+
* Deploys a new proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4143
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4144
|
+
* @returns Array[proxy]
|
|
4145
|
+
*/
|
|
4146
|
+
this.createProxyWithNonceL2 = async (args) => {
|
|
4147
|
+
return [await this.write("createProxyWithNonceL2", args)];
|
|
4148
|
+
};
|
|
4149
|
+
}
|
|
4150
|
+
};
|
|
4151
|
+
var SafeProxyFactoryContract_v1_5_0_default = SafeProxyFactoryContract_v1_5_0;
|
|
4152
|
+
|
|
3516
4153
|
// src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.ts
|
|
3517
4154
|
var SimulateTxAccessorBaseContract = class extends BaseContract_default {
|
|
3518
4155
|
/**
|
|
@@ -3545,7 +4182,7 @@ var SimulateTxAccessorBaseContract = class extends BaseContract_default {
|
|
|
3545
4182
|
var SimulateTxAccessorBaseContract_default = SimulateTxAccessorBaseContract;
|
|
3546
4183
|
|
|
3547
4184
|
// src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.ts
|
|
3548
|
-
var
|
|
4185
|
+
var import_types_kit26 = require("@safe-global/types-kit");
|
|
3549
4186
|
var SimulateTxAccessorContract_v1_3_0 = class extends SimulateTxAccessorBaseContract_default {
|
|
3550
4187
|
/**
|
|
3551
4188
|
* Constructs an instance of SimulateTxAccessorContract_v1_3_0
|
|
@@ -3558,7 +4195,7 @@ var SimulateTxAccessorContract_v1_3_0 = class extends SimulateTxAccessorBaseCont
|
|
|
3558
4195
|
*/
|
|
3559
4196
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
3560
4197
|
const safeVersion = "1.3.0";
|
|
3561
|
-
const defaultAbi =
|
|
4198
|
+
const defaultAbi = import_types_kit26.simulateTxAccessor_1_3_0_ContractArtifacts.abi;
|
|
3562
4199
|
super(
|
|
3563
4200
|
chainId,
|
|
3564
4201
|
safeProvider,
|
|
@@ -3581,7 +4218,7 @@ var SimulateTxAccessorContract_v1_3_0 = class extends SimulateTxAccessorBaseCont
|
|
|
3581
4218
|
var SimulateTxAccessorContract_v1_3_0_default = SimulateTxAccessorContract_v1_3_0;
|
|
3582
4219
|
|
|
3583
4220
|
// src/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1.ts
|
|
3584
|
-
var
|
|
4221
|
+
var import_types_kit27 = require("@safe-global/types-kit");
|
|
3585
4222
|
var SimulateTxAccessorContract_v1_4_1 = class extends SimulateTxAccessorBaseContract_default {
|
|
3586
4223
|
/**
|
|
3587
4224
|
* Constructs an instance of SimulateTxAccessorContract_v1_4_1
|
|
@@ -3594,7 +4231,7 @@ var SimulateTxAccessorContract_v1_4_1 = class extends SimulateTxAccessorBaseCont
|
|
|
3594
4231
|
*/
|
|
3595
4232
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
3596
4233
|
const safeVersion = "1.4.1";
|
|
3597
|
-
const defaultAbi =
|
|
4234
|
+
const defaultAbi = import_types_kit27.simulateTxAccessor_1_4_1_ContractArtifacts.abi;
|
|
3598
4235
|
super(
|
|
3599
4236
|
chainId,
|
|
3600
4237
|
safeProvider,
|
|
@@ -3616,6 +4253,42 @@ var SimulateTxAccessorContract_v1_4_1 = class extends SimulateTxAccessorBaseCont
|
|
|
3616
4253
|
};
|
|
3617
4254
|
var SimulateTxAccessorContract_v1_4_1_default = SimulateTxAccessorContract_v1_4_1;
|
|
3618
4255
|
|
|
4256
|
+
// src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.ts
|
|
4257
|
+
var import_types_kit28 = require("@safe-global/types-kit");
|
|
4258
|
+
var SimulateTxAccessorContract_v1_5_0 = class extends SimulateTxAccessorBaseContract_default {
|
|
4259
|
+
/**
|
|
4260
|
+
* Constructs an instance of SimulateTxAccessorContract_v1_5_0
|
|
4261
|
+
*
|
|
4262
|
+
* @param chainId - The chain ID where the contract resides.
|
|
4263
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
4264
|
+
* @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.
|
|
4265
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
4266
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
4267
|
+
*/
|
|
4268
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
4269
|
+
const safeVersion = "1.5.0";
|
|
4270
|
+
const defaultAbi = import_types_kit28.simulateTxAccessor_1_5_0_ContractArtifacts.abi;
|
|
4271
|
+
super(
|
|
4272
|
+
chainId,
|
|
4273
|
+
safeProvider,
|
|
4274
|
+
defaultAbi,
|
|
4275
|
+
safeVersion,
|
|
4276
|
+
customContractAddress,
|
|
4277
|
+
customContractAbi,
|
|
4278
|
+
deploymentType
|
|
4279
|
+
);
|
|
4280
|
+
/**
|
|
4281
|
+
* @param args - Array[to, value, data, operation]
|
|
4282
|
+
* @returns Array[estimate, success, returnData]
|
|
4283
|
+
*/
|
|
4284
|
+
this.simulate = async (args) => {
|
|
4285
|
+
const [estimate, success, returnData] = await this.write("simulate", args);
|
|
4286
|
+
return [BigInt(estimate), !!success, asHex(returnData)];
|
|
4287
|
+
};
|
|
4288
|
+
}
|
|
4289
|
+
};
|
|
4290
|
+
var SimulateTxAccessorContract_v1_5_0_default = SimulateTxAccessorContract_v1_5_0;
|
|
4291
|
+
|
|
3619
4292
|
// src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.ts
|
|
3620
4293
|
var CompatibilityFallbackHandlerBaseContract = class extends BaseContract_default {
|
|
3621
4294
|
/**
|
|
@@ -3648,7 +4321,7 @@ var CompatibilityFallbackHandlerBaseContract = class extends BaseContract_defaul
|
|
|
3648
4321
|
var CompatibilityFallbackHandlerBaseContract_default = CompatibilityFallbackHandlerBaseContract;
|
|
3649
4322
|
|
|
3650
4323
|
// src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.ts
|
|
3651
|
-
var
|
|
4324
|
+
var import_types_kit29 = require("@safe-global/types-kit");
|
|
3652
4325
|
var CompatibilityFallbackHandlerContract_v1_3_0 = class extends CompatibilityFallbackHandlerBaseContract_default {
|
|
3653
4326
|
/**
|
|
3654
4327
|
* Constructs an instance of CompatibilityFallbackHandlerContract_v1_3_0
|
|
@@ -3661,7 +4334,7 @@ var CompatibilityFallbackHandlerContract_v1_3_0 = class extends CompatibilityFal
|
|
|
3661
4334
|
*/
|
|
3662
4335
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
3663
4336
|
const safeVersion = "1.3.0";
|
|
3664
|
-
const defaultAbi =
|
|
4337
|
+
const defaultAbi = import_types_kit29.compatibilityFallbackHandler_1_3_0_ContractArtifacts.abi;
|
|
3665
4338
|
super(
|
|
3666
4339
|
chainId,
|
|
3667
4340
|
safeProvider,
|
|
@@ -3676,7 +4349,7 @@ var CompatibilityFallbackHandlerContract_v1_3_0 = class extends CompatibilityFal
|
|
|
3676
4349
|
var CompatibilityFallbackHandlerContract_v1_3_0_default = CompatibilityFallbackHandlerContract_v1_3_0;
|
|
3677
4350
|
|
|
3678
4351
|
// src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.ts
|
|
3679
|
-
var
|
|
4352
|
+
var import_types_kit30 = require("@safe-global/types-kit");
|
|
3680
4353
|
var CompatibilityFallbackHandlerContract_v1_4_1 = class extends CompatibilityFallbackHandlerBaseContract_default {
|
|
3681
4354
|
/**
|
|
3682
4355
|
* Constructs an instance of CompatibilityFallbackHandlerContract_v1_4_1
|
|
@@ -3689,7 +4362,103 @@ var CompatibilityFallbackHandlerContract_v1_4_1 = class extends CompatibilityFal
|
|
|
3689
4362
|
*/
|
|
3690
4363
|
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
3691
4364
|
const safeVersion = "1.4.1";
|
|
3692
|
-
const defaultAbi =
|
|
4365
|
+
const defaultAbi = import_types_kit30.compatibilityFallbackHandler_1_4_1_ContractArtifacts.abi;
|
|
4366
|
+
super(
|
|
4367
|
+
chainId,
|
|
4368
|
+
safeProvider,
|
|
4369
|
+
defaultAbi,
|
|
4370
|
+
safeVersion,
|
|
4371
|
+
customContractAddress,
|
|
4372
|
+
customContractAbi,
|
|
4373
|
+
deploymentType
|
|
4374
|
+
);
|
|
4375
|
+
}
|
|
4376
|
+
};
|
|
4377
|
+
var CompatibilityFallbackHandlerContract_v1_4_1_default = CompatibilityFallbackHandlerContract_v1_4_1;
|
|
4378
|
+
|
|
4379
|
+
// src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.ts
|
|
4380
|
+
var import_types_kit31 = require("@safe-global/types-kit");
|
|
4381
|
+
var CompatibilityFallbackHandlerContract_v1_5_0 = class extends CompatibilityFallbackHandlerBaseContract_default {
|
|
4382
|
+
/**
|
|
4383
|
+
* Constructs an instance of CompatibilityFallbackHandlerContract_v1_5_0
|
|
4384
|
+
*
|
|
4385
|
+
* @param chainId - The chain ID where the contract resides.
|
|
4386
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
4387
|
+
* @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.
|
|
4388
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
4389
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
4390
|
+
*/
|
|
4391
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
4392
|
+
const safeVersion = "1.5.0";
|
|
4393
|
+
const defaultAbi = import_types_kit31.compatibilityFallbackHandler_1_5_0_ContractArtifacts.abi;
|
|
4394
|
+
super(
|
|
4395
|
+
chainId,
|
|
4396
|
+
safeProvider,
|
|
4397
|
+
defaultAbi,
|
|
4398
|
+
safeVersion,
|
|
4399
|
+
customContractAddress,
|
|
4400
|
+
customContractAbi,
|
|
4401
|
+
deploymentType
|
|
4402
|
+
);
|
|
4403
|
+
/**
|
|
4404
|
+
* New in v1.5.0: encodeTransactionData was moved from the Safe contract to CompatibilityFallbackHandler
|
|
4405
|
+
* to preserve backwards compatibility for existing integrations.
|
|
4406
|
+
* @param args - Array[to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, nonce]
|
|
4407
|
+
* @returns Array[encodedData]
|
|
4408
|
+
*/
|
|
4409
|
+
this.encodeTransactionData = async (args) => {
|
|
4410
|
+
return [await this.read("encodeTransactionData", args)];
|
|
4411
|
+
};
|
|
4412
|
+
}
|
|
4413
|
+
};
|
|
4414
|
+
var CompatibilityFallbackHandlerContract_v1_5_0_default = CompatibilityFallbackHandlerContract_v1_5_0;
|
|
4415
|
+
|
|
4416
|
+
// src/contracts/ExtensibleFallbackHandler/ExtensibleFallbackHandlerBaseContract.ts
|
|
4417
|
+
var ExtensibleFallbackHandlerBaseContract = class extends BaseContract_default {
|
|
4418
|
+
/**
|
|
4419
|
+
* @constructor
|
|
4420
|
+
* Constructs an instance of ExtensibleFallbackHandlerBaseContract.
|
|
4421
|
+
*
|
|
4422
|
+
* @param chainId - The chain ID of the contract.
|
|
4423
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
4424
|
+
* @param defaultAbi - The default ABI for the ExtensibleFallbackHandler contract. It should be compatible with the specific version of the contract.
|
|
4425
|
+
* @param safeVersion - The version of the Safe contract.
|
|
4426
|
+
* @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.
|
|
4427
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
|
|
4428
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
4429
|
+
*/
|
|
4430
|
+
constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
|
|
4431
|
+
const contractName3 = "extensibleFallbackHandler";
|
|
4432
|
+
super(
|
|
4433
|
+
contractName3,
|
|
4434
|
+
chainId,
|
|
4435
|
+
safeProvider,
|
|
4436
|
+
defaultAbi,
|
|
4437
|
+
safeVersion,
|
|
4438
|
+
customContractAddress,
|
|
4439
|
+
customContractAbi,
|
|
4440
|
+
deploymentType
|
|
4441
|
+
);
|
|
4442
|
+
this.contractName = contractName3;
|
|
4443
|
+
}
|
|
4444
|
+
};
|
|
4445
|
+
var ExtensibleFallbackHandlerBaseContract_default = ExtensibleFallbackHandlerBaseContract;
|
|
4446
|
+
|
|
4447
|
+
// src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.ts
|
|
4448
|
+
var import_types_kit32 = require("@safe-global/types-kit");
|
|
4449
|
+
var ExtensibleFallbackHandlerContract_v1_5_0 = class extends ExtensibleFallbackHandlerBaseContract_default {
|
|
4450
|
+
/**
|
|
4451
|
+
* Constructs an instance of ExtensibleFallbackHandlerContract_v1_5_0
|
|
4452
|
+
*
|
|
4453
|
+
* @param chainId - The chain ID where the contract resides.
|
|
4454
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
4455
|
+
* @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.
|
|
4456
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
4457
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
4458
|
+
*/
|
|
4459
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
4460
|
+
const safeVersion = "1.5.0";
|
|
4461
|
+
const defaultAbi = import_types_kit32.extensibleFallbackHandler_1_5_0_ContractArtifacts.abi;
|
|
3693
4462
|
super(
|
|
3694
4463
|
chainId,
|
|
3695
4464
|
safeProvider,
|
|
@@ -3699,9 +4468,130 @@ var CompatibilityFallbackHandlerContract_v1_4_1 = class extends CompatibilityFal
|
|
|
3699
4468
|
customContractAbi,
|
|
3700
4469
|
deploymentType
|
|
3701
4470
|
);
|
|
4471
|
+
// Read methods
|
|
4472
|
+
/**
|
|
4473
|
+
* @param args - Array[safe, domainSeparator]
|
|
4474
|
+
* @returns Array[verifier]
|
|
4475
|
+
*/
|
|
4476
|
+
this.domainVerifiers = async (args) => {
|
|
4477
|
+
return [await this.read("domainVerifiers", args)];
|
|
4478
|
+
};
|
|
4479
|
+
/**
|
|
4480
|
+
* @param args - Array[_hash, signature]
|
|
4481
|
+
* @returns Array[magic]
|
|
4482
|
+
*/
|
|
4483
|
+
this.isValidSignature = async (args) => {
|
|
4484
|
+
return [await this.read("isValidSignature", args)];
|
|
4485
|
+
};
|
|
4486
|
+
/**
|
|
4487
|
+
* @param args - Array[safe, interfaceId]
|
|
4488
|
+
* @returns Array[isSupported]
|
|
4489
|
+
*/
|
|
4490
|
+
this.safeInterfaces = async (args) => {
|
|
4491
|
+
return [await this.read("safeInterfaces", args)];
|
|
4492
|
+
};
|
|
4493
|
+
/**
|
|
4494
|
+
* @param args - Array[safe, selector]
|
|
4495
|
+
* @returns Array[handler]
|
|
4496
|
+
*/
|
|
4497
|
+
this.safeMethods = async (args) => {
|
|
4498
|
+
return [await this.read("safeMethods", args)];
|
|
4499
|
+
};
|
|
4500
|
+
/**
|
|
4501
|
+
* @param args - Array[interfaceId]
|
|
4502
|
+
* @returns Array[isSupported]
|
|
4503
|
+
*/
|
|
4504
|
+
this.supportsInterface = async (args) => {
|
|
4505
|
+
return [await this.read("supportsInterface", args)];
|
|
4506
|
+
};
|
|
4507
|
+
/**
|
|
4508
|
+
* @param args - Array[operator, from, tokenId, data]
|
|
4509
|
+
* @returns Array[bytes4]
|
|
4510
|
+
*/
|
|
4511
|
+
this.onERC721Received = async (args) => {
|
|
4512
|
+
return [await this.read("onERC721Received", args)];
|
|
4513
|
+
};
|
|
4514
|
+
/**
|
|
4515
|
+
* @param args - Array[operator, from, id, value, data]
|
|
4516
|
+
* @returns Array[bytes4]
|
|
4517
|
+
*/
|
|
4518
|
+
this.onERC1155Received = async (args) => {
|
|
4519
|
+
return [await this.read("onERC1155Received", args)];
|
|
4520
|
+
};
|
|
4521
|
+
/**
|
|
4522
|
+
* @param args - Array[operator, from, ids, values, data]
|
|
4523
|
+
* @returns Array[bytes4]
|
|
4524
|
+
*/
|
|
4525
|
+
this.onERC1155BatchReceived = async (args) => {
|
|
4526
|
+
return [await this.read("onERC1155BatchReceived", args)];
|
|
4527
|
+
};
|
|
4528
|
+
// Write methods (must be called via Safe transactions since msg.sender = Safe address)
|
|
4529
|
+
/**
|
|
4530
|
+
* @param args - Array[_interfaceId, handlerWithSelectors]
|
|
4531
|
+
*/
|
|
4532
|
+
this.addSupportedInterfaceBatch = async (args, options) => {
|
|
4533
|
+
if (options && !options.gasLimit) {
|
|
4534
|
+
options.gasLimit = Number(
|
|
4535
|
+
await this.estimateGas("addSupportedInterfaceBatch", args, { ...options })
|
|
4536
|
+
);
|
|
4537
|
+
}
|
|
4538
|
+
return toTxResult(
|
|
4539
|
+
this.runner,
|
|
4540
|
+
await this.write("addSupportedInterfaceBatch", args, options),
|
|
4541
|
+
options
|
|
4542
|
+
);
|
|
4543
|
+
};
|
|
4544
|
+
/**
|
|
4545
|
+
* @param args - Array[_interfaceId, selectors]
|
|
4546
|
+
*/
|
|
4547
|
+
this.removeSupportedInterfaceBatch = async (args, options) => {
|
|
4548
|
+
if (options && !options.gasLimit) {
|
|
4549
|
+
options.gasLimit = Number(
|
|
4550
|
+
await this.estimateGas("removeSupportedInterfaceBatch", args, { ...options })
|
|
4551
|
+
);
|
|
4552
|
+
}
|
|
4553
|
+
return toTxResult(
|
|
4554
|
+
this.runner,
|
|
4555
|
+
await this.write("removeSupportedInterfaceBatch", args, options),
|
|
4556
|
+
options
|
|
4557
|
+
);
|
|
4558
|
+
};
|
|
4559
|
+
/**
|
|
4560
|
+
* @param args - Array[domainSeparator, newVerifier]
|
|
4561
|
+
*/
|
|
4562
|
+
this.setDomainVerifier = async (args, options) => {
|
|
4563
|
+
if (options && !options.gasLimit) {
|
|
4564
|
+
options.gasLimit = Number(await this.estimateGas("setDomainVerifier", args, { ...options }));
|
|
4565
|
+
}
|
|
4566
|
+
return toTxResult(this.runner, await this.write("setDomainVerifier", args, options), options);
|
|
4567
|
+
};
|
|
4568
|
+
/**
|
|
4569
|
+
* @param args - Array[selector, newMethod]
|
|
4570
|
+
*/
|
|
4571
|
+
this.setSafeMethod = async (args, options) => {
|
|
4572
|
+
if (options && !options.gasLimit) {
|
|
4573
|
+
options.gasLimit = Number(await this.estimateGas("setSafeMethod", args, { ...options }));
|
|
4574
|
+
}
|
|
4575
|
+
return toTxResult(this.runner, await this.write("setSafeMethod", args, options), options);
|
|
4576
|
+
};
|
|
4577
|
+
/**
|
|
4578
|
+
* @param args - Array[interfaceId, supported]
|
|
4579
|
+
*/
|
|
4580
|
+
this.setSupportedInterface = async (args, options) => {
|
|
4581
|
+
if (options && !options.gasLimit) {
|
|
4582
|
+
options.gasLimit = Number(
|
|
4583
|
+
await this.estimateGas("setSupportedInterface", args, { ...options })
|
|
4584
|
+
);
|
|
4585
|
+
}
|
|
4586
|
+
return toTxResult(
|
|
4587
|
+
this.runner,
|
|
4588
|
+
await this.write("setSupportedInterface", args, options),
|
|
4589
|
+
options
|
|
4590
|
+
);
|
|
4591
|
+
};
|
|
3702
4592
|
}
|
|
3703
4593
|
};
|
|
3704
|
-
var
|
|
4594
|
+
var ExtensibleFallbackHandlerContract_v1_5_0_default = ExtensibleFallbackHandlerContract_v1_5_0;
|
|
3705
4595
|
|
|
3706
4596
|
// src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.ts
|
|
3707
4597
|
var SafeWebAuthnSignerFactoryBaseContract = class extends BaseContract_default {
|
|
@@ -3735,7 +4625,7 @@ var SafeWebAuthnSignerFactoryBaseContract = class extends BaseContract_default {
|
|
|
3735
4625
|
var SafeWebAuthnSignerFactoryBaseContract_default = SafeWebAuthnSignerFactoryBaseContract;
|
|
3736
4626
|
|
|
3737
4627
|
// src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.ts
|
|
3738
|
-
var
|
|
4628
|
+
var import_types_kit33 = require("@safe-global/types-kit");
|
|
3739
4629
|
var SafeWebAuthnSignerFactoryContract_v0_2_1 = class extends SafeWebAuthnSignerFactoryBaseContract_default {
|
|
3740
4630
|
/**
|
|
3741
4631
|
* Constructs an instance of SafeWebAuthnSignerFactoryContract_v0_2_1
|
|
@@ -3748,7 +4638,7 @@ var SafeWebAuthnSignerFactoryContract_v0_2_1 = class extends SafeWebAuthnSignerF
|
|
|
3748
4638
|
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
3749
4639
|
*/
|
|
3750
4640
|
constructor(chainId, safeProvider, safeVersion, customContractAddress, customContractAbi, deploymentType) {
|
|
3751
|
-
const defaultAbi =
|
|
4641
|
+
const defaultAbi = import_types_kit33.SafeWebAuthnSignerFactory_0_2_1_ContractArtifacts.abi;
|
|
3752
4642
|
super(
|
|
3753
4643
|
chainId,
|
|
3754
4644
|
safeProvider,
|
|
@@ -3813,7 +4703,7 @@ var SafeWebAuthnSharedSignerBaseContract = class extends BaseContract_default {
|
|
|
3813
4703
|
var SafeWebAuthnSharedSignerBaseContract_default = SafeWebAuthnSharedSignerBaseContract;
|
|
3814
4704
|
|
|
3815
4705
|
// src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.ts
|
|
3816
|
-
var
|
|
4706
|
+
var import_types_kit34 = require("@safe-global/types-kit");
|
|
3817
4707
|
var SafeWebAuthnSharedSignerContract_v0_2_1 = class extends SafeWebAuthnSharedSignerBaseContract_default {
|
|
3818
4708
|
/**
|
|
3819
4709
|
* Constructs an instance of SafeWebAuthnSharedSignerContract_v0_2_1
|
|
@@ -3826,7 +4716,7 @@ var SafeWebAuthnSharedSignerContract_v0_2_1 = class extends SafeWebAuthnSharedSi
|
|
|
3826
4716
|
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
3827
4717
|
*/
|
|
3828
4718
|
constructor(chainId, safeProvider, safeVersion, customContractAddress, customContractAbi, deploymentType) {
|
|
3829
|
-
const defaultAbi =
|
|
4719
|
+
const defaultAbi = import_types_kit34.SafeWebAuthnSharedSigner_0_2_1_ContractArtifacts.abi;
|
|
3830
4720
|
super(
|
|
3831
4721
|
chainId,
|
|
3832
4722
|
safeProvider,
|
|
@@ -3871,6 +4761,16 @@ async function getSafeContractInstance(safeVersion, safeProvider, contractAddres
|
|
|
3871
4761
|
const chainId = await safeProvider.getChainId();
|
|
3872
4762
|
let safeContractInstance;
|
|
3873
4763
|
switch (safeVersion) {
|
|
4764
|
+
case "1.5.0":
|
|
4765
|
+
safeContractInstance = new SafeContract_v1_5_0_default(
|
|
4766
|
+
chainId,
|
|
4767
|
+
safeProvider,
|
|
4768
|
+
isL1SafeSingleton,
|
|
4769
|
+
contractAddress,
|
|
4770
|
+
customContractAbi,
|
|
4771
|
+
deploymentType
|
|
4772
|
+
);
|
|
4773
|
+
break;
|
|
3874
4774
|
case "1.4.1":
|
|
3875
4775
|
safeContractInstance = new SafeContract_v1_4_1_default(
|
|
3876
4776
|
chainId,
|
|
@@ -3931,6 +4831,15 @@ async function getCompatibilityFallbackHandlerContractInstance(safeVersion, safe
|
|
|
3931
4831
|
const chainId = await safeProvider.getChainId();
|
|
3932
4832
|
let compatibilityFallbackHandlerInstance;
|
|
3933
4833
|
switch (safeVersion) {
|
|
4834
|
+
case "1.5.0":
|
|
4835
|
+
compatibilityFallbackHandlerInstance = new CompatibilityFallbackHandlerContract_v1_5_0_default(
|
|
4836
|
+
chainId,
|
|
4837
|
+
safeProvider,
|
|
4838
|
+
contractAddress,
|
|
4839
|
+
customContractAbi,
|
|
4840
|
+
deploymentType
|
|
4841
|
+
);
|
|
4842
|
+
break;
|
|
3934
4843
|
case "1.4.1":
|
|
3935
4844
|
compatibilityFallbackHandlerInstance = new CompatibilityFallbackHandlerContract_v1_4_1_default(
|
|
3936
4845
|
chainId,
|
|
@@ -3961,6 +4870,15 @@ async function getMultiSendContractInstance(safeVersion, safeProvider, contractA
|
|
|
3961
4870
|
const chainId = await safeProvider.getChainId();
|
|
3962
4871
|
let multiSendContractInstance;
|
|
3963
4872
|
switch (safeVersion) {
|
|
4873
|
+
case "1.5.0":
|
|
4874
|
+
multiSendContractInstance = new MultiSendContract_v1_5_0_default(
|
|
4875
|
+
chainId,
|
|
4876
|
+
safeProvider,
|
|
4877
|
+
contractAddress,
|
|
4878
|
+
customContractAbi,
|
|
4879
|
+
deploymentType
|
|
4880
|
+
);
|
|
4881
|
+
break;
|
|
3964
4882
|
case "1.4.1":
|
|
3965
4883
|
multiSendContractInstance = new MultiSendContract_v1_4_1_default(
|
|
3966
4884
|
chainId,
|
|
@@ -4000,6 +4918,15 @@ async function getMultiSendCallOnlyContractInstance(safeVersion, safeProvider, c
|
|
|
4000
4918
|
const chainId = await safeProvider.getChainId();
|
|
4001
4919
|
let multiSendCallOnlyContractInstance;
|
|
4002
4920
|
switch (safeVersion) {
|
|
4921
|
+
case "1.5.0":
|
|
4922
|
+
multiSendCallOnlyContractInstance = new MultiSendCallOnlyContract_v1_5_0_default(
|
|
4923
|
+
chainId,
|
|
4924
|
+
safeProvider,
|
|
4925
|
+
contractAddress,
|
|
4926
|
+
customContractAbi,
|
|
4927
|
+
deploymentType
|
|
4928
|
+
);
|
|
4929
|
+
break;
|
|
4003
4930
|
case "1.4.1":
|
|
4004
4931
|
multiSendCallOnlyContractInstance = new MultiSendCallOnlyContract_v1_4_1_default(
|
|
4005
4932
|
chainId,
|
|
@@ -4031,6 +4958,15 @@ async function getSafeProxyFactoryContractInstance(safeVersion, safeProvider, co
|
|
|
4031
4958
|
const chainId = await safeProvider.getChainId();
|
|
4032
4959
|
let safeProxyFactoryContractInstance;
|
|
4033
4960
|
switch (safeVersion) {
|
|
4961
|
+
case "1.5.0":
|
|
4962
|
+
safeProxyFactoryContractInstance = new SafeProxyFactoryContract_v1_5_0_default(
|
|
4963
|
+
chainId,
|
|
4964
|
+
safeProvider,
|
|
4965
|
+
contractAddress,
|
|
4966
|
+
customContractAbi,
|
|
4967
|
+
deploymentType
|
|
4968
|
+
);
|
|
4969
|
+
break;
|
|
4034
4970
|
case "1.4.1":
|
|
4035
4971
|
safeProxyFactoryContractInstance = new SafeProxyFactoryContract_v1_4_1_default(
|
|
4036
4972
|
chainId,
|
|
@@ -4078,6 +5014,15 @@ async function getSignMessageLibContractInstance(safeVersion, safeProvider, cont
|
|
|
4078
5014
|
const chainId = await safeProvider.getChainId();
|
|
4079
5015
|
let signMessageLibContractInstance;
|
|
4080
5016
|
switch (safeVersion) {
|
|
5017
|
+
case "1.5.0":
|
|
5018
|
+
signMessageLibContractInstance = new SignMessageLibContract_v1_5_0_default(
|
|
5019
|
+
chainId,
|
|
5020
|
+
safeProvider,
|
|
5021
|
+
contractAddress,
|
|
5022
|
+
customContractAbi,
|
|
5023
|
+
deploymentType
|
|
5024
|
+
);
|
|
5025
|
+
break;
|
|
4081
5026
|
case "1.4.1":
|
|
4082
5027
|
signMessageLibContractInstance = new SignMessageLibContract_v1_4_1_default(
|
|
4083
5028
|
chainId,
|
|
@@ -4106,6 +5051,15 @@ async function getCreateCallContractInstance(safeVersion, safeProvider, contract
|
|
|
4106
5051
|
const chainId = await safeProvider.getChainId();
|
|
4107
5052
|
let createCallContractInstance;
|
|
4108
5053
|
switch (safeVersion) {
|
|
5054
|
+
case "1.5.0":
|
|
5055
|
+
createCallContractInstance = new CreateCallContract_v1_5_0_default(
|
|
5056
|
+
chainId,
|
|
5057
|
+
safeProvider,
|
|
5058
|
+
contractAddress,
|
|
5059
|
+
customContractAbi,
|
|
5060
|
+
deploymentType
|
|
5061
|
+
);
|
|
5062
|
+
break;
|
|
4109
5063
|
case "1.4.1":
|
|
4110
5064
|
createCallContractInstance = new CreateCallContract_v1_4_1_default(
|
|
4111
5065
|
chainId,
|
|
@@ -4137,6 +5091,15 @@ async function getSimulateTxAccessorContractInstance(safeVersion, safeProvider,
|
|
|
4137
5091
|
const chainId = await safeProvider.getChainId();
|
|
4138
5092
|
let simulateTxAccessorContractInstance;
|
|
4139
5093
|
switch (safeVersion) {
|
|
5094
|
+
case "1.5.0":
|
|
5095
|
+
simulateTxAccessorContractInstance = new SimulateTxAccessorContract_v1_5_0_default(
|
|
5096
|
+
chainId,
|
|
5097
|
+
safeProvider,
|
|
5098
|
+
contractAddress,
|
|
5099
|
+
customContractAbi,
|
|
5100
|
+
deploymentType
|
|
5101
|
+
);
|
|
5102
|
+
break;
|
|
4140
5103
|
case "1.4.1":
|
|
4141
5104
|
simulateTxAccessorContractInstance = new SimulateTxAccessorContract_v1_4_1_default(
|
|
4142
5105
|
chainId,
|
|
@@ -4164,6 +5127,7 @@ async function getSimulateTxAccessorContractInstance(safeVersion, safeProvider,
|
|
|
4164
5127
|
async function getSafeWebAuthnSignerFactoryContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
|
|
4165
5128
|
const chainId = await safeProvider.getChainId();
|
|
4166
5129
|
switch (safeVersion) {
|
|
5130
|
+
case "1.5.0":
|
|
4167
5131
|
case "1.4.1":
|
|
4168
5132
|
case "1.3.0":
|
|
4169
5133
|
const safeWebAuthnSignerFactoryContractInstance = new SafeWebAuthnSignerFactoryContract_v0_2_1_default(
|
|
@@ -4183,6 +5147,7 @@ async function getSafeWebAuthnSignerFactoryContractInstance(safeVersion, safePro
|
|
|
4183
5147
|
async function getSafeWebAuthnSharedSignerContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
|
|
4184
5148
|
const chainId = await safeProvider.getChainId();
|
|
4185
5149
|
switch (safeVersion) {
|
|
5150
|
+
case "1.5.0":
|
|
4186
5151
|
case "1.4.1":
|
|
4187
5152
|
case "1.3.0":
|
|
4188
5153
|
const safeWebAuthnSharedSignerContractInstance = new SafeWebAuthnSharedSignerContract_v0_2_1_default(
|
|
@@ -4199,6 +5164,23 @@ async function getSafeWebAuthnSharedSignerContractInstance(safeVersion, safeProv
|
|
|
4199
5164
|
throw new Error("Invalid Safe version");
|
|
4200
5165
|
}
|
|
4201
5166
|
}
|
|
5167
|
+
async function getExtensibleFallbackHandlerContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
|
|
5168
|
+
const chainId = await safeProvider.getChainId();
|
|
5169
|
+
switch (safeVersion) {
|
|
5170
|
+
case "1.5.0":
|
|
5171
|
+
const extensibleFallbackHandlerContractInstance = new ExtensibleFallbackHandlerContract_v1_5_0_default(
|
|
5172
|
+
chainId,
|
|
5173
|
+
safeProvider,
|
|
5174
|
+
contractAddress,
|
|
5175
|
+
customContractAbi,
|
|
5176
|
+
deploymentType
|
|
5177
|
+
);
|
|
5178
|
+
await extensibleFallbackHandlerContractInstance.init();
|
|
5179
|
+
return extensibleFallbackHandlerContractInstance;
|
|
5180
|
+
default:
|
|
5181
|
+
throw new Error("Invalid Safe version");
|
|
5182
|
+
}
|
|
5183
|
+
}
|
|
4202
5184
|
|
|
4203
5185
|
// src/contracts/safeDeploymentContracts.ts
|
|
4204
5186
|
async function getSafeContract({
|
|
@@ -4408,6 +5390,27 @@ async function getSafeWebAuthnSharedSignerContract({
|
|
|
4408
5390
|
}
|
|
4409
5391
|
return safeWebAuthnSharedSignerContract;
|
|
4410
5392
|
}
|
|
5393
|
+
async function getExtensibleFallbackHandlerContract({
|
|
5394
|
+
safeProvider,
|
|
5395
|
+
safeVersion,
|
|
5396
|
+
customContracts,
|
|
5397
|
+
deploymentType
|
|
5398
|
+
}) {
|
|
5399
|
+
const extensibleFallbackHandlerContract = await getExtensibleFallbackHandlerContractInstance(
|
|
5400
|
+
safeVersion,
|
|
5401
|
+
safeProvider,
|
|
5402
|
+
customContracts?.extensibleFallbackHandlerAddress,
|
|
5403
|
+
customContracts?.extensibleFallbackHandlerAbi,
|
|
5404
|
+
deploymentType
|
|
5405
|
+
);
|
|
5406
|
+
const isContractDeployed = await safeProvider.isContractDeployed(
|
|
5407
|
+
extensibleFallbackHandlerContract.getAddress()
|
|
5408
|
+
);
|
|
5409
|
+
if (!isContractDeployed) {
|
|
5410
|
+
throw new Error("ExtensibleFallbackHandler contract is not deployed on the current network");
|
|
5411
|
+
}
|
|
5412
|
+
return extensibleFallbackHandlerContract;
|
|
5413
|
+
}
|
|
4411
5414
|
|
|
4412
5415
|
// src/utils/transactions/gas.ts
|
|
4413
5416
|
var CALL_DATA_ZERO_BYTE_GAS_COST = 4;
|
|
@@ -4473,7 +5476,7 @@ async function estimateTxGas(safeContract, safeProvider, to, valueInWei, data, o
|
|
|
4473
5476
|
});
|
|
4474
5477
|
return estimateGas3;
|
|
4475
5478
|
} catch (error) {
|
|
4476
|
-
if (operation ===
|
|
5479
|
+
if (operation === import_types_kit35.OperationType.DelegateCall) {
|
|
4477
5480
|
return "0";
|
|
4478
5481
|
}
|
|
4479
5482
|
return Promise.reject(error);
|
|
@@ -4697,14 +5700,14 @@ var EthSafeTransaction = class {
|
|
|
4697
5700
|
var SafeTransaction_default = EthSafeTransaction;
|
|
4698
5701
|
|
|
4699
5702
|
// src/utils/transactions/utils.ts
|
|
4700
|
-
var
|
|
5703
|
+
var import_types_kit36 = require("@safe-global/types-kit");
|
|
4701
5704
|
var import_satisfies5 = __toESM(require("semver/functions/satisfies.js"));
|
|
4702
5705
|
var import_viem9 = require("viem");
|
|
4703
|
-
var
|
|
5706
|
+
var import_actions8 = require("viem/actions");
|
|
4704
5707
|
function standardizeMetaTransactionData(tx) {
|
|
4705
5708
|
const standardizedTxs = {
|
|
4706
5709
|
...tx,
|
|
4707
|
-
operation: tx.operation ??
|
|
5710
|
+
operation: tx.operation ?? import_types_kit36.OperationType.Call
|
|
4708
5711
|
};
|
|
4709
5712
|
return standardizedTxs;
|
|
4710
5713
|
}
|
|
@@ -4719,7 +5722,7 @@ async function standardizeSafeTransactionData({
|
|
|
4719
5722
|
to: tx.to,
|
|
4720
5723
|
value: tx.value,
|
|
4721
5724
|
data: tx.data,
|
|
4722
|
-
operation: tx.operation ??
|
|
5725
|
+
operation: tx.operation ?? import_types_kit36.OperationType.Call,
|
|
4723
5726
|
baseGas: tx.baseGas ?? "0",
|
|
4724
5727
|
gasPrice: tx.gasPrice ?? "0",
|
|
4725
5728
|
gasToken: tx.gasToken || ZERO_ADDRESS,
|
|
@@ -4784,7 +5787,7 @@ function encodeMetaTransaction(tx) {
|
|
|
4784
5787
|
const encoded = (0, import_viem9.encodePacked)(
|
|
4785
5788
|
["uint8", "address", "uint256", "uint256", "bytes"],
|
|
4786
5789
|
[
|
|
4787
|
-
tx.operation ??
|
|
5790
|
+
tx.operation ?? import_types_kit36.OperationType.Call,
|
|
4788
5791
|
tx.to,
|
|
4789
5792
|
BigInt(tx.value),
|
|
4790
5793
|
BigInt(data.length),
|
|
@@ -4796,6 +5799,32 @@ function encodeMetaTransaction(tx) {
|
|
|
4796
5799
|
function encodeMultiSendData(txs) {
|
|
4797
5800
|
return `0x${txs.map((tx) => encodeMetaTransaction(tx)).join("")}`;
|
|
4798
5801
|
}
|
|
5802
|
+
function decodeMultiSendData(encodedData) {
|
|
5803
|
+
const decodedData = (0, import_viem9.decodeFunctionData)({
|
|
5804
|
+
abi: (0, import_viem9.parseAbi)(["function multiSend(bytes memory transactions) public payable"]),
|
|
5805
|
+
data: asHex(encodedData)
|
|
5806
|
+
});
|
|
5807
|
+
const args = decodedData.args;
|
|
5808
|
+
const txs = [];
|
|
5809
|
+
let index = 2;
|
|
5810
|
+
if (args) {
|
|
5811
|
+
const [transactionBytes] = args;
|
|
5812
|
+
while (index < transactionBytes.length) {
|
|
5813
|
+
const operation = `0x${transactionBytes.slice(index, index += 2)}`;
|
|
5814
|
+
const to = `0x${transactionBytes.slice(index, index += 40)}`;
|
|
5815
|
+
const value = `0x${transactionBytes.slice(index, index += 64)}`;
|
|
5816
|
+
const dataLength = parseInt(`${transactionBytes.slice(index, index += 64)}`, 16) * 2;
|
|
5817
|
+
const data = `0x${transactionBytes.slice(index, index += dataLength)}`;
|
|
5818
|
+
txs.push({
|
|
5819
|
+
operation: Number(operation),
|
|
5820
|
+
to: (0, import_viem9.getAddress)(to),
|
|
5821
|
+
value: BigInt(value).toString(),
|
|
5822
|
+
data
|
|
5823
|
+
});
|
|
5824
|
+
}
|
|
5825
|
+
}
|
|
5826
|
+
return txs;
|
|
5827
|
+
}
|
|
4799
5828
|
function isSafeMultisigTransactionResponse(safeTransaction) {
|
|
4800
5829
|
return safeTransaction.isExecuted !== void 0;
|
|
4801
5830
|
}
|
|
@@ -4874,7 +5903,7 @@ function createTxOptions(options) {
|
|
|
4874
5903
|
}
|
|
4875
5904
|
function hasDelegateCalls(transactions) {
|
|
4876
5905
|
return transactions.some(
|
|
4877
|
-
(transaction) => transaction.operation && transaction.operation ===
|
|
5906
|
+
(transaction) => transaction.operation && transaction.operation === import_types_kit36.OperationType.DelegateCall
|
|
4878
5907
|
);
|
|
4879
5908
|
}
|
|
4880
5909
|
|
|
@@ -4990,18 +6019,18 @@ async function extractPasskeyData(passkeyCredential) {
|
|
|
4990
6019
|
coordinates
|
|
4991
6020
|
};
|
|
4992
6021
|
}
|
|
4993
|
-
function
|
|
4994
|
-
const
|
|
6022
|
+
function getP256VerifierAddress(chainId) {
|
|
6023
|
+
const deployment = (0, import_safe_modules_deployments2.getDaimoP256VerifierDeployment)({
|
|
4995
6024
|
version: "0.2.1",
|
|
4996
6025
|
released: true,
|
|
4997
6026
|
network: chainId
|
|
4998
6027
|
});
|
|
4999
|
-
if (!
|
|
5000
|
-
throw new Error(`Failed to load
|
|
6028
|
+
if (!deployment) {
|
|
6029
|
+
throw new Error(`Failed to load DaimoP256Verifier deployment for chain ID ${chainId}`);
|
|
5001
6030
|
}
|
|
5002
|
-
const verifierAddress =
|
|
6031
|
+
const verifierAddress = deployment.networkAddresses[chainId];
|
|
5003
6032
|
if (!verifierAddress) {
|
|
5004
|
-
throw new Error(`
|
|
6033
|
+
throw new Error(`DaimoP256Verifier address not found for chain ID ${chainId}`);
|
|
5005
6034
|
}
|
|
5006
6035
|
return verifierAddress;
|
|
5007
6036
|
}
|
|
@@ -5010,15 +6039,14 @@ function getDefaultFCLP256VerifierAddress(chainId) {
|
|
|
5010
6039
|
var import_viem10 = require("viem");
|
|
5011
6040
|
|
|
5012
6041
|
// src/utils/passkeys/isSharedSigner.ts
|
|
5013
|
-
async function isSharedSigner(passkey, safeWebAuthnSharedSignerContract, safeAddress, owners
|
|
6042
|
+
async function isSharedSigner(passkey, safeWebAuthnSharedSignerContract, safeAddress, owners) {
|
|
5014
6043
|
const sharedSignerContractAddress = safeWebAuthnSharedSignerContract.contractAddress;
|
|
5015
6044
|
if (safeAddress && owners.includes(sharedSignerContractAddress)) {
|
|
5016
6045
|
const [sharedSignerSlot] = await safeWebAuthnSharedSignerContract.getConfiguration([
|
|
5017
6046
|
asHex(safeAddress)
|
|
5018
6047
|
]);
|
|
5019
6048
|
const { x, y, verifiers } = sharedSignerSlot;
|
|
5020
|
-
const
|
|
5021
|
-
const isSharedSigner2 = BigInt(passkey.coordinates.x) === x && BigInt(passkey.coordinates.y) === y && BigInt(verifierAddress) === verifiers;
|
|
6049
|
+
const isSharedSigner2 = BigInt(passkey.coordinates.x) === x && BigInt(passkey.coordinates.y) === y && BigInt(passkey.verifierAddress) === verifiers;
|
|
5022
6050
|
return isSharedSigner2;
|
|
5023
6051
|
}
|
|
5024
6052
|
return false;
|
|
@@ -5054,16 +6082,14 @@ var signTransaction = () => {
|
|
|
5054
6082
|
var signTypedData = () => {
|
|
5055
6083
|
throw new Error("Passkey Signers cannot sign signTypedData, they can only sign data.");
|
|
5056
6084
|
};
|
|
5057
|
-
var createPasskeyClient = async (passkey, safeWebAuthnSignerFactoryContract, safeWebAuthnSharedSignerContract, provider, safeAddress, owners
|
|
5058
|
-
const { rawId, coordinates,
|
|
6085
|
+
var createPasskeyClient = async (passkey, safeWebAuthnSignerFactoryContract, safeWebAuthnSharedSignerContract, provider, safeAddress, owners) => {
|
|
6086
|
+
const { rawId, coordinates, verifierAddress } = passkey;
|
|
5059
6087
|
const passkeyRawId = (0, import_viem10.hexToBytes)(asHex(rawId));
|
|
5060
|
-
const verifierAddress = customVerifierAddress || getDefaultFCLP256VerifierAddress(chainId);
|
|
5061
6088
|
const isPasskeySharedSigner = await isSharedSigner_default(
|
|
5062
6089
|
passkey,
|
|
5063
6090
|
safeWebAuthnSharedSignerContract,
|
|
5064
6091
|
safeAddress,
|
|
5065
|
-
owners
|
|
5066
|
-
chainId
|
|
6092
|
+
owners
|
|
5067
6093
|
);
|
|
5068
6094
|
let signerAddress;
|
|
5069
6095
|
if (isPasskeySharedSigner) {
|
|
@@ -5203,7 +6229,7 @@ function blockTag(blockTag2) {
|
|
|
5203
6229
|
// src/SafeProvider.ts
|
|
5204
6230
|
var import_viem12 = require("viem");
|
|
5205
6231
|
var import_accounts = require("viem/accounts");
|
|
5206
|
-
var
|
|
6232
|
+
var import_actions9 = require("viem/actions");
|
|
5207
6233
|
|
|
5208
6234
|
// src/utils/provider.ts
|
|
5209
6235
|
var import_viem11 = require("viem");
|
|
@@ -5267,8 +6293,7 @@ var SafeProvider = class _SafeProvider {
|
|
|
5267
6293
|
safeWebAuthnSharedSignerContract,
|
|
5268
6294
|
safeProvider.getExternalProvider(),
|
|
5269
6295
|
safeAddress || "",
|
|
5270
|
-
owners || []
|
|
5271
|
-
chainId.toString()
|
|
6296
|
+
owners || []
|
|
5272
6297
|
);
|
|
5273
6298
|
} else {
|
|
5274
6299
|
passkeySigner = signer;
|
|
@@ -5334,13 +6359,13 @@ var SafeProvider = class _SafeProvider {
|
|
|
5334
6359
|
return validateEip3770Address(fullAddress, chainId);
|
|
5335
6360
|
}
|
|
5336
6361
|
async getBalance(address, blockTag2) {
|
|
5337
|
-
return (0,
|
|
6362
|
+
return (0, import_actions9.getBalance)(this.#externalProvider, {
|
|
5338
6363
|
address,
|
|
5339
6364
|
...asBlockId(blockTag2)
|
|
5340
6365
|
});
|
|
5341
6366
|
}
|
|
5342
6367
|
async getNonce(address, blockTag2) {
|
|
5343
|
-
return (0,
|
|
6368
|
+
return (0, import_actions9.getTransactionCount)(this.#externalProvider, {
|
|
5344
6369
|
address,
|
|
5345
6370
|
...asBlockId(blockTag2)
|
|
5346
6371
|
});
|
|
@@ -5353,21 +6378,21 @@ var SafeProvider = class _SafeProvider {
|
|
|
5353
6378
|
return (0, import_viem12.getAddress)(address);
|
|
5354
6379
|
}
|
|
5355
6380
|
async getContractCode(address, blockTag2) {
|
|
5356
|
-
const res = await (0,
|
|
6381
|
+
const res = await (0, import_actions9.getCode)(this.#externalProvider, {
|
|
5357
6382
|
address,
|
|
5358
6383
|
...asBlockId(blockTag2)
|
|
5359
6384
|
});
|
|
5360
6385
|
return res ?? "0x";
|
|
5361
6386
|
}
|
|
5362
6387
|
async isContractDeployed(address, blockTag2) {
|
|
5363
|
-
const contractCode = await (0,
|
|
6388
|
+
const contractCode = await (0, import_actions9.getCode)(this.#externalProvider, {
|
|
5364
6389
|
address,
|
|
5365
6390
|
...asBlockId(blockTag2)
|
|
5366
6391
|
});
|
|
5367
6392
|
return !!contractCode;
|
|
5368
6393
|
}
|
|
5369
6394
|
async getStorageAt(address, position) {
|
|
5370
|
-
const content = await (0,
|
|
6395
|
+
const content = await (0, import_actions9.getStorageAt)(this.#externalProvider, {
|
|
5371
6396
|
address,
|
|
5372
6397
|
slot: asHex(position)
|
|
5373
6398
|
});
|
|
@@ -5375,7 +6400,7 @@ var SafeProvider = class _SafeProvider {
|
|
|
5375
6400
|
return decodedContent[0];
|
|
5376
6401
|
}
|
|
5377
6402
|
async getTransaction(transactionHash) {
|
|
5378
|
-
return (0,
|
|
6403
|
+
return (0, import_actions9.getTransaction)(this.#externalProvider, {
|
|
5379
6404
|
hash: asHash(transactionHash)
|
|
5380
6405
|
});
|
|
5381
6406
|
}
|
|
@@ -5422,18 +6447,18 @@ var SafeProvider = class _SafeProvider {
|
|
|
5422
6447
|
}
|
|
5423
6448
|
async estimateGas(transaction) {
|
|
5424
6449
|
const converted = toEstimateGasParameters(transaction);
|
|
5425
|
-
return (await (0,
|
|
6450
|
+
return (await (0, import_actions9.estimateGas)(this.#externalProvider, converted)).toString();
|
|
5426
6451
|
}
|
|
5427
6452
|
async call(transaction, blockTag2) {
|
|
5428
6453
|
const converted = toTransactionRequest(transaction);
|
|
5429
|
-
const { data } = await (0,
|
|
6454
|
+
const { data } = await (0, import_actions9.call)(this.#externalProvider, {
|
|
5430
6455
|
...converted,
|
|
5431
6456
|
...asBlockId(blockTag2)
|
|
5432
6457
|
});
|
|
5433
6458
|
return data ?? "0x";
|
|
5434
6459
|
}
|
|
5435
6460
|
async readContract(args) {
|
|
5436
|
-
return (0,
|
|
6461
|
+
return (0, import_actions9.readContract)(this.#externalProvider, args);
|
|
5437
6462
|
}
|
|
5438
6463
|
// TODO: fix anys
|
|
5439
6464
|
encodeParameters(types, values) {
|
|
@@ -5716,7 +6741,7 @@ async function predictSafeAddress({
|
|
|
5716
6741
|
const salt = (0, import_viem13.keccak256)((0, import_viem13.concat)([initializerHash, encodedNonce]));
|
|
5717
6742
|
const input = safeProvider.encodeParameters("address", [safeContract.getAddress()]);
|
|
5718
6743
|
const from = safeProxyFactoryContract.getAddress();
|
|
5719
|
-
const isZkSyncChain = [ZKSYNC_MAINNET, ZKSYNC_TESTNET, ZKSYNC_LENS].includes(chainId);
|
|
6744
|
+
const isZkSyncChain = [ZKSYNC_MAINNET, ZKSYNC_TESTNET, ZKSYNC_LENS].includes(chainId) && (0, import_satisfies6.default)(safeVersion, "<=1.4.1");
|
|
5720
6745
|
if (isZkSyncChain) {
|
|
5721
6746
|
const proxyAddress2 = zkSyncCreate2Address(from, safeVersion, salt, asHex(input));
|
|
5722
6747
|
return safeProvider.getChecksummedAddress(proxyAddress2);
|
|
@@ -5781,7 +6806,7 @@ function toTxResult(runner, hash, options) {
|
|
|
5781
6806
|
hash,
|
|
5782
6807
|
options,
|
|
5783
6808
|
transactionResponse: {
|
|
5784
|
-
wait: async () => (0,
|
|
6809
|
+
wait: async () => (0, import_actions10.waitForTransactionReceipt)(runner, { hash })
|
|
5785
6810
|
}
|
|
5786
6811
|
};
|
|
5787
6812
|
}
|
|
@@ -5894,6 +6919,10 @@ var FallbackHandlerManager = class {
|
|
|
5894
6919
|
}
|
|
5895
6920
|
return this.#safeContract;
|
|
5896
6921
|
}
|
|
6922
|
+
encodeSetFallbackHandler(safeContract, handler) {
|
|
6923
|
+
const encode = safeContract.encode;
|
|
6924
|
+
return encode("setFallbackHandler", [asHex(handler)]);
|
|
6925
|
+
}
|
|
5897
6926
|
async getFallbackHandler() {
|
|
5898
6927
|
const safeContract = await this.isFallbackHandlerCompatible();
|
|
5899
6928
|
return this.#safeProvider.getStorageAt(safeContract.getAddress(), this.#slot);
|
|
@@ -5903,13 +6932,13 @@ var FallbackHandlerManager = class {
|
|
|
5903
6932
|
this.validateFallbackHandlerAddress(fallbackHandlerAddress);
|
|
5904
6933
|
const currentFallbackHandler = await this.getFallbackHandler();
|
|
5905
6934
|
this.validateFallbackHandlerIsNotEnabled(currentFallbackHandler, fallbackHandlerAddress);
|
|
5906
|
-
return
|
|
6935
|
+
return this.encodeSetFallbackHandler(safeContract, fallbackHandlerAddress);
|
|
5907
6936
|
}
|
|
5908
6937
|
async encodeDisableFallbackHandlerData() {
|
|
5909
6938
|
const safeContract = await this.isFallbackHandlerCompatible();
|
|
5910
6939
|
const currentFallbackHandler = await this.getFallbackHandler();
|
|
5911
6940
|
this.validateFallbackHandlerIsEnabled(currentFallbackHandler);
|
|
5912
|
-
return
|
|
6941
|
+
return this.encodeSetFallbackHandler(safeContract, ZERO_ADDRESS);
|
|
5913
6942
|
}
|
|
5914
6943
|
};
|
|
5915
6944
|
var fallbackHandlerManager_default = FallbackHandlerManager;
|
|
@@ -5976,6 +7005,8 @@ var guardManager_default = GuardManager;
|
|
|
5976
7005
|
var ModuleManager = class {
|
|
5977
7006
|
#safeProvider;
|
|
5978
7007
|
#safeContract;
|
|
7008
|
+
// keccak256("module_manager.module_guard.address")
|
|
7009
|
+
#moduleGuardSlot = "0xb104e0b93118902c651344349b610029d694cfdec91c589c91ebafbcd0289947";
|
|
5979
7010
|
constructor(safeProvider, safeContract) {
|
|
5980
7011
|
this.#safeProvider = safeProvider;
|
|
5981
7012
|
this.#safeContract = safeContract;
|
|
@@ -6041,6 +7072,49 @@ var ModuleManager = class {
|
|
|
6041
7072
|
const prevModuleAddress = moduleIndex === 0 ? SENTINEL_ADDRESS : modules[moduleIndex - 1];
|
|
6042
7073
|
return this.#safeContract.encode("disableModule", [prevModuleAddress, moduleAddress]);
|
|
6043
7074
|
}
|
|
7075
|
+
validateModuleGuardAddress(moduleGuardAddress) {
|
|
7076
|
+
const isValidAddress = this.#safeProvider.isAddress(moduleGuardAddress);
|
|
7077
|
+
if (!isValidAddress || isZeroAddress(moduleGuardAddress)) {
|
|
7078
|
+
throw new Error("Invalid module guard address provided");
|
|
7079
|
+
}
|
|
7080
|
+
}
|
|
7081
|
+
validateModuleGuardIsNotEnabled(currentModuleGuard, newModuleGuardAddress) {
|
|
7082
|
+
if (sameString(currentModuleGuard, newModuleGuardAddress)) {
|
|
7083
|
+
throw new Error("Module guard provided is already enabled");
|
|
7084
|
+
}
|
|
7085
|
+
}
|
|
7086
|
+
validateModuleGuardIsEnabled(moduleGuardAddress) {
|
|
7087
|
+
if (isZeroAddress(moduleGuardAddress)) {
|
|
7088
|
+
throw new Error("There is no module guard enabled yet");
|
|
7089
|
+
}
|
|
7090
|
+
}
|
|
7091
|
+
async isModuleGuardCompatible() {
|
|
7092
|
+
if (!this.#safeContract) {
|
|
7093
|
+
throw new Error("Safe is not deployed");
|
|
7094
|
+
}
|
|
7095
|
+
const safeVersion = this.#safeContract.safeVersion;
|
|
7096
|
+
if (!hasSafeFeature("SAFE_MODULE_GUARD" /* SAFE_MODULE_GUARD */, safeVersion)) {
|
|
7097
|
+
throw new Error("Current version of the Safe does not support module guard functionality");
|
|
7098
|
+
}
|
|
7099
|
+
return this.#safeContract;
|
|
7100
|
+
}
|
|
7101
|
+
async getModuleGuard() {
|
|
7102
|
+
const safeContract = await this.isModuleGuardCompatible();
|
|
7103
|
+
return this.#safeProvider.getStorageAt(safeContract.getAddress(), this.#moduleGuardSlot);
|
|
7104
|
+
}
|
|
7105
|
+
async encodeEnableModuleGuardData(moduleGuardAddress) {
|
|
7106
|
+
const safeContract = await this.isModuleGuardCompatible();
|
|
7107
|
+
this.validateModuleGuardAddress(moduleGuardAddress);
|
|
7108
|
+
const currentModuleGuard = await this.getModuleGuard();
|
|
7109
|
+
this.validateModuleGuardIsNotEnabled(currentModuleGuard, moduleGuardAddress);
|
|
7110
|
+
return safeContract.encode("setModuleGuard", [asHex(moduleGuardAddress)]);
|
|
7111
|
+
}
|
|
7112
|
+
async encodeDisableModuleGuardData() {
|
|
7113
|
+
const safeContract = await this.isModuleGuardCompatible();
|
|
7114
|
+
const currentModuleGuard = await this.getModuleGuard();
|
|
7115
|
+
this.validateModuleGuardIsEnabled(currentModuleGuard);
|
|
7116
|
+
return safeContract.encode("setModuleGuard", [asHex(ZERO_ADDRESS)]);
|
|
7117
|
+
}
|
|
6044
7118
|
};
|
|
6045
7119
|
var moduleManager_default = ModuleManager;
|
|
6046
7120
|
|
|
@@ -6227,9 +7301,10 @@ function generateOnChainIdentifier({
|
|
|
6227
7301
|
var generateOnChainIdentifier_default = generateOnChainIdentifier;
|
|
6228
7302
|
|
|
6229
7303
|
// src/utils/getProtocolKitVersion.ts
|
|
6230
|
-
var getProtocolKitVersion = () => "
|
|
7304
|
+
var getProtocolKitVersion = () => "7.0.0";
|
|
6231
7305
|
|
|
6232
7306
|
// src/Safe.ts
|
|
7307
|
+
var EQ_OR_GT_1_5_0 = ">=1.5.0";
|
|
6233
7308
|
var EQ_OR_GT_1_4_1 = ">=1.4.1";
|
|
6234
7309
|
var EQ_OR_GT_1_3_03 = ">=1.3.0";
|
|
6235
7310
|
var Safe = class _Safe {
|
|
@@ -6265,31 +7340,27 @@ var Safe = class _Safe {
|
|
|
6265
7340
|
this.isValidSignature = async (messageHash, signature = "0x") => {
|
|
6266
7341
|
const safeAddress = await this.getAddress();
|
|
6267
7342
|
const fallbackHandler = await this.#getFallbackHandlerContract();
|
|
7343
|
+
const safeVersion = this.getContractVersion();
|
|
6268
7344
|
const signatureToCheck = signature && Array.isArray(signature) ? buildSignatureBytes(signature) : signature;
|
|
6269
7345
|
const bytes32Tuple = [
|
|
6270
7346
|
asHash(messageHash),
|
|
6271
7347
|
asHex(signatureToCheck)
|
|
6272
7348
|
];
|
|
6273
7349
|
const data = fallbackHandler.encode("isValidSignature", bytes32Tuple);
|
|
6274
|
-
const
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
7350
|
+
const callParams = { from: safeAddress, to: safeAddress };
|
|
7351
|
+
const calls = [this.#safeProvider.call({ ...callParams, data })];
|
|
7352
|
+
if (!(0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_5_0)) {
|
|
7353
|
+
const bytesTuple = [
|
|
7354
|
+
asHash(messageHash),
|
|
7355
|
+
asHex(signatureToCheck)
|
|
7356
|
+
];
|
|
7357
|
+
const bytesData = fallbackHandler.encode("isValidSignature", bytesTuple);
|
|
7358
|
+
calls.push(this.#safeProvider.call({ ...callParams, data: bytesData }));
|
|
7359
|
+
}
|
|
6279
7360
|
try {
|
|
6280
|
-
const
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
to: safeAddress,
|
|
6284
|
-
data
|
|
6285
|
-
}),
|
|
6286
|
-
this.#safeProvider.call({
|
|
6287
|
-
from: safeAddress,
|
|
6288
|
-
to: safeAddress,
|
|
6289
|
-
data: bytesData
|
|
6290
|
-
})
|
|
6291
|
-
]);
|
|
6292
|
-
return !!isValidSignatureResponse.length && (isValidSignatureResponse[0].slice(0, 10).toLowerCase() === this.#MAGIC_VALUE || isValidSignatureResponse[1].slice(0, 10).toLowerCase() === this.#MAGIC_VALUE_BYTES);
|
|
7361
|
+
const responses = await Promise.all(calls);
|
|
7362
|
+
const magicValues = [this.#MAGIC_VALUE, this.#MAGIC_VALUE_BYTES];
|
|
7363
|
+
return responses.some((response, i) => response.slice(0, 10).toLowerCase() === magicValues[i]);
|
|
6293
7364
|
} catch (error) {
|
|
6294
7365
|
return false;
|
|
6295
7366
|
}
|
|
@@ -6648,6 +7719,15 @@ var Safe = class _Safe {
|
|
|
6648
7719
|
async isModuleEnabled(moduleAddress) {
|
|
6649
7720
|
return this.#moduleManager.isModuleEnabled(moduleAddress);
|
|
6650
7721
|
}
|
|
7722
|
+
/**
|
|
7723
|
+
* Returns the enabled Safe module guard or 0x address if no module guard is enabled.
|
|
7724
|
+
*
|
|
7725
|
+
* @returns The address of the enabled Safe module guard
|
|
7726
|
+
* @throws "Current version of the Safe does not support module guard functionality"
|
|
7727
|
+
*/
|
|
7728
|
+
async getModuleGuard() {
|
|
7729
|
+
return this.#moduleManager.getModuleGuard();
|
|
7730
|
+
}
|
|
6651
7731
|
/**
|
|
6652
7732
|
* Checks if a specific address is an owner of the current Safe.
|
|
6653
7733
|
*
|
|
@@ -6704,7 +7784,7 @@ var Safe = class _Safe {
|
|
|
6704
7784
|
to: multiSendContract.getAddress(),
|
|
6705
7785
|
value: "0",
|
|
6706
7786
|
data: multiSendContract.encode("multiSend", [asHex(multiSendData)]),
|
|
6707
|
-
operation:
|
|
7787
|
+
operation: import_types_kit37.OperationType.DelegateCall
|
|
6708
7788
|
};
|
|
6709
7789
|
newTransaction = multiSendTransaction;
|
|
6710
7790
|
} else {
|
|
@@ -6796,7 +7876,7 @@ var Safe = class _Safe {
|
|
|
6796
7876
|
const signerAddress = await this.#safeProvider.getSignerAddress();
|
|
6797
7877
|
if (isPasskeySigner && signerAddress) {
|
|
6798
7878
|
let signature2 = await this.#safeProvider.signMessage(hash);
|
|
6799
|
-
signature2 = await adjustVInSignature(
|
|
7879
|
+
signature2 = await adjustVInSignature(import_types_kit37.SigningMethod.ETH_SIGN, signature2, hash, signerAddress);
|
|
6800
7880
|
const safeSignature = new EthSafeSignature(signerAddress, signature2, true);
|
|
6801
7881
|
return safeSignature;
|
|
6802
7882
|
}
|
|
@@ -6823,7 +7903,7 @@ var Safe = class _Safe {
|
|
|
6823
7903
|
* https://github.com/safe-global/safe-contracts/blob/192c7dc67290940fcbc75165522bb86a37187069/test/core/Safe.Signatures.spec.ts#L229-L233
|
|
6824
7904
|
* @returns The signed Safe message
|
|
6825
7905
|
*/
|
|
6826
|
-
async signMessage(message, signingMethod =
|
|
7906
|
+
async signMessage(message, signingMethod = import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V4, preimageSafeAddress) {
|
|
6827
7907
|
const signerAddress = await this.#safeProvider.getSignerAddress();
|
|
6828
7908
|
if (!signerAddress) {
|
|
6829
7909
|
throw new Error("The protocol-kit requires a signer to use this method");
|
|
@@ -6833,15 +7913,15 @@ var Safe = class _Safe {
|
|
|
6833
7913
|
throw new Error("Messages can only be signed by Safe owners");
|
|
6834
7914
|
}
|
|
6835
7915
|
const safeVersion = this.getContractVersion();
|
|
6836
|
-
if (signingMethod ===
|
|
7916
|
+
if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_4_1) && !preimageSafeAddress) {
|
|
6837
7917
|
throw new Error("The parent Safe account address is mandatory for contract signatures");
|
|
6838
7918
|
}
|
|
6839
7919
|
let signature;
|
|
6840
|
-
if (signingMethod ===
|
|
7920
|
+
if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V4) {
|
|
6841
7921
|
signature = await this.signTypedData(message, "v4");
|
|
6842
|
-
} else if (signingMethod ===
|
|
7922
|
+
} else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V3) {
|
|
6843
7923
|
signature = await this.signTypedData(message, "v3");
|
|
6844
|
-
} else if (signingMethod ===
|
|
7924
|
+
} else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA) {
|
|
6845
7925
|
signature = await this.signTypedData(message, void 0);
|
|
6846
7926
|
} else {
|
|
6847
7927
|
const chainId = await this.getChainId();
|
|
@@ -6849,7 +7929,15 @@ var Safe = class _Safe {
|
|
|
6849
7929
|
throw new Error("eth_sign is only supported by Safes >= v1.1.0");
|
|
6850
7930
|
}
|
|
6851
7931
|
let safeMessageHash;
|
|
6852
|
-
if (signingMethod ===
|
|
7932
|
+
if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && preimageSafeAddress && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_5_0)) {
|
|
7933
|
+
const parentSafeMessageHash = calculateSafeMessageHash(
|
|
7934
|
+
preimageSafeAddress,
|
|
7935
|
+
hashSafeMessage(message.data),
|
|
7936
|
+
safeVersion,
|
|
7937
|
+
chainId
|
|
7938
|
+
);
|
|
7939
|
+
safeMessageHash = await this.getSafeMessageHash(parentSafeMessageHash);
|
|
7940
|
+
} else if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && preimageSafeAddress && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_4_1)) {
|
|
6853
7941
|
const messageHashData = preimageSafeMessageHash(
|
|
6854
7942
|
preimageSafeAddress,
|
|
6855
7943
|
hashSafeMessage(message.data),
|
|
@@ -6897,7 +7985,7 @@ var Safe = class _Safe {
|
|
|
6897
7985
|
* @returns The signed Safe transaction
|
|
6898
7986
|
* @throws "Transactions can only be signed by Safe owners"
|
|
6899
7987
|
*/
|
|
6900
|
-
async signTransaction(safeTransaction, signingMethod =
|
|
7988
|
+
async signTransaction(safeTransaction, signingMethod = import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V4, preimageSafeAddress) {
|
|
6901
7989
|
const transaction = isSafeMultisigTransactionResponse(safeTransaction) ? await this.toSafeTransactionType(safeTransaction) : safeTransaction;
|
|
6902
7990
|
const signerAddress = await this.#safeProvider.getSignerAddress();
|
|
6903
7991
|
if (!signerAddress) {
|
|
@@ -6908,7 +7996,7 @@ var Safe = class _Safe {
|
|
|
6908
7996
|
throw new Error("Transactions can only be signed by Safe owners");
|
|
6909
7997
|
}
|
|
6910
7998
|
const safeVersion = this.getContractVersion();
|
|
6911
|
-
if (signingMethod ===
|
|
7999
|
+
if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_3_03) && !preimageSafeAddress) {
|
|
6912
8000
|
throw new Error("The parent Safe account address is mandatory for contract signatures");
|
|
6913
8001
|
}
|
|
6914
8002
|
let signature;
|
|
@@ -6916,11 +8004,11 @@ var Safe = class _Safe {
|
|
|
6916
8004
|
if (isPasskeySigner) {
|
|
6917
8005
|
const txHash = await this.getTransactionHash(transaction);
|
|
6918
8006
|
signature = await this.signHash(txHash);
|
|
6919
|
-
} else if (signingMethod ===
|
|
8007
|
+
} else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V4) {
|
|
6920
8008
|
signature = await this.signTypedData(transaction, "v4");
|
|
6921
|
-
} else if (signingMethod ===
|
|
8009
|
+
} else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA_V3) {
|
|
6922
8010
|
signature = await this.signTypedData(transaction, "v3");
|
|
6923
|
-
} else if (signingMethod ===
|
|
8011
|
+
} else if (signingMethod === import_types_kit37.SigningMethod.ETH_SIGN_TYPED_DATA) {
|
|
6924
8012
|
signature = await this.signTypedData(transaction, void 0);
|
|
6925
8013
|
} else {
|
|
6926
8014
|
const safeVersion2 = this.getContractVersion();
|
|
@@ -6929,7 +8017,15 @@ var Safe = class _Safe {
|
|
|
6929
8017
|
throw new Error("eth_sign is only supported by Safes >= v1.1.0");
|
|
6930
8018
|
}
|
|
6931
8019
|
let txHash;
|
|
6932
|
-
if (signingMethod ===
|
|
8020
|
+
if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion2, EQ_OR_GT_1_5_0) && preimageSafeAddress) {
|
|
8021
|
+
const txHashData = calculateSafeTransactionHash(
|
|
8022
|
+
preimageSafeAddress,
|
|
8023
|
+
transaction.data,
|
|
8024
|
+
safeVersion2,
|
|
8025
|
+
chainId
|
|
8026
|
+
);
|
|
8027
|
+
txHash = await this.getSafeMessageHash(txHashData);
|
|
8028
|
+
} else if (signingMethod === import_types_kit37.SigningMethod.SAFE_SIGNATURE && (0, import_satisfies7.default)(safeVersion2, EQ_OR_GT_1_3_03) && preimageSafeAddress) {
|
|
6933
8029
|
const txHashData = preimageSafeTransactionHash(
|
|
6934
8030
|
preimageSafeAddress,
|
|
6935
8031
|
safeTransaction.data,
|
|
@@ -7051,6 +8147,203 @@ var Safe = class _Safe {
|
|
|
7051
8147
|
});
|
|
7052
8148
|
return safeTransaction;
|
|
7053
8149
|
}
|
|
8150
|
+
// ---------------------------------------------------------------------------
|
|
8151
|
+
// ExtensibleFallbackHandler helpers
|
|
8152
|
+
// ---------------------------------------------------------------------------
|
|
8153
|
+
/**
|
|
8154
|
+
* Returns an instance of the ExtensibleFallbackHandler contract for the current chain.
|
|
8155
|
+
* Used internally to compose read queries and Safe transactions against the EFH.
|
|
8156
|
+
* @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
|
|
8157
|
+
*/
|
|
8158
|
+
async #getExtensibleFallbackHandlerContract() {
|
|
8159
|
+
const safeVersion = this.getContractVersion();
|
|
8160
|
+
if (!(0, import_satisfies7.default)(safeVersion, EQ_OR_GT_1_5_0)) {
|
|
8161
|
+
throw new Error("ExtensibleFallbackHandler is only available for Safe >= v1.5.0");
|
|
8162
|
+
}
|
|
8163
|
+
const chainId = await this.getChainId();
|
|
8164
|
+
const customContracts = this.#contractManager.contractNetworks?.[chainId.toString()];
|
|
8165
|
+
return getExtensibleFallbackHandlerContract({
|
|
8166
|
+
safeProvider: this.#safeProvider,
|
|
8167
|
+
safeVersion,
|
|
8168
|
+
customContracts
|
|
8169
|
+
});
|
|
8170
|
+
}
|
|
8171
|
+
// ----- Read helpers -----
|
|
8172
|
+
/**
|
|
8173
|
+
* Returns the bytes32-encoded handler registered for the given 4-byte selector on
|
|
8174
|
+
* the ExtensibleFallbackHandler for this Safe.
|
|
8175
|
+
* Only available for Safe >= v1.5.0.
|
|
8176
|
+
*
|
|
8177
|
+
* @param selector - The 4-byte function selector (e.g. '0xaabbccdd')
|
|
8178
|
+
* @returns The bytes32 handler entry, or the zero bytes32 if unregistered
|
|
8179
|
+
* @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
|
|
8180
|
+
*/
|
|
8181
|
+
async getSafeMethod(selector) {
|
|
8182
|
+
const safeAddress = await this.getAddress();
|
|
8183
|
+
const efhContract = await this.#getExtensibleFallbackHandlerContract();
|
|
8184
|
+
const [method] = await efhContract.safeMethods([
|
|
8185
|
+
safeAddress,
|
|
8186
|
+
selector
|
|
8187
|
+
]);
|
|
8188
|
+
return method;
|
|
8189
|
+
}
|
|
8190
|
+
/**
|
|
8191
|
+
* Returns the ISafeSignatureVerifier address registered for the given domain separator
|
|
8192
|
+
* on the ExtensibleFallbackHandler for this Safe.
|
|
8193
|
+
* Only available for Safe >= v1.5.0.
|
|
8194
|
+
*
|
|
8195
|
+
* @param domainSeparator - 32-byte domain separator
|
|
8196
|
+
* @returns The verifier address, or the zero address if unregistered
|
|
8197
|
+
* @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
|
|
8198
|
+
*/
|
|
8199
|
+
async getDomainVerifier(domainSeparator) {
|
|
8200
|
+
const safeAddress = await this.getAddress();
|
|
8201
|
+
const efhContract = await this.#getExtensibleFallbackHandlerContract();
|
|
8202
|
+
const [verifier] = await efhContract.domainVerifiers([
|
|
8203
|
+
safeAddress,
|
|
8204
|
+
domainSeparator
|
|
8205
|
+
]);
|
|
8206
|
+
return verifier;
|
|
8207
|
+
}
|
|
8208
|
+
/**
|
|
8209
|
+
* Returns whether the given ERC-165 interface ID is marked as supported for this Safe
|
|
8210
|
+
* on the ExtensibleFallbackHandler.
|
|
8211
|
+
* Only available for Safe >= v1.5.0.
|
|
8212
|
+
*
|
|
8213
|
+
* @param interfaceId - 4-byte ERC-165 interface ID
|
|
8214
|
+
* @returns true if supported, false otherwise
|
|
8215
|
+
* @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
|
|
8216
|
+
*/
|
|
8217
|
+
async isSafeInterfaceSupported(interfaceId) {
|
|
8218
|
+
const safeAddress = await this.getAddress();
|
|
8219
|
+
const efhContract = await this.#getExtensibleFallbackHandlerContract();
|
|
8220
|
+
const [isSupported] = await efhContract.safeInterfaces([
|
|
8221
|
+
safeAddress,
|
|
8222
|
+
interfaceId
|
|
8223
|
+
]);
|
|
8224
|
+
return isSupported;
|
|
8225
|
+
}
|
|
8226
|
+
// ----- Write transaction builders -----
|
|
8227
|
+
/**
|
|
8228
|
+
* Returns a Safe transaction that calls setSafeMethod on the ExtensibleFallbackHandler.
|
|
8229
|
+
* Because the EFH uses msg.sender as the Safe address, this must be executed through
|
|
8230
|
+
* the Safe itself.
|
|
8231
|
+
* Only available for Safe >= v1.5.0.
|
|
8232
|
+
*
|
|
8233
|
+
* @param selector - The 4-byte function selector to handle
|
|
8234
|
+
* @param newMethod - bytes32-packed handler address (address right-aligned, 12 leading zero bytes)
|
|
8235
|
+
* @param options - Optional Safe transaction properties
|
|
8236
|
+
* @returns The Safe transaction ready to be signed
|
|
8237
|
+
* @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
|
|
8238
|
+
*/
|
|
8239
|
+
async createSetSafeMethodTx(selector, newMethod, options) {
|
|
8240
|
+
const efhContract = await this.#getExtensibleFallbackHandlerContract();
|
|
8241
|
+
const safeAddress = await this.getAddress();
|
|
8242
|
+
const data = efhContract.encode("setSafeMethod", [
|
|
8243
|
+
selector,
|
|
8244
|
+
newMethod
|
|
8245
|
+
]);
|
|
8246
|
+
return this.createTransaction({
|
|
8247
|
+
transactions: [{ to: safeAddress, value: "0", data }],
|
|
8248
|
+
options
|
|
8249
|
+
});
|
|
8250
|
+
}
|
|
8251
|
+
/**
|
|
8252
|
+
* Returns a Safe transaction that calls setDomainVerifier on the ExtensibleFallbackHandler.
|
|
8253
|
+
* Registers an ISafeSignatureVerifier for EIP-712 domain-based signature validation.
|
|
8254
|
+
* Only available for Safe >= v1.5.0.
|
|
8255
|
+
*
|
|
8256
|
+
* @param domainSeparator - 32-byte EIP-712 domain separator
|
|
8257
|
+
* @param verifier - Address of the ISafeSignatureVerifier contract
|
|
8258
|
+
* @param options - Optional Safe transaction properties
|
|
8259
|
+
* @returns The Safe transaction ready to be signed
|
|
8260
|
+
* @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
|
|
8261
|
+
*/
|
|
8262
|
+
async createSetDomainVerifierTx(domainSeparator, verifier, options) {
|
|
8263
|
+
const efhContract = await this.#getExtensibleFallbackHandlerContract();
|
|
8264
|
+
const safeAddress = await this.getAddress();
|
|
8265
|
+
const data = efhContract.encode("setDomainVerifier", [
|
|
8266
|
+
domainSeparator,
|
|
8267
|
+
verifier
|
|
8268
|
+
]);
|
|
8269
|
+
return this.createTransaction({
|
|
8270
|
+
transactions: [{ to: safeAddress, value: "0", data }],
|
|
8271
|
+
options
|
|
8272
|
+
});
|
|
8273
|
+
}
|
|
8274
|
+
/**
|
|
8275
|
+
* Returns a Safe transaction that calls setSupportedInterface on the ExtensibleFallbackHandler.
|
|
8276
|
+
* Marks (or un-marks) an ERC-165 interface as supported for this Safe.
|
|
8277
|
+
* Only available for Safe >= v1.5.0.
|
|
8278
|
+
*
|
|
8279
|
+
* @param interfaceId - 4-byte ERC-165 interface ID
|
|
8280
|
+
* @param supported - true to add support, false to remove it
|
|
8281
|
+
* @param options - Optional Safe transaction properties
|
|
8282
|
+
* @returns The Safe transaction ready to be signed
|
|
8283
|
+
* @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
|
|
8284
|
+
*/
|
|
8285
|
+
async createSetSupportedInterfaceTx(interfaceId, supported, options) {
|
|
8286
|
+
const efhContract = await this.#getExtensibleFallbackHandlerContract();
|
|
8287
|
+
const safeAddress = await this.getAddress();
|
|
8288
|
+
const data = efhContract.encode("setSupportedInterface", [
|
|
8289
|
+
interfaceId,
|
|
8290
|
+
supported
|
|
8291
|
+
]);
|
|
8292
|
+
return this.createTransaction({
|
|
8293
|
+
transactions: [{ to: safeAddress, value: "0", data }],
|
|
8294
|
+
options
|
|
8295
|
+
});
|
|
8296
|
+
}
|
|
8297
|
+
/**
|
|
8298
|
+
* Returns a Safe transaction that calls addSupportedInterfaceBatch on the ExtensibleFallbackHandler.
|
|
8299
|
+
* Atomically registers an interface and multiple method handlers in a single call.
|
|
8300
|
+
* Only available for Safe >= v1.5.0.
|
|
8301
|
+
*
|
|
8302
|
+
* Each entry in handlerWithSelectors is a bytes32 value encoding both the handler address
|
|
8303
|
+
* and the 4-byte method selector: first 4 bytes = selector, next 8 bytes = zero padding,
|
|
8304
|
+
* last 20 bytes = handler address.
|
|
8305
|
+
*
|
|
8306
|
+
* @param interfaceId - 4-byte ERC-165 interface ID to mark as supported
|
|
8307
|
+
* @param handlerWithSelectors - Array of packed selector+handler bytes32 values
|
|
8308
|
+
* @param options - Optional Safe transaction properties
|
|
8309
|
+
* @returns The Safe transaction ready to be signed
|
|
8310
|
+
* @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
|
|
8311
|
+
*/
|
|
8312
|
+
async createAddSupportedInterfaceBatchTx(interfaceId, handlerWithSelectors, options) {
|
|
8313
|
+
const efhContract = await this.#getExtensibleFallbackHandlerContract();
|
|
8314
|
+
const safeAddress = await this.getAddress();
|
|
8315
|
+
const data = efhContract.encode("addSupportedInterfaceBatch", [
|
|
8316
|
+
interfaceId,
|
|
8317
|
+
handlerWithSelectors
|
|
8318
|
+
]);
|
|
8319
|
+
return this.createTransaction({
|
|
8320
|
+
transactions: [{ to: safeAddress, value: "0", data }],
|
|
8321
|
+
options
|
|
8322
|
+
});
|
|
8323
|
+
}
|
|
8324
|
+
/**
|
|
8325
|
+
* Returns a Safe transaction that calls removeSupportedInterfaceBatch on the ExtensibleFallbackHandler.
|
|
8326
|
+
* Atomically un-registers an interface and removes the given method handlers in a single call.
|
|
8327
|
+
* Only available for Safe >= v1.5.0.
|
|
8328
|
+
*
|
|
8329
|
+
* @param interfaceId - 4-byte ERC-165 interface ID to remove
|
|
8330
|
+
* @param selectors - Array of 4-byte function selectors to un-register
|
|
8331
|
+
* @param options - Optional Safe transaction properties
|
|
8332
|
+
* @returns The Safe transaction ready to be signed
|
|
8333
|
+
* @throws "ExtensibleFallbackHandler is only available for Safe >= v1.5.0"
|
|
8334
|
+
*/
|
|
8335
|
+
async createRemoveSupportedInterfaceBatchTx(interfaceId, selectors, options) {
|
|
8336
|
+
const efhContract = await this.#getExtensibleFallbackHandlerContract();
|
|
8337
|
+
const safeAddress = await this.getAddress();
|
|
8338
|
+
const data = efhContract.encode("removeSupportedInterfaceBatch", [
|
|
8339
|
+
interfaceId,
|
|
8340
|
+
selectors
|
|
8341
|
+
]);
|
|
8342
|
+
return this.createTransaction({
|
|
8343
|
+
transactions: [{ to: safeAddress, value: "0", data }],
|
|
8344
|
+
options
|
|
8345
|
+
});
|
|
8346
|
+
}
|
|
7054
8347
|
/**
|
|
7055
8348
|
* Returns the Safe transaction to enable a Safe guard.
|
|
7056
8349
|
*
|
|
@@ -7093,6 +8386,48 @@ var Safe = class _Safe {
|
|
|
7093
8386
|
});
|
|
7094
8387
|
return safeTransaction;
|
|
7095
8388
|
}
|
|
8389
|
+
/**
|
|
8390
|
+
* Returns the Safe transaction to enable a Safe module guard.
|
|
8391
|
+
*
|
|
8392
|
+
* @param moduleGuardAddress - The desired module guard address
|
|
8393
|
+
* @param options - The transaction optional properties
|
|
8394
|
+
* @returns The Safe transaction ready to be signed
|
|
8395
|
+
* @throws "Invalid module guard address provided"
|
|
8396
|
+
* @throws "Module guard provided is already enabled"
|
|
8397
|
+
* @throws "Current version of the Safe does not support module guard functionality"
|
|
8398
|
+
*/
|
|
8399
|
+
async createEnableModuleGuardTx(moduleGuardAddress, options) {
|
|
8400
|
+
const safeTransactionData = {
|
|
8401
|
+
to: await this.getAddress(),
|
|
8402
|
+
value: "0",
|
|
8403
|
+
data: await this.#moduleManager.encodeEnableModuleGuardData(moduleGuardAddress)
|
|
8404
|
+
};
|
|
8405
|
+
const safeTransaction = await this.createTransaction({
|
|
8406
|
+
transactions: [safeTransactionData],
|
|
8407
|
+
options
|
|
8408
|
+
});
|
|
8409
|
+
return safeTransaction;
|
|
8410
|
+
}
|
|
8411
|
+
/**
|
|
8412
|
+
* Returns the Safe transaction to disable a Safe module guard.
|
|
8413
|
+
*
|
|
8414
|
+
* @param options - The transaction optional properties
|
|
8415
|
+
* @returns The Safe transaction ready to be signed
|
|
8416
|
+
* @throws "There is no module guard enabled yet"
|
|
8417
|
+
* @throws "Current version of the Safe does not support module guard functionality"
|
|
8418
|
+
*/
|
|
8419
|
+
async createDisableModuleGuardTx(options) {
|
|
8420
|
+
const safeTransactionData = {
|
|
8421
|
+
to: await this.getAddress(),
|
|
8422
|
+
value: "0",
|
|
8423
|
+
data: await this.#moduleManager.encodeDisableModuleGuardData()
|
|
8424
|
+
};
|
|
8425
|
+
const safeTransaction = await this.createTransaction({
|
|
8426
|
+
transactions: [safeTransactionData],
|
|
8427
|
+
options
|
|
8428
|
+
});
|
|
8429
|
+
return safeTransaction;
|
|
8430
|
+
}
|
|
7096
8431
|
/**
|
|
7097
8432
|
* Returns the Safe transaction to enable a Safe module.
|
|
7098
8433
|
*
|
|
@@ -7472,13 +8807,13 @@ var Safe = class _Safe {
|
|
|
7472
8807
|
to: safeDeploymentTransaction.to,
|
|
7473
8808
|
value: safeDeploymentTransaction.value,
|
|
7474
8809
|
data: safeDeploymentTransaction.data,
|
|
7475
|
-
operation:
|
|
8810
|
+
operation: import_types_kit37.OperationType.Call
|
|
7476
8811
|
};
|
|
7477
8812
|
const safeBatchTransaction = {
|
|
7478
8813
|
to: await this.getAddress(),
|
|
7479
8814
|
value: "0",
|
|
7480
8815
|
data: await this.getEncodedTransaction(safeTransaction),
|
|
7481
|
-
operation:
|
|
8816
|
+
operation: import_types_kit37.OperationType.Call
|
|
7482
8817
|
};
|
|
7483
8818
|
const transactions = [safeDeploymentBatchTransaction, safeBatchTransaction];
|
|
7484
8819
|
const safeDeploymentBatch = await this.createTransactionBatch(
|
|
@@ -7605,7 +8940,7 @@ var Safe = class _Safe {
|
|
|
7605
8940
|
/**
|
|
7606
8941
|
* This method creates a signer to be used with the init method
|
|
7607
8942
|
* @param {Credential} credential - The credential to be used to create the signer. Can be generated in the web with navigator.credentials.create
|
|
7608
|
-
* @returns {
|
|
8943
|
+
* @returns {ExtractedPasskeyData} - The extracted passkey data. Combine with a verifierAddress to build a PasskeyArgType.
|
|
7609
8944
|
*/
|
|
7610
8945
|
this.createPasskeySigner = async (credential) => {
|
|
7611
8946
|
return extractPasskeyData(credential);
|