@1delta/margin-fetcher 0.0.19 → 0.0.20

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.
Files changed (67) hide show
  1. package/dist/abis/aave-v2/YLDR.d.ts.map +1 -1
  2. package/dist/abis/aave-v2/YLDR.js +176 -148
  3. package/dist/abis/aave-v3/YLDR.js +29 -29
  4. package/dist/abis/compound-v3/Comet.d.ts +0 -20
  5. package/dist/abis/compound-v3/Comet.d.ts.map +1 -1
  6. package/dist/abis/compound-v3/Comet.js +0 -25
  7. package/dist/lending/fetchLender.js +1 -1
  8. package/dist/lending/user-data/abis.d.ts +20 -20
  9. package/dist/lending/user-data/compound-v3/userCallBuild.d.ts.map +1 -1
  10. package/dist/lending/user-data/compound-v3/userCallBuild.js +1 -7
  11. package/dist/lending/user-data/compound-v3/userCallParse.d.ts +2 -2
  12. package/dist/lending/user-data/compound-v3/userCallParse.d.ts.map +1 -1
  13. package/dist/lending/user-data/compound-v3/userCallParse.js +19 -20
  14. package/dist/lending/user-data/morpho/userCallBuild.d.ts.map +1 -1
  15. package/dist/lending/user-data/morpho/userCallBuild.js +6 -4
  16. package/dist/prices/main-prices/addresses/morpho.d.ts.map +1 -1
  17. package/dist/prices/main-prices/addresses/morpho.js +191 -0
  18. package/dist/prices/main-prices/fetchOracleData.js +4 -2
  19. package/dist/yields/index.d.ts.map +1 -1
  20. package/dist/yields/index.js +13 -1
  21. package/package.json +2 -2
  22. package/src/abis/aave-v2/YLDR.ts +177 -149
  23. package/src/abis/aave-v3/YLDR.ts +45 -45
  24. package/src/abis/compound-v3/Comet.ts +0 -25
  25. package/src/lending/fetchLender.ts +1 -1
  26. package/src/lending/user-data/compound-v3/userCallBuild.ts +1 -8
  27. package/src/lending/user-data/compound-v3/userCallParse.ts +39 -29
  28. package/src/lending/user-data/morpho/userCallBuild.ts +6 -4
  29. package/src/prices/main-prices/addresses/morpho.ts +191 -0
  30. package/src/prices/main-prices/fetchOracleData.ts +4 -2
  31. package/src/yields/index.ts +15 -0
  32. package/test/index.test.ts +101 -97
  33. package/test/mainPriceMB.test.ts +1 -1
  34. package/test/mainPrices.test.ts +2 -2
  35. package/test/morpho.test.ts +1 -1
  36. package/test/morphoPrice.test.ts +1 -1
  37. package/test/yields.test.ts +27 -0
  38. package/tsconfig.json +2 -1
  39. package/dist/abis/aave/AToken.d.ts +0 -526
  40. package/dist/abis/aave/AToken.d.ts.map +0 -1
  41. package/dist/abis/aave/AToken.js +0 -686
  42. package/dist/abis/aave/AavePoolV3.d.ts +0 -819
  43. package/dist/abis/aave/AavePoolV3.d.ts.map +0 -1
  44. package/dist/abis/aave/AavePoolV3.js +0 -1060
  45. package/dist/abis/init/Core.d.ts +0 -523
  46. package/dist/abis/init/Core.d.ts.map +0 -1
  47. package/dist/abis/init/Core.js +0 -681
  48. package/dist/abis/init/InitFlashAggregator.d.ts +0 -624
  49. package/dist/abis/init/InitFlashAggregator.d.ts.map +0 -1
  50. package/dist/abis/init/InitFlashAggregator.js +0 -795
  51. package/dist/abis/init/PosManager.d.ts +0 -802
  52. package/dist/abis/init/PosManager.d.ts.map +0 -1
  53. package/dist/abis/init/PosManager.js +0 -1055
  54. package/dist/abis/uniswap/FeeOnTransferDetector.d.ts +0 -102
  55. package/dist/abis/uniswap/FeeOnTransferDetector.d.ts.map +0 -1
  56. package/dist/abis/uniswap/FeeOnTransferDetector.js +0 -133
  57. package/dist/abis/uniswap/UniswapV2Pair.d.ts +0 -513
  58. package/dist/abis/uniswap/UniswapV2Pair.d.ts.map +0 -1
  59. package/dist/abis/uniswap/UniswapV2Pair.js +0 -659
  60. package/src/abis/aave/AToken.ts +0 -686
  61. package/src/abis/aave/AavePoolV3.ts +0 -1060
  62. package/src/abis/init/Core.ts +0 -681
  63. package/src/abis/init/InitFlashAggregator.ts +0 -795
  64. package/src/abis/init/PosManager.ts +0 -1055
  65. package/src/abis/uniswap/FeeOnTransferDetector.ts +0 -133
  66. package/src/abis/uniswap/UniswapV2Pair.ts +0 -659
  67. /package/test/{userdata.test.ts → userData.test.ts} +0 -0
