@defisaver/automation-sdk 1.0.1
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/.babelrc +3 -0
- package/.editorconfig +9 -0
- package/.eslintignore +7 -0
- package/.eslintrc.js +104 -0
- package/esm/abis/Erc20.json +223 -0
- package/esm/abis/SubStorage.json +17 -0
- package/esm/abis/UniMulticall.json +14 -0
- package/esm/abis/index.d.ts +9 -0
- package/esm/abis/index.js +18 -0
- package/esm/abis/legacy_AaveV2Subscriptions.json +8 -0
- package/esm/abis/legacy_AuthCheck.json +8 -0
- package/esm/abis/legacy_CompoundV2Subscriptions.json +9 -0
- package/esm/abis/legacy_MakerSubscriptions.json +9 -0
- package/esm/automation/private/Automation.d.ts +12 -0
- package/esm/automation/private/Automation.js +39 -0
- package/esm/automation/private/LegacyAutomation.d.ts +25 -0
- package/esm/automation/private/LegacyAutomation.js +102 -0
- package/esm/automation/private/LegacyProtocol.d.ts +20 -0
- package/esm/automation/private/LegacyProtocol.js +34 -0
- package/esm/automation/private/Protocol.d.ts +20 -0
- package/esm/automation/private/Protocol.js +34 -0
- package/esm/automation/private/StrategiesAutomation.d.ts +24 -0
- package/esm/automation/private/StrategiesAutomation.js +111 -0
- package/esm/automation/public/ArbitrumStrategies.d.ts +5 -0
- package/esm/automation/public/ArbitrumStrategies.js +7 -0
- package/esm/automation/public/EthereumStrategies.d.ts +5 -0
- package/esm/automation/public/EthereumStrategies.js +7 -0
- package/esm/automation/public/OptimismStrategies.d.ts +5 -0
- package/esm/automation/public/OptimismStrategies.js +7 -0
- package/esm/automation/public/legacy/LegacyAaveAutomation.d.ts +6 -0
- package/esm/automation/public/legacy/LegacyAaveAutomation.js +14 -0
- package/esm/automation/public/legacy/LegacyCompoundAutomation.d.ts +6 -0
- package/esm/automation/public/legacy/LegacyCompoundAutomation.js +14 -0
- package/esm/automation/public/legacy/LegacyMakerAutomation.d.ts +6 -0
- package/esm/automation/public/legacy/LegacyMakerAutomation.js +14 -0
- package/esm/configuration.d.ts +1 -0
- package/esm/configuration.js +9 -0
- package/esm/constants/index.d.ts +23 -0
- package/esm/constants/index.js +153 -0
- package/esm/index.d.ts +20 -0
- package/esm/index.js +22 -0
- package/esm/services/contractService.d.ts +11 -0
- package/esm/services/contractService.js +40 -0
- package/esm/services/ethereumService.d.ts +7 -0
- package/esm/services/ethereumService.js +34 -0
- package/esm/services/strategiesService.d.ts +2 -0
- package/esm/services/strategiesService.js +244 -0
- package/esm/services/strategySubService.d.ts +32 -0
- package/esm/services/strategySubService.js +91 -0
- package/esm/services/subDataService.d.ts +62 -0
- package/esm/services/subDataService.js +148 -0
- package/esm/services/triggerService.d.ts +89 -0
- package/esm/services/triggerService.js +141 -0
- package/esm/services/utils.d.ts +24 -0
- package/esm/services/utils.js +78 -0
- package/esm/types/contracts/generated/Erc20.d.ts +53 -0
- package/esm/types/contracts/generated/Erc20.js +4 -0
- package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.d.ts +129 -0
- package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.js +4 -0
- package/esm/types/contracts/generated/Legacy_AuthCheck.d.ts +20 -0
- package/esm/types/contracts/generated/Legacy_AuthCheck.js +4 -0
- package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.d.ts +128 -0
- package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.js +4 -0
- package/esm/types/contracts/generated/Legacy_MakerSubscriptions.d.ts +246 -0
- package/esm/types/contracts/generated/Legacy_MakerSubscriptions.js +4 -0
- package/esm/types/contracts/generated/SubStorage.d.ts +114 -0
- package/esm/types/contracts/generated/SubStorage.js +4 -0
- package/esm/types/contracts/generated/UniMulticall.d.ts +55 -0
- package/esm/types/contracts/generated/UniMulticall.js +4 -0
- package/esm/types/contracts/generated/index.d.ts +7 -0
- package/esm/types/contracts/generated/index.js +1 -0
- package/esm/types/contracts/generated/types.d.ts +54 -0
- package/esm/types/contracts/generated/types.js +1 -0
- package/esm/types/enums.d.ts +97 -0
- package/esm/types/enums.js +113 -0
- package/esm/types/index.d.ts +180 -0
- package/esm/types/index.js +1 -0
- package/package.json +66 -0
- package/scripts/generateContractTypes.js +39 -0
- package/src/abis/Erc20.json +223 -0
- package/src/abis/SubStorage.json +17 -0
- package/src/abis/UniMulticall.json +14 -0
- package/src/abis/index.ts +28 -0
- package/src/abis/legacy_AaveV2Subscriptions.json +8 -0
- package/src/abis/legacy_AuthCheck.json +8 -0
- package/src/abis/legacy_CompoundV2Subscriptions.json +9 -0
- package/src/abis/legacy_MakerSubscriptions.json +9 -0
- package/src/automation/private/Automation.ts +44 -0
- package/src/automation/private/LegacyAutomation.ts +124 -0
- package/src/automation/private/LegacyProtocol.ts +45 -0
- package/src/automation/private/Protocol.ts +45 -0
- package/src/automation/private/StrategiesAutomation.ts +157 -0
- package/src/automation/public/ArbitrumStrategies.ts +10 -0
- package/src/automation/public/EthereumStrategies.ts +10 -0
- package/src/automation/public/OptimismStrategies.ts +10 -0
- package/src/automation/public/legacy/LegacyAaveAutomation.ts +20 -0
- package/src/automation/public/legacy/LegacyCompoundAutomation.ts +20 -0
- package/src/automation/public/legacy/LegacyMakerAutomation.ts +20 -0
- package/src/configuration.ts +11 -0
- package/src/constants/index.ts +173 -0
- package/src/index.ts +38 -0
- package/src/services/contractService.ts +65 -0
- package/src/services/ethereumService.ts +55 -0
- package/src/services/strategiesService.ts +336 -0
- package/src/services/strategySubService.ts +202 -0
- package/src/services/subDataService.ts +212 -0
- package/src/services/triggerService.ts +173 -0
- package/src/services/utils.ts +101 -0
- package/src/types/contracts/generated/Erc20.ts +95 -0
- package/src/types/contracts/generated/Legacy_AaveV2Subscriptions.ts +207 -0
- package/src/types/contracts/generated/Legacy_AuthCheck.ts +41 -0
- package/src/types/contracts/generated/Legacy_CompoundV2Subscriptions.ts +205 -0
- package/src/types/contracts/generated/Legacy_MakerSubscriptions.ts +338 -0
- package/src/types/contracts/generated/SubStorage.ts +196 -0
- package/src/types/contracts/generated/UniMulticall.ts +83 -0
- package/src/types/contracts/generated/index.ts +10 -0
- package/src/types/contracts/generated/types.ts +73 -0
- package/src/types/enums.ts +108 -0
- package/src/types/index.ts +217 -0
- package/src/types/typings/process.d.ts +9 -0
- package/tsconfig.json +79 -0
- package/umd/web3.d.ts +28961 -0
- package/webpack.umd.js +52 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type BN from "bn.js";
|
|
6
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
7
|
+
import type { EventLog } from "web3-core";
|
|
8
|
+
import type { EventEmitter } from "events";
|
|
9
|
+
import type {
|
|
10
|
+
Callback,
|
|
11
|
+
PayableTransactionObject,
|
|
12
|
+
NonPayableTransactionObject,
|
|
13
|
+
BlockType,
|
|
14
|
+
ContractEventLog,
|
|
15
|
+
BaseContract,
|
|
16
|
+
} from "./types";
|
|
17
|
+
|
|
18
|
+
export interface EventOptions {
|
|
19
|
+
filter?: object;
|
|
20
|
+
fromBlock?: BlockType;
|
|
21
|
+
topics?: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type Subscribed = ContractEventLog<{
|
|
25
|
+
owner: string;
|
|
26
|
+
cdpId: string;
|
|
27
|
+
0: string;
|
|
28
|
+
1: string;
|
|
29
|
+
}>;
|
|
30
|
+
export type Unsubscribed = ContractEventLog<{
|
|
31
|
+
owner: string;
|
|
32
|
+
cdpId: string;
|
|
33
|
+
0: string;
|
|
34
|
+
1: string;
|
|
35
|
+
}>;
|
|
36
|
+
export type Updated = ContractEventLog<{
|
|
37
|
+
owner: string;
|
|
38
|
+
cdpId: string;
|
|
39
|
+
0: string;
|
|
40
|
+
1: string;
|
|
41
|
+
}>;
|
|
42
|
+
export type ParamUpdates = ContractEventLog<{
|
|
43
|
+
owner: string;
|
|
44
|
+
cdpId: string;
|
|
45
|
+
boostEnabled: boolean;
|
|
46
|
+
0: string;
|
|
47
|
+
1: string;
|
|
48
|
+
2: string;
|
|
49
|
+
3: string;
|
|
50
|
+
4: string;
|
|
51
|
+
5: string;
|
|
52
|
+
6: boolean;
|
|
53
|
+
}>;
|
|
54
|
+
|
|
55
|
+
export interface Legacy_MakerSubscriptions extends BaseContract {
|
|
56
|
+
constructor(
|
|
57
|
+
jsonInterface: any[],
|
|
58
|
+
address?: string,
|
|
59
|
+
options?: ContractOptions
|
|
60
|
+
): Legacy_MakerSubscriptions;
|
|
61
|
+
clone(): Legacy_MakerSubscriptions;
|
|
62
|
+
methods: {
|
|
63
|
+
WETH_ADDRESS(): NonPayableTransactionObject<string>;
|
|
64
|
+
|
|
65
|
+
CDAI_ADDRESS(): NonPayableTransactionObject<string>;
|
|
66
|
+
|
|
67
|
+
getSubscribers(): NonPayableTransactionObject<
|
|
68
|
+
[string, string, string, string, string, string, boolean, boolean] &
|
|
69
|
+
{
|
|
70
|
+
minRatio: string;
|
|
71
|
+
maxRatio: string;
|
|
72
|
+
optimalRatioBoost: string;
|
|
73
|
+
optimalRatioRepay: string;
|
|
74
|
+
owner: string;
|
|
75
|
+
cdpId: string;
|
|
76
|
+
boostEnabled: boolean;
|
|
77
|
+
nextPriceEnabled: boolean;
|
|
78
|
+
}[]
|
|
79
|
+
>;
|
|
80
|
+
|
|
81
|
+
SAVINGS_LOGGER_ADDRESS(): NonPayableTransactionObject<string>;
|
|
82
|
+
|
|
83
|
+
SAI_ADDRESS(): NonPayableTransactionObject<string>;
|
|
84
|
+
|
|
85
|
+
changeIndex(): NonPayableTransactionObject<string>;
|
|
86
|
+
|
|
87
|
+
getCdpHolder(
|
|
88
|
+
_cdpId: number | string | BN
|
|
89
|
+
): NonPayableTransactionObject<
|
|
90
|
+
[
|
|
91
|
+
boolean,
|
|
92
|
+
[string, string, string, string, string, string, boolean, boolean] & {
|
|
93
|
+
minRatio: string;
|
|
94
|
+
maxRatio: string;
|
|
95
|
+
optimalRatioBoost: string;
|
|
96
|
+
optimalRatioRepay: string;
|
|
97
|
+
owner: string;
|
|
98
|
+
cdpId: string;
|
|
99
|
+
boostEnabled: boolean;
|
|
100
|
+
nextPriceEnabled: boolean;
|
|
101
|
+
}
|
|
102
|
+
] & { subscribed: boolean }
|
|
103
|
+
>;
|
|
104
|
+
|
|
105
|
+
PIP_INTERFACE_ADDRESS(): NonPayableTransactionObject<string>;
|
|
106
|
+
|
|
107
|
+
setOwnerByAdmin(_owner: string): NonPayableTransactionObject<void>;
|
|
108
|
+
|
|
109
|
+
KYBER_ETH_ADDRESS(): NonPayableTransactionObject<string>;
|
|
110
|
+
|
|
111
|
+
OTC_ADDRESS(): NonPayableTransactionObject<string>;
|
|
112
|
+
|
|
113
|
+
DAI_ADDRESS(): NonPayableTransactionObject<string>;
|
|
114
|
+
|
|
115
|
+
IDAI_ADDRESS(): NonPayableTransactionObject<string>;
|
|
116
|
+
|
|
117
|
+
getIlkInfo(
|
|
118
|
+
_ilk: string | number[],
|
|
119
|
+
_cdpId: number | string | BN
|
|
120
|
+
): NonPayableTransactionObject<
|
|
121
|
+
[string, string, string, string, string, string, string, string] & {
|
|
122
|
+
ilk: string;
|
|
123
|
+
art: string;
|
|
124
|
+
rate: string;
|
|
125
|
+
spot: string;
|
|
126
|
+
line: string;
|
|
127
|
+
dust: string;
|
|
128
|
+
mat: string;
|
|
129
|
+
par: string;
|
|
130
|
+
}
|
|
131
|
+
>;
|
|
132
|
+
|
|
133
|
+
spotter(): NonPayableTransactionObject<string>;
|
|
134
|
+
|
|
135
|
+
GAS_TOKEN_INTERFACE_ADDRESS(): NonPayableTransactionObject<string>;
|
|
136
|
+
|
|
137
|
+
vat(): NonPayableTransactionObject<string>;
|
|
138
|
+
|
|
139
|
+
VOX_ADDRESS(): NonPayableTransactionObject<string>;
|
|
140
|
+
|
|
141
|
+
MANAGER_ADDRESS(): NonPayableTransactionObject<string>;
|
|
142
|
+
|
|
143
|
+
MONITOR_ADDRESS(): NonPayableTransactionObject<string>;
|
|
144
|
+
|
|
145
|
+
ETH2DAI_WRAPPER(): NonPayableTransactionObject<string>;
|
|
146
|
+
|
|
147
|
+
manager(): NonPayableTransactionObject<string>;
|
|
148
|
+
|
|
149
|
+
STUPID_EXCHANGE(): NonPayableTransactionObject<string>;
|
|
150
|
+
|
|
151
|
+
subscribers(
|
|
152
|
+
arg0: number | string | BN
|
|
153
|
+
): NonPayableTransactionObject<
|
|
154
|
+
[string, string, string, string, string, string, boolean, boolean] & {
|
|
155
|
+
minRatio: string;
|
|
156
|
+
maxRatio: string;
|
|
157
|
+
optimalRatioBoost: string;
|
|
158
|
+
optimalRatioRepay: string;
|
|
159
|
+
owner: string;
|
|
160
|
+
cdpId: string;
|
|
161
|
+
boostEnabled: boolean;
|
|
162
|
+
nextPriceEnabled: boolean;
|
|
163
|
+
}
|
|
164
|
+
>;
|
|
165
|
+
|
|
166
|
+
subscribe(
|
|
167
|
+
_cdpId: number | string | BN,
|
|
168
|
+
_minRatio: number | string | BN,
|
|
169
|
+
_maxRatio: number | string | BN,
|
|
170
|
+
_optimalBoost: number | string | BN,
|
|
171
|
+
_optimalRepay: number | string | BN,
|
|
172
|
+
_boostEnabled: boolean,
|
|
173
|
+
_nextPriceEnabled: boolean
|
|
174
|
+
): NonPayableTransactionObject<void>;
|
|
175
|
+
|
|
176
|
+
MIGRATION_ACTIONS_PROXY(): NonPayableTransactionObject<string>;
|
|
177
|
+
|
|
178
|
+
minLimits(arg0: string | number[]): NonPayableTransactionObject<string>;
|
|
179
|
+
|
|
180
|
+
SPOTTER_ADDRESS(): NonPayableTransactionObject<string>;
|
|
181
|
+
|
|
182
|
+
subscribersPos(
|
|
183
|
+
arg0: number | string | BN
|
|
184
|
+
): NonPayableTransactionObject<
|
|
185
|
+
[string, boolean] & { arrPos: string; subscribed: boolean }
|
|
186
|
+
>;
|
|
187
|
+
|
|
188
|
+
PROXY_REGISTRY_INTERFACE_ADDRESS(): NonPayableTransactionObject<string>;
|
|
189
|
+
|
|
190
|
+
PROXY_ACTIONS(): NonPayableTransactionObject<string>;
|
|
191
|
+
|
|
192
|
+
MKR_ADDRESS(): NonPayableTransactionObject<string>;
|
|
193
|
+
|
|
194
|
+
FACTORY_ADDRESS(): NonPayableTransactionObject<string>;
|
|
195
|
+
|
|
196
|
+
getSubscribersByPage(
|
|
197
|
+
_page: number | string | BN,
|
|
198
|
+
_perPage: number | string | BN
|
|
199
|
+
): NonPayableTransactionObject<
|
|
200
|
+
[string, string, string, string, string, string, boolean, boolean] &
|
|
201
|
+
{
|
|
202
|
+
minRatio: string;
|
|
203
|
+
maxRatio: string;
|
|
204
|
+
optimalRatioBoost: string;
|
|
205
|
+
optimalRatioRepay: string;
|
|
206
|
+
owner: string;
|
|
207
|
+
cdpId: string;
|
|
208
|
+
boostEnabled: boolean;
|
|
209
|
+
nextPriceEnabled: boolean;
|
|
210
|
+
}[]
|
|
211
|
+
>;
|
|
212
|
+
|
|
213
|
+
owner(): NonPayableTransactionObject<string>;
|
|
214
|
+
|
|
215
|
+
unsubscribeByAdmin(
|
|
216
|
+
_cdpId: number | string | BN
|
|
217
|
+
): NonPayableTransactionObject<void>;
|
|
218
|
+
|
|
219
|
+
LOGGER_ADDRESS(): NonPayableTransactionObject<string>;
|
|
220
|
+
|
|
221
|
+
SAVER_EXCHANGE_ADDRESS(): NonPayableTransactionObject<string>;
|
|
222
|
+
|
|
223
|
+
MAKER_DAI_ADDRESS(): NonPayableTransactionObject<string>;
|
|
224
|
+
|
|
225
|
+
DISCOUNT_ADDRESS(): NonPayableTransactionObject<string>;
|
|
226
|
+
|
|
227
|
+
setAdminByAdmin(_admin: string): NonPayableTransactionObject<void>;
|
|
228
|
+
|
|
229
|
+
JUG_ADDRESS(): NonPayableTransactionObject<string>;
|
|
230
|
+
|
|
231
|
+
unsubscribe(
|
|
232
|
+
_cdpId: number | string | BN
|
|
233
|
+
): NonPayableTransactionObject<void>;
|
|
234
|
+
|
|
235
|
+
NEW_CDAI_ADDRESS(): NonPayableTransactionObject<string>;
|
|
236
|
+
|
|
237
|
+
KYBER_WRAPPER(): NonPayableTransactionObject<string>;
|
|
238
|
+
|
|
239
|
+
SUBSCRIPTION_ADDRESS(): NonPayableTransactionObject<string>;
|
|
240
|
+
|
|
241
|
+
NEW_IDAI_ADDRESS(): NonPayableTransactionObject<string>;
|
|
242
|
+
|
|
243
|
+
COMPOUND_DAI_ADDRESS(): NonPayableTransactionObject<string>;
|
|
244
|
+
|
|
245
|
+
getOwner(_cdpId: number | string | BN): NonPayableTransactionObject<string>;
|
|
246
|
+
|
|
247
|
+
UNISWAP_FACTORY(): NonPayableTransactionObject<string>;
|
|
248
|
+
|
|
249
|
+
OASIS_WRAPPER(): NonPayableTransactionObject<string>;
|
|
250
|
+
|
|
251
|
+
PETH_ADDRESS(): NonPayableTransactionObject<string>;
|
|
252
|
+
|
|
253
|
+
getSubscribedInfo(
|
|
254
|
+
_cdpId: number | string | BN
|
|
255
|
+
): NonPayableTransactionObject<
|
|
256
|
+
[boolean, string, string, string, string, string, string, string] & {
|
|
257
|
+
coll: string;
|
|
258
|
+
debt: string;
|
|
259
|
+
}
|
|
260
|
+
>;
|
|
261
|
+
|
|
262
|
+
KYBER_INTERFACE(): NonPayableTransactionObject<string>;
|
|
263
|
+
|
|
264
|
+
VAT_ADDRESS(): NonPayableTransactionObject<string>;
|
|
265
|
+
|
|
266
|
+
DAI_JOIN_ADDRESS(): NonPayableTransactionObject<string>;
|
|
267
|
+
|
|
268
|
+
ERC20_PROXY_0X(): NonPayableTransactionObject<string>;
|
|
269
|
+
|
|
270
|
+
WALLET_ID(): NonPayableTransactionObject<string>;
|
|
271
|
+
|
|
272
|
+
SOLO_MARGIN_ADDRESS(): NonPayableTransactionObject<string>;
|
|
273
|
+
|
|
274
|
+
UNISWAP_WRAPPER(): NonPayableTransactionObject<string>;
|
|
275
|
+
|
|
276
|
+
setAdminByOwner(_admin: string): NonPayableTransactionObject<void>;
|
|
277
|
+
|
|
278
|
+
saverProxy(): NonPayableTransactionObject<string>;
|
|
279
|
+
|
|
280
|
+
changeMinRatios(
|
|
281
|
+
_ilk: string | number[],
|
|
282
|
+
_newRatio: number | string | BN
|
|
283
|
+
): NonPayableTransactionObject<void>;
|
|
284
|
+
|
|
285
|
+
TUB_ADDRESS(): NonPayableTransactionObject<string>;
|
|
286
|
+
|
|
287
|
+
ETH_JOIN_ADDRESS(): NonPayableTransactionObject<string>;
|
|
288
|
+
|
|
289
|
+
SCD_MCD_MIGRATION(): NonPayableTransactionObject<string>;
|
|
290
|
+
|
|
291
|
+
admin(): NonPayableTransactionObject<string>;
|
|
292
|
+
};
|
|
293
|
+
events: {
|
|
294
|
+
Subscribed(cb?: Callback<Subscribed>): EventEmitter;
|
|
295
|
+
Subscribed(options?: EventOptions, cb?: Callback<Subscribed>): EventEmitter;
|
|
296
|
+
|
|
297
|
+
Unsubscribed(cb?: Callback<Unsubscribed>): EventEmitter;
|
|
298
|
+
Unsubscribed(
|
|
299
|
+
options?: EventOptions,
|
|
300
|
+
cb?: Callback<Unsubscribed>
|
|
301
|
+
): EventEmitter;
|
|
302
|
+
|
|
303
|
+
Updated(cb?: Callback<Updated>): EventEmitter;
|
|
304
|
+
Updated(options?: EventOptions, cb?: Callback<Updated>): EventEmitter;
|
|
305
|
+
|
|
306
|
+
ParamUpdates(cb?: Callback<ParamUpdates>): EventEmitter;
|
|
307
|
+
ParamUpdates(
|
|
308
|
+
options?: EventOptions,
|
|
309
|
+
cb?: Callback<ParamUpdates>
|
|
310
|
+
): EventEmitter;
|
|
311
|
+
|
|
312
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
once(event: "Subscribed", cb: Callback<Subscribed>): void;
|
|
316
|
+
once(
|
|
317
|
+
event: "Subscribed",
|
|
318
|
+
options: EventOptions,
|
|
319
|
+
cb: Callback<Subscribed>
|
|
320
|
+
): void;
|
|
321
|
+
|
|
322
|
+
once(event: "Unsubscribed", cb: Callback<Unsubscribed>): void;
|
|
323
|
+
once(
|
|
324
|
+
event: "Unsubscribed",
|
|
325
|
+
options: EventOptions,
|
|
326
|
+
cb: Callback<Unsubscribed>
|
|
327
|
+
): void;
|
|
328
|
+
|
|
329
|
+
once(event: "Updated", cb: Callback<Updated>): void;
|
|
330
|
+
once(event: "Updated", options: EventOptions, cb: Callback<Updated>): void;
|
|
331
|
+
|
|
332
|
+
once(event: "ParamUpdates", cb: Callback<ParamUpdates>): void;
|
|
333
|
+
once(
|
|
334
|
+
event: "ParamUpdates",
|
|
335
|
+
options: EventOptions,
|
|
336
|
+
cb: Callback<ParamUpdates>
|
|
337
|
+
): void;
|
|
338
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type BN from "bn.js";
|
|
6
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
7
|
+
import type { EventLog } from "web3-core";
|
|
8
|
+
import type { EventEmitter } from "events";
|
|
9
|
+
import type {
|
|
10
|
+
Callback,
|
|
11
|
+
PayableTransactionObject,
|
|
12
|
+
NonPayableTransactionObject,
|
|
13
|
+
BlockType,
|
|
14
|
+
ContractEventLog,
|
|
15
|
+
BaseContract,
|
|
16
|
+
} from "./types";
|
|
17
|
+
|
|
18
|
+
export interface EventOptions {
|
|
19
|
+
filter?: object;
|
|
20
|
+
fromBlock?: BlockType;
|
|
21
|
+
topics?: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare namespace StrategyModel {
|
|
25
|
+
export type StrategySubStruct =
|
|
26
|
+
| [number | string | BN, boolean, string | number[][], string | number[][]]
|
|
27
|
+
| {
|
|
28
|
+
strategyOrBundleId: number | string | BN;
|
|
29
|
+
isBundle: boolean;
|
|
30
|
+
triggerData: string | number[][];
|
|
31
|
+
subData: string | number[][];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type StrategySubStructOutputArray = [
|
|
35
|
+
string,
|
|
36
|
+
boolean,
|
|
37
|
+
string[],
|
|
38
|
+
string[]
|
|
39
|
+
];
|
|
40
|
+
export type StrategySubStructOutputStruct = {
|
|
41
|
+
strategyOrBundleId: string;
|
|
42
|
+
isBundle: boolean;
|
|
43
|
+
triggerData: string[];
|
|
44
|
+
subData: string[];
|
|
45
|
+
};
|
|
46
|
+
export type StrategySubStructOutput = StrategySubStructOutputArray &
|
|
47
|
+
StrategySubStructOutputStruct;
|
|
48
|
+
|
|
49
|
+
export type StoredSubDataStruct =
|
|
50
|
+
| [string | number[], boolean, string | number[]]
|
|
51
|
+
| {
|
|
52
|
+
userProxy: string | number[];
|
|
53
|
+
isEnabled: boolean;
|
|
54
|
+
strategySubHash: string | number[];
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type StoredSubDataStructOutputArray = [string, boolean, string];
|
|
58
|
+
export type StoredSubDataStructOutputStruct = {
|
|
59
|
+
userProxy: string;
|
|
60
|
+
isEnabled: boolean;
|
|
61
|
+
strategySubHash: string;
|
|
62
|
+
};
|
|
63
|
+
export type StoredSubDataStructOutput = StoredSubDataStructOutputArray &
|
|
64
|
+
StoredSubDataStructOutputStruct;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type ActivateSub = ContractEventLog<{
|
|
68
|
+
subId: string;
|
|
69
|
+
0: string;
|
|
70
|
+
}>;
|
|
71
|
+
export type DeactivateSub = ContractEventLog<{
|
|
72
|
+
subId: string;
|
|
73
|
+
0: string;
|
|
74
|
+
}>;
|
|
75
|
+
export type Subscribe = ContractEventLog<{
|
|
76
|
+
subId: string;
|
|
77
|
+
proxy: string;
|
|
78
|
+
subHash: string;
|
|
79
|
+
subStruct: StrategyModel.StrategySubStructOutput;
|
|
80
|
+
0: string;
|
|
81
|
+
1: string;
|
|
82
|
+
2: string;
|
|
83
|
+
3: StrategyModel.StrategySubStructOutput;
|
|
84
|
+
}>;
|
|
85
|
+
export type UpdateData = ContractEventLog<{
|
|
86
|
+
subId: string;
|
|
87
|
+
subHash: string;
|
|
88
|
+
subStruct: StrategyModel.StrategySubStructOutput;
|
|
89
|
+
0: string;
|
|
90
|
+
1: string;
|
|
91
|
+
2: StrategyModel.StrategySubStructOutput;
|
|
92
|
+
}>;
|
|
93
|
+
|
|
94
|
+
export interface SubStorage extends BaseContract {
|
|
95
|
+
constructor(
|
|
96
|
+
jsonInterface: any[],
|
|
97
|
+
address?: string,
|
|
98
|
+
options?: ContractOptions
|
|
99
|
+
): SubStorage;
|
|
100
|
+
clone(): SubStorage;
|
|
101
|
+
methods: {
|
|
102
|
+
activateSub(
|
|
103
|
+
_subId: number | string | BN
|
|
104
|
+
): NonPayableTransactionObject<void>;
|
|
105
|
+
|
|
106
|
+
adminVault(): NonPayableTransactionObject<string>;
|
|
107
|
+
|
|
108
|
+
deactivateSub(
|
|
109
|
+
_subId: number | string | BN
|
|
110
|
+
): NonPayableTransactionObject<void>;
|
|
111
|
+
|
|
112
|
+
getSub(
|
|
113
|
+
_subId: number | string | BN
|
|
114
|
+
): NonPayableTransactionObject<StrategyModel.StoredSubDataStructOutput>;
|
|
115
|
+
|
|
116
|
+
getSubsCount(): NonPayableTransactionObject<string>;
|
|
117
|
+
|
|
118
|
+
kill(): NonPayableTransactionObject<void>;
|
|
119
|
+
|
|
120
|
+
registry(): NonPayableTransactionObject<string>;
|
|
121
|
+
|
|
122
|
+
strategiesSubs(
|
|
123
|
+
arg0: number | string | BN
|
|
124
|
+
): NonPayableTransactionObject<
|
|
125
|
+
[string, boolean, string] & {
|
|
126
|
+
userProxy: string;
|
|
127
|
+
isEnabled: boolean;
|
|
128
|
+
strategySubHash: string;
|
|
129
|
+
}
|
|
130
|
+
>;
|
|
131
|
+
|
|
132
|
+
subscribeToStrategy(
|
|
133
|
+
_sub: StrategyModel.StrategySubStruct
|
|
134
|
+
): NonPayableTransactionObject<string>;
|
|
135
|
+
|
|
136
|
+
updateSubData(
|
|
137
|
+
_subId: number | string | BN,
|
|
138
|
+
_sub: StrategyModel.StrategySubStruct
|
|
139
|
+
): NonPayableTransactionObject<void>;
|
|
140
|
+
|
|
141
|
+
withdrawStuckFunds(
|
|
142
|
+
_token: string,
|
|
143
|
+
_receiver: string,
|
|
144
|
+
_amount: number | string | BN
|
|
145
|
+
): NonPayableTransactionObject<void>;
|
|
146
|
+
};
|
|
147
|
+
events: {
|
|
148
|
+
ActivateSub(cb?: Callback<ActivateSub>): EventEmitter;
|
|
149
|
+
ActivateSub(
|
|
150
|
+
options?: EventOptions,
|
|
151
|
+
cb?: Callback<ActivateSub>
|
|
152
|
+
): EventEmitter;
|
|
153
|
+
|
|
154
|
+
DeactivateSub(cb?: Callback<DeactivateSub>): EventEmitter;
|
|
155
|
+
DeactivateSub(
|
|
156
|
+
options?: EventOptions,
|
|
157
|
+
cb?: Callback<DeactivateSub>
|
|
158
|
+
): EventEmitter;
|
|
159
|
+
|
|
160
|
+
Subscribe(cb?: Callback<Subscribe>): EventEmitter;
|
|
161
|
+
Subscribe(options?: EventOptions, cb?: Callback<Subscribe>): EventEmitter;
|
|
162
|
+
|
|
163
|
+
UpdateData(cb?: Callback<UpdateData>): EventEmitter;
|
|
164
|
+
UpdateData(options?: EventOptions, cb?: Callback<UpdateData>): EventEmitter;
|
|
165
|
+
|
|
166
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
once(event: "ActivateSub", cb: Callback<ActivateSub>): void;
|
|
170
|
+
once(
|
|
171
|
+
event: "ActivateSub",
|
|
172
|
+
options: EventOptions,
|
|
173
|
+
cb: Callback<ActivateSub>
|
|
174
|
+
): void;
|
|
175
|
+
|
|
176
|
+
once(event: "DeactivateSub", cb: Callback<DeactivateSub>): void;
|
|
177
|
+
once(
|
|
178
|
+
event: "DeactivateSub",
|
|
179
|
+
options: EventOptions,
|
|
180
|
+
cb: Callback<DeactivateSub>
|
|
181
|
+
): void;
|
|
182
|
+
|
|
183
|
+
once(event: "Subscribe", cb: Callback<Subscribe>): void;
|
|
184
|
+
once(
|
|
185
|
+
event: "Subscribe",
|
|
186
|
+
options: EventOptions,
|
|
187
|
+
cb: Callback<Subscribe>
|
|
188
|
+
): void;
|
|
189
|
+
|
|
190
|
+
once(event: "UpdateData", cb: Callback<UpdateData>): void;
|
|
191
|
+
once(
|
|
192
|
+
event: "UpdateData",
|
|
193
|
+
options: EventOptions,
|
|
194
|
+
cb: Callback<UpdateData>
|
|
195
|
+
): void;
|
|
196
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type BN from "bn.js";
|
|
6
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
7
|
+
import type { EventLog } from "web3-core";
|
|
8
|
+
import type { EventEmitter } from "events";
|
|
9
|
+
import type {
|
|
10
|
+
Callback,
|
|
11
|
+
PayableTransactionObject,
|
|
12
|
+
NonPayableTransactionObject,
|
|
13
|
+
BlockType,
|
|
14
|
+
ContractEventLog,
|
|
15
|
+
BaseContract,
|
|
16
|
+
} from "./types";
|
|
17
|
+
|
|
18
|
+
export interface EventOptions {
|
|
19
|
+
filter?: object;
|
|
20
|
+
fromBlock?: BlockType;
|
|
21
|
+
topics?: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare namespace UniswapInterfaceMulticall {
|
|
25
|
+
export type CallStruct =
|
|
26
|
+
| [string, number | string | BN, string | number[]]
|
|
27
|
+
| {
|
|
28
|
+
target: string;
|
|
29
|
+
gasLimit: number | string | BN;
|
|
30
|
+
callData: string | number[];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type CallStructOutputArray = [string, string, string];
|
|
34
|
+
export type CallStructOutputStruct = {
|
|
35
|
+
target: string;
|
|
36
|
+
gasLimit: string;
|
|
37
|
+
callData: string;
|
|
38
|
+
};
|
|
39
|
+
export type CallStructOutput = CallStructOutputArray & CallStructOutputStruct;
|
|
40
|
+
|
|
41
|
+
export type ResultStruct =
|
|
42
|
+
| [boolean, number | string | BN, string | number[]]
|
|
43
|
+
| {
|
|
44
|
+
success: boolean;
|
|
45
|
+
gasUsed: number | string | BN;
|
|
46
|
+
returnData: string | number[];
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type ResultStructOutputArray = [boolean, string, string];
|
|
50
|
+
export type ResultStructOutputStruct = {
|
|
51
|
+
success: boolean;
|
|
52
|
+
gasUsed: string;
|
|
53
|
+
returnData: string;
|
|
54
|
+
};
|
|
55
|
+
export type ResultStructOutput = ResultStructOutputArray &
|
|
56
|
+
ResultStructOutputStruct;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface UniMulticall extends BaseContract {
|
|
60
|
+
constructor(
|
|
61
|
+
jsonInterface: any[],
|
|
62
|
+
address?: string,
|
|
63
|
+
options?: ContractOptions
|
|
64
|
+
): UniMulticall;
|
|
65
|
+
clone(): UniMulticall;
|
|
66
|
+
methods: {
|
|
67
|
+
getCurrentBlockTimestamp(): NonPayableTransactionObject<string>;
|
|
68
|
+
|
|
69
|
+
getEthBalance(addr: string): NonPayableTransactionObject<string>;
|
|
70
|
+
|
|
71
|
+
multicall(
|
|
72
|
+
calls: UniswapInterfaceMulticall.CallStruct[]
|
|
73
|
+
): NonPayableTransactionObject<
|
|
74
|
+
[string, UniswapInterfaceMulticall.ResultStructOutput[]] & {
|
|
75
|
+
blockNumber: string;
|
|
76
|
+
returnData: UniswapInterfaceMulticall.ResultStructOutput[];
|
|
77
|
+
}
|
|
78
|
+
>;
|
|
79
|
+
};
|
|
80
|
+
events: {
|
|
81
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
export type { Erc20 } from "./Erc20";
|
|
5
|
+
export type { SubStorage } from "./SubStorage";
|
|
6
|
+
export type { UniMulticall } from "./UniMulticall";
|
|
7
|
+
export type { Legacy_AaveV2Subscriptions } from "./Legacy_AaveV2Subscriptions";
|
|
8
|
+
export type { Legacy_AuthCheck } from "./Legacy_AuthCheck";
|
|
9
|
+
export type { Legacy_CompoundV2Subscriptions } from "./Legacy_CompoundV2Subscriptions";
|
|
10
|
+
export type { Legacy_MakerSubscriptions } from "./Legacy_MakerSubscriptions";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type BN from "bn.js";
|
|
5
|
+
import type { EventEmitter } from "events";
|
|
6
|
+
import type { EventLog, PromiEvent, TransactionReceipt } from "web3-core/types";
|
|
7
|
+
import type { Contract } from "web3-eth-contract";
|
|
8
|
+
|
|
9
|
+
export interface EstimateGasOptions {
|
|
10
|
+
from?: string;
|
|
11
|
+
gas?: number;
|
|
12
|
+
value?: number | string | BN;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface EventOptions {
|
|
16
|
+
filter?: object;
|
|
17
|
+
fromBlock?: BlockType;
|
|
18
|
+
topics?: string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type Callback<T> = (error: Error, result: T) => void;
|
|
22
|
+
export interface ContractEventLog<T> extends EventLog {
|
|
23
|
+
returnValues: T;
|
|
24
|
+
}
|
|
25
|
+
export interface ContractEventEmitter<T> extends EventEmitter {
|
|
26
|
+
on(event: "connected", listener: (subscriptionId: string) => void): this;
|
|
27
|
+
on(
|
|
28
|
+
event: "data" | "changed",
|
|
29
|
+
listener: (event: ContractEventLog<T>) => void
|
|
30
|
+
): this;
|
|
31
|
+
on(event: "error", listener: (error: Error) => void): this;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface NonPayableTx {
|
|
35
|
+
nonce?: string | number | BN;
|
|
36
|
+
chainId?: string | number | BN;
|
|
37
|
+
from?: string;
|
|
38
|
+
to?: string;
|
|
39
|
+
data?: string;
|
|
40
|
+
gas?: string | number | BN;
|
|
41
|
+
maxPriorityFeePerGas?: string | number | BN;
|
|
42
|
+
maxFeePerGas?: string | number | BN;
|
|
43
|
+
gasPrice?: string | number | BN;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface PayableTx extends NonPayableTx {
|
|
47
|
+
value?: string | number | BN;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface NonPayableTransactionObject<T> {
|
|
51
|
+
arguments: any[];
|
|
52
|
+
call(tx?: NonPayableTx, block?: BlockType): Promise<T>;
|
|
53
|
+
send(tx?: NonPayableTx): PromiEvent<TransactionReceipt>;
|
|
54
|
+
estimateGas(tx?: NonPayableTx): Promise<number>;
|
|
55
|
+
encodeABI(): string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface PayableTransactionObject<T> {
|
|
59
|
+
arguments: any[];
|
|
60
|
+
call(tx?: PayableTx, block?: BlockType): Promise<T>;
|
|
61
|
+
send(tx?: PayableTx): PromiEvent<TransactionReceipt>;
|
|
62
|
+
estimateGas(tx?: PayableTx): Promise<number>;
|
|
63
|
+
encodeABI(): string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type BlockType =
|
|
67
|
+
| "latest"
|
|
68
|
+
| "pending"
|
|
69
|
+
| "genesis"
|
|
70
|
+
| "earliest"
|
|
71
|
+
| number
|
|
72
|
+
| BN;
|
|
73
|
+
export type BaseContract = Omit<Contract, "clone" | "once">;
|