@dhedge/v2-sdk 1.4.3 → 1.5.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.
@@ -0,0 +1,443 @@
1
+ {
2
+ "abi": [
3
+ {
4
+ "inputs": [
5
+ {
6
+ "internalType": "address payable",
7
+ "name": "_feeSink",
8
+ "type": "address"
9
+ },
10
+ {
11
+ "components": [
12
+ {
13
+ "internalType": "contract IUniswapV2RouterSwapOnly",
14
+ "name": "swapRouter",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "internalType": "contract IUniswapV2Router",
19
+ "name": "assetType2Router",
20
+ "type": "address"
21
+ },
22
+ {
23
+ "internalType": "contract IUniswapV2Router",
24
+ "name": "assetType5Router",
25
+ "type": "address"
26
+ },
27
+ {
28
+ "components": [
29
+ {
30
+ "internalType": "contract ISynthetix",
31
+ "name": "snxProxy",
32
+ "type": "address"
33
+ },
34
+ {
35
+ "internalType": "contract IERC20",
36
+ "name": "swapSUSDToAsset",
37
+ "type": "address"
38
+ },
39
+ {
40
+ "internalType": "contract ISynthAddressProxy",
41
+ "name": "sUSDProxy",
42
+ "type": "address"
43
+ }
44
+ ],
45
+ "internalType": "struct EasySwapperStructs.SynthetixProps",
46
+ "name": "synthetixProps",
47
+ "type": "tuple"
48
+ },
49
+ {
50
+ "internalType": "contract IERC20",
51
+ "name": "weth",
52
+ "type": "address"
53
+ }
54
+ ],
55
+ "internalType": "struct EasySwapperStructs.WithdrawProps",
56
+ "name": "_withdrawProps",
57
+ "type": "tuple"
58
+ }
59
+ ],
60
+ "stateMutability": "nonpayable",
61
+ "type": "constructor"
62
+ },
63
+ {
64
+ "anonymous": false,
65
+ "inputs": [
66
+ {
67
+ "indexed": false,
68
+ "internalType": "address",
69
+ "name": "pool",
70
+ "type": "address"
71
+ },
72
+ {
73
+ "indexed": false,
74
+ "internalType": "address",
75
+ "name": "depositor",
76
+ "type": "address"
77
+ },
78
+ {
79
+ "indexed": false,
80
+ "internalType": "address",
81
+ "name": "depositAsset",
82
+ "type": "address"
83
+ },
84
+ {
85
+ "indexed": false,
86
+ "internalType": "uint256",
87
+ "name": "amount",
88
+ "type": "uint256"
89
+ },
90
+ {
91
+ "indexed": false,
92
+ "internalType": "address",
93
+ "name": "poolDepositAsset",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "indexed": false,
98
+ "internalType": "uint256",
99
+ "name": "liquidityMinted",
100
+ "type": "uint256"
101
+ }
102
+ ],
103
+ "name": "Deposit",
104
+ "type": "event"
105
+ },
106
+ {
107
+ "anonymous": false,
108
+ "inputs": [
109
+ {
110
+ "indexed": true,
111
+ "internalType": "address",
112
+ "name": "previousOwner",
113
+ "type": "address"
114
+ },
115
+ {
116
+ "indexed": true,
117
+ "internalType": "address",
118
+ "name": "newOwner",
119
+ "type": "address"
120
+ }
121
+ ],
122
+ "name": "OwnershipTransferred",
123
+ "type": "event"
124
+ },
125
+ {
126
+ "inputs": [
127
+ {
128
+ "internalType": "address",
129
+ "name": "",
130
+ "type": "address"
131
+ }
132
+ ],
133
+ "name": "allowedPools",
134
+ "outputs": [
135
+ {
136
+ "internalType": "bool",
137
+ "name": "",
138
+ "type": "bool"
139
+ }
140
+ ],
141
+ "stateMutability": "view",
142
+ "type": "function"
143
+ },
144
+ {
145
+ "inputs": [
146
+ {
147
+ "internalType": "address",
148
+ "name": "pool",
149
+ "type": "address"
150
+ },
151
+ {
152
+ "internalType": "contract IERC20",
153
+ "name": "depositAsset",
154
+ "type": "address"
155
+ },
156
+ {
157
+ "internalType": "uint256",
158
+ "name": "amount",
159
+ "type": "uint256"
160
+ },
161
+ {
162
+ "internalType": "contract IERC20",
163
+ "name": "poolDepositAsset",
164
+ "type": "address"
165
+ },
166
+ {
167
+ "internalType": "uint256",
168
+ "name": "expectedLiquidityMinted",
169
+ "type": "uint256"
170
+ }
171
+ ],
172
+ "name": "deposit",
173
+ "outputs": [
174
+ {
175
+ "internalType": "uint256",
176
+ "name": "liquidityMinted",
177
+ "type": "uint256"
178
+ }
179
+ ],
180
+ "stateMutability": "nonpayable",
181
+ "type": "function"
182
+ },
183
+ {
184
+ "inputs": [
185
+ {
186
+ "internalType": "address",
187
+ "name": "pool",
188
+ "type": "address"
189
+ },
190
+ {
191
+ "internalType": "contract IERC20",
192
+ "name": "depositAsset",
193
+ "type": "address"
194
+ },
195
+ {
196
+ "internalType": "uint256",
197
+ "name": "amount",
198
+ "type": "uint256"
199
+ },
200
+ {
201
+ "internalType": "contract IERC20",
202
+ "name": "poolDepositAsset",
203
+ "type": "address"
204
+ }
205
+ ],
206
+ "name": "depositQuote",
207
+ "outputs": [
208
+ {
209
+ "internalType": "uint256",
210
+ "name": "expectedLiquidityMinted",
211
+ "type": "uint256"
212
+ }
213
+ ],
214
+ "stateMutability": "view",
215
+ "type": "function"
216
+ },
217
+ {
218
+ "inputs": [],
219
+ "name": "feeDenominator",
220
+ "outputs": [
221
+ {
222
+ "internalType": "uint256",
223
+ "name": "",
224
+ "type": "uint256"
225
+ }
226
+ ],
227
+ "stateMutability": "view",
228
+ "type": "function"
229
+ },
230
+ {
231
+ "inputs": [],
232
+ "name": "feeNumerator",
233
+ "outputs": [
234
+ {
235
+ "internalType": "uint256",
236
+ "name": "",
237
+ "type": "uint256"
238
+ }
239
+ ],
240
+ "stateMutability": "view",
241
+ "type": "function"
242
+ },
243
+ {
244
+ "inputs": [],
245
+ "name": "feeSink",
246
+ "outputs": [
247
+ {
248
+ "internalType": "address payable",
249
+ "name": "",
250
+ "type": "address"
251
+ }
252
+ ],
253
+ "stateMutability": "view",
254
+ "type": "function"
255
+ },
256
+ {
257
+ "inputs": [],
258
+ "name": "owner",
259
+ "outputs": [
260
+ {
261
+ "internalType": "address",
262
+ "name": "",
263
+ "type": "address"
264
+ }
265
+ ],
266
+ "stateMutability": "view",
267
+ "type": "function"
268
+ },
269
+ {
270
+ "inputs": [],
271
+ "name": "renounceOwnership",
272
+ "outputs": [],
273
+ "stateMutability": "nonpayable",
274
+ "type": "function"
275
+ },
276
+ {
277
+ "inputs": [
278
+ {
279
+ "internalType": "uint256",
280
+ "name": "numerator",
281
+ "type": "uint256"
282
+ },
283
+ {
284
+ "internalType": "uint256",
285
+ "name": "denominator",
286
+ "type": "uint256"
287
+ }
288
+ ],
289
+ "name": "setFee",
290
+ "outputs": [],
291
+ "stateMutability": "nonpayable",
292
+ "type": "function"
293
+ },
294
+ {
295
+ "inputs": [
296
+ {
297
+ "internalType": "address payable",
298
+ "name": "sink",
299
+ "type": "address"
300
+ }
301
+ ],
302
+ "name": "setFeeSink",
303
+ "outputs": [],
304
+ "stateMutability": "nonpayable",
305
+ "type": "function"
306
+ },
307
+ {
308
+ "inputs": [
309
+ {
310
+ "internalType": "address",
311
+ "name": "pool",
312
+ "type": "address"
313
+ },
314
+ {
315
+ "internalType": "bool",
316
+ "name": "allowed",
317
+ "type": "bool"
318
+ }
319
+ ],
320
+ "name": "setPoolAllowed",
321
+ "outputs": [],
322
+ "stateMutability": "nonpayable",
323
+ "type": "function"
324
+ },
325
+ {
326
+ "inputs": [
327
+ {
328
+ "internalType": "contract IUniswapV2RouterSwapOnly",
329
+ "name": "_swapRouter",
330
+ "type": "address"
331
+ }
332
+ ],
333
+ "name": "setSwapRouter",
334
+ "outputs": [],
335
+ "stateMutability": "nonpayable",
336
+ "type": "function"
337
+ },
338
+ {
339
+ "inputs": [
340
+ {
341
+ "internalType": "address",
342
+ "name": "newOwner",
343
+ "type": "address"
344
+ }
345
+ ],
346
+ "name": "transferOwnership",
347
+ "outputs": [],
348
+ "stateMutability": "nonpayable",
349
+ "type": "function"
350
+ },
351
+ {
352
+ "inputs": [],
353
+ "name": "weth",
354
+ "outputs": [
355
+ {
356
+ "internalType": "contract IERC20",
357
+ "name": "",
358
+ "type": "address"
359
+ }
360
+ ],
361
+ "stateMutability": "view",
362
+ "type": "function"
363
+ },
364
+ {
365
+ "inputs": [
366
+ {
367
+ "internalType": "address",
368
+ "name": "pool",
369
+ "type": "address"
370
+ },
371
+ {
372
+ "internalType": "uint256",
373
+ "name": "fundTokenAmount",
374
+ "type": "uint256"
375
+ },
376
+ {
377
+ "internalType": "contract IERC20",
378
+ "name": "withdrawalAsset",
379
+ "type": "address"
380
+ },
381
+ {
382
+ "internalType": "uint256",
383
+ "name": "expectedAmountOut",
384
+ "type": "uint256"
385
+ }
386
+ ],
387
+ "name": "withdraw",
388
+ "outputs": [],
389
+ "stateMutability": "nonpayable",
390
+ "type": "function"
391
+ },
392
+ {
393
+ "inputs": [],
394
+ "name": "withdrawProps",
395
+ "outputs": [
396
+ {
397
+ "internalType": "contract IUniswapV2RouterSwapOnly",
398
+ "name": "swapRouter",
399
+ "type": "address"
400
+ },
401
+ {
402
+ "internalType": "contract IUniswapV2Router",
403
+ "name": "assetType2Router",
404
+ "type": "address"
405
+ },
406
+ {
407
+ "internalType": "contract IUniswapV2Router",
408
+ "name": "assetType5Router",
409
+ "type": "address"
410
+ },
411
+ {
412
+ "components": [
413
+ {
414
+ "internalType": "contract ISynthetix",
415
+ "name": "snxProxy",
416
+ "type": "address"
417
+ },
418
+ {
419
+ "internalType": "contract IERC20",
420
+ "name": "swapSUSDToAsset",
421
+ "type": "address"
422
+ },
423
+ {
424
+ "internalType": "contract ISynthAddressProxy",
425
+ "name": "sUSDProxy",
426
+ "type": "address"
427
+ }
428
+ ],
429
+ "internalType": "struct EasySwapperStructs.SynthetixProps",
430
+ "name": "synthetixProps",
431
+ "type": "tuple"
432
+ },
433
+ {
434
+ "internalType": "contract IERC20",
435
+ "name": "weth",
436
+ "type": "address"
437
+ }
438
+ ],
439
+ "stateMutability": "view",
440
+ "type": "function"
441
+ }
442
+ ]
443
+ }
@@ -0,0 +1,244 @@
1
+ {
2
+ "abi": [
3
+ {
4
+ "inputs": [
5
+ {
6
+ "internalType": "address[]",
7
+ "name": "_assets",
8
+ "type": "address[]"
9
+ },
10
+ {
11
+ "internalType": "address[]",
12
+ "name": "_sources",
13
+ "type": "address[]"
14
+ },
15
+ {
16
+ "internalType": "address",
17
+ "name": "_fallbackOracle",
18
+ "type": "address"
19
+ }
20
+ ],
21
+ "payable": false,
22
+ "stateMutability": "nonpayable",
23
+ "type": "constructor"
24
+ },
25
+ {
26
+ "anonymous": false,
27
+ "inputs": [
28
+ {
29
+ "indexed": true,
30
+ "internalType": "address",
31
+ "name": "asset",
32
+ "type": "address"
33
+ },
34
+ {
35
+ "indexed": true,
36
+ "internalType": "address",
37
+ "name": "source",
38
+ "type": "address"
39
+ }
40
+ ],
41
+ "name": "AssetSourceUpdated",
42
+ "type": "event"
43
+ },
44
+ {
45
+ "anonymous": false,
46
+ "inputs": [
47
+ {
48
+ "indexed": true,
49
+ "internalType": "address",
50
+ "name": "fallbackOracle",
51
+ "type": "address"
52
+ }
53
+ ],
54
+ "name": "FallbackOracleUpdated",
55
+ "type": "event"
56
+ },
57
+ {
58
+ "anonymous": false,
59
+ "inputs": [
60
+ {
61
+ "indexed": true,
62
+ "internalType": "address",
63
+ "name": "previousOwner",
64
+ "type": "address"
65
+ },
66
+ {
67
+ "indexed": true,
68
+ "internalType": "address",
69
+ "name": "newOwner",
70
+ "type": "address"
71
+ }
72
+ ],
73
+ "name": "OwnershipTransferred",
74
+ "type": "event"
75
+ },
76
+ {
77
+ "constant": true,
78
+ "inputs": [],
79
+ "name": "isOwner",
80
+ "outputs": [
81
+ {
82
+ "internalType": "bool",
83
+ "name": "",
84
+ "type": "bool"
85
+ }
86
+ ],
87
+ "payable": false,
88
+ "stateMutability": "view",
89
+ "type": "function"
90
+ },
91
+ {
92
+ "constant": true,
93
+ "inputs": [],
94
+ "name": "owner",
95
+ "outputs": [
96
+ {
97
+ "internalType": "address",
98
+ "name": "",
99
+ "type": "address"
100
+ }
101
+ ],
102
+ "payable": false,
103
+ "stateMutability": "view",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "constant": false,
108
+ "inputs": [],
109
+ "name": "renounceOwnership",
110
+ "outputs": [],
111
+ "payable": false,
112
+ "stateMutability": "nonpayable",
113
+ "type": "function"
114
+ },
115
+ {
116
+ "constant": false,
117
+ "inputs": [
118
+ {
119
+ "internalType": "address",
120
+ "name": "newOwner",
121
+ "type": "address"
122
+ }
123
+ ],
124
+ "name": "transferOwnership",
125
+ "outputs": [],
126
+ "payable": false,
127
+ "stateMutability": "nonpayable",
128
+ "type": "function"
129
+ },
130
+ {
131
+ "constant": false,
132
+ "inputs": [
133
+ {
134
+ "internalType": "address[]",
135
+ "name": "_assets",
136
+ "type": "address[]"
137
+ },
138
+ {
139
+ "internalType": "address[]",
140
+ "name": "_sources",
141
+ "type": "address[]"
142
+ }
143
+ ],
144
+ "name": "setAssetSources",
145
+ "outputs": [],
146
+ "payable": false,
147
+ "stateMutability": "nonpayable",
148
+ "type": "function"
149
+ },
150
+ {
151
+ "constant": false,
152
+ "inputs": [
153
+ {
154
+ "internalType": "address",
155
+ "name": "_fallbackOracle",
156
+ "type": "address"
157
+ }
158
+ ],
159
+ "name": "setFallbackOracle",
160
+ "outputs": [],
161
+ "payable": false,
162
+ "stateMutability": "nonpayable",
163
+ "type": "function"
164
+ },
165
+ {
166
+ "constant": true,
167
+ "inputs": [
168
+ {
169
+ "internalType": "address",
170
+ "name": "_asset",
171
+ "type": "address"
172
+ }
173
+ ],
174
+ "name": "getAssetPrice",
175
+ "outputs": [
176
+ {
177
+ "internalType": "uint256",
178
+ "name": "",
179
+ "type": "uint256"
180
+ }
181
+ ],
182
+ "payable": false,
183
+ "stateMutability": "view",
184
+ "type": "function"
185
+ },
186
+ {
187
+ "constant": true,
188
+ "inputs": [
189
+ {
190
+ "internalType": "address[]",
191
+ "name": "_assets",
192
+ "type": "address[]"
193
+ }
194
+ ],
195
+ "name": "getAssetsPrices",
196
+ "outputs": [
197
+ {
198
+ "internalType": "uint256[]",
199
+ "name": "",
200
+ "type": "uint256[]"
201
+ }
202
+ ],
203
+ "payable": false,
204
+ "stateMutability": "view",
205
+ "type": "function"
206
+ },
207
+ {
208
+ "constant": true,
209
+ "inputs": [
210
+ {
211
+ "internalType": "address",
212
+ "name": "_asset",
213
+ "type": "address"
214
+ }
215
+ ],
216
+ "name": "getSourceOfAsset",
217
+ "outputs": [
218
+ {
219
+ "internalType": "address",
220
+ "name": "",
221
+ "type": "address"
222
+ }
223
+ ],
224
+ "payable": false,
225
+ "stateMutability": "view",
226
+ "type": "function"
227
+ },
228
+ {
229
+ "constant": true,
230
+ "inputs": [],
231
+ "name": "getFallbackOracle",
232
+ "outputs": [
233
+ {
234
+ "internalType": "address",
235
+ "name": "",
236
+ "type": "address"
237
+ }
238
+ ],
239
+ "payable": false,
240
+ "stateMutability": "view",
241
+ "type": "function"
242
+ }
243
+ ]
244
+ }
package/src/config.ts CHANGED
@@ -25,13 +25,15 @@ export const routerAddress: AddressDappNetworkMap = {
25
25
  [Dapp.QUICKSWAP]: "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",
26
26
  [Dapp.BALANCER]: "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
27
27
  [Dapp.UNISWAPV3]: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
28
- [Dapp.ARRAKIS]: "0xbc91a120cCD8F80b819EAF32F0996daC3Fa76a6C"
28
+ [Dapp.ARRAKIS]: "0xbc91a120cCD8F80b819EAF32F0996daC3Fa76a6C",
29
+ [Dapp.TOROS]: "0x9e080df81d9Db50348ef40F630fAE74f5Aea1f68"
29
30
  },
30
31
  [Network.OPTIMISM]: {
31
32
  [Dapp.UNISWAPV3]: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
32
33
  [Dapp.SYNTHETIX]: "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4",
33
34
  [Dapp.AAVEV3]: "0x794a61358D6845594F94dc1DB02A252b5b4814aD",
34
- [Dapp.ONEINCH]: "0x1111111254760F7ab3F16433eea9304126DCd199"
35
+ [Dapp.ONEINCH]: "0x1111111254760F7ab3F16433eea9304126DCd199",
36
+ [Dapp.TOROS]: "0x15B7199AA9b9CaE9e611d858ab458aea8D36555B"
35
37
  }
36
38
  };
37
39