@@ -1,659 +0,0 @@
1
- export const UniswapV2PairAbi = [
2
- {
3
- "type": "function",
4
- "stateMutability": "view",
5
- "outputs": [
6
- {
7
- "type": "bytes32",
8
- "name": "",
9
- "internalType": "bytes32"
10
- }
11
- ],
12
- "name": "DOMAIN_SEPARATOR",
13
- "inputs": [],
14
- "constant": true
15
- },
16
- {
17
- "type": "function",
18
- "stateMutability": "view",
19
- "outputs": [
20
- {
21
- "type": "uint256",
22
- "name": "",
23
- "internalType": "uint256"
24
- }
25
- ],
26
- "name": "MINIMUM_LIQUIDITY",
27
- "inputs": [],
28
- "constant": true
29
- },
30
- {
31
- "type": "function",
32
- "stateMutability": "view",
33
- "outputs": [
34
- {
35
- "type": "bytes32",
36
- "name": "",
37
- "internalType": "bytes32"
38
- }
39
- ],
40
- "name": "PERMIT_TYPEHASH",
41
- "inputs": [],
42
- "constant": true
43
- },
44
- {
45
- "type": "function",
46
- "stateMutability": "view",
47
- "outputs": [
48
- {
49
- "type": "uint256",
50
- "name": "",
51
- "internalType": "uint256"
52
- }
53
- ],
54
- "name": "allowance",
55
- "inputs": [
56
- {
57
- "type": "address",
58
- "name": "",
59
- "internalType": "address"
60
- },
61
- {
62
- "type": "address",
63
- "name": "",
64
- "internalType": "address"
65
- }
66
- ],
67
- "constant": true
68
- },
69
- {
70
- "type": "function",
71
- "stateMutability": "nonpayable",
72
- "outputs": [
73
- {
74
- "type": "bool",
75
- "name": "",
76
- "internalType": "bool"
77
- }
78
- ],
79
- "name": "approve",
80
- "inputs": [
81
- {
82
- "type": "address",
83
- "name": "spender",
84
- "internalType": "address"
85
- },
86
- {
87
- "type": "uint256",
88
- "name": "value",
89
- "internalType": "uint256"
90
- }
91
- ],
92
- "constant": false
93
- },
94
- {
95
- "type": "function",
96
- "stateMutability": "view",
97
- "outputs": [
98
- {
99
- "type": "uint256",
100
- "name": "",
101
- "internalType": "uint256"
102
- }
103
- ],
104
- "name": "balanceOf",
105
- "inputs": [
106
- {
107
- "type": "address",
108
- "name": "",
109
- "internalType": "address"
110
- }
111
- ],
112
- "constant": true
113
- },
114
- {
115
- "type": "function",
116
- "stateMutability": "nonpayable",
117
- "outputs": [
118
- {
119
- "type": "uint256",
120
- "name": "amount0",
121
- "internalType": "uint256"
122
- },
123
- {
124
- "type": "uint256",
125
- "name": "amount1",
126
- "internalType": "uint256"
127
- }
128
- ],
129
- "name": "burn",
130
- "inputs": [
131
- {
132
- "type": "address",
133
- "name": "to",
134
- "internalType": "address"
135
- }
136
- ],
137
- "constant": false
138
- },
139
- {
140
- "type": "function",
141
- "stateMutability": "view",
142
- "outputs": [
143
- {
144
- "type": "uint8",
145
- "name": "",
146
- "internalType": "uint8"
147
- }
148
- ],
149
- "name": "decimals",
150
- "inputs": [],
151
- "constant": true
152
- },
153
- {
154
- "type": "function",
155
- "stateMutability": "view",
156
- "outputs": [
157
- {
158
- "type": "address",
159
- "name": "",
160
- "internalType": "address"
161
- }
162
- ],
163
- "name": "factory",
164
- "inputs": [],
165
- "constant": true
166
- },
167
- {
168
- "type": "function",
169
- "stateMutability": "view",
170
- "outputs": [
171
- {
172
- "type": "uint112",
173
- "name": "_reserve0",
174
- "internalType": "uint112"
175
- },
176
- {
177
- "type": "uint112",
178
- "name": "_reserve1",
179
- "internalType": "uint112"
180
- },
181
- {
182
- "type": "uint32",
183
- "name": "_blockTimestampLast",
184
- "internalType": "uint32"
185
- }
186
- ],
187
- "name": "getReserves",
188
- "inputs": [],
189
- "constant": true
190
- },
191
- {
192
- "type": "function",
193
- "stateMutability": "nonpayable",
194
- "outputs": [],
195
- "name": "initialize",
196
- "inputs": [
197
- {
198
- "type": "address",
199
- "name": "_token0",
200
- "internalType": "address"
201
- },
202
- {
203
- "type": "address",
204
- "name": "_token1",
205
- "internalType": "address"
206
- }
207
- ],
208
- "constant": false
209
- },
210
- {
211
- "type": "function",
212
- "stateMutability": "view",
213
- "outputs": [
214
- {
215
- "type": "uint256",
216
- "name": "",
217
- "internalType": "uint256"
218
- }
219
- ],
220
- "name": "kLast",
221
- "inputs": [],
222
- "constant": true
223
- },
224
- {
225
- "type": "function",
226
- "stateMutability": "nonpayable",
227
- "outputs": [
228
- {
229
- "type": "uint256",
230
- "name": "liquidity",
231
- "internalType": "uint256"
232
- }
233
- ],
234
- "name": "mint",
235
- "inputs": [
236
- {
237
- "type": "address",
238
- "name": "to",
239
- "internalType": "address"
240
- }
241
- ],
242
- "constant": false
243
- },
244
- {
245
- "type": "function",
246
- "stateMutability": "view",
247
- "outputs": [
248
- {
249
- "type": "string",
250
- "name": "",
251
- "internalType": "string"
252
- }
253
- ],
254
- "name": "name",
255
- "inputs": [],
256
- "constant": true
257
- },
258
- {
259
- "type": "function",
260
- "stateMutability": "view",
261
- "outputs": [
262
- {
263
- "type": "uint256",
264
- "name": "",
265
- "internalType": "uint256"
266
- }
267
- ],
268
- "name": "nonces",
269
- "inputs": [
270
- {
271
- "type": "address",
272
- "name": "",
273
- "internalType": "address"
274
- }
275
- ],
276
- "constant": true
277
- },
278
- {
279
- "type": "function",
280
- "stateMutability": "nonpayable",
281
- "outputs": [],
282
- "name": "permit",
283
- "inputs": [
284
- {
285
- "type": "address",
286
- "name": "owner",
287
- "internalType": "address"
288
- },
289
- {
290
- "type": "address",
291
- "name": "spender",
292
- "internalType": "address"
293
- },
294
- {
295
- "type": "uint256",
296
- "name": "value",
297
- "internalType": "uint256"
298
- },
299
- {
300
- "type": "uint256",
301
- "name": "deadline",
302
- "internalType": "uint256"
303
- },
304
- {
305
- "type": "uint8",
306
- "name": "v",
307
- "internalType": "uint8"
308
- },
309
- {
310
- "type": "bytes32",
311
- "name": "r",
312
- "internalType": "bytes32"
313
- },
314
- {
315
- "type": "bytes32",
316
- "name": "s",
317
- "internalType": "bytes32"
318
- }
319
- ],
320
- "constant": false
321
- },
322
- {
323
- "type": "function",
324
- "stateMutability": "view",
325
- "outputs": [
326
- {
327
- "type": "uint256",
328
- "name": "",
329
- "internalType": "uint256"
330
- }
331
- ],
332
- "name": "price0CumulativeLast",
333
- "inputs": [],
334
- "constant": true
335
- },
336
- {
337
- "type": "function",
338
- "stateMutability": "view",
339
- "outputs": [
340
- {
341
- "type": "uint256",
342
- "name": "",
343
- "internalType": "uint256"
344
- }
345
- ],
346
- "name": "price1CumulativeLast",
347
- "inputs": [],
348
- "constant": true
349
- },
350
- {
351
- "type": "function",
352
- "stateMutability": "nonpayable",
353
- "outputs": [],
354
- "name": "skim",
355
- "inputs": [
356
- {
357
- "type": "address",
358
- "name": "to",
359
- "internalType": "address"
360
- }
361
- ],
362
- "constant": false
363
- },
364
- {
365
- "type": "function",
366
- "stateMutability": "nonpayable",
367
- "outputs": [],
368
- "name": "swap",
369
- "inputs": [
370
- {
371
- "type": "uint256",
372
- "name": "amount0Out",
373
- "internalType": "uint256"
374
- },
375
- {
376
- "type": "uint256",
377
- "name": "amount1Out",
378
- "internalType": "uint256"
379
- },
380
- {
381
- "type": "address",
382
- "name": "to",
383
- "internalType": "address"
384
- },
385
- {
386
- "type": "bytes",
387
- "name": "data",
388
- "internalType": "bytes"
389
- }
390
- ],
391
- "constant": false
392
- },
393
- {
394
- "type": "function",
395
- "stateMutability": "view",
396
- "outputs": [
397
- {
398
- "type": "string",
399
- "name": "",
400
- "internalType": "string"
401
- }
402
- ],
403
- "name": "symbol",
404
- "inputs": [],
405
- "constant": true
406
- },
407
- {
408
- "type": "function",
409
- "stateMutability": "nonpayable",
410
- "outputs": [],
411
- "name": "sync",
412
- "inputs": [],
413
- "constant": false
414
- },
415
- {
416
- "type": "function",
417
- "stateMutability": "view",
418
- "outputs": [
419
- {
420
- "type": "address",
421
- "name": "",
422
- "internalType": "address"
423
- }
424
- ],
425
- "name": "token0",
426
- "inputs": [],
427
- "constant": true
428
- },
429
- {
430
- "type": "function",
431
- "stateMutability": "view",
432
- "outputs": [
433
- {
434
- "type": "address",
435
- "name": "",
436
- "internalType": "address"
437
- }
438
- ],
439
- "name": "token1",
440
- "inputs": [],
441
- "constant": true
442
- },
443
- {
444
- "type": "function",
445
- "stateMutability": "view",
446
- "outputs": [
447
- {
448
- "type": "uint256",
449
- "name": "",
450
- "internalType": "uint256"
451
- }
452
- ],
453
- "name": "totalSupply",
454
- "inputs": [],
455
- "constant": true
456
- },
457
- {
458
- "type": "function",
459
- "stateMutability": "nonpayable",
460
- "outputs": [
461
- {
462
- "type": "bool",
463
- "name": "",
464
- "internalType": "bool"
465
- }
466
- ],
467
- "name": "transfer",
468
- "inputs": [
469
- {
470
- "type": "address",
471
- "name": "to",
472
- "internalType": "address"
473
- },
474
- {
475
- "type": "uint256",
476
- "name": "value",
477
- "internalType": "uint256"
478
- }
479
- ],
480
- "constant": false
481
- },
482
- {
483
- "type": "function",
484
- "stateMutability": "nonpayable",
485
- "outputs": [
486
- {
487
- "type": "bool",
488
- "name": "",
489
- "internalType": "bool"
490
- }
491
- ],
492
- "name": "transferFrom",
493
- "inputs": [
494
- {
495
- "type": "address",
496
- "name": "from",
497
- "internalType": "address"
498
- },
499
- {
500
- "type": "address",
501
- "name": "to",
502
- "internalType": "address"
503
- },
504
- {
505
- "type": "uint256",
506
- "name": "value",
507
- "internalType": "uint256"
508
- }
509
- ],
510
- "constant": false
511
- },
512
- {
513
- "type": "event",
514
- "name": "Approval",
515
- "inputs": [
516
- {
517
- "type": "address",
518
- "name": "owner",
519
- "indexed": true
520
- },
521
- {
522
- "type": "address",
523
- "name": "spender",
524
- "indexed": true
525
- },
526
- {
527
- "type": "uint256",
528
- "name": "value",
529
- "indexed": false
530
- }
531
- ],
532
- "anonymous": false
533
- },
534
- {
535
- "type": "event",
536
- "name": "Burn",
537
- "inputs": [
538
- {
539
- "type": "address",
540
- "name": "sender",
541
- "indexed": true
542
- },
543
- {
544
- "type": "uint256",
545
- "name": "amount0",
546
- "indexed": false
547
- },
548
- {
549
- "type": "uint256",
550
- "name": "amount1",
551
- "indexed": false
552
- },
553
- {
554
- "type": "address",
555
- "name": "to",
556
- "indexed": true
557
- }
558
- ],
559
- "anonymous": false
560
- },
561
- {
562
- "type": "event",
563
- "name": "Mint",
564
- "inputs": [
565
- {
566
- "type": "address",
567
- "name": "sender",
568
- "indexed": true
569
- },
570
- {
571
- "type": "uint256",
572
- "name": "amount0",
573
- "indexed": false
574
- },
575
- {
576
- "type": "uint256",
577
- "name": "amount1",
578
- "indexed": false
579
- }
580
- ],
581
- "anonymous": false
582
- },
583
- {
584
- "type": "event",
585
- "name": "Swap",
586
- "inputs": [
587
- {
588
- "type": "address",
589
- "name": "sender",
590
- "indexed": true
591
- },
592
- {
593
- "type": "uint256",
594
- "name": "amount0In",
595
- "indexed": false
596
- },
597
- {
598
- "type": "uint256",
599
- "name": "amount1In",
600
- "indexed": false
601
- },
602
- {
603
- "type": "uint256",
604
- "name": "amount0Out",
605
- "indexed": false
606
- },
607
- {
608
- "type": "uint256",
609
- "name": "amount1Out",
610
- "indexed": false
611
- },
612
- {
613
- "type": "address",
614
- "name": "to",
615
- "indexed": true
616
- }
617
- ],
618
- "anonymous": false
619
- },
620
- {
621
- "type": "event",
622
- "name": "Sync",
623
- "inputs": [
624
- {
625
- "type": "uint112",
626
- "name": "reserve0",
627
- "indexed": false
628
- },
629
- {
630
- "type": "uint112",
631
- "name": "reserve1",
632
- "indexed": false
633
- }
634
- ],
635
- "anonymous": false
636
- },
637
- {
638
- "type": "event",
639
- "name": "Transfer",
640
- "inputs": [
641
- {
642
- "type": "address",
643
- "name": "from",
644
- "indexed": true
645
- },
646
- {
647
- "type": "address",
648
- "name": "to",
649
- "indexed": true
650
- },
651
- {
652
- "type": "uint256",
653
- "name": "value",
654
- "indexed": false
655
- }
656
- ],
657
- "anonymous": false
658
- }
659
- ] as const
File without changes