@dhedge/v2-sdk 1.9.5 → 1.9.6
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/entities/pool.d.ts +76 -39
- package/dist/test/utils/testingHelper.d.ts +1 -0
- package/dist/utils/contract.d.ts +2 -1
- package/dist/v2-sdk.cjs.development.js +965 -437
- package/dist/v2-sdk.cjs.development.js.map +1 -1
- package/dist/v2-sdk.cjs.production.min.js +1 -1
- package/dist/v2-sdk.cjs.production.min.js.map +1 -1
- package/dist/v2-sdk.esm.js +965 -437
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/PoolLogic.json +349 -63
- package/src/entities/pool.ts +334 -222
- package/src/test/oneInch.test.ts +34 -2
- package/src/test/utils/testingHelper.ts +4 -0
- package/src/utils/contract.ts +17 -1
package/package.json
CHANGED
package/src/abi/PoolLogic.json
CHANGED
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
},
|
|
283
283
|
{
|
|
284
284
|
"internalType": "bool",
|
|
285
|
-
"name": "
|
|
285
|
+
"name": "externalWithdrawProcessed",
|
|
286
286
|
"type": "bool"
|
|
287
287
|
}
|
|
288
288
|
],
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
"outputs": [
|
|
356
356
|
{
|
|
357
357
|
"internalType": "uint256",
|
|
358
|
-
"name": "",
|
|
358
|
+
"name": "fee",
|
|
359
359
|
"type": "uint256"
|
|
360
360
|
}
|
|
361
361
|
],
|
|
@@ -381,6 +381,69 @@
|
|
|
381
381
|
"stateMutability": "view",
|
|
382
382
|
"type": "function"
|
|
383
383
|
},
|
|
384
|
+
{
|
|
385
|
+
"inputs": [
|
|
386
|
+
{
|
|
387
|
+
"internalType": "uint256",
|
|
388
|
+
"name": "fundValue",
|
|
389
|
+
"type": "uint256"
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"name": "calculateAvailableManagerFee",
|
|
393
|
+
"outputs": [
|
|
394
|
+
{
|
|
395
|
+
"internalType": "uint256",
|
|
396
|
+
"name": "fee",
|
|
397
|
+
"type": "uint256"
|
|
398
|
+
}
|
|
399
|
+
],
|
|
400
|
+
"stateMutability": "view",
|
|
401
|
+
"type": "function"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"inputs": [
|
|
405
|
+
{
|
|
406
|
+
"internalType": "uint256",
|
|
407
|
+
"name": "currentBalance",
|
|
408
|
+
"type": "uint256"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"internalType": "uint256",
|
|
412
|
+
"name": "liquidityMinted",
|
|
413
|
+
"type": "uint256"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"internalType": "uint256",
|
|
417
|
+
"name": "newCooldown",
|
|
418
|
+
"type": "uint256"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"internalType": "uint256",
|
|
422
|
+
"name": "lastCooldown",
|
|
423
|
+
"type": "uint256"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"internalType": "uint256",
|
|
427
|
+
"name": "lastDepositTime",
|
|
428
|
+
"type": "uint256"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"internalType": "uint256",
|
|
432
|
+
"name": "blockTimestamp",
|
|
433
|
+
"type": "uint256"
|
|
434
|
+
}
|
|
435
|
+
],
|
|
436
|
+
"name": "calculateCooldown",
|
|
437
|
+
"outputs": [
|
|
438
|
+
{
|
|
439
|
+
"internalType": "uint256",
|
|
440
|
+
"name": "cooldown",
|
|
441
|
+
"type": "uint256"
|
|
442
|
+
}
|
|
443
|
+
],
|
|
444
|
+
"stateMutability": "pure",
|
|
445
|
+
"type": "function"
|
|
446
|
+
},
|
|
384
447
|
{
|
|
385
448
|
"inputs": [],
|
|
386
449
|
"name": "creationTime",
|
|
@@ -461,7 +524,70 @@
|
|
|
461
524
|
"outputs": [
|
|
462
525
|
{
|
|
463
526
|
"internalType": "uint256",
|
|
464
|
-
"name": "",
|
|
527
|
+
"name": "liquidityMinted",
|
|
528
|
+
"type": "uint256"
|
|
529
|
+
}
|
|
530
|
+
],
|
|
531
|
+
"stateMutability": "nonpayable",
|
|
532
|
+
"type": "function"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"inputs": [
|
|
536
|
+
{
|
|
537
|
+
"internalType": "address",
|
|
538
|
+
"name": "_recipient",
|
|
539
|
+
"type": "address"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"internalType": "address",
|
|
543
|
+
"name": "_asset",
|
|
544
|
+
"type": "address"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"internalType": "uint256",
|
|
548
|
+
"name": "_amount",
|
|
549
|
+
"type": "uint256"
|
|
550
|
+
}
|
|
551
|
+
],
|
|
552
|
+
"name": "depositFor",
|
|
553
|
+
"outputs": [
|
|
554
|
+
{
|
|
555
|
+
"internalType": "uint256",
|
|
556
|
+
"name": "liquidityMinted",
|
|
557
|
+
"type": "uint256"
|
|
558
|
+
}
|
|
559
|
+
],
|
|
560
|
+
"stateMutability": "nonpayable",
|
|
561
|
+
"type": "function"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"inputs": [
|
|
565
|
+
{
|
|
566
|
+
"internalType": "address",
|
|
567
|
+
"name": "_recipient",
|
|
568
|
+
"type": "address"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"internalType": "address",
|
|
572
|
+
"name": "_asset",
|
|
573
|
+
"type": "address"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"internalType": "uint256",
|
|
577
|
+
"name": "_amount",
|
|
578
|
+
"type": "uint256"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"internalType": "uint256",
|
|
582
|
+
"name": "_cooldown",
|
|
583
|
+
"type": "uint256"
|
|
584
|
+
}
|
|
585
|
+
],
|
|
586
|
+
"name": "depositForWithCustomCooldown",
|
|
587
|
+
"outputs": [
|
|
588
|
+
{
|
|
589
|
+
"internalType": "uint256",
|
|
590
|
+
"name": "liquidityMinted",
|
|
465
591
|
"type": "uint256"
|
|
466
592
|
}
|
|
467
593
|
],
|
|
@@ -492,6 +618,37 @@
|
|
|
492
618
|
"stateMutability": "nonpayable",
|
|
493
619
|
"type": "function"
|
|
494
620
|
},
|
|
621
|
+
{
|
|
622
|
+
"inputs": [
|
|
623
|
+
{
|
|
624
|
+
"components": [
|
|
625
|
+
{
|
|
626
|
+
"internalType": "address",
|
|
627
|
+
"name": "to",
|
|
628
|
+
"type": "address"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"internalType": "bytes",
|
|
632
|
+
"name": "data",
|
|
633
|
+
"type": "bytes"
|
|
634
|
+
}
|
|
635
|
+
],
|
|
636
|
+
"internalType": "struct PoolLogic.TxToExecute[]",
|
|
637
|
+
"name": "txs",
|
|
638
|
+
"type": "tuple[]"
|
|
639
|
+
}
|
|
640
|
+
],
|
|
641
|
+
"name": "execTransactions",
|
|
642
|
+
"outputs": [
|
|
643
|
+
{
|
|
644
|
+
"internalType": "bool",
|
|
645
|
+
"name": "success",
|
|
646
|
+
"type": "bool"
|
|
647
|
+
}
|
|
648
|
+
],
|
|
649
|
+
"stateMutability": "nonpayable",
|
|
650
|
+
"type": "function"
|
|
651
|
+
},
|
|
495
652
|
{
|
|
496
653
|
"inputs": [
|
|
497
654
|
{
|
|
@@ -524,7 +681,7 @@
|
|
|
524
681
|
"outputs": [
|
|
525
682
|
{
|
|
526
683
|
"internalType": "bool",
|
|
527
|
-
"name": "",
|
|
684
|
+
"name": "success",
|
|
528
685
|
"type": "bool"
|
|
529
686
|
}
|
|
530
687
|
],
|
|
@@ -544,19 +701,6 @@
|
|
|
544
701
|
"stateMutability": "view",
|
|
545
702
|
"type": "function"
|
|
546
703
|
},
|
|
547
|
-
{
|
|
548
|
-
"inputs": [],
|
|
549
|
-
"name": "getExitCooldown",
|
|
550
|
-
"outputs": [
|
|
551
|
-
{
|
|
552
|
-
"internalType": "uint256",
|
|
553
|
-
"name": "",
|
|
554
|
-
"type": "uint256"
|
|
555
|
-
}
|
|
556
|
-
],
|
|
557
|
-
"stateMutability": "view",
|
|
558
|
-
"type": "function"
|
|
559
|
-
},
|
|
560
704
|
{
|
|
561
705
|
"inputs": [
|
|
562
706
|
{
|
|
@@ -569,7 +713,7 @@
|
|
|
569
713
|
"outputs": [
|
|
570
714
|
{
|
|
571
715
|
"internalType": "uint256",
|
|
572
|
-
"name": "",
|
|
716
|
+
"name": "remaining",
|
|
573
717
|
"type": "uint256"
|
|
574
718
|
}
|
|
575
719
|
],
|
|
@@ -581,49 +725,76 @@
|
|
|
581
725
|
"name": "getFundSummary",
|
|
582
726
|
"outputs": [
|
|
583
727
|
{
|
|
584
|
-
"
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
728
|
+
"components": [
|
|
729
|
+
{
|
|
730
|
+
"internalType": "string",
|
|
731
|
+
"name": "name",
|
|
732
|
+
"type": "string"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"internalType": "uint256",
|
|
736
|
+
"name": "totalSupply",
|
|
737
|
+
"type": "uint256"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"internalType": "uint256",
|
|
741
|
+
"name": "totalFundValue",
|
|
742
|
+
"type": "uint256"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"internalType": "address",
|
|
746
|
+
"name": "manager",
|
|
747
|
+
"type": "address"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"internalType": "string",
|
|
751
|
+
"name": "managerName",
|
|
752
|
+
"type": "string"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"internalType": "uint256",
|
|
756
|
+
"name": "creationTime",
|
|
757
|
+
"type": "uint256"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"internalType": "bool",
|
|
761
|
+
"name": "privatePool",
|
|
762
|
+
"type": "bool"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"internalType": "uint256",
|
|
766
|
+
"name": "performanceFeeNumerator",
|
|
767
|
+
"type": "uint256"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"internalType": "uint256",
|
|
771
|
+
"name": "managerFeeNumerator",
|
|
772
|
+
"type": "uint256"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"internalType": "uint256",
|
|
776
|
+
"name": "managerFeeDenominator",
|
|
777
|
+
"type": "uint256"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"internalType": "uint256",
|
|
781
|
+
"name": "exitFeeNumerator",
|
|
782
|
+
"type": "uint256"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"internalType": "uint256",
|
|
786
|
+
"name": "exitFeeDenominator",
|
|
787
|
+
"type": "uint256"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"internalType": "uint256",
|
|
791
|
+
"name": "entryFeeNumerator",
|
|
792
|
+
"type": "uint256"
|
|
793
|
+
}
|
|
794
|
+
],
|
|
795
|
+
"internalType": "struct PoolLogic.FundSummary",
|
|
625
796
|
"name": "",
|
|
626
|
-
"type": "
|
|
797
|
+
"type": "tuple"
|
|
627
798
|
}
|
|
628
799
|
],
|
|
629
800
|
"stateMutability": "view",
|
|
@@ -719,13 +890,64 @@
|
|
|
719
890
|
"stateMutability": "view",
|
|
720
891
|
"type": "function"
|
|
721
892
|
},
|
|
893
|
+
{
|
|
894
|
+
"inputs": [
|
|
895
|
+
{
|
|
896
|
+
"internalType": "address",
|
|
897
|
+
"name": "",
|
|
898
|
+
"type": "address"
|
|
899
|
+
}
|
|
900
|
+
],
|
|
901
|
+
"name": "lastExitCooldown",
|
|
902
|
+
"outputs": [
|
|
903
|
+
{
|
|
904
|
+
"internalType": "uint256",
|
|
905
|
+
"name": "",
|
|
906
|
+
"type": "uint256"
|
|
907
|
+
}
|
|
908
|
+
],
|
|
909
|
+
"stateMutability": "view",
|
|
910
|
+
"type": "function"
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"inputs": [],
|
|
914
|
+
"name": "lastFeeMintTime",
|
|
915
|
+
"outputs": [
|
|
916
|
+
{
|
|
917
|
+
"internalType": "uint256",
|
|
918
|
+
"name": "",
|
|
919
|
+
"type": "uint256"
|
|
920
|
+
}
|
|
921
|
+
],
|
|
922
|
+
"stateMutability": "view",
|
|
923
|
+
"type": "function"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"inputs": [
|
|
927
|
+
{
|
|
928
|
+
"internalType": "address",
|
|
929
|
+
"name": "",
|
|
930
|
+
"type": "address"
|
|
931
|
+
}
|
|
932
|
+
],
|
|
933
|
+
"name": "lastWhitelistTransfer",
|
|
934
|
+
"outputs": [
|
|
935
|
+
{
|
|
936
|
+
"internalType": "uint256",
|
|
937
|
+
"name": "",
|
|
938
|
+
"type": "uint256"
|
|
939
|
+
}
|
|
940
|
+
],
|
|
941
|
+
"stateMutability": "view",
|
|
942
|
+
"type": "function"
|
|
943
|
+
},
|
|
722
944
|
{
|
|
723
945
|
"inputs": [],
|
|
724
946
|
"name": "managerName",
|
|
725
947
|
"outputs": [
|
|
726
948
|
{
|
|
727
949
|
"internalType": "string",
|
|
728
|
-
"name": "",
|
|
950
|
+
"name": "_managerName",
|
|
729
951
|
"type": "string"
|
|
730
952
|
}
|
|
731
953
|
],
|
|
@@ -752,6 +974,40 @@
|
|
|
752
974
|
"stateMutability": "view",
|
|
753
975
|
"type": "function"
|
|
754
976
|
},
|
|
977
|
+
{
|
|
978
|
+
"inputs": [
|
|
979
|
+
{
|
|
980
|
+
"internalType": "address",
|
|
981
|
+
"name": "operator",
|
|
982
|
+
"type": "address"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"internalType": "address",
|
|
986
|
+
"name": "from",
|
|
987
|
+
"type": "address"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"internalType": "uint256",
|
|
991
|
+
"name": "tokenId",
|
|
992
|
+
"type": "uint256"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"internalType": "bytes",
|
|
996
|
+
"name": "data",
|
|
997
|
+
"type": "bytes"
|
|
998
|
+
}
|
|
999
|
+
],
|
|
1000
|
+
"name": "onERC721Received",
|
|
1001
|
+
"outputs": [
|
|
1002
|
+
{
|
|
1003
|
+
"internalType": "bytes4",
|
|
1004
|
+
"name": "magicSelector",
|
|
1005
|
+
"type": "bytes4"
|
|
1006
|
+
}
|
|
1007
|
+
],
|
|
1008
|
+
"stateMutability": "nonpayable",
|
|
1009
|
+
"type": "function"
|
|
1010
|
+
},
|
|
755
1011
|
{
|
|
756
1012
|
"inputs": [],
|
|
757
1013
|
"name": "poolManagerLogic",
|
|
@@ -829,7 +1085,7 @@
|
|
|
829
1085
|
"outputs": [
|
|
830
1086
|
{
|
|
831
1087
|
"internalType": "uint256",
|
|
832
|
-
"name": "",
|
|
1088
|
+
"name": "price",
|
|
833
1089
|
"type": "uint256"
|
|
834
1090
|
}
|
|
835
1091
|
],
|
|
@@ -849,6 +1105,19 @@
|
|
|
849
1105
|
"stateMutability": "view",
|
|
850
1106
|
"type": "function"
|
|
851
1107
|
},
|
|
1108
|
+
{
|
|
1109
|
+
"inputs": [],
|
|
1110
|
+
"name": "tokenPriceWithoutManagerFee",
|
|
1111
|
+
"outputs": [
|
|
1112
|
+
{
|
|
1113
|
+
"internalType": "uint256",
|
|
1114
|
+
"name": "price",
|
|
1115
|
+
"type": "uint256"
|
|
1116
|
+
}
|
|
1117
|
+
],
|
|
1118
|
+
"stateMutability": "view",
|
|
1119
|
+
"type": "function"
|
|
1120
|
+
},
|
|
852
1121
|
{
|
|
853
1122
|
"inputs": [],
|
|
854
1123
|
"name": "totalSupply",
|
|
@@ -927,7 +1196,24 @@
|
|
|
927
1196
|
"outputs": [],
|
|
928
1197
|
"stateMutability": "nonpayable",
|
|
929
1198
|
"type": "function"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"inputs": [
|
|
1202
|
+
{
|
|
1203
|
+
"internalType": "address",
|
|
1204
|
+
"name": "_recipient",
|
|
1205
|
+
"type": "address"
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
"internalType": "uint256",
|
|
1209
|
+
"name": "_fundTokenAmount",
|
|
1210
|
+
"type": "uint256"
|
|
1211
|
+
}
|
|
1212
|
+
],
|
|
1213
|
+
"name": "withdrawTo",
|
|
1214
|
+
"outputs": [],
|
|
1215
|
+
"stateMutability": "nonpayable",
|
|
1216
|
+
"type": "function"
|
|
930
1217
|
}
|
|
931
1218
|
]
|
|
932
|
-
|
|
933
1219
|
}
|