@defisaver/automation-sdk 3.3.15 → 3.3.16-liq-prot-dev
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/cjs/constants/index.js +145 -0
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +5 -2
- package/cjs/services/strategiesService.js +158 -9
- package/cjs/services/strategySubService.d.ts +17 -16
- package/cjs/services/strategySubService.js +69 -28
- package/cjs/services/strategySubService.test.js +69 -40
- package/cjs/services/subDataService.d.ts +70 -20
- package/cjs/services/subDataService.js +23 -79
- package/cjs/services/subDataService.test.js +117 -202
- package/cjs/services/triggerService.test.js +60 -0
- package/cjs/services/utils.d.ts +2 -1
- package/cjs/services/utils.js +14 -1
- package/cjs/types/enums.d.ts +39 -6
- package/cjs/types/enums.js +33 -0
- package/esm/constants/index.js +145 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.js +5 -2
- package/esm/services/strategiesService.js +158 -9
- package/esm/services/strategySubService.d.ts +17 -16
- package/esm/services/strategySubService.js +69 -28
- package/esm/services/strategySubService.test.js +70 -38
- package/esm/services/subDataService.d.ts +70 -20
- package/esm/services/subDataService.js +21 -77
- package/esm/services/subDataService.test.js +118 -200
- package/esm/services/triggerService.test.js +61 -1
- package/esm/services/utils.d.ts +2 -1
- package/esm/services/utils.js +13 -1
- package/esm/types/enums.d.ts +39 -6
- package/esm/types/enums.js +33 -0
- package/package.json +1 -1
- package/src/constants/index.ts +147 -1
- package/src/index.ts +22 -6
- package/src/services/strategiesService.ts +222 -9
- package/src/services/strategySubService.test.ts +86 -46
- package/src/services/strategySubService.ts +166 -39
- package/src/services/subDataService.test.ts +128 -214
- package/src/services/subDataService.ts +42 -106
- package/src/services/triggerService.test.ts +69 -0
- package/src/services/utils.test.ts +1 -1
- package/src/services/utils.ts +15 -1
- package/src/types/enums.ts +33 -2
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import Dec from 'decimal.js';
|
|
2
1
|
import { expect } from 'chai';
|
|
3
2
|
import { getAssetInfo } from '@defisaver/tokens';
|
|
4
3
|
import * as web3Utils from 'web3-utils';
|
|
5
4
|
import { MAXUINT } from '@defisaver/tokens';
|
|
6
|
-
import { ChainId, CloseStrategyType,
|
|
5
|
+
import { ChainId, CloseStrategyType, RatioState } from '../types/enums';
|
|
7
6
|
import '../configuration';
|
|
8
7
|
import * as subDataService from './subDataService';
|
|
9
8
|
describe('Feature: subDataService.ts', () => {
|
|
@@ -118,7 +117,7 @@ describe('Feature: subDataService.ts', () => {
|
|
|
118
117
|
});
|
|
119
118
|
});
|
|
120
119
|
});
|
|
121
|
-
describe('When testing subDataService.
|
|
120
|
+
describe('When testing subDataService.legacyMakerLeverageManagementSubData', () => {
|
|
122
121
|
describe('decode()', () => {
|
|
123
122
|
const examples = [
|
|
124
123
|
[
|
|
@@ -131,12 +130,12 @@ describe('Feature: subDataService.ts', () => {
|
|
|
131
130
|
];
|
|
132
131
|
examples.forEach(([expected, actual]) => {
|
|
133
132
|
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
134
|
-
expect(subDataService.
|
|
133
|
+
expect(subDataService.legacyMakerLeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
135
134
|
});
|
|
136
135
|
});
|
|
137
136
|
});
|
|
138
137
|
});
|
|
139
|
-
describe('When testing subDataService.
|
|
138
|
+
describe('When testing subDataService.makerLeverageManagementSubData', () => {
|
|
140
139
|
describe('encode()', () => {
|
|
141
140
|
const examples = [
|
|
142
141
|
[
|
|
@@ -156,7 +155,7 @@ describe('Feature: subDataService.ts', () => {
|
|
|
156
155
|
];
|
|
157
156
|
examples.forEach(([expected, actual]) => {
|
|
158
157
|
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
159
|
-
expect(subDataService.
|
|
158
|
+
expect(subDataService.makerLeverageManagementSubData.encode(...actual)).to.eql(expected);
|
|
160
159
|
});
|
|
161
160
|
});
|
|
162
161
|
});
|
|
@@ -187,12 +186,12 @@ describe('Feature: subDataService.ts', () => {
|
|
|
187
186
|
];
|
|
188
187
|
examples.forEach(([expected, actual]) => {
|
|
189
188
|
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
190
|
-
expect(subDataService.
|
|
189
|
+
expect(subDataService.makerLeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
191
190
|
});
|
|
192
191
|
});
|
|
193
192
|
});
|
|
194
193
|
});
|
|
195
|
-
describe('When testing subDataService.
|
|
194
|
+
describe('When testing subDataService.legacyLiquityLeverageManagementSubData', () => {
|
|
196
195
|
describe('decode()', () => {
|
|
197
196
|
const examples = [
|
|
198
197
|
[
|
|
@@ -205,7 +204,7 @@ describe('Feature: subDataService.ts', () => {
|
|
|
205
204
|
];
|
|
206
205
|
examples.forEach(([expected, actual]) => {
|
|
207
206
|
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
208
|
-
expect(subDataService.
|
|
207
|
+
expect(subDataService.legacyLiquityLeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
209
208
|
});
|
|
210
209
|
});
|
|
211
210
|
});
|
|
@@ -260,24 +259,7 @@ describe('Feature: subDataService.ts', () => {
|
|
|
260
259
|
});
|
|
261
260
|
});
|
|
262
261
|
});
|
|
263
|
-
describe('When testing subDataService.
|
|
264
|
-
describe('encode()', () => {
|
|
265
|
-
const examples = [
|
|
266
|
-
[
|
|
267
|
-
[new Dec(160).mul(1e16).toString(), new Dec(220).mul(1e16).toString(), new Dec(180).mul(1e16).toString(), new Dec(190).mul(1e16).toString(), true],
|
|
268
|
-
[160, 220, 180, 190, true]
|
|
269
|
-
],
|
|
270
|
-
[
|
|
271
|
-
[new Dec(160).mul(1e16).toString(), new Dec(200).mul(1e16).toString(), new Dec(180).mul(1e16).toString(), new Dec(190).mul(1e16).toString(), false],
|
|
272
|
-
[160, 200, 180, 190, false]
|
|
273
|
-
],
|
|
274
|
-
];
|
|
275
|
-
examples.forEach(([expected, actual]) => {
|
|
276
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
277
|
-
expect(subDataService.aaveV2LeverageManagementSubData.encode(...actual)).to.eql(expected);
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
});
|
|
262
|
+
describe('When testing subDataService.legacyAaveV2LeverageManagementSubData', () => {
|
|
281
263
|
describe('decode()', () => {
|
|
282
264
|
const examples = [
|
|
283
265
|
[
|
|
@@ -291,12 +273,12 @@ describe('Feature: subDataService.ts', () => {
|
|
|
291
273
|
];
|
|
292
274
|
examples.forEach(([expected, actual]) => {
|
|
293
275
|
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
294
|
-
expect(subDataService.
|
|
276
|
+
expect(subDataService.legacyAaveV2LeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
295
277
|
});
|
|
296
278
|
});
|
|
297
279
|
});
|
|
298
280
|
});
|
|
299
|
-
describe('When testing subDataService.
|
|
281
|
+
describe('When testing subDataService.legacyAaveV3LeverageManagementSubData', () => {
|
|
300
282
|
describe('decode()', () => {
|
|
301
283
|
const examples = [
|
|
302
284
|
[
|
|
@@ -310,7 +292,7 @@ describe('Feature: subDataService.ts', () => {
|
|
|
310
292
|
];
|
|
311
293
|
examples.forEach(([expected, actual]) => {
|
|
312
294
|
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
313
|
-
expect(subDataService.
|
|
295
|
+
expect(subDataService.legacyAaveV3LeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
314
296
|
});
|
|
315
297
|
});
|
|
316
298
|
});
|
|
@@ -649,24 +631,7 @@ describe('Feature: subDataService.ts', () => {
|
|
|
649
631
|
});
|
|
650
632
|
});
|
|
651
633
|
});
|
|
652
|
-
describe('When testing subDataService.
|
|
653
|
-
describe('encode()', () => {
|
|
654
|
-
const examples = [
|
|
655
|
-
[
|
|
656
|
-
[new Dec(160).mul(1e16).toString(), new Dec(220).mul(1e16).toString(), new Dec(180).mul(1e16).toString(), new Dec(190).mul(1e16).toString(), true],
|
|
657
|
-
[160, 220, 180, 190, true]
|
|
658
|
-
],
|
|
659
|
-
[
|
|
660
|
-
[new Dec(160).mul(1e16).toString(), new Dec(200).mul(1e16).toString(), new Dec(180).mul(1e16).toString(), new Dec(190).mul(1e16).toString(), false],
|
|
661
|
-
[160, 200, 180, 190, false]
|
|
662
|
-
],
|
|
663
|
-
];
|
|
664
|
-
examples.forEach(([expected, actual]) => {
|
|
665
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
666
|
-
expect(subDataService.compoundV2LeverageManagementSubData.encode(...actual)).to.eql(expected);
|
|
667
|
-
});
|
|
668
|
-
});
|
|
669
|
-
});
|
|
634
|
+
describe('When testing subDataService.legacyCompoundV2LeverageManagementSubData', () => {
|
|
670
635
|
describe('decode()', () => {
|
|
671
636
|
const examples = [
|
|
672
637
|
[
|
|
@@ -680,97 +645,12 @@ describe('Feature: subDataService.ts', () => {
|
|
|
680
645
|
];
|
|
681
646
|
examples.forEach(([expected, actual]) => {
|
|
682
647
|
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
683
|
-
expect(subDataService.
|
|
684
|
-
});
|
|
685
|
-
});
|
|
686
|
-
});
|
|
687
|
-
});
|
|
688
|
-
describe('When testing subDataService.compoundV3LeverageManagementSubData', () => {
|
|
689
|
-
describe('encode()', () => {
|
|
690
|
-
const examples = [
|
|
691
|
-
[
|
|
692
|
-
[
|
|
693
|
-
web3Utils.toChecksumAddress('0x1C0F620155e85491f8D35440eb17538Ca5c55212'),
|
|
694
|
-
web3Utils.toChecksumAddress(getAssetInfo('USDC', ChainId.Ethereum).address),
|
|
695
|
-
new Dec(160).mul(1e16).toString(),
|
|
696
|
-
new Dec(220).mul(1e16).toString(),
|
|
697
|
-
new Dec(180).mul(1e16).toString(),
|
|
698
|
-
new Dec(190).mul(1e16).toString(),
|
|
699
|
-
true, false,
|
|
700
|
-
],
|
|
701
|
-
[
|
|
702
|
-
web3Utils.toChecksumAddress('0x1C0F620155e85491f8D35440eb17538Ca5c55212'),
|
|
703
|
-
web3Utils.toChecksumAddress(getAssetInfo('USDC', ChainId.Ethereum).address),
|
|
704
|
-
160, 220, 180, 190,
|
|
705
|
-
true, false,
|
|
706
|
-
]
|
|
707
|
-
],
|
|
708
|
-
[
|
|
709
|
-
[
|
|
710
|
-
web3Utils.toChecksumAddress('0xaC0F620155e85491f8D35440eb17538Ca5c55212'),
|
|
711
|
-
web3Utils.toChecksumAddress(getAssetInfo('WETH', ChainId.Ethereum).address),
|
|
712
|
-
new Dec(160).mul(1e16).toString(),
|
|
713
|
-
new Dec(210).mul(1e16).toString(),
|
|
714
|
-
new Dec(180).mul(1e16).toString(),
|
|
715
|
-
new Dec(190).mul(1e16).toString(),
|
|
716
|
-
false, true,
|
|
717
|
-
],
|
|
718
|
-
[
|
|
719
|
-
web3Utils.toChecksumAddress('0xaC0F620155e85491f8D35440eb17538Ca5c55212'),
|
|
720
|
-
web3Utils.toChecksumAddress(getAssetInfo('WETH', ChainId.Ethereum).address),
|
|
721
|
-
160, 210, 180, 190,
|
|
722
|
-
false, true,
|
|
723
|
-
]
|
|
724
|
-
],
|
|
725
|
-
];
|
|
726
|
-
examples.forEach(([expected, actual]) => {
|
|
727
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
728
|
-
expect(subDataService.compoundV3LeverageManagementSubData.encode(...actual)).to.eql(expected);
|
|
729
|
-
});
|
|
730
|
-
});
|
|
731
|
-
});
|
|
732
|
-
describe('decode()', () => {
|
|
733
|
-
const examples = [
|
|
734
|
-
[
|
|
735
|
-
{ targetRatio: 123 },
|
|
736
|
-
[
|
|
737
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
738
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000001111d67bb1bb0000',
|
|
739
|
-
],
|
|
740
|
-
],
|
|
741
|
-
[
|
|
742
|
-
{ targetRatio: 200 },
|
|
743
|
-
[
|
|
744
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
745
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000001bc16d674ec80000',
|
|
746
|
-
],
|
|
747
|
-
],
|
|
748
|
-
];
|
|
749
|
-
examples.forEach(([expected, actual]) => {
|
|
750
|
-
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
751
|
-
expect(subDataService.compoundV3LeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
648
|
+
expect(subDataService.legacyCompoundV2LeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
752
649
|
});
|
|
753
650
|
});
|
|
754
651
|
});
|
|
755
652
|
});
|
|
756
653
|
describe('When testing subDataService.morphoAaveV2LeverageManagementSubData', () => {
|
|
757
|
-
describe('encode()', () => {
|
|
758
|
-
const examples = [
|
|
759
|
-
[
|
|
760
|
-
[new Dec(160).mul(1e16).toString(), new Dec(220).mul(1e16).toString(), new Dec(180).mul(1e16).toString(), new Dec(190).mul(1e16).toString(), true],
|
|
761
|
-
[160, 220, 180, 190, true]
|
|
762
|
-
],
|
|
763
|
-
[
|
|
764
|
-
[new Dec(160).mul(1e16).toString(), new Dec(200).mul(1e16).toString(), new Dec(180).mul(1e16).toString(), new Dec(190).mul(1e16).toString(), false],
|
|
765
|
-
[160, 200, 180, 190, false]
|
|
766
|
-
],
|
|
767
|
-
];
|
|
768
|
-
examples.forEach(([expected, actual]) => {
|
|
769
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
770
|
-
expect(subDataService.morphoAaveV2LeverageManagementSubData.encode(...actual)).to.eql(expected);
|
|
771
|
-
});
|
|
772
|
-
});
|
|
773
|
-
});
|
|
774
654
|
describe('decode()', () => {
|
|
775
655
|
const examples = [
|
|
776
656
|
[
|
|
@@ -790,23 +670,6 @@ describe('Feature: subDataService.ts', () => {
|
|
|
790
670
|
});
|
|
791
671
|
});
|
|
792
672
|
describe('When testing subDataService.cBondsRebondSubData', () => {
|
|
793
|
-
describe('encode()', () => {
|
|
794
|
-
const examples = [
|
|
795
|
-
[
|
|
796
|
-
['0x00000000000000000000000000000000000000000000000000000000000000c8'],
|
|
797
|
-
[200]
|
|
798
|
-
],
|
|
799
|
-
[
|
|
800
|
-
['0x000000000000000000000000000000000000000000000000000000000000a119'],
|
|
801
|
-
[41241]
|
|
802
|
-
],
|
|
803
|
-
];
|
|
804
|
-
examples.forEach(([expected, actual]) => {
|
|
805
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
806
|
-
expect(subDataService.cBondsRebondSubData.encode(...actual)).to.eql(expected);
|
|
807
|
-
});
|
|
808
|
-
});
|
|
809
|
-
});
|
|
810
673
|
describe('decode()', () => {
|
|
811
674
|
const examples = [
|
|
812
675
|
[
|
|
@@ -947,52 +810,7 @@ describe('Feature: subDataService.ts', () => {
|
|
|
947
810
|
});
|
|
948
811
|
});
|
|
949
812
|
});
|
|
950
|
-
describe('When testing subDataService.
|
|
951
|
-
describe('encode()', () => {
|
|
952
|
-
const examples = [
|
|
953
|
-
[
|
|
954
|
-
[
|
|
955
|
-
web3Utils.toChecksumAddress(getAssetInfo('WETH', ChainId.Ethereum).address),
|
|
956
|
-
web3Utils.toChecksumAddress(getAssetInfo('DAI', ChainId.Ethereum).address),
|
|
957
|
-
'2131',
|
|
958
|
-
'0.53123',
|
|
959
|
-
'1696590921159',
|
|
960
|
-
`${OrderType.STOP_LOSS}`
|
|
961
|
-
],
|
|
962
|
-
[
|
|
963
|
-
web3Utils.toChecksumAddress(getAssetInfo('WETH', ChainId.Ethereum).address),
|
|
964
|
-
web3Utils.toChecksumAddress(getAssetInfo('DAI', ChainId.Ethereum).address),
|
|
965
|
-
'2131',
|
|
966
|
-
'0.53123',
|
|
967
|
-
1696590921159,
|
|
968
|
-
OrderType.STOP_LOSS
|
|
969
|
-
]
|
|
970
|
-
],
|
|
971
|
-
[
|
|
972
|
-
[
|
|
973
|
-
web3Utils.toChecksumAddress(getAssetInfo('LINK', ChainId.Arbitrum).address),
|
|
974
|
-
web3Utils.toChecksumAddress(getAssetInfo('USDC', ChainId.Arbitrum).address),
|
|
975
|
-
'2131',
|
|
976
|
-
'0.43123',
|
|
977
|
-
'1646590921159',
|
|
978
|
-
`${OrderType.TAKE_PROFIT}`
|
|
979
|
-
],
|
|
980
|
-
[
|
|
981
|
-
web3Utils.toChecksumAddress(getAssetInfo('LINK', ChainId.Arbitrum).address),
|
|
982
|
-
web3Utils.toChecksumAddress(getAssetInfo('USDC', ChainId.Arbitrum).address),
|
|
983
|
-
'2131',
|
|
984
|
-
'0.43123',
|
|
985
|
-
1646590921159,
|
|
986
|
-
OrderType.TAKE_PROFIT
|
|
987
|
-
]
|
|
988
|
-
],
|
|
989
|
-
];
|
|
990
|
-
examples.forEach(([expected, actual]) => {
|
|
991
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
992
|
-
expect(subDataService.exchangeLimitOrderSubData.encode(...actual)).to.eql(expected);
|
|
993
|
-
});
|
|
994
|
-
});
|
|
995
|
-
});
|
|
813
|
+
describe('When testing subDataService.legacyExchangeLimitOrderSubData', () => {
|
|
996
814
|
describe('decode()', () => {
|
|
997
815
|
const examples = [
|
|
998
816
|
[
|
|
@@ -1026,12 +844,12 @@ describe('Feature: subDataService.ts', () => {
|
|
|
1026
844
|
];
|
|
1027
845
|
examples.forEach(([expected, actual]) => {
|
|
1028
846
|
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
1029
|
-
expect(subDataService.
|
|
847
|
+
expect(subDataService.legacyExchangeLimitOrderSubData.decode(...actual)).to.eql(expected);
|
|
1030
848
|
});
|
|
1031
849
|
});
|
|
1032
850
|
});
|
|
1033
851
|
});
|
|
1034
|
-
describe('When testing subDataService.
|
|
852
|
+
describe('When testing subDataService.legacySparkLeverageManagementSubData', () => {
|
|
1035
853
|
describe('decode()', () => {
|
|
1036
854
|
const examples = [
|
|
1037
855
|
[
|
|
@@ -1045,7 +863,7 @@ describe('Feature: subDataService.ts', () => {
|
|
|
1045
863
|
];
|
|
1046
864
|
examples.forEach(([expected, actual]) => {
|
|
1047
865
|
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
1048
|
-
expect(subDataService.
|
|
866
|
+
expect(subDataService.legacySparkLeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
1049
867
|
});
|
|
1050
868
|
});
|
|
1051
869
|
});
|
|
@@ -1451,6 +1269,106 @@ describe('Feature: subDataService.ts', () => {
|
|
|
1451
1269
|
});
|
|
1452
1270
|
});
|
|
1453
1271
|
});
|
|
1272
|
+
describe('When testing subDataService.morphoBlueLeverageManagementOnPriceSubData', () => {
|
|
1273
|
+
describe('encode()', () => {
|
|
1274
|
+
const examples = [
|
|
1275
|
+
[
|
|
1276
|
+
[
|
|
1277
|
+
'0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
1278
|
+
'0x0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
|
|
1279
|
+
'0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc',
|
|
1280
|
+
'0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
1281
|
+
'0x0000000000000000000000000000000000000000000000000d1d507e40be8000',
|
|
1282
|
+
'0x0000000000000000000000000000000000000000000000001bc16d674ec80000',
|
|
1283
|
+
'0x0000000000000000000000001031d218133afab8c2b819b1366c7e434ad91e9c',
|
|
1284
|
+
],
|
|
1285
|
+
[
|
|
1286
|
+
web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1287
|
+
web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1288
|
+
web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1289
|
+
web3Utils.toChecksumAddress('0x0000000000000000000000000000000000000000'),
|
|
1290
|
+
'945000000000000000',
|
|
1291
|
+
200,
|
|
1292
|
+
web3Utils.toChecksumAddress('0x1031d218133AFaB8c2B819B1366c7E434Ad91E9c'),
|
|
1293
|
+
],
|
|
1294
|
+
],
|
|
1295
|
+
[
|
|
1296
|
+
[
|
|
1297
|
+
'0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
1298
|
+
'0x0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
|
|
1299
|
+
'0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc',
|
|
1300
|
+
'0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
1301
|
+
'0x0000000000000000000000000000000000000000000000000d1d507e40be8000',
|
|
1302
|
+
'0x00000000000000000000000000000000000000000000000016345785d8a00000',
|
|
1303
|
+
'0x0000000000000000000000001031d218133afab8c2b819b1366c7e434ad91e9c',
|
|
1304
|
+
],
|
|
1305
|
+
[
|
|
1306
|
+
web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1307
|
+
web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1308
|
+
web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1309
|
+
web3Utils.toChecksumAddress('0x0000000000000000000000000000000000000000'),
|
|
1310
|
+
'945000000000000000',
|
|
1311
|
+
160,
|
|
1312
|
+
web3Utils.toChecksumAddress('0x1031d218133AFaB8c2B819B1366c7E434Ad91E9c'),
|
|
1313
|
+
],
|
|
1314
|
+
],
|
|
1315
|
+
];
|
|
1316
|
+
examples.forEach(([expected, actual]) => {
|
|
1317
|
+
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
1318
|
+
expect(subDataService.morphoBlueLeverageManagementOnPriceSubData.encode(...actual)).to.eql(expected);
|
|
1319
|
+
});
|
|
1320
|
+
});
|
|
1321
|
+
});
|
|
1322
|
+
describe('decode()', () => {
|
|
1323
|
+
const examples = [
|
|
1324
|
+
[
|
|
1325
|
+
{
|
|
1326
|
+
loanToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
1327
|
+
collToken: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
|
|
1328
|
+
oracle: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC',
|
|
1329
|
+
irm: '0x0000000000000000000000000000000000000000',
|
|
1330
|
+
lltv: '945000000000000000',
|
|
1331
|
+
targetRatio: 200,
|
|
1332
|
+
user: '0x1031d218133AFaB8C2B819B1366c7e434Ad91e9c',
|
|
1333
|
+
},
|
|
1334
|
+
[
|
|
1335
|
+
'0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
1336
|
+
'0x0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
|
|
1337
|
+
'0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc',
|
|
1338
|
+
'0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
1339
|
+
'0x0000000000000000000000000000000000000000000000000d1d507e40be8000',
|
|
1340
|
+
'0x0000000000000000000000000000000000000000000000001bc16d674ec80000',
|
|
1341
|
+
'0x0000000000000000000000001031d218133afab8c2b819b1366c7e434ad91e9c',
|
|
1342
|
+
],
|
|
1343
|
+
],
|
|
1344
|
+
[
|
|
1345
|
+
{
|
|
1346
|
+
loanToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
1347
|
+
collToken: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
|
|
1348
|
+
oracle: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC',
|
|
1349
|
+
irm: '0x0000000000000000000000000000000000000000',
|
|
1350
|
+
lltv: '945000000000000000',
|
|
1351
|
+
targetRatio: 160,
|
|
1352
|
+
user: '0x1031d218133AFaB8C2B819B1366c7e434Ad91e9c',
|
|
1353
|
+
},
|
|
1354
|
+
[
|
|
1355
|
+
'0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
1356
|
+
'0x0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
|
|
1357
|
+
'0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc',
|
|
1358
|
+
'0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
1359
|
+
'0x0000000000000000000000000000000000000000000000000d1d507e40be8000',
|
|
1360
|
+
'0x00000000000000000000000000000000000000000000000016345785d8a00000',
|
|
1361
|
+
'0x0000000000000000000000001031d218133afab8c2b819b1366c7e434ad91e9c',
|
|
1362
|
+
],
|
|
1363
|
+
],
|
|
1364
|
+
];
|
|
1365
|
+
examples.forEach(([expected, actual]) => {
|
|
1366
|
+
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
1367
|
+
expect(subDataService.morphoBlueLeverageManagementOnPriceSubData.decode(actual)).to.eql(expected);
|
|
1368
|
+
});
|
|
1369
|
+
});
|
|
1370
|
+
});
|
|
1371
|
+
});
|
|
1454
1372
|
describe('When testing subDataService.aaveV3LeverageManagementOnPriceSubData', () => {
|
|
1455
1373
|
describe('encode()', () => {
|
|
1456
1374
|
const examples = [
|
|
@@ -3,7 +3,7 @@ import { getAssetInfo, MAXUINT } from '@defisaver/tokens';
|
|
|
3
3
|
import * as web3Utils from 'web3-utils';
|
|
4
4
|
import { ChainId, OrderType, RatioState } from '../types/enums';
|
|
5
5
|
import '../configuration';
|
|
6
|
-
import { aaveV2RatioTrigger, aaveV3QuotePriceTrigger, aaveV3QuotePriceWithMaximumGasPriceTrigger, aaveV3RatioTrigger, cBondsRebondTrigger, chainlinkPriceTrigger, compoundV2RatioTrigger, compoundV3RatioTrigger, compoundV3PriceTrigger, curveUsdBorrowRateTrigger, curveUsdSoftLiquidationTrigger, exchangeOffchainPriceTrigger, exchangeTimestampTrigger, liquityDebtInFrontTrigger, makerRatioTrigger, morphoAaveV2RatioTrigger, sparkRatioTrigger, trailingStopTrigger, liquityDebtInFrontWithLimitTrigger, crvUSDRatioTrigger, morphoBlueRatioTrigger, crvUsdHealthRatioTrigger, liquityV2DebtInFrontTrigger, liquityV2AdjustTimeTrigger, compoundV3PriceRangeTrigger, aaveV3QuotePriceRangeTrigger, morphoBluePriceRangeTrigger, sparkQuotePriceTrigger, aaveV4RatioTrigger, aaveV4QuotePriceTrigger, aaveV4QuotePriceRangeTrigger, } from './triggerService';
|
|
6
|
+
import { aaveV2RatioTrigger, aaveV3QuotePriceTrigger, aaveV3QuotePriceWithMaximumGasPriceTrigger, aaveV3RatioTrigger, cBondsRebondTrigger, chainlinkPriceTrigger, compoundV2RatioTrigger, compoundV3RatioTrigger, compoundV3PriceTrigger, curveUsdBorrowRateTrigger, curveUsdSoftLiquidationTrigger, exchangeOffchainPriceTrigger, exchangeTimestampTrigger, liquityDebtInFrontTrigger, makerRatioTrigger, morphoAaveV2RatioTrigger, sparkRatioTrigger, trailingStopTrigger, liquityDebtInFrontWithLimitTrigger, crvUSDRatioTrigger, morphoBlueRatioTrigger, crvUsdHealthRatioTrigger, liquityV2DebtInFrontTrigger, liquityV2AdjustTimeTrigger, compoundV3PriceRangeTrigger, aaveV3QuotePriceRangeTrigger, morphoBluePriceRangeTrigger, morphoBluePriceTrigger, sparkQuotePriceTrigger, aaveV4RatioTrigger, aaveV4QuotePriceTrigger, aaveV4QuotePriceRangeTrigger, } from './triggerService';
|
|
7
7
|
describe('Feature: triggerService.ts', () => {
|
|
8
8
|
describe('When testing triggerService.chainlinkPriceTrigger', () => {
|
|
9
9
|
describe('encode()', () => {
|
|
@@ -1159,6 +1159,66 @@ describe('Feature: triggerService.ts', () => {
|
|
|
1159
1159
|
});
|
|
1160
1160
|
});
|
|
1161
1161
|
});
|
|
1162
|
+
describe('When testing triggerService.morphoBluePriceTrigger', () => {
|
|
1163
|
+
describe('encode()', () => {
|
|
1164
|
+
const examples = [
|
|
1165
|
+
[
|
|
1166
|
+
['0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000003a352944000000000000000000000000000000000000000000000000000000000000000001'],
|
|
1167
|
+
[
|
|
1168
|
+
web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1169
|
+
web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1170
|
+
web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1171
|
+
2500,
|
|
1172
|
+
RatioState.UNDER,
|
|
1173
|
+
],
|
|
1174
|
+
],
|
|
1175
|
+
[
|
|
1176
|
+
['0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000005d21dba0000000000000000000000000000000000000000000000000000000000000000000'],
|
|
1177
|
+
[
|
|
1178
|
+
web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1179
|
+
web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1180
|
+
web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1181
|
+
4000,
|
|
1182
|
+
RatioState.OVER,
|
|
1183
|
+
],
|
|
1184
|
+
],
|
|
1185
|
+
];
|
|
1186
|
+
examples.forEach(([expected, actual]) => {
|
|
1187
|
+
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
1188
|
+
expect(morphoBluePriceTrigger.encode(...actual)).to.eql(expected);
|
|
1189
|
+
});
|
|
1190
|
+
});
|
|
1191
|
+
});
|
|
1192
|
+
describe('decode()', () => {
|
|
1193
|
+
const examples = [
|
|
1194
|
+
[
|
|
1195
|
+
{
|
|
1196
|
+
oracle: web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1197
|
+
collateralToken: web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1198
|
+
loanToken: web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1199
|
+
price: '2500',
|
|
1200
|
+
priceState: RatioState.UNDER,
|
|
1201
|
+
},
|
|
1202
|
+
['0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000003a352944000000000000000000000000000000000000000000000000000000000000000001'],
|
|
1203
|
+
],
|
|
1204
|
+
[
|
|
1205
|
+
{
|
|
1206
|
+
oracle: web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1207
|
+
collateralToken: web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1208
|
+
loanToken: web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1209
|
+
price: '4000',
|
|
1210
|
+
priceState: RatioState.OVER,
|
|
1211
|
+
},
|
|
1212
|
+
['0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000005d21dba0000000000000000000000000000000000000000000000000000000000000000000'],
|
|
1213
|
+
],
|
|
1214
|
+
];
|
|
1215
|
+
examples.forEach(([expected, actual]) => {
|
|
1216
|
+
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
1217
|
+
expect(morphoBluePriceTrigger.decode(actual)).to.eql(expected);
|
|
1218
|
+
});
|
|
1219
|
+
});
|
|
1220
|
+
});
|
|
1221
|
+
});
|
|
1162
1222
|
describe('When testing triggerService.aaveV4RatioTrigger', () => {
|
|
1163
1223
|
describe('encode()', () => {
|
|
1164
1224
|
const examples = [
|
package/esm/services/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EthereumAddress } from '../types';
|
|
2
|
-
import { ChainId, CloseStrategyType, CloseToAssetType, RatioState } from '../types/enums';
|
|
2
|
+
import { Bundles, ChainId, CloseStrategyType, CloseToAssetType, RatioState } from '../types/enums';
|
|
3
3
|
export declare function isDefined<T>(value: T): value is NonNullable<T>;
|
|
4
4
|
export declare function isUndefined(value: unknown): boolean;
|
|
5
5
|
export declare function compareAddresses(firstAddress: EthereumAddress, secondAddress: EthereumAddress): boolean;
|
|
@@ -28,3 +28,4 @@ export declare function getStopLossAndTakeProfitTypeByCloseStrategyType(closeStr
|
|
|
28
28
|
stopLossType: CloseToAssetType | undefined;
|
|
29
29
|
takeProfitType: CloseToAssetType | undefined;
|
|
30
30
|
};
|
|
31
|
+
export declare function getBundleIdsByNetwork(network: ChainId): typeof Bundles.MainnetIds | typeof Bundles.ArbitrumIds | typeof Bundles.BaseIds;
|
package/esm/services/utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import Dec from 'decimal.js';
|
|
|
2
2
|
import * as web3Utils from 'web3-utils';
|
|
3
3
|
import AbiCoder from 'web3-eth-abi';
|
|
4
4
|
import { getAssetInfo, getAssetInfoByAddress } from '@defisaver/tokens';
|
|
5
|
-
import { ChainId, CloseStrategyType, CloseToAssetType, RatioState, } from '../types/enums';
|
|
5
|
+
import { Bundles, ChainId, CloseStrategyType, CloseToAssetType, RatioState, } from '../types/enums';
|
|
6
6
|
export function isDefined(value) {
|
|
7
7
|
return value !== undefined && value !== null;
|
|
8
8
|
}
|
|
@@ -137,3 +137,15 @@ export function getStopLossAndTakeProfitTypeByCloseStrategyType(closeStrategyTyp
|
|
|
137
137
|
throw new Error('CloseStrategyType not supported');
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
+
export function getBundleIdsByNetwork(network) {
|
|
141
|
+
switch (Number(network)) {
|
|
142
|
+
case ChainId.Ethereum:
|
|
143
|
+
return Bundles.MainnetIds;
|
|
144
|
+
case ChainId.Arbitrum:
|
|
145
|
+
return Bundles.ArbitrumIds;
|
|
146
|
+
case ChainId.Base:
|
|
147
|
+
return Bundles.BaseIds;
|
|
148
|
+
default:
|
|
149
|
+
throw new Error(`Unsupported network ${network}`);
|
|
150
|
+
}
|
|
151
|
+
}
|
package/esm/types/enums.d.ts
CHANGED
|
@@ -138,7 +138,9 @@ export declare namespace Strategies {
|
|
|
138
138
|
EoaBoostOnPrice = "eoa-boost-on-price",
|
|
139
139
|
EoaRepayOnPrice = "eoa-repay-on-price",
|
|
140
140
|
CollateralSwitch = "collateral-switch",
|
|
141
|
-
EoaCollateralSwitch = "eoa-collateral-switch"
|
|
141
|
+
EoaCollateralSwitch = "eoa-collateral-switch",
|
|
142
|
+
LiquidationProtection = "liquidation-protection",
|
|
143
|
+
EoaLiquidationProtection = "liquidation-protection-eoa"
|
|
142
144
|
}
|
|
143
145
|
enum IdOverrides {
|
|
144
146
|
TakeProfit = "take-profit",
|
|
@@ -149,7 +151,9 @@ export declare namespace Strategies {
|
|
|
149
151
|
LeverageManagement = "leverage-management",
|
|
150
152
|
EoaLeverageManagement = "leverage-management-eoa",
|
|
151
153
|
LeverageManagementOnPrice = "leverage-management-on-price",
|
|
152
|
-
EoaLeverageManagementOnPrice = "leverage-management-on-price-eoa"
|
|
154
|
+
EoaLeverageManagementOnPrice = "leverage-management-on-price-eoa",
|
|
155
|
+
LiquidationProtection = "liquidation-protection",
|
|
156
|
+
EoaLiquidationProtection = "liquidation-protection-eoa"
|
|
153
157
|
}
|
|
154
158
|
}
|
|
155
159
|
export declare namespace Bundles {
|
|
@@ -224,7 +228,19 @@ export declare namespace Bundles {
|
|
|
224
228
|
AAVE_V4_EOA_BOOST = 67,
|
|
225
229
|
AAVE_V4_EOA_REPAY_ON_PRICE = 68,
|
|
226
230
|
AAVE_V4_EOA_BOOST_ON_PRICE = 69,
|
|
227
|
-
AAVE_V4_EOA_CLOSE = 70
|
|
231
|
+
AAVE_V4_EOA_CLOSE = 70,
|
|
232
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 71,
|
|
233
|
+
SPARK_SW_LIQUIDATION_PROTECTION = 72,
|
|
234
|
+
MAKER_SW_LIQUIDATION_PROTECTION = 75,
|
|
235
|
+
FLUID_T1_SW_LIQUIDATION_PROTECTION = 76,
|
|
236
|
+
AAVE_V4_SW_LIQUIDATION_PROTECTION = 77,
|
|
237
|
+
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 78,
|
|
238
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 79,
|
|
239
|
+
AAVE_V4_EOA_LIQUIDATION_PROTECTION = 80,
|
|
240
|
+
MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 81,
|
|
241
|
+
COMP_V3_SW_LIQUIDATION_PROTECTION = 82,
|
|
242
|
+
COMP_V3_EOA_LIQUIDATION_PROTECTION = 83,
|
|
243
|
+
MORPHO_BLUE_REPAY_ON_PRICE = 84
|
|
228
244
|
}
|
|
229
245
|
enum OptimismIds {
|
|
230
246
|
AAVE_V3_REPAY = 0,
|
|
@@ -237,7 +253,9 @@ export declare namespace Bundles {
|
|
|
237
253
|
AAVE_V3_EOA_BOOST = 7,
|
|
238
254
|
AAVE_V3_EOA_REPAY_ON_PRICE = 8,
|
|
239
255
|
AAVE_V3_EOA_BOOST_ON_PRICE = 9,
|
|
240
|
-
AAVE_V3_EOA_CLOSE = 10
|
|
256
|
+
AAVE_V3_EOA_CLOSE = 10,
|
|
257
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 11,
|
|
258
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 12
|
|
241
259
|
}
|
|
242
260
|
enum BaseIds {
|
|
243
261
|
AAVE_V3_REPAY = 0,
|
|
@@ -266,7 +284,14 @@ export declare namespace Bundles {
|
|
|
266
284
|
AAVE_V3_EOA_REPAY_ON_PRICE = 25,
|
|
267
285
|
AAVE_V3_EOA_BOOST_ON_PRICE = 26,
|
|
268
286
|
AAVE_V3_EOA_CLOSE = 27,
|
|
269
|
-
MORPHO_BLUE_CLOSE = 28
|
|
287
|
+
MORPHO_BLUE_CLOSE = 28,
|
|
288
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 29,
|
|
289
|
+
FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
|
|
290
|
+
COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
|
|
291
|
+
COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
|
|
292
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
|
|
293
|
+
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 35,
|
|
294
|
+
MORPHO_BLUE_REPAY_ON_PRICE = 36
|
|
270
295
|
}
|
|
271
296
|
enum ArbitrumIds {
|
|
272
297
|
AAVE_V3_REPAY = 0,
|
|
@@ -297,6 +322,14 @@ export declare namespace Bundles {
|
|
|
297
322
|
MORPHO_BLUE_BOOST_ON_PRICE = 25,
|
|
298
323
|
MORPHO_BLUE_EOA_REPAY = 26,
|
|
299
324
|
MORPHO_BLUE_EOA_BOOST = 27,
|
|
300
|
-
MORPHO_BLUE_CLOSE = 28
|
|
325
|
+
MORPHO_BLUE_CLOSE = 28,
|
|
326
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 29,
|
|
327
|
+
FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
|
|
328
|
+
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 31,
|
|
329
|
+
COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
|
|
330
|
+
COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
|
|
331
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
|
|
332
|
+
MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 35,
|
|
333
|
+
MORPHO_BLUE_REPAY_ON_PRICE = 36
|
|
301
334
|
}
|
|
302
335
|
}
|