@defisaver/automation-sdk 1.2.32 → 2.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/README.md +36 -0
- package/esm/abis/legacy_AaveV2Subscriptions.json +1 -1
- package/esm/abis/legacy_CompoundV2Subscriptions.json +1 -1
- package/esm/abis/legacy_MakerSubscriptions.json +1 -1
- package/esm/constants/index.js +20 -0
- package/esm/services/strategiesService.js +96 -29
- package/esm/services/strategySubService.d.ts +13 -7
- package/esm/services/strategySubService.js +37 -27
- package/esm/services/subDataService.d.ts +15 -3
- package/esm/services/subDataService.js +45 -11
- package/esm/services/triggerService.d.ts +2 -2
- package/esm/services/triggerService.js +2 -2
- package/esm/types/enums.d.ts +8 -2
- package/esm/types/enums.js +8 -2
- package/esm/types/index.d.ts +4 -4
- package/package.json +1 -1
- package/src/abis/legacy_AaveV2Subscriptions.json +1 -1
- package/src/abis/legacy_CompoundV2Subscriptions.json +1 -1
- package/src/abis/legacy_MakerSubscriptions.json +1 -1
- package/src/constants/index.ts +20 -0
- package/src/services/strategiesService.ts +109 -29
- package/src/services/strategySubService.ts +70 -46
- package/src/services/subDataService.ts +67 -17
- package/src/services/triggerService.ts +4 -4
- package/src/types/contracts/generated/Legacy_AaveV2Subscriptions.ts +8 -8
- package/src/types/contracts/generated/Legacy_CompoundV2Subscriptions.ts +8 -8
- package/src/types/contracts/generated/Legacy_MakerSubscriptions.ts +11 -11
- package/src/types/enums.ts +8 -2
- package/src/types/index.ts +4 -4
- package/umd/index.js +207 -64
|
@@ -5,9 +5,9 @@ import * as subDataService from './subDataService';
|
|
|
5
5
|
import * as triggerService from './triggerService';
|
|
6
6
|
import { compareAddresses, requireAddress, requireAddresses } from './utils';
|
|
7
7
|
export const makerEncode = {
|
|
8
|
-
repayFromSavings(bundleId, vaultId,
|
|
9
|
-
const subData = subDataService.makerRepayFromSavingsSubData.encode(vaultId,
|
|
10
|
-
const triggerData = triggerService.makerRatioTrigger.encode(vaultId,
|
|
8
|
+
repayFromSavings(bundleId, vaultId, triggerRepayRatio, targetRepayRatio, isBundle = true, chainId = ChainId.Ethereum, daiAddr, mcdCdpManagerAddr) {
|
|
9
|
+
const subData = subDataService.makerRepayFromSavingsSubData.encode(vaultId, targetRepayRatio, chainId, daiAddr, mcdCdpManagerAddr);
|
|
10
|
+
const triggerData = triggerService.makerRatioTrigger.encode(vaultId, triggerRepayRatio, RatioState.UNDER);
|
|
11
11
|
return [bundleId, isBundle, triggerData, subData];
|
|
12
12
|
},
|
|
13
13
|
closeOnPrice(vaultId, ratioState, price, closeToAssetAddr, chainlinkCollAddress, chainId = ChainId.Ethereum, daiAddr, mcdCdpManagerAddr) {
|
|
@@ -30,13 +30,13 @@ export const makerEncode = {
|
|
|
30
30
|
const isBundle = false;
|
|
31
31
|
return [strategyOrBundleId, isBundle, triggerData, subData];
|
|
32
32
|
},
|
|
33
|
-
leverageManagement(vaultId,
|
|
33
|
+
leverageManagement(vaultId, triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
34
34
|
return [
|
|
35
35
|
vaultId,
|
|
36
|
-
new Dec(
|
|
37
|
-
new Dec(
|
|
38
|
-
new Dec(
|
|
39
|
-
new Dec(
|
|
36
|
+
new Dec(triggerRepayRatio).mul(1e16).toString(),
|
|
37
|
+
new Dec(triggerBoostRatio).mul(1e16).toString(),
|
|
38
|
+
new Dec(targetBoostRatio).mul(1e16).toString(),
|
|
39
|
+
new Dec(targetRepayRatio).mul(1e16).toString(),
|
|
40
40
|
boostEnabled,
|
|
41
41
|
];
|
|
42
42
|
},
|
|
@@ -66,12 +66,12 @@ export const liquityEncode = {
|
|
|
66
66
|
const isBundle = true;
|
|
67
67
|
return [strategyId, isBundle, triggerData, subData];
|
|
68
68
|
},
|
|
69
|
-
leverageManagement(
|
|
69
|
+
leverageManagement(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
70
70
|
return [
|
|
71
|
-
new Dec(
|
|
72
|
-
new Dec(
|
|
73
|
-
new Dec(
|
|
74
|
-
new Dec(
|
|
71
|
+
new Dec(triggerRepayRatio).mul(1e16).toString(),
|
|
72
|
+
new Dec(triggerBoostRatio).mul(1e16).toString(),
|
|
73
|
+
new Dec(targetBoostRatio).mul(1e16).toString(),
|
|
74
|
+
new Dec(targetRepayRatio).mul(1e16).toString(),
|
|
75
75
|
boostEnabled,
|
|
76
76
|
];
|
|
77
77
|
},
|
|
@@ -81,16 +81,21 @@ export const chickenBondsEncode = {
|
|
|
81
81
|
return subDataService.cBondsRebondSubData.encode(bondId);
|
|
82
82
|
},
|
|
83
83
|
};
|
|
84
|
+
export const aaveV2Encode = {
|
|
85
|
+
leverageManagement(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
86
|
+
return subDataService.aaveV2LeverageManagementSubData.encode(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled);
|
|
87
|
+
},
|
|
88
|
+
};
|
|
84
89
|
export const aaveV3Encode = {
|
|
85
|
-
leverageManagement(
|
|
90
|
+
leverageManagement(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
86
91
|
let subInput = '0x';
|
|
87
|
-
subInput = subInput.concat(new Dec(
|
|
92
|
+
subInput = subInput.concat(new Dec(triggerRepayRatio).mul(1e16).toHex().slice(2)
|
|
88
93
|
.padStart(32, '0'));
|
|
89
|
-
subInput = subInput.concat(new Dec(
|
|
94
|
+
subInput = subInput.concat(new Dec(triggerBoostRatio).mul(1e16).toHex().slice(2)
|
|
90
95
|
.padStart(32, '0'));
|
|
91
|
-
subInput = subInput.concat(new Dec(
|
|
96
|
+
subInput = subInput.concat(new Dec(targetBoostRatio).mul(1e16).toHex().slice(2)
|
|
92
97
|
.padStart(32, '0'));
|
|
93
|
-
subInput = subInput.concat(new Dec(
|
|
98
|
+
subInput = subInput.concat(new Dec(targetRepayRatio).mul(1e16).toHex().slice(2)
|
|
94
99
|
.padStart(32, '0'));
|
|
95
100
|
subInput = subInput.concat(boostEnabled ? '01' : '00');
|
|
96
101
|
return subInput;
|
|
@@ -103,14 +108,19 @@ export const aaveV3Encode = {
|
|
|
103
108
|
return [strategyOrBundleId, isBundle, triggerDataEncoded, subDataEncoded];
|
|
104
109
|
},
|
|
105
110
|
};
|
|
111
|
+
export const compoundV2Encode = {
|
|
112
|
+
leverageManagement(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
113
|
+
return subDataService.compoundV2LeverageManagementSubData.encode(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled);
|
|
114
|
+
},
|
|
115
|
+
};
|
|
106
116
|
export const compoundV3Encode = {
|
|
107
|
-
leverageManagement(market, baseToken,
|
|
108
|
-
return subDataService.compoundV3LeverageManagementSubData.encode(market, baseToken,
|
|
117
|
+
leverageManagement(market, baseToken, triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled, isEOA) {
|
|
118
|
+
return subDataService.compoundV3LeverageManagementSubData.encode(market, baseToken, triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled, isEOA);
|
|
109
119
|
},
|
|
110
120
|
};
|
|
111
121
|
export const morphoAaveV2Encode = {
|
|
112
|
-
leverageManagement(
|
|
113
|
-
return subDataService.morphoAaveV2LeverageManagementSubData.encode(
|
|
122
|
+
leverageManagement(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
123
|
+
return subDataService.morphoAaveV2LeverageManagementSubData.encode(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled);
|
|
114
124
|
},
|
|
115
125
|
};
|
|
116
126
|
export const exchangeEncode = {
|
|
@@ -131,15 +141,15 @@ export const exchangeEncode = {
|
|
|
131
141
|
},
|
|
132
142
|
};
|
|
133
143
|
export const sparkEncode = {
|
|
134
|
-
leverageManagement(
|
|
144
|
+
leverageManagement(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
135
145
|
let subInput = '0x';
|
|
136
|
-
subInput = subInput.concat(new Dec(
|
|
146
|
+
subInput = subInput.concat(new Dec(triggerRepayRatio).mul(1e16).toHex().slice(2)
|
|
137
147
|
.padStart(32, '0'));
|
|
138
|
-
subInput = subInput.concat(new Dec(
|
|
148
|
+
subInput = subInput.concat(new Dec(triggerBoostRatio).mul(1e16).toHex().slice(2)
|
|
139
149
|
.padStart(32, '0'));
|
|
140
|
-
subInput = subInput.concat(new Dec(
|
|
150
|
+
subInput = subInput.concat(new Dec(targetBoostRatio).mul(1e16).toHex().slice(2)
|
|
141
151
|
.padStart(32, '0'));
|
|
142
|
-
subInput = subInput.concat(new Dec(
|
|
152
|
+
subInput = subInput.concat(new Dec(targetRepayRatio).mul(1e16).toHex().slice(2)
|
|
143
153
|
.padStart(32, '0'));
|
|
144
154
|
subInput = subInput.concat(boostEnabled ? '01' : '00');
|
|
145
155
|
return subInput;
|
|
@@ -34,7 +34,13 @@ export declare const liquityCloseSubData: {
|
|
|
34
34
|
debtAddr: string;
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
-
export declare const
|
|
37
|
+
export declare const aaveV2LeverageManagementSubData: {
|
|
38
|
+
encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
|
|
39
|
+
decode(subData: string[]): {
|
|
40
|
+
targetRatio: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const aaveV3LeverageManagementSubData: {
|
|
38
44
|
decode(subData: string[]): {
|
|
39
45
|
targetRatio: number;
|
|
40
46
|
};
|
|
@@ -48,14 +54,20 @@ export declare const aaveV3QuotePriceSubData: {
|
|
|
48
54
|
debtAssetId: number;
|
|
49
55
|
};
|
|
50
56
|
};
|
|
57
|
+
export declare const compoundV2LeverageManagementSubData: {
|
|
58
|
+
encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
|
|
59
|
+
decode(subData: string[]): {
|
|
60
|
+
targetRatio: number;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
51
63
|
export declare const compoundV3LeverageManagementSubData: {
|
|
52
|
-
encode(market: EthereumAddress, baseToken: EthereumAddress,
|
|
64
|
+
encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string[];
|
|
53
65
|
decode(subData: string[]): {
|
|
54
66
|
targetRatio: number;
|
|
55
67
|
};
|
|
56
68
|
};
|
|
57
69
|
export declare const morphoAaveV2LeverageManagementSubData: {
|
|
58
|
-
encode(
|
|
70
|
+
encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
|
|
59
71
|
decode(subData: string[]): {
|
|
60
72
|
targetRatio: number;
|
|
61
73
|
};
|
|
@@ -96,7 +96,24 @@ export const liquityCloseSubData = {
|
|
|
96
96
|
return { closeToAssetAddr, debtAddr };
|
|
97
97
|
},
|
|
98
98
|
};
|
|
99
|
-
export const
|
|
99
|
+
export const aaveV2LeverageManagementSubData = {
|
|
100
|
+
encode(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
101
|
+
return [
|
|
102
|
+
new Dec(triggerRepayRatio).mul(1e16).toString(),
|
|
103
|
+
new Dec(triggerBoostRatio).mul(1e16).toString(),
|
|
104
|
+
new Dec(targetBoostRatio).mul(1e16).toString(),
|
|
105
|
+
new Dec(targetRepayRatio).mul(1e16).toString(),
|
|
106
|
+
// @ts-ignore // TODO
|
|
107
|
+
boostEnabled,
|
|
108
|
+
];
|
|
109
|
+
},
|
|
110
|
+
decode(subData) {
|
|
111
|
+
const ratioWei = mockedWeb3.eth.abi.decodeParameter('uint256', subData[1]);
|
|
112
|
+
const targetRatio = weiToRatioPercentage(ratioWei);
|
|
113
|
+
return { targetRatio };
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
export const aaveV3LeverageManagementSubData = {
|
|
100
117
|
decode(subData) {
|
|
101
118
|
const ratioWei = mockedWeb3.eth.abi.decodeParameter('uint256', subData[0]);
|
|
102
119
|
const targetRatio = weiToRatioPercentage(ratioWei);
|
|
@@ -122,15 +139,32 @@ export const aaveV3QuotePriceSubData = {
|
|
|
122
139
|
};
|
|
123
140
|
},
|
|
124
141
|
};
|
|
142
|
+
export const compoundV2LeverageManagementSubData = {
|
|
143
|
+
encode(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
144
|
+
return [
|
|
145
|
+
new Dec(triggerRepayRatio).mul(1e16).toString(),
|
|
146
|
+
new Dec(triggerBoostRatio).mul(1e16).toString(),
|
|
147
|
+
new Dec(targetBoostRatio).mul(1e16).toString(),
|
|
148
|
+
new Dec(targetRepayRatio).mul(1e16).toString(),
|
|
149
|
+
// @ts-ignore // TODO
|
|
150
|
+
boostEnabled,
|
|
151
|
+
];
|
|
152
|
+
},
|
|
153
|
+
decode(subData) {
|
|
154
|
+
const weiRatio = mockedWeb3.eth.abi.decodeParameter('uint256', subData[0]);
|
|
155
|
+
const targetRatio = weiToRatioPercentage(weiRatio);
|
|
156
|
+
return { targetRatio };
|
|
157
|
+
},
|
|
158
|
+
};
|
|
125
159
|
export const compoundV3LeverageManagementSubData = {
|
|
126
|
-
encode(market, baseToken,
|
|
160
|
+
encode(market, baseToken, triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled, isEOA) {
|
|
127
161
|
return [
|
|
128
162
|
market,
|
|
129
163
|
baseToken,
|
|
130
|
-
new Dec(
|
|
131
|
-
new Dec(
|
|
132
|
-
new Dec(
|
|
133
|
-
new Dec(
|
|
164
|
+
new Dec(triggerRepayRatio).mul(1e16).toString(),
|
|
165
|
+
new Dec(triggerBoostRatio).mul(1e16).toString(),
|
|
166
|
+
new Dec(targetBoostRatio).mul(1e16).toString(),
|
|
167
|
+
new Dec(targetRepayRatio).mul(1e16).toString(),
|
|
134
168
|
// @ts-ignore // TODO
|
|
135
169
|
boostEnabled, isEOA,
|
|
136
170
|
];
|
|
@@ -142,12 +176,12 @@ export const compoundV3LeverageManagementSubData = {
|
|
|
142
176
|
},
|
|
143
177
|
};
|
|
144
178
|
export const morphoAaveV2LeverageManagementSubData = {
|
|
145
|
-
encode(
|
|
179
|
+
encode(triggerRepayRatio, triggerBoostRatio, targetBoostRatio, targetRepayRatio, boostEnabled) {
|
|
146
180
|
return [
|
|
147
|
-
ratioPercentageToWei(
|
|
148
|
-
ratioPercentageToWei(
|
|
149
|
-
ratioPercentageToWei(
|
|
150
|
-
ratioPercentageToWei(
|
|
181
|
+
ratioPercentageToWei(triggerRepayRatio),
|
|
182
|
+
ratioPercentageToWei(triggerBoostRatio),
|
|
183
|
+
ratioPercentageToWei(targetBoostRatio),
|
|
184
|
+
ratioPercentageToWei(targetRepayRatio),
|
|
151
185
|
// @ts-ignore
|
|
152
186
|
boostEnabled,
|
|
153
187
|
];
|
|
@@ -55,7 +55,7 @@ export declare const compoundV2RatioTrigger: {
|
|
|
55
55
|
decode(triggerData: string[]): {
|
|
56
56
|
owner: EthereumAddress;
|
|
57
57
|
ratioState: RatioState;
|
|
58
|
-
ratio:
|
|
58
|
+
ratio: number;
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
61
|
export declare const liquityRatioTrigger: {
|
|
@@ -79,7 +79,7 @@ export declare const aaveV2RatioTrigger: {
|
|
|
79
79
|
owner: EthereumAddress;
|
|
80
80
|
market: EthereumAddress;
|
|
81
81
|
ratioState: RatioState;
|
|
82
|
-
ratio:
|
|
82
|
+
ratio: number;
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
85
|
export declare const cBondsRebondTrigger: {
|
|
@@ -88,7 +88,7 @@ export const compoundV2RatioTrigger = {
|
|
|
88
88
|
const decodedData = mockedWeb3.eth.abi.decodeParameters(['address', 'uint256', 'uint8'], triggerData[0]);
|
|
89
89
|
return {
|
|
90
90
|
owner: decodedData[0],
|
|
91
|
-
ratio: new Dec(mockedWeb3.utils.fromWei(decodedData[1])).mul(100).
|
|
91
|
+
ratio: new Dec(mockedWeb3.utils.fromWei(decodedData[1])).mul(100).toNumber(),
|
|
92
92
|
ratioState: +decodedData[2],
|
|
93
93
|
};
|
|
94
94
|
},
|
|
@@ -129,7 +129,7 @@ export const aaveV2RatioTrigger = {
|
|
|
129
129
|
return {
|
|
130
130
|
owner: decodedData[0],
|
|
131
131
|
market: decodedData[1],
|
|
132
|
-
ratio: new Dec(mockedWeb3.utils.fromWei(decodedData[2])).mul(100).
|
|
132
|
+
ratio: new Dec(mockedWeb3.utils.fromWei(decodedData[2])).mul(100).toNumber(),
|
|
133
133
|
ratioState: +decodedData[3],
|
|
134
134
|
};
|
|
135
135
|
},
|
package/esm/types/enums.d.ts
CHANGED
|
@@ -24,7 +24,9 @@ export declare namespace ProtocolIdentifiers {
|
|
|
24
24
|
MakerDAO = "MakerDAO",
|
|
25
25
|
Liquity = "Liquity",
|
|
26
26
|
ChickenBonds = "Chicken Bonds",
|
|
27
|
+
CompoundV2 = "Compound__V2",
|
|
27
28
|
CompoundV3 = "Compound__V3",
|
|
29
|
+
AaveV2 = "Aave__V2",
|
|
28
30
|
AaveV3 = "Aave__V3",
|
|
29
31
|
MorphoAaveV2 = "Morpho-Aave__V2",
|
|
30
32
|
Exchange = "Exchange",
|
|
@@ -104,8 +106,12 @@ export declare namespace Bundles {
|
|
|
104
106
|
LIQUITY_BOOST = 17,
|
|
105
107
|
SPARK_REPAY = 18,
|
|
106
108
|
SPARK_BOOST = 19,
|
|
107
|
-
SPARK_CLOSE_TO_DEBT =
|
|
108
|
-
SPARK_CLOSE_TO_COLLATERAL =
|
|
109
|
+
SPARK_CLOSE_TO_DEBT = -21231230,
|
|
110
|
+
SPARK_CLOSE_TO_COLLATERAL = -21231231,
|
|
111
|
+
AAVE_V2_REPAY = 22,
|
|
112
|
+
AAVE_V2_BOOST = 23,
|
|
113
|
+
COMP_V2_REPAY = 20,
|
|
114
|
+
COMP_V2_BOOST = 21
|
|
109
115
|
}
|
|
110
116
|
enum OptimismIds {
|
|
111
117
|
AAVE_V3_REPAY = 0,
|
package/esm/types/enums.js
CHANGED
|
@@ -29,7 +29,9 @@ export var ProtocolIdentifiers;
|
|
|
29
29
|
StrategiesAutomation["MakerDAO"] = "MakerDAO";
|
|
30
30
|
StrategiesAutomation["Liquity"] = "Liquity";
|
|
31
31
|
StrategiesAutomation["ChickenBonds"] = "Chicken Bonds";
|
|
32
|
+
StrategiesAutomation["CompoundV2"] = "Compound__V2";
|
|
32
33
|
StrategiesAutomation["CompoundV3"] = "Compound__V3";
|
|
34
|
+
StrategiesAutomation["AaveV2"] = "Aave__V2";
|
|
33
35
|
StrategiesAutomation["AaveV3"] = "Aave__V3";
|
|
34
36
|
StrategiesAutomation["MorphoAaveV2"] = "Morpho-Aave__V2";
|
|
35
37
|
StrategiesAutomation["Exchange"] = "Exchange";
|
|
@@ -118,8 +120,12 @@ export var Bundles;
|
|
|
118
120
|
MainnetIds[MainnetIds["LIQUITY_BOOST"] = 17] = "LIQUITY_BOOST";
|
|
119
121
|
MainnetIds[MainnetIds["SPARK_REPAY"] = 18] = "SPARK_REPAY";
|
|
120
122
|
MainnetIds[MainnetIds["SPARK_BOOST"] = 19] = "SPARK_BOOST";
|
|
121
|
-
MainnetIds[MainnetIds["SPARK_CLOSE_TO_DEBT"] =
|
|
122
|
-
MainnetIds[MainnetIds["SPARK_CLOSE_TO_COLLATERAL"] =
|
|
123
|
+
MainnetIds[MainnetIds["SPARK_CLOSE_TO_DEBT"] = -21231230] = "SPARK_CLOSE_TO_DEBT";
|
|
124
|
+
MainnetIds[MainnetIds["SPARK_CLOSE_TO_COLLATERAL"] = -21231231] = "SPARK_CLOSE_TO_COLLATERAL";
|
|
125
|
+
MainnetIds[MainnetIds["AAVE_V2_REPAY"] = 22] = "AAVE_V2_REPAY";
|
|
126
|
+
MainnetIds[MainnetIds["AAVE_V2_BOOST"] = 23] = "AAVE_V2_BOOST";
|
|
127
|
+
MainnetIds[MainnetIds["COMP_V2_REPAY"] = 20] = "COMP_V2_REPAY";
|
|
128
|
+
MainnetIds[MainnetIds["COMP_V2_BOOST"] = 21] = "COMP_V2_BOOST";
|
|
123
129
|
})(MainnetIds = Bundles.MainnetIds || (Bundles.MainnetIds = {}));
|
|
124
130
|
let OptimismIds;
|
|
125
131
|
(function (OptimismIds) {
|
package/esm/types/index.d.ts
CHANGED
|
@@ -95,11 +95,11 @@ export declare namespace Position {
|
|
|
95
95
|
mergeWithSameId?: boolean;
|
|
96
96
|
}
|
|
97
97
|
interface RatioProtection extends Base {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
triggerRepayRatio?: number;
|
|
99
|
+
targetRepayRatio?: number;
|
|
100
100
|
repayEnabled?: boolean;
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
triggerBoostRatio?: number;
|
|
102
|
+
targetBoostRatio?: number;
|
|
103
103
|
boostEnabled?: boolean;
|
|
104
104
|
}
|
|
105
105
|
interface CloseOnPrice extends Base {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"abi": [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"ParamUpdates","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Subscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Unsubscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Updated","type":"event"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"changeIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getHolder","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"
|
|
2
|
+
"abi": [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"ParamUpdates","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Subscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Unsubscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Updated","type":"event"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"changeIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getHolder","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"optimalRatioBoost","type":"uint128"},{"internalType":"uint128","name":"optimalRatioRepay","type":"uint128"},{"internalType":"bool","name":"boostEnabled","type":"bool"}],"internalType":"struct AaveSubscriptionsV2.AaveHolder","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSubscribers","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"optimalRatioBoost","type":"uint128"},{"internalType":"uint128","name":"optimalRatioRepay","type":"uint128"},{"internalType":"bool","name":"boostEnabled","type":"bool"}],"internalType":"struct AaveSubscriptionsV2.AaveHolder[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_page","type":"uint256"},{"internalType":"uint256","name":"_perPage","type":"uint256"}],"name":"getSubscribersByPage","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"optimalRatioBoost","type":"uint128"},{"internalType":"uint128","name":"optimalRatioRepay","type":"uint128"},{"internalType":"bool","name":"boostEnabled","type":"bool"}],"internalType":"struct AaveSubscriptionsV2.AaveHolder[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isSubscribed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdminByAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdminByOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwnerByAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"_triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"_optimalBoost","type":"uint128"},{"internalType":"uint128","name":"_optimalRepay","type":"uint128"},{"internalType":"bool","name":"_boostEnabled","type":"bool"}],"name":"subscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"subscribers","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"optimalRatioBoost","type":"uint128"},{"internalType":"uint128","name":"optimalRatioRepay","type":"uint128"},{"internalType":"bool","name":"boostEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"subscribersPos","outputs":[{"internalType":"uint256","name":"arrPos","type":"uint256"},{"internalType":"bool","name":"subscribed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unsubscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"unsubscribeByAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawStuckFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}],
|
|
3
3
|
"networks": {
|
|
4
4
|
"1": {
|
|
5
5
|
"address": "0x6B25043BF08182d8e86056C6548847aF607cd7CD"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"abi": [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"ParamUpdates","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Subscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Unsubscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Updated","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"changeIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getHolder","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"
|
|
2
|
+
"abi": [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"","type":"uint128"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"ParamUpdates","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Subscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Unsubscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Updated","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"changeIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getHolder","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"optimalRatioBoost","type":"uint128"},{"internalType":"uint128","name":"optimalRatioRepay","type":"uint128"},{"internalType":"bool","name":"boostEnabled","type":"bool"}],"internalType":"struct CompoundSubscriptions.CompoundHolder","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSubscribers","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"optimalRatioBoost","type":"uint128"},{"internalType":"uint128","name":"optimalRatioRepay","type":"uint128"},{"internalType":"bool","name":"boostEnabled","type":"bool"}],"internalType":"struct CompoundSubscriptions.CompoundHolder[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_page","type":"uint256"},{"internalType":"uint256","name":"_perPage","type":"uint256"}],"name":"getSubscribersByPage","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"optimalRatioBoost","type":"uint128"},{"internalType":"uint128","name":"optimalRatioRepay","type":"uint128"},{"internalType":"bool","name":"boostEnabled","type":"bool"}],"internalType":"struct CompoundSubscriptions.CompoundHolder[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isSubscribed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdminByAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdminByOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwnerByAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"_triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"_optimalBoost","type":"uint128"},{"internalType":"uint128","name":"_optimalRepay","type":"uint128"},{"internalType":"bool","name":"_boostEnabled","type":"bool"}],"name":"subscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"subscribers","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"triggerRepayRatio","type":"uint128"},{"internalType":"uint128","name":"triggerBoostRatio","type":"uint128"},{"internalType":"uint128","name":"optimalRatioBoost","type":"uint128"},{"internalType":"uint128","name":"optimalRatioRepay","type":"uint128"},{"internalType":"bool","name":"boostEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"subscribersPos","outputs":[{"internalType":"uint256","name":"arrPos","type":"uint256"},{"internalType":"bool","name":"subscribed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unsubscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"unsubscribeByAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawStuckFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}],
|
|
3
3
|
"networks": {
|
|
4
4
|
"1": {
|
|
5
5
|
"address": "0x52015EFFD577E08f498a0CCc11905925D58D6207",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"abi": [{"constant":true,"inputs":[],"name":"WETH_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSubscribers","outputs":[{"components":[{"name":"minRatio","type":"uint128"},{"name":"maxRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAVINGS_LOGGER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"changeIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"getCdpHolder","outputs":[{"name":"subscribed","type":"bool"},{"components":[{"name":"minRatio","type":"uint128"},{"name":"maxRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PIP_INTERFACE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"setOwnerByAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"KYBER_ETH_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OTC_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"IDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ilk","type":"bytes32"},{"name":"_cdpId","type":"uint256"}],"name":"getIlkInfo","outputs":[{"name":"ilk","type":"bytes32"},{"name":"art","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"spot","type":"uint256"},{"name":"line","type":"uint256"},{"name":"dust","type":"uint256"},{"name":"mat","type":"uint256"},{"name":"par","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spotter","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GAS_TOKEN_INTERFACE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VOX_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MANAGER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MONITOR_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ETH2DAI_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"manager","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"STUPID_EXCHANGE","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"subscribers","outputs":[{"name":"minRatio","type":"uint128"},{"name":"maxRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cdpId","type":"uint256"},{"name":"_minRatio","type":"uint128"},{"name":"_maxRatio","type":"uint128"},{"name":"_optimalBoost","type":"uint128"},{"name":"_optimalRepay","type":"uint128"},{"name":"_boostEnabled","type":"bool"},{"name":"_nextPriceEnabled","type":"bool"}],"name":"subscribe","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MIGRATION_ACTIONS_PROXY","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"minLimits","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SPOTTER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"subscribersPos","outputs":[{"name":"arrPos","type":"uint256"},{"name":"subscribed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PROXY_REGISTRY_INTERFACE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PROXY_ACTIONS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MKR_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FACTORY_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_page","type":"uint256"},{"name":"_perPage","type":"uint256"}],"name":"getSubscribersByPage","outputs":[{"components":[{"name":"minRatio","type":"uint128"},{"name":"maxRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"unsubscribeByAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"LOGGER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAVER_EXCHANGE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAKER_DAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DISCOUNT_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_admin","type":"address"}],"name":"setAdminByAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"JUG_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"unsubscribe","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"NEW_CDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"KYBER_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SUBSCRIPTION_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"NEW_IDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"COMPOUND_DAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"UNISWAP_FACTORY","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OASIS_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PETH_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"getSubscribedInfo","outputs":[{"name":"","type":"bool"},{"name":"","type":"uint128"},{"name":"","type":"uint128"},{"name":"","type":"uint128"},{"name":"","type":"uint128"},{"name":"","type":"address"},{"name":"coll","type":"uint256"},{"name":"debt","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"KYBER_INTERFACE","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VAT_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DAI_JOIN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERC20_PROXY_0X","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"WALLET_ID","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SOLO_MARGIN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"UNISWAP_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_admin","type":"address"}],"name":"setAdminByOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"saverProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_ilk","type":"bytes32"},{"name":"_newRatio","type":"uint256"}],"name":"changeMinRatios","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"TUB_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ETH_JOIN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SCD_MCD_MIGRATION","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_saverProxy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"}],"name":"Subscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"}],"name":"Unsubscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"}],"name":"Updated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"boostEnabled","type":"bool"}],"name":"ParamUpdates","type":"event"}],
|
|
2
|
+
"abi": [{"constant":true,"inputs":[],"name":"WETH_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSubscribers","outputs":[{"components":[{"name":"triggerRepayRatio","type":"uint128"},{"name":"triggerBoostRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAVINGS_LOGGER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"changeIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"getCdpHolder","outputs":[{"name":"subscribed","type":"bool"},{"components":[{"name":"triggerRepayRatio","type":"uint128"},{"name":"triggerBoostRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PIP_INTERFACE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"setOwnerByAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"KYBER_ETH_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OTC_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"IDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ilk","type":"bytes32"},{"name":"_cdpId","type":"uint256"}],"name":"getIlkInfo","outputs":[{"name":"ilk","type":"bytes32"},{"name":"art","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"spot","type":"uint256"},{"name":"line","type":"uint256"},{"name":"dust","type":"uint256"},{"name":"mat","type":"uint256"},{"name":"par","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spotter","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GAS_TOKEN_INTERFACE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VOX_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MANAGER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MONITOR_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ETH2DAI_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"manager","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"STUPID_EXCHANGE","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"subscribers","outputs":[{"name":"triggerRepayRatio","type":"uint128"},{"name":"triggerBoostRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cdpId","type":"uint256"},{"name":"_triggerRepayRatio","type":"uint128"},{"name":"_triggerBoostRatio","type":"uint128"},{"name":"_optimalBoost","type":"uint128"},{"name":"_optimalRepay","type":"uint128"},{"name":"_boostEnabled","type":"bool"},{"name":"_nextPriceEnabled","type":"bool"}],"name":"subscribe","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MIGRATION_ACTIONS_PROXY","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"minLimits","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SPOTTER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"subscribersPos","outputs":[{"name":"arrPos","type":"uint256"},{"name":"subscribed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PROXY_REGISTRY_INTERFACE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PROXY_ACTIONS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MKR_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FACTORY_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_page","type":"uint256"},{"name":"_perPage","type":"uint256"}],"name":"getSubscribersByPage","outputs":[{"components":[{"name":"triggerRepayRatio","type":"uint128"},{"name":"triggerBoostRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"unsubscribeByAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"LOGGER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAVER_EXCHANGE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAKER_DAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DISCOUNT_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_admin","type":"address"}],"name":"setAdminByAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"JUG_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"unsubscribe","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"NEW_CDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"KYBER_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SUBSCRIPTION_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"NEW_IDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"COMPOUND_DAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"UNISWAP_FACTORY","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OASIS_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PETH_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"getSubscribedInfo","outputs":[{"name":"","type":"bool"},{"name":"","type":"uint128"},{"name":"","type":"uint128"},{"name":"","type":"uint128"},{"name":"","type":"uint128"},{"name":"","type":"address"},{"name":"coll","type":"uint256"},{"name":"debt","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"KYBER_INTERFACE","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VAT_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DAI_JOIN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERC20_PROXY_0X","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"WALLET_ID","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SOLO_MARGIN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"UNISWAP_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_admin","type":"address"}],"name":"setAdminByOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"saverProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_ilk","type":"bytes32"},{"name":"_newRatio","type":"uint256"}],"name":"changetriggerRepayRatios","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"TUB_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ETH_JOIN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SCD_MCD_MIGRATION","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_saverProxy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"}],"name":"Subscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"}],"name":"Unsubscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"}],"name":"Updated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"boostEnabled","type":"bool"}],"name":"ParamUpdates","type":"event"}],
|
|
3
3
|
"networks": {
|
|
4
4
|
"1": {
|
|
5
5
|
"createdBlock": 8335635,
|