@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
|
@@ -277,6 +277,8 @@ var networks = [
|
|
|
277
277
|
{ chainId: 146n, shortName: "sonic" },
|
|
278
278
|
{ chainId: 148n, shortName: "shimmerevm" },
|
|
279
279
|
{ chainId: 150n, shortName: "sixt" },
|
|
280
|
+
{ chainId: 151n, shortName: "rbn" },
|
|
281
|
+
{ chainId: 153n, shortName: "rbn-testnet" },
|
|
280
282
|
{ chainId: 155n, shortName: "tenet-testnet" },
|
|
281
283
|
{ chainId: 169n, shortName: "manta" },
|
|
282
284
|
{ chainId: 173n, shortName: "eni" },
|
|
@@ -297,7 +299,7 @@ var networks = [
|
|
|
297
299
|
{ chainId: 255n, shortName: "kroma" },
|
|
298
300
|
{ chainId: 274n, shortName: "lachain" },
|
|
299
301
|
{ chainId: 280n, shortName: "zksync-goerli" },
|
|
300
|
-
{ chainId: 282n, shortName: "zkTCRO" },
|
|
302
|
+
{ chainId: 282n, shortName: "deprecated-zkTCRO" },
|
|
301
303
|
{ chainId: 288n, shortName: "boba" },
|
|
302
304
|
{ chainId: 291n, shortName: "orderly" },
|
|
303
305
|
{ chainId: 295n, shortName: "hedera-mainnet" },
|
|
@@ -330,7 +332,10 @@ var networks = [
|
|
|
330
332
|
{ chainId: 690n, shortName: "redstone" },
|
|
331
333
|
{ chainId: 698n, shortName: "Matchain" },
|
|
332
334
|
{ chainId: 747n, shortName: "flow-mainnet" },
|
|
335
|
+
{ chainId: 756n, shortName: "capx-testnet" },
|
|
336
|
+
{ chainId: 757n, shortName: "capx" },
|
|
333
337
|
{ chainId: 787n, shortName: "aca" },
|
|
338
|
+
{ chainId: 841n, shortName: "tara" },
|
|
334
339
|
{ chainId: 842n, shortName: "taratest" },
|
|
335
340
|
{ chainId: 870n, shortName: "AMN" },
|
|
336
341
|
{ chainId: 919n, shortName: "modesep" },
|
|
@@ -338,8 +343,9 @@ var networks = [
|
|
|
338
343
|
{ chainId: 943n, shortName: "t4pls" },
|
|
339
344
|
{ chainId: 964n, shortName: "bittensor-evm-mainnet" },
|
|
340
345
|
{ chainId: 970n, shortName: "ccn" },
|
|
346
|
+
{ chainId: 988n, shortName: "stable" },
|
|
341
347
|
{ chainId: 995n, shortName: "5ire" },
|
|
342
|
-
{ chainId: 999n, shortName: "
|
|
348
|
+
{ chainId: 999n, shortName: "hyper_evm" },
|
|
343
349
|
{ chainId: 1001n, shortName: "kaia-kairos" },
|
|
344
350
|
{ chainId: 1008n, shortName: "eun" },
|
|
345
351
|
{ chainId: 1030n, shortName: "cfx" },
|
|
@@ -373,9 +379,11 @@ var networks = [
|
|
|
373
379
|
{ chainId: 1559n, shortName: "tenet" },
|
|
374
380
|
{ chainId: 1625n, shortName: "gravity" },
|
|
375
381
|
{ chainId: 1663n, shortName: "Gobi" },
|
|
382
|
+
{ chainId: 1672n, shortName: "pharos" },
|
|
376
383
|
{ chainId: 1729n, shortName: "reya" },
|
|
377
384
|
{ chainId: 1740n, shortName: "metall2-testnet" },
|
|
378
385
|
{ chainId: 1750n, shortName: "metall2" },
|
|
386
|
+
{ chainId: 1776n, shortName: "injective" },
|
|
379
387
|
{ chainId: 1807n, shortName: "rana" },
|
|
380
388
|
{ chainId: 1811n, shortName: "lif3-testnet" },
|
|
381
389
|
{ chainId: 1868n, shortName: "soneium" },
|
|
@@ -397,6 +405,7 @@ var networks = [
|
|
|
397
405
|
{ chainId: 2039n, shortName: "aleph" },
|
|
398
406
|
{ chainId: 2187n, shortName: "g7" },
|
|
399
407
|
{ chainId: 2192n, shortName: "snax" },
|
|
408
|
+
{ chainId: 2201n, shortName: "stable-testnet" },
|
|
400
409
|
{ chainId: 2221n, shortName: "tkava" },
|
|
401
410
|
{ chainId: 2222n, shortName: "kava" },
|
|
402
411
|
{ chainId: 2331n, shortName: "rss3-testnet" },
|
|
@@ -406,10 +415,14 @@ var networks = [
|
|
|
406
415
|
{ chainId: 2391n, shortName: "tacchain_2391-1" },
|
|
407
416
|
{ chainId: 2424n, shortName: "inevm-testnet" },
|
|
408
417
|
{ chainId: 2442n, shortName: "zkevm-testnet-cardona" },
|
|
418
|
+
{ chainId: 2522n, shortName: "fraxtal-testnet" },
|
|
409
419
|
{ chainId: 2741n, shortName: "abstract" },
|
|
420
|
+
{ chainId: 2787n, shortName: "creator-chain-mainnet" },
|
|
410
421
|
{ chainId: 2810n, shortName: "hmorph" },
|
|
411
422
|
{ chainId: 2818n, shortName: "morph" },
|
|
423
|
+
{ chainId: 2910n, shortName: "morph-hoodi-testnet" },
|
|
412
424
|
{ chainId: 3068n, shortName: "bfc" },
|
|
425
|
+
{ chainId: 3111n, shortName: "alpha" },
|
|
413
426
|
{ chainId: 3338n, shortName: "PEAQ" },
|
|
414
427
|
{ chainId: 3501n, shortName: "JFIN" },
|
|
415
428
|
{ chainId: 3636n, shortName: "BTNXt" },
|
|
@@ -424,23 +437,30 @@ var networks = [
|
|
|
424
437
|
{ chainId: 4158n, shortName: "crossfi" },
|
|
425
438
|
{ chainId: 4162n, shortName: "SXR" },
|
|
426
439
|
{ chainId: 4202n, shortName: "lisksep" },
|
|
440
|
+
{ chainId: 4326n, shortName: "megaeth" },
|
|
427
441
|
{ chainId: 4337n, shortName: "beam" },
|
|
428
442
|
{ chainId: 4460n, shortName: "orderlyl2" },
|
|
429
443
|
{ chainId: 4488n, shortName: "HYDRA" },
|
|
444
|
+
{ chainId: 4509n, shortName: "SC" },
|
|
430
445
|
{ chainId: 4653n, shortName: "gold" },
|
|
431
446
|
{ chainId: 4661n, shortName: "appchaintestnet" },
|
|
432
447
|
{ chainId: 4689n, shortName: "iotex-mainnet" },
|
|
448
|
+
{ chainId: 4801n, shortName: "wcsep" },
|
|
433
449
|
{ chainId: 4918n, shortName: "txvm" },
|
|
434
450
|
{ chainId: 4919n, shortName: "xvm" },
|
|
435
451
|
{ chainId: 5000n, shortName: "mantle" },
|
|
436
452
|
{ chainId: 5001n, shortName: "mantle-testnet" },
|
|
437
453
|
{ chainId: 5003n, shortName: "mnt-sep" },
|
|
454
|
+
{ chainId: 5031n, shortName: "Somnia" },
|
|
438
455
|
{ chainId: 5115n, shortName: "citrea-testnet" },
|
|
439
456
|
{ chainId: 5165n, shortName: "ftn" },
|
|
440
457
|
{ chainId: 5330n, shortName: "sseed" },
|
|
458
|
+
{ chainId: 5464n, shortName: "saga" },
|
|
441
459
|
{ chainId: 5611n, shortName: "obnbt" },
|
|
442
460
|
{ chainId: 5700n, shortName: "tsys" },
|
|
443
461
|
{ chainId: 5851n, shortName: "OntologyTestnet" },
|
|
462
|
+
{ chainId: 5887n, shortName: "dukong" },
|
|
463
|
+
{ chainId: 5888n, shortName: "mantrachain" },
|
|
444
464
|
{ chainId: 6001n, shortName: "bouncebit-mainnet" },
|
|
445
465
|
{ chainId: 6102n, shortName: "cascadia" },
|
|
446
466
|
{ chainId: 6321n, shortName: "eaura" },
|
|
@@ -457,13 +477,17 @@ var networks = [
|
|
|
457
477
|
{ chainId: 7070n, shortName: "planq" },
|
|
458
478
|
{ chainId: 7171n, shortName: "bitrock" },
|
|
459
479
|
{ chainId: 7200n, shortName: "xsat" },
|
|
480
|
+
{ chainId: 7208n, shortName: "nxra-mainnet" },
|
|
460
481
|
{ chainId: 7332n, shortName: "EON" },
|
|
482
|
+
{ chainId: 7336n, shortName: "pruvtestnet" },
|
|
483
|
+
{ chainId: 7337n, shortName: "pruvmainnet" },
|
|
461
484
|
{ chainId: 7341n, shortName: "shyft" },
|
|
462
485
|
{ chainId: 7560n, shortName: "cyeth" },
|
|
463
486
|
{ chainId: 7700n, shortName: "canto" },
|
|
464
487
|
{ chainId: 7771n, shortName: "tbitrock" },
|
|
465
488
|
{ chainId: 7897n, shortName: "arena-z" },
|
|
466
489
|
{ chainId: 8008n, shortName: "polynomial" },
|
|
490
|
+
{ chainId: 8150n, shortName: "alpen" },
|
|
467
491
|
{ chainId: 8192n, shortName: "tqf" },
|
|
468
492
|
{ chainId: 8194n, shortName: "ttqf" },
|
|
469
493
|
{ chainId: 8217n, shortName: "kaia-mainnet" },
|
|
@@ -471,6 +495,8 @@ var networks = [
|
|
|
471
495
|
{ chainId: 8333n, shortName: "b3" },
|
|
472
496
|
{ chainId: 8408n, shortName: "zentest" },
|
|
473
497
|
{ chainId: 8453n, shortName: "base" },
|
|
498
|
+
{ chainId: 8700n, shortName: "ACN" },
|
|
499
|
+
{ chainId: 8765n, shortName: "ward" },
|
|
474
500
|
{ chainId: 8801n, shortName: "okto-testnet" },
|
|
475
501
|
{ chainId: 8822n, shortName: "iotaevm" },
|
|
476
502
|
{ chainId: 8844n, shortName: "THYDRA" },
|
|
@@ -481,7 +507,8 @@ var networks = [
|
|
|
481
507
|
{ chainId: 9369n, shortName: "z" },
|
|
482
508
|
{ chainId: 9700n, shortName: "MainnetDev" },
|
|
483
509
|
{ chainId: 9728n, shortName: "boba-testnet" },
|
|
484
|
-
{ chainId:
|
|
510
|
+
{ chainId: 9745n, shortName: "plasma" },
|
|
511
|
+
{ chainId: 9746n, shortName: "plasma-testnet" },
|
|
485
512
|
{ chainId: 10000n, shortName: "smartbch" },
|
|
486
513
|
{ chainId: 10001n, shortName: "smartbchtest" },
|
|
487
514
|
{ chainId: 10081n, shortName: "joct" },
|
|
@@ -495,6 +522,7 @@ var networks = [
|
|
|
495
522
|
{ chainId: 11111n, shortName: "WAGMI" },
|
|
496
523
|
{ chainId: 11124n, shortName: "abstract-sepolia" },
|
|
497
524
|
{ chainId: 11235n, shortName: "islm" },
|
|
525
|
+
{ chainId: 11417n, shortName: "anq-testnet" },
|
|
498
526
|
{ chainId: 11437n, shortName: "shyftt" },
|
|
499
527
|
{ chainId: 11501n, shortName: "bevm" },
|
|
500
528
|
{ chainId: 11503n, shortName: "bevm-test" },
|
|
@@ -506,33 +534,44 @@ var networks = [
|
|
|
506
534
|
{ chainId: 12553n, shortName: "rss3" },
|
|
507
535
|
{ chainId: 13337n, shortName: "beam-testnet" },
|
|
508
536
|
{ chainId: 13371n, shortName: "imx" },
|
|
537
|
+
{ chainId: 13441n, shortName: "bridgeless" },
|
|
509
538
|
{ chainId: 13473n, shortName: "imx-testnet" },
|
|
510
539
|
{ chainId: 13505n, shortName: "gravitysep" },
|
|
511
540
|
{ chainId: 13746n, shortName: "g7t" },
|
|
541
|
+
{ chainId: 14601n, shortName: "sonic-testnet" },
|
|
512
542
|
{ chainId: 14800n, shortName: "vana-moksha" },
|
|
543
|
+
{ chainId: 16661n, shortName: "0g" },
|
|
513
544
|
{ chainId: 17000n, shortName: "holesky" },
|
|
514
545
|
{ chainId: 17069n, shortName: "garnet" },
|
|
515
546
|
{ chainId: 17172n, shortName: "eclipse" },
|
|
516
547
|
{ chainId: 18231n, shortName: "unreal-old" },
|
|
517
548
|
{ chainId: 18233n, shortName: "unreal" },
|
|
518
549
|
{ chainId: 18880n, shortName: "expchain" },
|
|
550
|
+
{ chainId: 20994n, shortName: "fluent-testnet" },
|
|
519
551
|
{ chainId: 22776n, shortName: "mapo" },
|
|
520
552
|
{ chainId: 23294n, shortName: "sapphire" },
|
|
521
553
|
{ chainId: 23295n, shortName: "sapphire-testnet" },
|
|
554
|
+
{ chainId: 24101n, shortName: "incentiv" },
|
|
522
555
|
{ chainId: 25327n, shortName: "Everclear" },
|
|
556
|
+
{ chainId: 26888n, shortName: "tABCore" },
|
|
557
|
+
{ chainId: 28802n, shortName: "tcent" },
|
|
523
558
|
{ chainId: 28882n, shortName: "BobaSepolia" },
|
|
524
559
|
{ chainId: 28979n, shortName: "kimbonet-testnet" },
|
|
560
|
+
{ chainId: 30303n, shortName: "Ethiq" },
|
|
525
561
|
{ chainId: 31611n, shortName: "mezo" },
|
|
526
562
|
{ chainId: 32323n, shortName: "basedai" },
|
|
527
563
|
{ chainId: 32380n, shortName: "paix" },
|
|
528
564
|
{ chainId: 32769n, shortName: "zil" },
|
|
529
565
|
{ chainId: 32770n, shortName: "zq2-proto-mainnet" },
|
|
530
566
|
{ chainId: 33101n, shortName: "zil-testnet" },
|
|
567
|
+
{ chainId: 33111n, shortName: "curtis" },
|
|
531
568
|
{ chainId: 33139n, shortName: "apechain" },
|
|
532
569
|
{ chainId: 33401n, shortName: "slingshot" },
|
|
533
570
|
{ chainId: 34443n, shortName: "mode" },
|
|
534
571
|
{ chainId: 35441n, shortName: "q" },
|
|
535
572
|
{ chainId: 35443n, shortName: "q-testnet" },
|
|
573
|
+
{ chainId: 36888n, shortName: "abcore" },
|
|
574
|
+
{ chainId: 36900n, shortName: "adi" },
|
|
536
575
|
{ chainId: 37111n, shortName: "lens-sepolia" },
|
|
537
576
|
{ chainId: 41455n, shortName: "aleph-zero" },
|
|
538
577
|
{ chainId: 41923n, shortName: "edu-chain" },
|
|
@@ -540,6 +579,7 @@ var networks = [
|
|
|
540
579
|
{ chainId: 42170n, shortName: "arb-nova" },
|
|
541
580
|
{ chainId: 42220n, shortName: "celo" },
|
|
542
581
|
{ chainId: 42421n, shortName: "rwa" },
|
|
582
|
+
{ chainId: 42431n, shortName: "tempo-moderato" },
|
|
543
583
|
{ chainId: 42793n, shortName: "etlk" },
|
|
544
584
|
{ chainId: 43111n, shortName: "hemi" },
|
|
545
585
|
{ chainId: 43113n, shortName: "fuji" },
|
|
@@ -557,6 +597,7 @@ var networks = [
|
|
|
557
597
|
{ chainId: 49321n, shortName: "Stork" },
|
|
558
598
|
{ chainId: 50104n, shortName: "sophon" },
|
|
559
599
|
{ chainId: 50312n, shortName: "SomniaTestnet" },
|
|
600
|
+
{ chainId: 52924n, shortName: "lazai" },
|
|
560
601
|
{ chainId: 53302n, shortName: "seedsep" },
|
|
561
602
|
{ chainId: 53456n, shortName: "birdlayer" },
|
|
562
603
|
{ chainId: 53457n, shortName: "dodochain" },
|
|
@@ -591,35 +632,49 @@ var networks = [
|
|
|
591
632
|
{ chainId: 84532n, shortName: "basesep" },
|
|
592
633
|
{ chainId: 88811n, shortName: "unit0-mainnet" },
|
|
593
634
|
{ chainId: 88817n, shortName: "unit0-testnet" },
|
|
635
|
+
{ chainId: 88882n, shortName: "chzspicy" },
|
|
636
|
+
{ chainId: 88888n, shortName: "chiliz" },
|
|
594
637
|
{ chainId: 90001n, shortName: "dhobyghaut" },
|
|
638
|
+
{ chainId: 91342n, shortName: "giwasepolia" },
|
|
595
639
|
{ chainId: 97435n, shortName: "sling" },
|
|
596
640
|
{ chainId: 98864n, shortName: "plume-devnet" },
|
|
597
641
|
{ chainId: 98865n, shortName: "plume" },
|
|
642
|
+
{ chainId: 98866n, shortName: "plume-mainnet" },
|
|
598
643
|
{ chainId: 98867n, shortName: "plume-testnet" },
|
|
644
|
+
{ chainId: 98985n, shortName: "superposition-testnet" },
|
|
645
|
+
{ chainId: 102030n, shortName: "ctc" },
|
|
599
646
|
{ chainId: 103454n, shortName: "masatest" },
|
|
600
647
|
{ chainId: 105105n, shortName: "stratis" },
|
|
601
648
|
{ chainId: 111188n, shortName: "re-al" },
|
|
649
|
+
{ chainId: 127823n, shortName: "etls" },
|
|
602
650
|
{ chainId: 128123n, shortName: "etlt" },
|
|
603
651
|
{ chainId: 167000n, shortName: "tko-mainnet" },
|
|
604
652
|
{ chainId: 167008n, shortName: "tko-katla" },
|
|
605
653
|
{ chainId: 167009n, shortName: "tko-hekla" },
|
|
654
|
+
{ chainId: 167013n, shortName: "tko-hoodi" },
|
|
606
655
|
{ chainId: 175188n, shortName: "lpy" },
|
|
656
|
+
{ chainId: 181228n, shortName: "hpp-sepolia" },
|
|
657
|
+
{ chainId: 190415n, shortName: "hpp-mainnet" },
|
|
607
658
|
{ chainId: 200101n, shortName: "milktada" },
|
|
608
659
|
{ chainId: 200202n, shortName: "milktalgo" },
|
|
609
660
|
{ chainId: 200810n, shortName: "btrt" },
|
|
610
661
|
{ chainId: 200901n, shortName: "btr" },
|
|
611
662
|
{ chainId: 205205n, shortName: "auroria" },
|
|
612
663
|
{ chainId: 210425n, shortName: "platon" },
|
|
664
|
+
{ chainId: 222888n, shortName: "mocat" },
|
|
665
|
+
{ chainId: 278701n, shortName: "creator-chain-testnet" },
|
|
613
666
|
{ chainId: 314159n, shortName: "filecoin-calibration" },
|
|
614
667
|
{ chainId: 325000n, shortName: "CampV2" },
|
|
615
668
|
{ chainId: 328527n, shortName: "nal" },
|
|
616
669
|
{ chainId: 333999n, shortName: "olympus" },
|
|
670
|
+
{ chainId: 369369n, shortName: "den-mainnet" },
|
|
617
671
|
{ chainId: 381931n, shortName: "metal" },
|
|
618
672
|
{ chainId: 421611n, shortName: "arb-rinkeby" },
|
|
619
673
|
{ chainId: 421613n, shortName: "arb-goerli" },
|
|
620
674
|
{ chainId: 421614n, shortName: "arb-sep" },
|
|
621
675
|
{ chainId: 444444n, shortName: "syndr" },
|
|
622
676
|
{ chainId: 490000n, shortName: "ATN" },
|
|
677
|
+
{ chainId: 511111n, shortName: "alpha-testnet" },
|
|
623
678
|
{ chainId: 534351n, shortName: "scr-sepolia" },
|
|
624
679
|
{ chainId: 534352n, shortName: "scr" },
|
|
625
680
|
{ chainId: 534353n, shortName: "scr-alpha" },
|
|
@@ -632,37 +687,51 @@ var networks = [
|
|
|
632
687
|
{ chainId: 660279n, shortName: "xai" },
|
|
633
688
|
{ chainId: 668668n, shortName: "cnw" },
|
|
634
689
|
{ chainId: 688688n, shortName: "pharos-testnet" },
|
|
690
|
+
{ chainId: 688689n, shortName: "pharos-atlantic" },
|
|
635
691
|
{ chainId: 695569n, shortName: "pyrope" },
|
|
636
692
|
{ chainId: 713715n, shortName: "sei-devnet" },
|
|
637
693
|
{ chainId: 743111n, shortName: "hemi-sep" },
|
|
638
694
|
{ chainId: 747474n, shortName: "katana" },
|
|
639
695
|
{ chainId: 763373n, shortName: "inksepolia" },
|
|
696
|
+
{ chainId: 763375n, shortName: "surge-testnet" },
|
|
640
697
|
{ chainId: 764984n, shortName: "lamina1test" },
|
|
641
698
|
{ chainId: 808813n, shortName: "bob-sepolia" },
|
|
642
699
|
{ chainId: 810180n, shortName: "zklink-nova" },
|
|
643
700
|
{ chainId: 839999n, shortName: "txsat" },
|
|
701
|
+
{ chainId: 853211n, shortName: "haqq-testethiq" },
|
|
644
702
|
{ chainId: 978657n, shortName: "treasure-ruby" },
|
|
645
703
|
{ chainId: 984122n, shortName: "forma" },
|
|
704
|
+
{ chainId: 1000101n, shortName: "xo" },
|
|
705
|
+
{ chainId: 1440000n, shortName: "xrplevm" },
|
|
706
|
+
{ chainId: 1449000n, shortName: "xrplevmtestnet" },
|
|
646
707
|
{ chainId: 1501869n, shortName: "water9" },
|
|
647
708
|
{ chainId: 2206132n, shortName: "platondev2" },
|
|
648
709
|
{ chainId: 2632500n, shortName: "coti" },
|
|
649
710
|
{ chainId: 3441006n, shortName: "mantaSepoliaTestnet" },
|
|
650
711
|
{ chainId: 4457845n, shortName: "zero-sepolia" },
|
|
712
|
+
{ chainId: 5042002n, shortName: "arc-testnet" },
|
|
713
|
+
{ chainId: 5064014n, shortName: "ethereal" },
|
|
651
714
|
{ chainId: 6038361n, shortName: "azkyt" },
|
|
715
|
+
{ chainId: 6281971n, shortName: "dogeos-chykyu" },
|
|
716
|
+
{ chainId: 6985385n, shortName: "hp" },
|
|
652
717
|
{ chainId: 7225878n, shortName: "saakuru" },
|
|
653
718
|
{ chainId: 7777777n, shortName: "zora" },
|
|
654
719
|
{ chainId: 9999999n, shortName: "fluence" },
|
|
720
|
+
{ chainId: 11142220n, shortName: "celo-sep" },
|
|
655
721
|
{ chainId: 11155111n, shortName: "sep" },
|
|
656
722
|
{ chainId: 11155420n, shortName: "opsep" },
|
|
657
723
|
{ chainId: 11155931n, shortName: "rise-testnet" },
|
|
658
724
|
{ chainId: 12227332n, shortName: "neox-t4" },
|
|
725
|
+
{ chainId: 13374202n, shortName: "ethereal-testnet-0" },
|
|
726
|
+
{ chainId: 13863860n, shortName: "sis" },
|
|
727
|
+
{ chainId: 20250407n, shortName: "platondev3" },
|
|
659
728
|
{ chainId: 21000000n, shortName: "corn" },
|
|
660
729
|
{ chainId: 52164803n, shortName: "fluence-testnet" },
|
|
661
730
|
{ chainId: 65100004n, shortName: "piccadilly-04" },
|
|
662
731
|
{ chainId: 94204209n, shortName: "polygon-blackberry" },
|
|
663
732
|
{ chainId: 111557560n, shortName: "cysep" },
|
|
664
733
|
{ chainId: 123420111n, shortName: "opcelestia-raspberry" },
|
|
665
|
-
{ chainId: 161221135n, shortName: "plume-testnet" },
|
|
734
|
+
{ chainId: 161221135n, shortName: "plume-testnet-legacy" },
|
|
666
735
|
{ chainId: 168587773n, shortName: "blastsepolia" },
|
|
667
736
|
{ chainId: 222000222n, shortName: "kanazawa" },
|
|
668
737
|
{ chainId: 245022926n, shortName: "neonevm-devnet" },
|
|
@@ -672,6 +741,7 @@ var networks = [
|
|
|
672
741
|
{ chainId: 333000333n, shortName: "meld" },
|
|
673
742
|
{ chainId: 476462898n, shortName: "Skopje" },
|
|
674
743
|
{ chainId: 531050104n, shortName: "sophon-testnet" },
|
|
744
|
+
{ chainId: 531050204n, shortName: "sophon-os-testnet" },
|
|
675
745
|
{ chainId: 666666666n, shortName: "degen-chain" },
|
|
676
746
|
{ chainId: 888888888n, shortName: "ancient8" },
|
|
677
747
|
{ chainId: 994873017n, shortName: "lumia-mainnet" },
|
|
@@ -685,8 +755,11 @@ var networks = [
|
|
|
685
755
|
{ chainId: 1666600000n, shortName: "hmy-s0" },
|
|
686
756
|
{ chainId: 1666700000n, shortName: "hmy-b-s0" },
|
|
687
757
|
{ chainId: 1952959480n, shortName: "lumiatestnet" },
|
|
758
|
+
{ chainId: 2030232745n, shortName: "lumia-beam-testnet" },
|
|
759
|
+
{ chainId: 3735928814n, shortName: "edent" },
|
|
688
760
|
{ chainId: 11297108099n, shortName: "tpalm" },
|
|
689
761
|
{ chainId: 11297108109n, shortName: "palm" },
|
|
762
|
+
{ chainId: 30143370385n, shortName: "BUB" },
|
|
690
763
|
{ chainId: 37714555429n, shortName: "xaitestnet" },
|
|
691
764
|
{ chainId: 88153591557n, shortName: "arb-blueberry" },
|
|
692
765
|
{ chainId: 123420000220n, shortName: "fluence-stage" },
|
|
@@ -998,7 +1071,8 @@ var SAFE_FEATURES_BY_VERSION = {
|
|
|
998
1071
|
["REQUIRED_TXGAS" /* REQUIRED_TXGAS */]: "<=1.2.0",
|
|
999
1072
|
["SIMULATE_AND_REVERT" /* SIMULATE_AND_REVERT */]: ">=1.3.0",
|
|
1000
1073
|
["PASSKEY_SIGNER" /* PASSKEY_SIGNER */]: ">=1.3.0",
|
|
1001
|
-
["SAFE_L2_CONTRACTS" /* SAFE_L2_CONTRACTS */]: ">=1.3.0"
|
|
1074
|
+
["SAFE_L2_CONTRACTS" /* SAFE_L2_CONTRACTS */]: ">=1.3.0",
|
|
1075
|
+
["SAFE_MODULE_GUARD" /* SAFE_MODULE_GUARD */]: ">=1.5.0"
|
|
1002
1076
|
};
|
|
1003
1077
|
var hasSafeFeature = (feature, version) => {
|
|
1004
1078
|
if (!(feature in SAFE_FEATURES_BY_VERSION)) {
|
|
@@ -1029,6 +1103,7 @@ import { estimateContractGas, getTransactionReceipt } from "viem/actions";
|
|
|
1029
1103
|
import {
|
|
1030
1104
|
getCompatibilityFallbackHandlerDeployments,
|
|
1031
1105
|
getCreateCallDeployments,
|
|
1106
|
+
getExtensibleFallbackHandlerDeployments,
|
|
1032
1107
|
getMultiSendCallOnlyDeployments,
|
|
1033
1108
|
getMultiSendDeployments,
|
|
1034
1109
|
getProxyFactoryDeployments,
|
|
@@ -1041,8 +1116,22 @@ import {
|
|
|
1041
1116
|
getSafeWebAuthnSignerFactoryDeployment,
|
|
1042
1117
|
getSafeWebAuthnShareSignerDeployment
|
|
1043
1118
|
} from "@safe-global/safe-modules-deployments";
|
|
1044
|
-
var DEFAULT_SAFE_VERSION = "1.
|
|
1119
|
+
var DEFAULT_SAFE_VERSION = "1.4.1";
|
|
1045
1120
|
var safeDeploymentsVersions = {
|
|
1121
|
+
"1.5.0": {
|
|
1122
|
+
safeSingletonVersion: "1.5.0",
|
|
1123
|
+
safeSingletonL2Version: "1.5.0",
|
|
1124
|
+
safeProxyFactoryVersion: "1.5.0",
|
|
1125
|
+
compatibilityFallbackHandler: "1.5.0",
|
|
1126
|
+
extensibleFallbackHandler: "1.5.0",
|
|
1127
|
+
multiSendVersion: "1.5.0",
|
|
1128
|
+
multiSendCallOnlyVersion: "1.5.0",
|
|
1129
|
+
signMessageLibVersion: "1.5.0",
|
|
1130
|
+
createCallVersion: "1.5.0",
|
|
1131
|
+
simulateTxAccessorVersion: "1.5.0",
|
|
1132
|
+
safeWebAuthnSignerFactoryVersion: "0.2.1",
|
|
1133
|
+
safeWebAuthnSharedSignerVersion: "0.2.1"
|
|
1134
|
+
},
|
|
1046
1135
|
"1.4.1": {
|
|
1047
1136
|
safeSingletonVersion: "1.4.1",
|
|
1048
1137
|
safeSingletonL2Version: "1.4.1",
|
|
@@ -1115,6 +1204,7 @@ var contractFunctions = {
|
|
|
1115
1204
|
safeSingletonL2Version: getSafeL2SingletonDeployments,
|
|
1116
1205
|
safeProxyFactoryVersion: getProxyFactoryDeployments,
|
|
1117
1206
|
compatibilityFallbackHandler: getCompatibilityFallbackHandlerDeployments,
|
|
1207
|
+
extensibleFallbackHandler: getExtensibleFallbackHandlerDeployments,
|
|
1118
1208
|
multiSendVersion: getMultiSendDeployments,
|
|
1119
1209
|
multiSendCallOnlyVersion: getMultiSendCallOnlyDeployments,
|
|
1120
1210
|
signMessageLibVersion: getSignMessageLibDeployments,
|
|
@@ -1323,7 +1413,7 @@ import { isAddress as isAddress2 } from "viem";
|
|
|
1323
1413
|
|
|
1324
1414
|
// src/utils/passkeys/extractPasskeyData.ts
|
|
1325
1415
|
import { Buffer as Buffer2 } from "buffer";
|
|
1326
|
-
import {
|
|
1416
|
+
import { getDaimoP256VerifierDeployment } from "@safe-global/safe-modules-deployments";
|
|
1327
1417
|
async function decodePublicKeyForWeb(publicKey) {
|
|
1328
1418
|
const algorithm = {
|
|
1329
1419
|
name: "ECDSA",
|
|
@@ -1341,21 +1431,6 @@ async function decodePublicKeyForWeb(publicKey) {
|
|
|
1341
1431
|
y: "0x" + Buffer2.from(y, "base64").toString("hex")
|
|
1342
1432
|
};
|
|
1343
1433
|
}
|
|
1344
|
-
function getDefaultFCLP256VerifierAddress(chainId) {
|
|
1345
|
-
const FCLP256VerifierDeployment = getFCLP256VerifierDeployment({
|
|
1346
|
-
version: "0.2.1",
|
|
1347
|
-
released: true,
|
|
1348
|
-
network: chainId
|
|
1349
|
-
});
|
|
1350
|
-
if (!FCLP256VerifierDeployment) {
|
|
1351
|
-
throw new Error(`Failed to load FCLP256Verifier deployment for chain ID ${chainId}`);
|
|
1352
|
-
}
|
|
1353
|
-
const verifierAddress = FCLP256VerifierDeployment.networkAddresses[chainId];
|
|
1354
|
-
if (!verifierAddress) {
|
|
1355
|
-
throw new Error(`FCLP256Verifier address not found for chain ID ${chainId}`);
|
|
1356
|
-
}
|
|
1357
|
-
return verifierAddress;
|
|
1358
|
-
}
|
|
1359
1434
|
|
|
1360
1435
|
// src/utils/passkeys/PasskeyClient.ts
|
|
1361
1436
|
import {
|
|
@@ -1377,15 +1452,14 @@ import {
|
|
|
1377
1452
|
} from "viem";
|
|
1378
1453
|
|
|
1379
1454
|
// src/utils/passkeys/isSharedSigner.ts
|
|
1380
|
-
async function isSharedSigner(passkey, safeWebAuthnSharedSignerContract, safeAddress, owners
|
|
1455
|
+
async function isSharedSigner(passkey, safeWebAuthnSharedSignerContract, safeAddress, owners) {
|
|
1381
1456
|
const sharedSignerContractAddress = safeWebAuthnSharedSignerContract.contractAddress;
|
|
1382
1457
|
if (safeAddress && owners.includes(sharedSignerContractAddress)) {
|
|
1383
1458
|
const [sharedSignerSlot] = await safeWebAuthnSharedSignerContract.getConfiguration([
|
|
1384
1459
|
asHex(safeAddress)
|
|
1385
1460
|
]);
|
|
1386
1461
|
const { x, y, verifiers } = sharedSignerSlot;
|
|
1387
|
-
const
|
|
1388
|
-
const isSharedSigner2 = BigInt(passkey.coordinates.x) === x && BigInt(passkey.coordinates.y) === y && BigInt(verifierAddress) === verifiers;
|
|
1462
|
+
const isSharedSigner2 = BigInt(passkey.coordinates.x) === x && BigInt(passkey.coordinates.y) === y && BigInt(passkey.verifierAddress) === verifiers;
|
|
1389
1463
|
return isSharedSigner2;
|
|
1390
1464
|
}
|
|
1391
1465
|
return false;
|
|
@@ -1421,16 +1495,14 @@ var signTransaction = () => {
|
|
|
1421
1495
|
var signTypedData = () => {
|
|
1422
1496
|
throw new Error("Passkey Signers cannot sign signTypedData, they can only sign data.");
|
|
1423
1497
|
};
|
|
1424
|
-
var createPasskeyClient = async (passkey, safeWebAuthnSignerFactoryContract, safeWebAuthnSharedSignerContract, provider, safeAddress, owners
|
|
1425
|
-
const { rawId, coordinates,
|
|
1498
|
+
var createPasskeyClient = async (passkey, safeWebAuthnSignerFactoryContract, safeWebAuthnSharedSignerContract, provider, safeAddress, owners) => {
|
|
1499
|
+
const { rawId, coordinates, verifierAddress } = passkey;
|
|
1426
1500
|
const passkeyRawId = hexToBytes(asHex(rawId));
|
|
1427
|
-
const verifierAddress = customVerifierAddress || getDefaultFCLP256VerifierAddress(chainId);
|
|
1428
1501
|
const isPasskeySharedSigner = await isSharedSigner_default(
|
|
1429
1502
|
passkey,
|
|
1430
1503
|
safeWebAuthnSharedSignerContract,
|
|
1431
1504
|
safeAddress,
|
|
1432
|
-
owners
|
|
1433
|
-
chainId
|
|
1505
|
+
owners
|
|
1434
1506
|
);
|
|
1435
1507
|
let signerAddress;
|
|
1436
1508
|
if (isPasskeySharedSigner) {
|
|
@@ -1598,8 +1670,7 @@ var SafeProvider = class _SafeProvider {
|
|
|
1598
1670
|
safeWebAuthnSharedSignerContract,
|
|
1599
1671
|
safeProvider.getExternalProvider(),
|
|
1600
1672
|
safeAddress || "",
|
|
1601
|
-
owners || []
|
|
1602
|
-
chainId.toString()
|
|
1673
|
+
owners || []
|
|
1603
1674
|
);
|
|
1604
1675
|
} else {
|
|
1605
1676
|
passkeySigner = signer;
|
|
@@ -1879,6 +1950,11 @@ import {
|
|
|
1879
1950
|
createCall_1_4_1_ContractArtifacts
|
|
1880
1951
|
} from "@safe-global/types-kit";
|
|
1881
1952
|
|
|
1953
|
+
// src/contracts/CreateCall/v1.5.0/CreateCallContract_v1_5_0.ts
|
|
1954
|
+
import {
|
|
1955
|
+
createCall_1_5_0_ContractArtifacts
|
|
1956
|
+
} from "@safe-global/types-kit";
|
|
1957
|
+
|
|
1882
1958
|
// src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.ts
|
|
1883
1959
|
import {
|
|
1884
1960
|
multisend_1_1_1_ContractArtifacts
|
|
@@ -1894,6 +1970,11 @@ import {
|
|
|
1894
1970
|
multisend_1_4_1_ContractArtifacts
|
|
1895
1971
|
} from "@safe-global/types-kit";
|
|
1896
1972
|
|
|
1973
|
+
// src/contracts/MultiSend/v1.5.0/MultiSendContract_v1_5_0.ts
|
|
1974
|
+
import {
|
|
1975
|
+
multisend_1_5_0_ContractArtifacts
|
|
1976
|
+
} from "@safe-global/types-kit";
|
|
1977
|
+
|
|
1897
1978
|
// src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.ts
|
|
1898
1979
|
import {
|
|
1899
1980
|
multiSendCallOnly_1_3_0_ContractArtifacts
|
|
@@ -1904,6 +1985,11 @@ import {
|
|
|
1904
1985
|
multiSendCallOnly_1_4_1_ContractArtifacts
|
|
1905
1986
|
} from "@safe-global/types-kit";
|
|
1906
1987
|
|
|
1988
|
+
// src/contracts/MultiSend/v1.5.0/MultiSendCallOnlyContract_v1_5_0.ts
|
|
1989
|
+
import {
|
|
1990
|
+
multiSendCallOnly_1_5_0_ContractArtifacts
|
|
1991
|
+
} from "@safe-global/types-kit";
|
|
1992
|
+
|
|
1907
1993
|
// src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.ts
|
|
1908
1994
|
import {
|
|
1909
1995
|
signMessageLib_1_3_0_ContractArtifacts
|
|
@@ -1914,6 +2000,11 @@ import {
|
|
|
1914
2000
|
signMessageLib_1_4_1_ContractArtifacts
|
|
1915
2001
|
} from "@safe-global/types-kit";
|
|
1916
2002
|
|
|
2003
|
+
// src/contracts/SignMessageLib/v1.5.0/SignMessageLibContract_v1_5_0.ts
|
|
2004
|
+
import {
|
|
2005
|
+
signMessageLib_1_5_0_ContractArtifacts
|
|
2006
|
+
} from "@safe-global/types-kit";
|
|
2007
|
+
|
|
1917
2008
|
// src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.ts
|
|
1918
2009
|
import { simulateContract } from "viem/actions";
|
|
1919
2010
|
|
|
@@ -3119,7 +3210,7 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
|
|
|
3119
3210
|
return [await this.read("getOwners")];
|
|
3120
3211
|
};
|
|
3121
3212
|
/**
|
|
3122
|
-
* Reads `length` bytes of storage in the
|
|
3213
|
+
* Reads `length` bytes of storage in the current contract
|
|
3123
3214
|
* @param args - Array[offset, length]
|
|
3124
3215
|
* @returns Array[storage]
|
|
3125
3216
|
*/
|
|
@@ -3302,6 +3393,330 @@ var SafeContract_v1_4_1 = class extends SafeBaseContract_default {
|
|
|
3302
3393
|
};
|
|
3303
3394
|
var SafeContract_v1_4_1_default = SafeContract_v1_4_1;
|
|
3304
3395
|
|
|
3396
|
+
// src/contracts/Safe/v1.5.0/SafeContract_v1_5_0.ts
|
|
3397
|
+
import { readContract as readContract2, simulateContract as simulateContract6 } from "viem/actions";
|
|
3398
|
+
import {
|
|
3399
|
+
safe_1_5_0_ContractArtifacts
|
|
3400
|
+
} from "@safe-global/types-kit";
|
|
3401
|
+
var SafeContract_v1_5_0 = class extends SafeBaseContract_default {
|
|
3402
|
+
/**
|
|
3403
|
+
* Constructs an instance of SafeContract_v1_5_0
|
|
3404
|
+
*
|
|
3405
|
+
* @param chainId - The chain ID where the contract resides.
|
|
3406
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
3407
|
+
* @param isL1SafeSingleton - A flag indicating if the contract is a L1 Safe Singleton.
|
|
3408
|
+
* @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.
|
|
3409
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
3410
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
3411
|
+
*/
|
|
3412
|
+
constructor(chainId, safeProvider, isL1SafeSingleton, customContractAddress, customContractAbi, deploymentType) {
|
|
3413
|
+
const safeVersion = "1.5.0";
|
|
3414
|
+
const defaultAbi = safe_1_5_0_ContractArtifacts.abi;
|
|
3415
|
+
super(
|
|
3416
|
+
chainId,
|
|
3417
|
+
safeProvider,
|
|
3418
|
+
defaultAbi,
|
|
3419
|
+
safeVersion,
|
|
3420
|
+
isL1SafeSingleton,
|
|
3421
|
+
customContractAddress,
|
|
3422
|
+
customContractAbi,
|
|
3423
|
+
deploymentType
|
|
3424
|
+
);
|
|
3425
|
+
/**
|
|
3426
|
+
* @returns Array[safeContractVersion]
|
|
3427
|
+
*/
|
|
3428
|
+
this.VERSION = async () => {
|
|
3429
|
+
return [await this.read("VERSION")];
|
|
3430
|
+
};
|
|
3431
|
+
/**
|
|
3432
|
+
* @param args - Array[owner, txHash]
|
|
3433
|
+
* @returns Array[approvedHashes]
|
|
3434
|
+
*/
|
|
3435
|
+
this.approvedHashes = async (args) => {
|
|
3436
|
+
return [await this.read("approvedHashes", args)];
|
|
3437
|
+
};
|
|
3438
|
+
/**
|
|
3439
|
+
* Checks whether the signature provided is valid for the provided data, hash and number of required signatures.
|
|
3440
|
+
* Will revert otherwise.
|
|
3441
|
+
* @param args - Array[dataHash, data, signatures, requiredSignatures]
|
|
3442
|
+
* @returns Empty array
|
|
3443
|
+
*/
|
|
3444
|
+
this.checkNSignatures = async (args) => {
|
|
3445
|
+
await this.read("checkNSignatures", args);
|
|
3446
|
+
return [];
|
|
3447
|
+
};
|
|
3448
|
+
/**
|
|
3449
|
+
* New in v1.5.0: overload of checkNSignatures that accepts an explicit executor address.
|
|
3450
|
+
* Allows modules to pass msg.sender explicitly rather than relying on the contract's own context.
|
|
3451
|
+
* Will revert otherwise.
|
|
3452
|
+
* @param args - Array[executor, dataHash, signatures, requiredSignatures]
|
|
3453
|
+
* @returns Empty array
|
|
3454
|
+
*/
|
|
3455
|
+
this.checkNSignaturesWithExecutor = async (args) => {
|
|
3456
|
+
await readContract2(this.runner, {
|
|
3457
|
+
address: this.contractAddress,
|
|
3458
|
+
functionName: "checkNSignatures",
|
|
3459
|
+
abi: [
|
|
3460
|
+
{
|
|
3461
|
+
inputs: [
|
|
3462
|
+
{ internalType: "address", name: "executor", type: "address" },
|
|
3463
|
+
{ internalType: "bytes32", name: "dataHash", type: "bytes32" },
|
|
3464
|
+
{ internalType: "bytes", name: "signatures", type: "bytes" },
|
|
3465
|
+
{ internalType: "uint256", name: "requiredSignatures", type: "uint256" }
|
|
3466
|
+
],
|
|
3467
|
+
name: "checkNSignatures",
|
|
3468
|
+
outputs: [],
|
|
3469
|
+
stateMutability: "view",
|
|
3470
|
+
type: "function"
|
|
3471
|
+
}
|
|
3472
|
+
],
|
|
3473
|
+
args
|
|
3474
|
+
});
|
|
3475
|
+
return [];
|
|
3476
|
+
};
|
|
3477
|
+
/**
|
|
3478
|
+
* Checks whether the signature provided is valid for the provided data and hash. Will revert otherwise.
|
|
3479
|
+
* @param args - Array[dataHash, data, signatures]
|
|
3480
|
+
* @returns Empty array
|
|
3481
|
+
*/
|
|
3482
|
+
this.checkSignatures = async (args) => {
|
|
3483
|
+
await this.read("checkSignatures", args);
|
|
3484
|
+
return [];
|
|
3485
|
+
};
|
|
3486
|
+
/**
|
|
3487
|
+
* New in v1.5.0: overload of checkSignatures that accepts an explicit executor address.
|
|
3488
|
+
* Allows modules to pass msg.sender explicitly rather than relying on the contract's own context.
|
|
3489
|
+
* Will revert otherwise.
|
|
3490
|
+
* @param args - Array[executor, dataHash, signatures]
|
|
3491
|
+
* @returns Empty array
|
|
3492
|
+
*/
|
|
3493
|
+
this.checkSignaturesWithExecutor = async (args) => {
|
|
3494
|
+
await readContract2(this.runner, {
|
|
3495
|
+
address: this.contractAddress,
|
|
3496
|
+
functionName: "checkSignatures",
|
|
3497
|
+
abi: [
|
|
3498
|
+
{
|
|
3499
|
+
inputs: [
|
|
3500
|
+
{ internalType: "address", name: "executor", type: "address" },
|
|
3501
|
+
{ internalType: "bytes32", name: "dataHash", type: "bytes32" },
|
|
3502
|
+
{ internalType: "bytes", name: "signatures", type: "bytes" }
|
|
3503
|
+
],
|
|
3504
|
+
name: "checkSignatures",
|
|
3505
|
+
outputs: [],
|
|
3506
|
+
stateMutability: "view",
|
|
3507
|
+
type: "function"
|
|
3508
|
+
}
|
|
3509
|
+
],
|
|
3510
|
+
args
|
|
3511
|
+
});
|
|
3512
|
+
return [];
|
|
3513
|
+
};
|
|
3514
|
+
/**
|
|
3515
|
+
* @returns Array[domainSeparator]
|
|
3516
|
+
*/
|
|
3517
|
+
this.domainSeparator = async () => {
|
|
3518
|
+
return [await this.read("domainSeparator")];
|
|
3519
|
+
};
|
|
3520
|
+
/**
|
|
3521
|
+
* Returns array of modules.
|
|
3522
|
+
* @param args - Array[start, pageSize]
|
|
3523
|
+
* @returns Array[Array[modules], next]
|
|
3524
|
+
*/
|
|
3525
|
+
this.getModulesPaginated = async (args) => {
|
|
3526
|
+
const [array, next] = await this.read("getModulesPaginated", args);
|
|
3527
|
+
return [array, next];
|
|
3528
|
+
};
|
|
3529
|
+
/**
|
|
3530
|
+
* Returns the list of Safe owner accounts.
|
|
3531
|
+
* @returns Array[Array[owners]]
|
|
3532
|
+
*/
|
|
3533
|
+
this.getOwners = async () => {
|
|
3534
|
+
return [await this.read("getOwners")];
|
|
3535
|
+
};
|
|
3536
|
+
/**
|
|
3537
|
+
* Reads `length` bytes of storage in the current contract
|
|
3538
|
+
* @param args - Array[offset, length]
|
|
3539
|
+
* @returns Array[storage]
|
|
3540
|
+
*/
|
|
3541
|
+
this.getStorageAt = async (args) => {
|
|
3542
|
+
return [await this.read("getStorageAt", args)];
|
|
3543
|
+
};
|
|
3544
|
+
/**
|
|
3545
|
+
* Returns the Safe threshold.
|
|
3546
|
+
* @returns Array[threshold]
|
|
3547
|
+
*/
|
|
3548
|
+
this.getThreshold = async () => {
|
|
3549
|
+
return [await this.read("getThreshold")];
|
|
3550
|
+
};
|
|
3551
|
+
/**
|
|
3552
|
+
* Returns hash to be signed by owners.
|
|
3553
|
+
* @param args - Array[to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce]
|
|
3554
|
+
* @returns Array[transactionHash]
|
|
3555
|
+
*/
|
|
3556
|
+
this.getTransactionHash = async (args) => {
|
|
3557
|
+
return [await this.read("getTransactionHash", args)];
|
|
3558
|
+
};
|
|
3559
|
+
/**
|
|
3560
|
+
* Checks if a specific Safe module is enabled for the current Safe.
|
|
3561
|
+
* @param args - Array[moduleAddress]
|
|
3562
|
+
* @returns Array[isEnabled]
|
|
3563
|
+
*/
|
|
3564
|
+
this.isModuleEnabled = async (args) => {
|
|
3565
|
+
return [await this.read("isModuleEnabled", args)];
|
|
3566
|
+
};
|
|
3567
|
+
/**
|
|
3568
|
+
* Checks if a specific address is an owner of the current Safe.
|
|
3569
|
+
* @param args - Array[address]
|
|
3570
|
+
* @returns Array[isOwner]
|
|
3571
|
+
*/
|
|
3572
|
+
this.isOwner = async (args) => {
|
|
3573
|
+
return [await this.read("isOwner", args)];
|
|
3574
|
+
};
|
|
3575
|
+
/**
|
|
3576
|
+
* Returns the Safe nonce.
|
|
3577
|
+
* @returns Array[nonce]
|
|
3578
|
+
*/
|
|
3579
|
+
this.nonce = async () => {
|
|
3580
|
+
return [await this.read("nonce")];
|
|
3581
|
+
};
|
|
3582
|
+
/**
|
|
3583
|
+
* @param args - Array[messageHash]
|
|
3584
|
+
* @returns Array[signedMessages]
|
|
3585
|
+
*/
|
|
3586
|
+
this.signedMessages = async (args) => {
|
|
3587
|
+
return [await this.read("signedMessages", args)];
|
|
3588
|
+
};
|
|
3589
|
+
}
|
|
3590
|
+
/**
|
|
3591
|
+
* Checks whether a given Safe transaction can be executed successfully with no errors.
|
|
3592
|
+
* @param safeTransaction - The Safe transaction to check.
|
|
3593
|
+
* @param options - Optional transaction options.
|
|
3594
|
+
* @returns True, if the given transactions is valid.
|
|
3595
|
+
*/
|
|
3596
|
+
async isValidTransaction(safeTransaction, options = {}) {
|
|
3597
|
+
try {
|
|
3598
|
+
const gasLimit = options?.gasLimit || await this.estimateGas(
|
|
3599
|
+
"execTransaction",
|
|
3600
|
+
[
|
|
3601
|
+
safeTransaction.data.to,
|
|
3602
|
+
BigInt(safeTransaction.data.value),
|
|
3603
|
+
asHex(safeTransaction.data.data),
|
|
3604
|
+
safeTransaction.data.operation,
|
|
3605
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3606
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3607
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3608
|
+
safeTransaction.data.gasToken,
|
|
3609
|
+
safeTransaction.data.refundReceiver,
|
|
3610
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3611
|
+
],
|
|
3612
|
+
options
|
|
3613
|
+
);
|
|
3614
|
+
const converted = this.convertOptions({ ...options, gasLimit });
|
|
3615
|
+
const txResult = await simulateContract6(this.runner, {
|
|
3616
|
+
address: this.contractAddress,
|
|
3617
|
+
functionName: "execTransaction",
|
|
3618
|
+
abi: this.contractAbi,
|
|
3619
|
+
args: [
|
|
3620
|
+
safeTransaction.data.to,
|
|
3621
|
+
BigInt(safeTransaction.data.value),
|
|
3622
|
+
asHex(safeTransaction.data.data),
|
|
3623
|
+
safeTransaction.data.operation,
|
|
3624
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3625
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3626
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3627
|
+
safeTransaction.data.gasToken,
|
|
3628
|
+
safeTransaction.data.refundReceiver,
|
|
3629
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3630
|
+
],
|
|
3631
|
+
...converted
|
|
3632
|
+
});
|
|
3633
|
+
return txResult.result;
|
|
3634
|
+
} catch (error) {
|
|
3635
|
+
return false;
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3638
|
+
/**
|
|
3639
|
+
* Executes a transaction.
|
|
3640
|
+
* @param safeTransaction - The Safe transaction to execute.
|
|
3641
|
+
* @param options - Transaction options.
|
|
3642
|
+
* @returns Transaction result.
|
|
3643
|
+
*/
|
|
3644
|
+
async execTransaction(safeTransaction, options) {
|
|
3645
|
+
const gasLimit = options?.gasLimit || await this.estimateGas(
|
|
3646
|
+
"execTransaction",
|
|
3647
|
+
[
|
|
3648
|
+
safeTransaction.data.to,
|
|
3649
|
+
BigInt(safeTransaction.data.value),
|
|
3650
|
+
asHex(safeTransaction.data.data),
|
|
3651
|
+
safeTransaction.data.operation,
|
|
3652
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3653
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3654
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3655
|
+
safeTransaction.data.gasToken,
|
|
3656
|
+
safeTransaction.data.refundReceiver,
|
|
3657
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3658
|
+
],
|
|
3659
|
+
options
|
|
3660
|
+
);
|
|
3661
|
+
const args = [
|
|
3662
|
+
safeTransaction.data.to,
|
|
3663
|
+
BigInt(safeTransaction.data.value),
|
|
3664
|
+
asHex(safeTransaction.data.data),
|
|
3665
|
+
safeTransaction.data.operation,
|
|
3666
|
+
BigInt(safeTransaction.data.safeTxGas),
|
|
3667
|
+
BigInt(safeTransaction.data.baseGas),
|
|
3668
|
+
BigInt(safeTransaction.data.gasPrice),
|
|
3669
|
+
safeTransaction.data.gasToken,
|
|
3670
|
+
safeTransaction.data.refundReceiver,
|
|
3671
|
+
asHex(safeTransaction.encodedSignatures())
|
|
3672
|
+
];
|
|
3673
|
+
return toTxResult(
|
|
3674
|
+
this.runner,
|
|
3675
|
+
await this.write("execTransaction", args, { ...options, gasLimit }),
|
|
3676
|
+
options
|
|
3677
|
+
);
|
|
3678
|
+
}
|
|
3679
|
+
/**
|
|
3680
|
+
* Returns array of first 10 modules.
|
|
3681
|
+
* @returns Array[modules]
|
|
3682
|
+
*/
|
|
3683
|
+
async getModules() {
|
|
3684
|
+
const [modules] = await this.getModulesPaginated([SENTINEL_ADDRESS, BigInt(10)]);
|
|
3685
|
+
return [modules.map((module) => module)];
|
|
3686
|
+
}
|
|
3687
|
+
/**
|
|
3688
|
+
* Marks a hash as approved. This can be used to validate a hash that is used by a signature.
|
|
3689
|
+
* @param hash - The hash that should be marked as approved for signatures that are verified by this contract.
|
|
3690
|
+
* @param options - Optional transaction options.
|
|
3691
|
+
* @returns Transaction result.
|
|
3692
|
+
*/
|
|
3693
|
+
async approveHash(hash, options) {
|
|
3694
|
+
const gasLimit = options?.gasLimit || await this.estimateGas("approveHash", [asHash(hash)], options);
|
|
3695
|
+
return toTxResult(
|
|
3696
|
+
this.runner,
|
|
3697
|
+
await this.write("approveHash", [asHash(hash)], { ...options, gasLimit }),
|
|
3698
|
+
options
|
|
3699
|
+
);
|
|
3700
|
+
}
|
|
3701
|
+
/**
|
|
3702
|
+
* Returns the chain id of the Safe contract. (Custom method - not defined in the Safe Contract)
|
|
3703
|
+
* @returns Array[chainId]
|
|
3704
|
+
*/
|
|
3705
|
+
async getChainId() {
|
|
3706
|
+
return [await Promise.resolve(this.chainId)];
|
|
3707
|
+
}
|
|
3708
|
+
/**
|
|
3709
|
+
* returns the nonce of the Safe contract.
|
|
3710
|
+
*
|
|
3711
|
+
* @returns {Promise<bigint>} A promise that resolves to the nonce of the Safe contract.
|
|
3712
|
+
*/
|
|
3713
|
+
async getNonce() {
|
|
3714
|
+
const [nonce] = await this.nonce();
|
|
3715
|
+
return nonce;
|
|
3716
|
+
}
|
|
3717
|
+
};
|
|
3718
|
+
var SafeContract_v1_5_0_default = SafeContract_v1_5_0;
|
|
3719
|
+
|
|
3305
3720
|
// src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.ts
|
|
3306
3721
|
var SafeProxyFactoryBaseContract = class extends BaseContract_default {
|
|
3307
3722
|
/**
|
|
@@ -3614,6 +4029,82 @@ var SafeProxyFactoryContract_v1_4_1 = class extends SafeProxyFactoryBaseContract
|
|
|
3614
4029
|
};
|
|
3615
4030
|
var SafeProxyFactoryContract_v1_4_1_default = SafeProxyFactoryContract_v1_4_1;
|
|
3616
4031
|
|
|
4032
|
+
// src/contracts/SafeProxyFactory/v1.5.0/SafeProxyFactoryContract_v1_5_0.ts
|
|
4033
|
+
import {
|
|
4034
|
+
safeProxyFactory_1_5_0_ContractArtifacts
|
|
4035
|
+
} from "@safe-global/types-kit";
|
|
4036
|
+
var SafeProxyFactoryContract_v1_5_0 = class extends SafeProxyFactoryBaseContract_default {
|
|
4037
|
+
/**
|
|
4038
|
+
* Constructs an instance of SafeProxyFactoryContract_v1_5_0
|
|
4039
|
+
*
|
|
4040
|
+
* @param chainId - The chain ID where the contract resides.
|
|
4041
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
4042
|
+
* @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.
|
|
4043
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
4044
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
4045
|
+
*/
|
|
4046
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
4047
|
+
const safeVersion = "1.5.0";
|
|
4048
|
+
const defaultAbi = safeProxyFactory_1_5_0_ContractArtifacts.abi;
|
|
4049
|
+
super(
|
|
4050
|
+
chainId,
|
|
4051
|
+
safeProvider,
|
|
4052
|
+
defaultAbi,
|
|
4053
|
+
safeVersion,
|
|
4054
|
+
customContractAddress,
|
|
4055
|
+
customContractAbi,
|
|
4056
|
+
deploymentType
|
|
4057
|
+
);
|
|
4058
|
+
/**
|
|
4059
|
+
* Returns the ID of the chain the contract is currently deployed on.
|
|
4060
|
+
* @returns Array[chainId]
|
|
4061
|
+
*/
|
|
4062
|
+
this.getChainId = async () => {
|
|
4063
|
+
return [await this.read("getChainId")];
|
|
4064
|
+
};
|
|
4065
|
+
/**
|
|
4066
|
+
* Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
|
|
4067
|
+
* @returns Array[creationCode]
|
|
4068
|
+
*/
|
|
4069
|
+
this.proxyCreationCode = async () => {
|
|
4070
|
+
return [await this.read("proxyCreationCode")];
|
|
4071
|
+
};
|
|
4072
|
+
/**
|
|
4073
|
+
* Deploys a new chain-specific proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4074
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4075
|
+
* @returns Array[proxy]
|
|
4076
|
+
*/
|
|
4077
|
+
this.createChainSpecificProxyWithNonce = async (args) => {
|
|
4078
|
+
return [await this.write("createChainSpecificProxyWithNonce", args)];
|
|
4079
|
+
};
|
|
4080
|
+
/**
|
|
4081
|
+
* Deploys a new chain-specific proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4082
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4083
|
+
* @returns Array[proxy]
|
|
4084
|
+
*/
|
|
4085
|
+
this.createChainSpecificProxyWithNonceL2 = async (args) => {
|
|
4086
|
+
return [await this.write("createChainSpecificProxyWithNonceL2", args)];
|
|
4087
|
+
};
|
|
4088
|
+
/**
|
|
4089
|
+
* Deploys a new proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4090
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4091
|
+
* @returns Array[proxy]
|
|
4092
|
+
*/
|
|
4093
|
+
this.createProxyWithNonce = async (args) => {
|
|
4094
|
+
return [await this.write("createProxyWithNonce", args)];
|
|
4095
|
+
};
|
|
4096
|
+
/**
|
|
4097
|
+
* Deploys a new proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
|
|
4098
|
+
* @param args - Array[singleton, initializer, saltNonce]
|
|
4099
|
+
* @returns Array[proxy]
|
|
4100
|
+
*/
|
|
4101
|
+
this.createProxyWithNonceL2 = async (args) => {
|
|
4102
|
+
return [await this.write("createProxyWithNonceL2", args)];
|
|
4103
|
+
};
|
|
4104
|
+
}
|
|
4105
|
+
};
|
|
4106
|
+
var SafeProxyFactoryContract_v1_5_0_default = SafeProxyFactoryContract_v1_5_0;
|
|
4107
|
+
|
|
3617
4108
|
// src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.ts
|
|
3618
4109
|
import {
|
|
3619
4110
|
simulateTxAccessor_1_3_0_ContractArtifacts
|
|
@@ -3624,6 +4115,11 @@ import {
|
|
|
3624
4115
|
simulateTxAccessor_1_4_1_ContractArtifacts
|
|
3625
4116
|
} from "@safe-global/types-kit";
|
|
3626
4117
|
|
|
4118
|
+
// src/contracts/SimulateTxAccessor/v1.5.0/SimulateTxAccessorContract_v1_5_0.ts
|
|
4119
|
+
import {
|
|
4120
|
+
simulateTxAccessor_1_5_0_ContractArtifacts
|
|
4121
|
+
} from "@safe-global/types-kit";
|
|
4122
|
+
|
|
3627
4123
|
// src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.ts
|
|
3628
4124
|
var CompatibilityFallbackHandlerBaseContract = class extends BaseContract_default {
|
|
3629
4125
|
/**
|
|
@@ -3715,6 +4211,50 @@ var CompatibilityFallbackHandlerContract_v1_4_1 = class extends CompatibilityFal
|
|
|
3715
4211
|
};
|
|
3716
4212
|
var CompatibilityFallbackHandlerContract_v1_4_1_default = CompatibilityFallbackHandlerContract_v1_4_1;
|
|
3717
4213
|
|
|
4214
|
+
// src/contracts/CompatibilityFallbackHandler/v1.5.0/CompatibilityFallbackHandlerContract_v1_5_0.ts
|
|
4215
|
+
import {
|
|
4216
|
+
compatibilityFallbackHandler_1_5_0_ContractArtifacts
|
|
4217
|
+
} from "@safe-global/types-kit";
|
|
4218
|
+
var CompatibilityFallbackHandlerContract_v1_5_0 = class extends CompatibilityFallbackHandlerBaseContract_default {
|
|
4219
|
+
/**
|
|
4220
|
+
* Constructs an instance of CompatibilityFallbackHandlerContract_v1_5_0
|
|
4221
|
+
*
|
|
4222
|
+
* @param chainId - The chain ID where the contract resides.
|
|
4223
|
+
* @param safeProvider - An instance of SafeProvider.
|
|
4224
|
+
* @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.
|
|
4225
|
+
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.5.0 is used.
|
|
4226
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
4227
|
+
*/
|
|
4228
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
4229
|
+
const safeVersion = "1.5.0";
|
|
4230
|
+
const defaultAbi = compatibilityFallbackHandler_1_5_0_ContractArtifacts.abi;
|
|
4231
|
+
super(
|
|
4232
|
+
chainId,
|
|
4233
|
+
safeProvider,
|
|
4234
|
+
defaultAbi,
|
|
4235
|
+
safeVersion,
|
|
4236
|
+
customContractAddress,
|
|
4237
|
+
customContractAbi,
|
|
4238
|
+
deploymentType
|
|
4239
|
+
);
|
|
4240
|
+
/**
|
|
4241
|
+
* New in v1.5.0: encodeTransactionData was moved from the Safe contract to CompatibilityFallbackHandler
|
|
4242
|
+
* to preserve backwards compatibility for existing integrations.
|
|
4243
|
+
* @param args - Array[to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, nonce]
|
|
4244
|
+
* @returns Array[encodedData]
|
|
4245
|
+
*/
|
|
4246
|
+
this.encodeTransactionData = async (args) => {
|
|
4247
|
+
return [await this.read("encodeTransactionData", args)];
|
|
4248
|
+
};
|
|
4249
|
+
}
|
|
4250
|
+
};
|
|
4251
|
+
var CompatibilityFallbackHandlerContract_v1_5_0_default = CompatibilityFallbackHandlerContract_v1_5_0;
|
|
4252
|
+
|
|
4253
|
+
// src/contracts/ExtensibleFallbackHandler/v1.5.0/ExtensibleFallbackHandlerContract_v1_5_0.ts
|
|
4254
|
+
import {
|
|
4255
|
+
extensibleFallbackHandler_1_5_0_ContractArtifacts
|
|
4256
|
+
} from "@safe-global/types-kit";
|
|
4257
|
+
|
|
3718
4258
|
// src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.ts
|
|
3719
4259
|
var SafeWebAuthnSignerFactoryBaseContract = class extends BaseContract_default {
|
|
3720
4260
|
/**
|
|
@@ -3887,6 +4427,16 @@ async function getSafeContractInstance(safeVersion, safeProvider, contractAddres
|
|
|
3887
4427
|
const chainId = await safeProvider.getChainId();
|
|
3888
4428
|
let safeContractInstance;
|
|
3889
4429
|
switch (safeVersion) {
|
|
4430
|
+
case "1.5.0":
|
|
4431
|
+
safeContractInstance = new SafeContract_v1_5_0_default(
|
|
4432
|
+
chainId,
|
|
4433
|
+
safeProvider,
|
|
4434
|
+
isL1SafeSingleton,
|
|
4435
|
+
contractAddress,
|
|
4436
|
+
customContractAbi,
|
|
4437
|
+
deploymentType
|
|
4438
|
+
);
|
|
4439
|
+
break;
|
|
3890
4440
|
case "1.4.1":
|
|
3891
4441
|
safeContractInstance = new SafeContract_v1_4_1_default(
|
|
3892
4442
|
chainId,
|
|
@@ -3947,6 +4497,15 @@ async function getCompatibilityFallbackHandlerContractInstance(safeVersion, safe
|
|
|
3947
4497
|
const chainId = await safeProvider.getChainId();
|
|
3948
4498
|
let compatibilityFallbackHandlerInstance;
|
|
3949
4499
|
switch (safeVersion) {
|
|
4500
|
+
case "1.5.0":
|
|
4501
|
+
compatibilityFallbackHandlerInstance = new CompatibilityFallbackHandlerContract_v1_5_0_default(
|
|
4502
|
+
chainId,
|
|
4503
|
+
safeProvider,
|
|
4504
|
+
contractAddress,
|
|
4505
|
+
customContractAbi,
|
|
4506
|
+
deploymentType
|
|
4507
|
+
);
|
|
4508
|
+
break;
|
|
3950
4509
|
case "1.4.1":
|
|
3951
4510
|
compatibilityFallbackHandlerInstance = new CompatibilityFallbackHandlerContract_v1_4_1_default(
|
|
3952
4511
|
chainId,
|
|
@@ -3977,6 +4536,15 @@ async function getSafeProxyFactoryContractInstance(safeVersion, safeProvider, co
|
|
|
3977
4536
|
const chainId = await safeProvider.getChainId();
|
|
3978
4537
|
let safeProxyFactoryContractInstance;
|
|
3979
4538
|
switch (safeVersion) {
|
|
4539
|
+
case "1.5.0":
|
|
4540
|
+
safeProxyFactoryContractInstance = new SafeProxyFactoryContract_v1_5_0_default(
|
|
4541
|
+
chainId,
|
|
4542
|
+
safeProvider,
|
|
4543
|
+
contractAddress,
|
|
4544
|
+
customContractAbi,
|
|
4545
|
+
deploymentType
|
|
4546
|
+
);
|
|
4547
|
+
break;
|
|
3980
4548
|
case "1.4.1":
|
|
3981
4549
|
safeProxyFactoryContractInstance = new SafeProxyFactoryContract_v1_4_1_default(
|
|
3982
4550
|
chainId,
|
|
@@ -4023,6 +4591,7 @@ async function getSafeProxyFactoryContractInstance(safeVersion, safeProvider, co
|
|
|
4023
4591
|
async function getSafeWebAuthnSignerFactoryContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
|
|
4024
4592
|
const chainId = await safeProvider.getChainId();
|
|
4025
4593
|
switch (safeVersion) {
|
|
4594
|
+
case "1.5.0":
|
|
4026
4595
|
case "1.4.1":
|
|
4027
4596
|
case "1.3.0":
|
|
4028
4597
|
const safeWebAuthnSignerFactoryContractInstance = new SafeWebAuthnSignerFactoryContract_v0_2_1_default(
|
|
@@ -4042,6 +4611,7 @@ async function getSafeWebAuthnSignerFactoryContractInstance(safeVersion, safePro
|
|
|
4042
4611
|
async function getSafeWebAuthnSharedSignerContractInstance(safeVersion, safeProvider, contractAddress, customContractAbi, deploymentType) {
|
|
4043
4612
|
const chainId = await safeProvider.getChainId();
|
|
4044
4613
|
switch (safeVersion) {
|
|
4614
|
+
case "1.5.0":
|
|
4045
4615
|
case "1.4.1":
|
|
4046
4616
|
case "1.3.0":
|
|
4047
4617
|
const safeWebAuthnSharedSignerContractInstance = new SafeWebAuthnSharedSignerContract_v0_2_1_default(
|
|
@@ -4303,11 +4873,7 @@ async function createMockPasskey(name, webAuthnCredentials) {
|
|
|
4303
4873
|
const exportedPublicKey = await crypto.subtle.exportKey("spki", key);
|
|
4304
4874
|
const rawId = Buffer.from(passkeyCredential.rawId).toString("hex");
|
|
4305
4875
|
const coordinates = await decodePublicKeyForWeb(exportedPublicKey);
|
|
4306
|
-
|
|
4307
|
-
rawId,
|
|
4308
|
-
coordinates
|
|
4309
|
-
};
|
|
4310
|
-
return passkey;
|
|
4876
|
+
return { rawId, coordinates };
|
|
4311
4877
|
}
|
|
4312
4878
|
export {
|
|
4313
4879
|
WebAuthnCredentials,
|