@orbs-network/twap 1.10.13 → 1.11.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/dist/src/configs.d.ts +470 -19
- package/dist/src/configs.js +9 -56
- package/dist/src/paraswap.js +1 -3
- package/package.json +3 -2
package/dist/src/configs.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ export declare enum ParaswapOnlyDex {
|
|
|
11
11
|
SpiritSwap = "SpiritSwap,SpiritSwapV2",
|
|
12
12
|
SpookySwap = "SpookySwap",
|
|
13
13
|
Pangolin = "PangolinSwap",
|
|
14
|
-
TraderJoe = "TraderJoe"
|
|
14
|
+
TraderJoe = "TraderJoe",
|
|
15
|
+
Thena = ""
|
|
15
16
|
}
|
|
16
17
|
export declare enum OdosOnlyDex {
|
|
17
18
|
Chronos = "Chronos Stable,Chronos Volatile,Wrapped Ether"
|
|
@@ -243,14 +244,235 @@ export declare const ChainConfigs: {
|
|
|
243
244
|
minChunkSizeUsd: number;
|
|
244
245
|
nativeToken: {
|
|
245
246
|
address: string;
|
|
246
|
-
decimals: number;
|
|
247
247
|
symbol: string;
|
|
248
|
+
decimals: number;
|
|
248
249
|
logoUrl: string;
|
|
249
250
|
};
|
|
250
251
|
wToken: {
|
|
252
|
+
symbol: string;
|
|
253
|
+
address: string;
|
|
254
|
+
decimals: number;
|
|
255
|
+
weth: boolean;
|
|
256
|
+
logoUrl: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
bsc: {
|
|
260
|
+
twapAbi: ({
|
|
261
|
+
inputs: {
|
|
262
|
+
internalType: string;
|
|
263
|
+
name: string;
|
|
264
|
+
type: string;
|
|
265
|
+
}[];
|
|
266
|
+
stateMutability: string;
|
|
267
|
+
type: string;
|
|
268
|
+
anonymous?: undefined;
|
|
269
|
+
name?: undefined;
|
|
270
|
+
outputs?: undefined;
|
|
271
|
+
} | {
|
|
272
|
+
anonymous: boolean;
|
|
273
|
+
inputs: ({
|
|
274
|
+
indexed: boolean;
|
|
275
|
+
internalType: string;
|
|
276
|
+
name: string;
|
|
277
|
+
type: string;
|
|
278
|
+
components?: undefined;
|
|
279
|
+
} | {
|
|
280
|
+
components: {
|
|
281
|
+
internalType: string;
|
|
282
|
+
name: string;
|
|
283
|
+
type: string;
|
|
284
|
+
}[];
|
|
285
|
+
indexed: boolean;
|
|
286
|
+
internalType: string;
|
|
287
|
+
name: string;
|
|
288
|
+
type: string;
|
|
289
|
+
})[];
|
|
290
|
+
name: string;
|
|
291
|
+
type: string;
|
|
292
|
+
stateMutability?: undefined;
|
|
293
|
+
outputs?: undefined;
|
|
294
|
+
} | {
|
|
295
|
+
inputs: {
|
|
296
|
+
components: {
|
|
297
|
+
internalType: string;
|
|
298
|
+
name: string;
|
|
299
|
+
type: string;
|
|
300
|
+
}[];
|
|
301
|
+
internalType: string;
|
|
302
|
+
name: string;
|
|
303
|
+
type: string;
|
|
304
|
+
}[];
|
|
305
|
+
name: string;
|
|
306
|
+
outputs: {
|
|
307
|
+
internalType: string;
|
|
308
|
+
name: string;
|
|
309
|
+
type: string;
|
|
310
|
+
}[];
|
|
311
|
+
stateMutability: string;
|
|
312
|
+
type: string;
|
|
313
|
+
anonymous?: undefined;
|
|
314
|
+
} | {
|
|
315
|
+
inputs: {
|
|
316
|
+
internalType: string;
|
|
317
|
+
name: string;
|
|
318
|
+
type: string;
|
|
319
|
+
}[];
|
|
320
|
+
name: string;
|
|
321
|
+
outputs: ({
|
|
322
|
+
internalType: string;
|
|
323
|
+
name: string;
|
|
324
|
+
type: string;
|
|
325
|
+
components?: undefined;
|
|
326
|
+
} | {
|
|
327
|
+
components: {
|
|
328
|
+
internalType: string;
|
|
329
|
+
name: string;
|
|
330
|
+
type: string;
|
|
331
|
+
}[];
|
|
332
|
+
internalType: string;
|
|
333
|
+
name: string;
|
|
334
|
+
type: string;
|
|
335
|
+
})[];
|
|
336
|
+
stateMutability: string;
|
|
337
|
+
type: string;
|
|
338
|
+
anonymous?: undefined;
|
|
339
|
+
} | {
|
|
340
|
+
inputs: {
|
|
341
|
+
internalType: string;
|
|
342
|
+
name: string;
|
|
343
|
+
type: string;
|
|
344
|
+
}[];
|
|
345
|
+
name: string;
|
|
346
|
+
outputs: {
|
|
347
|
+
components: ({
|
|
348
|
+
internalType: string;
|
|
349
|
+
name: string;
|
|
350
|
+
type: string;
|
|
351
|
+
components?: undefined;
|
|
352
|
+
} | {
|
|
353
|
+
components: {
|
|
354
|
+
internalType: string;
|
|
355
|
+
name: string;
|
|
356
|
+
type: string;
|
|
357
|
+
}[];
|
|
358
|
+
internalType: string;
|
|
359
|
+
name: string;
|
|
360
|
+
type: string;
|
|
361
|
+
})[];
|
|
362
|
+
internalType: string;
|
|
363
|
+
name: string;
|
|
364
|
+
type: string;
|
|
365
|
+
}[];
|
|
366
|
+
stateMutability: string;
|
|
367
|
+
type: string;
|
|
368
|
+
anonymous?: undefined;
|
|
369
|
+
} | {
|
|
370
|
+
stateMutability: string;
|
|
371
|
+
type: string;
|
|
372
|
+
inputs?: undefined;
|
|
373
|
+
anonymous?: undefined;
|
|
374
|
+
name?: undefined;
|
|
375
|
+
outputs?: undefined;
|
|
376
|
+
})[];
|
|
377
|
+
lensAbi: ({
|
|
378
|
+
inputs: {
|
|
379
|
+
internalType: string;
|
|
380
|
+
name: string;
|
|
381
|
+
type: string;
|
|
382
|
+
}[];
|
|
383
|
+
stateMutability: string;
|
|
384
|
+
type: string;
|
|
385
|
+
name?: undefined;
|
|
386
|
+
outputs?: undefined;
|
|
387
|
+
} | {
|
|
388
|
+
inputs: never[];
|
|
389
|
+
name: string;
|
|
390
|
+
outputs: {
|
|
391
|
+
internalType: string;
|
|
392
|
+
name: string;
|
|
393
|
+
type: string;
|
|
394
|
+
}[];
|
|
395
|
+
stateMutability: string;
|
|
396
|
+
type: string;
|
|
397
|
+
} | {
|
|
398
|
+
inputs: {
|
|
399
|
+
internalType: string;
|
|
400
|
+
name: string;
|
|
401
|
+
type: string;
|
|
402
|
+
}[];
|
|
403
|
+
name: string;
|
|
404
|
+
outputs: {
|
|
405
|
+
components: ({
|
|
406
|
+
internalType: string;
|
|
407
|
+
name: string;
|
|
408
|
+
type: string;
|
|
409
|
+
components?: undefined;
|
|
410
|
+
} | {
|
|
411
|
+
components: {
|
|
412
|
+
internalType: string;
|
|
413
|
+
name: string;
|
|
414
|
+
type: string;
|
|
415
|
+
}[];
|
|
416
|
+
internalType: string;
|
|
417
|
+
name: string;
|
|
418
|
+
type: string;
|
|
419
|
+
})[];
|
|
420
|
+
internalType: string;
|
|
421
|
+
name: string;
|
|
422
|
+
type: string;
|
|
423
|
+
}[];
|
|
424
|
+
stateMutability: string;
|
|
425
|
+
type: string;
|
|
426
|
+
})[];
|
|
427
|
+
takerAbi: ({
|
|
428
|
+
inputs: {
|
|
429
|
+
internalType: string;
|
|
430
|
+
name: string;
|
|
431
|
+
type: string;
|
|
432
|
+
}[];
|
|
433
|
+
stateMutability: string;
|
|
434
|
+
type: string;
|
|
435
|
+
name?: undefined;
|
|
436
|
+
outputs?: undefined;
|
|
437
|
+
} | {
|
|
438
|
+
inputs: {
|
|
439
|
+
internalType: string;
|
|
440
|
+
name: string;
|
|
441
|
+
type: string;
|
|
442
|
+
}[];
|
|
443
|
+
name: string;
|
|
444
|
+
outputs: {
|
|
445
|
+
internalType: string;
|
|
446
|
+
name: string;
|
|
447
|
+
type: string;
|
|
448
|
+
}[];
|
|
449
|
+
stateMutability: string;
|
|
450
|
+
type: string;
|
|
451
|
+
} | {
|
|
452
|
+
stateMutability: string;
|
|
453
|
+
type: string;
|
|
454
|
+
inputs?: undefined;
|
|
455
|
+
name?: undefined;
|
|
456
|
+
outputs?: undefined;
|
|
457
|
+
})[];
|
|
458
|
+
chainName: string;
|
|
459
|
+
chainId: number;
|
|
460
|
+
twapVersion: number;
|
|
461
|
+
twapAddress: string;
|
|
462
|
+
lensAddress: string;
|
|
463
|
+
bidDelaySeconds: number;
|
|
464
|
+
minChunkSizeUsd: number;
|
|
465
|
+
nativeToken: {
|
|
251
466
|
address: string;
|
|
467
|
+
symbol: string;
|
|
252
468
|
decimals: number;
|
|
469
|
+
logoUrl: string;
|
|
470
|
+
};
|
|
471
|
+
wToken: {
|
|
253
472
|
symbol: string;
|
|
473
|
+
address: string;
|
|
474
|
+
decimals: number;
|
|
475
|
+
weth: boolean;
|
|
254
476
|
logoUrl: string;
|
|
255
477
|
};
|
|
256
478
|
};
|
|
@@ -462,14 +684,15 @@ export declare const ChainConfigs: {
|
|
|
462
684
|
minChunkSizeUsd: number;
|
|
463
685
|
nativeToken: {
|
|
464
686
|
address: string;
|
|
465
|
-
decimals: number;
|
|
466
687
|
symbol: string;
|
|
688
|
+
decimals: number;
|
|
467
689
|
logoUrl: string;
|
|
468
690
|
};
|
|
469
691
|
wToken: {
|
|
692
|
+
symbol: string;
|
|
470
693
|
address: string;
|
|
471
694
|
decimals: number;
|
|
472
|
-
|
|
695
|
+
weth: boolean;
|
|
473
696
|
logoUrl: string;
|
|
474
697
|
};
|
|
475
698
|
};
|
|
@@ -483,14 +706,15 @@ export declare const ChainConfigs: {
|
|
|
483
706
|
minChunkSizeUsd: number;
|
|
484
707
|
nativeToken: {
|
|
485
708
|
address: string;
|
|
486
|
-
decimals: number;
|
|
487
709
|
symbol: string;
|
|
710
|
+
decimals: number;
|
|
488
711
|
logoUrl: string;
|
|
489
712
|
};
|
|
490
713
|
wToken: {
|
|
714
|
+
symbol: string;
|
|
491
715
|
address: string;
|
|
492
716
|
decimals: number;
|
|
493
|
-
|
|
717
|
+
weth: boolean;
|
|
494
718
|
logoUrl: string;
|
|
495
719
|
};
|
|
496
720
|
twapAbi: ({
|
|
@@ -880,14 +1104,15 @@ export declare const ChainConfigs: {
|
|
|
880
1104
|
minChunkSizeUsd: number;
|
|
881
1105
|
nativeToken: {
|
|
882
1106
|
address: string;
|
|
883
|
-
decimals: number;
|
|
884
1107
|
symbol: string;
|
|
1108
|
+
decimals: number;
|
|
885
1109
|
logoUrl: string;
|
|
886
1110
|
};
|
|
887
1111
|
wToken: {
|
|
1112
|
+
symbol: string;
|
|
888
1113
|
address: string;
|
|
889
1114
|
decimals: number;
|
|
890
|
-
|
|
1115
|
+
weth: boolean;
|
|
891
1116
|
logoUrl: string;
|
|
892
1117
|
};
|
|
893
1118
|
};
|
|
@@ -1099,14 +1324,15 @@ export declare const ChainConfigs: {
|
|
|
1099
1324
|
minChunkSizeUsd: number;
|
|
1100
1325
|
nativeToken: {
|
|
1101
1326
|
address: string;
|
|
1102
|
-
decimals: number;
|
|
1103
1327
|
symbol: string;
|
|
1328
|
+
decimals: number;
|
|
1104
1329
|
logoUrl: string;
|
|
1105
1330
|
};
|
|
1106
1331
|
wToken: {
|
|
1332
|
+
symbol: string;
|
|
1107
1333
|
address: string;
|
|
1108
1334
|
decimals: number;
|
|
1109
|
-
|
|
1335
|
+
weth: boolean;
|
|
1110
1336
|
logoUrl: string;
|
|
1111
1337
|
};
|
|
1112
1338
|
};
|
|
@@ -1118,6 +1344,7 @@ export declare const Configs: {
|
|
|
1118
1344
|
PangolinDaas: Config;
|
|
1119
1345
|
QuickSwap: Config;
|
|
1120
1346
|
Chronos: Config;
|
|
1347
|
+
Thena: Config;
|
|
1121
1348
|
};
|
|
1122
1349
|
export declare const chainConfig: (chainId: number) => {
|
|
1123
1350
|
twapAbi: ({
|
|
@@ -1327,14 +1554,15 @@ export declare const chainConfig: (chainId: number) => {
|
|
|
1327
1554
|
minChunkSizeUsd: number;
|
|
1328
1555
|
nativeToken: {
|
|
1329
1556
|
address: string;
|
|
1330
|
-
decimals: number;
|
|
1331
1557
|
symbol: string;
|
|
1558
|
+
decimals: number;
|
|
1332
1559
|
logoUrl: string;
|
|
1333
1560
|
};
|
|
1334
1561
|
wToken: {
|
|
1562
|
+
symbol: string;
|
|
1335
1563
|
address: string;
|
|
1336
1564
|
decimals: number;
|
|
1337
|
-
|
|
1565
|
+
weth: boolean;
|
|
1338
1566
|
logoUrl: string;
|
|
1339
1567
|
};
|
|
1340
1568
|
} | {
|
|
@@ -1545,17 +1773,216 @@ export declare const chainConfig: (chainId: number) => {
|
|
|
1545
1773
|
minChunkSizeUsd: number;
|
|
1546
1774
|
nativeToken: {
|
|
1547
1775
|
address: string;
|
|
1548
|
-
decimals: number;
|
|
1549
1776
|
symbol: string;
|
|
1777
|
+
decimals: number;
|
|
1550
1778
|
logoUrl: string;
|
|
1551
1779
|
};
|
|
1552
1780
|
wToken: {
|
|
1781
|
+
symbol: string;
|
|
1553
1782
|
address: string;
|
|
1554
1783
|
decimals: number;
|
|
1555
|
-
|
|
1784
|
+
weth: boolean;
|
|
1556
1785
|
logoUrl: string;
|
|
1557
1786
|
};
|
|
1558
1787
|
} | {
|
|
1788
|
+
twapAbi: ({
|
|
1789
|
+
inputs: {
|
|
1790
|
+
internalType: string;
|
|
1791
|
+
name: string;
|
|
1792
|
+
type: string;
|
|
1793
|
+
}[];
|
|
1794
|
+
stateMutability: string;
|
|
1795
|
+
type: string;
|
|
1796
|
+
anonymous?: undefined;
|
|
1797
|
+
name?: undefined;
|
|
1798
|
+
outputs?: undefined;
|
|
1799
|
+
} | {
|
|
1800
|
+
anonymous: boolean;
|
|
1801
|
+
inputs: ({
|
|
1802
|
+
indexed: boolean;
|
|
1803
|
+
internalType: string;
|
|
1804
|
+
name: string;
|
|
1805
|
+
type: string;
|
|
1806
|
+
components?: undefined;
|
|
1807
|
+
} | {
|
|
1808
|
+
components: {
|
|
1809
|
+
internalType: string;
|
|
1810
|
+
name: string;
|
|
1811
|
+
type: string;
|
|
1812
|
+
}[];
|
|
1813
|
+
indexed: boolean;
|
|
1814
|
+
internalType: string;
|
|
1815
|
+
name: string;
|
|
1816
|
+
type: string;
|
|
1817
|
+
})[];
|
|
1818
|
+
name: string;
|
|
1819
|
+
type: string;
|
|
1820
|
+
stateMutability?: undefined;
|
|
1821
|
+
outputs?: undefined;
|
|
1822
|
+
} | {
|
|
1823
|
+
inputs: {
|
|
1824
|
+
components: {
|
|
1825
|
+
internalType: string;
|
|
1826
|
+
name: string;
|
|
1827
|
+
type: string;
|
|
1828
|
+
}[];
|
|
1829
|
+
internalType: string;
|
|
1830
|
+
name: string;
|
|
1831
|
+
type: string;
|
|
1832
|
+
}[];
|
|
1833
|
+
name: string;
|
|
1834
|
+
outputs: {
|
|
1835
|
+
internalType: string;
|
|
1836
|
+
name: string;
|
|
1837
|
+
type: string;
|
|
1838
|
+
}[];
|
|
1839
|
+
stateMutability: string;
|
|
1840
|
+
type: string;
|
|
1841
|
+
anonymous?: undefined;
|
|
1842
|
+
} | {
|
|
1843
|
+
inputs: {
|
|
1844
|
+
internalType: string;
|
|
1845
|
+
name: string;
|
|
1846
|
+
type: string;
|
|
1847
|
+
}[];
|
|
1848
|
+
name: string;
|
|
1849
|
+
outputs: ({
|
|
1850
|
+
internalType: string;
|
|
1851
|
+
name: string;
|
|
1852
|
+
type: string;
|
|
1853
|
+
components?: undefined;
|
|
1854
|
+
} | {
|
|
1855
|
+
components: {
|
|
1856
|
+
internalType: string;
|
|
1857
|
+
name: string;
|
|
1858
|
+
type: string;
|
|
1859
|
+
}[];
|
|
1860
|
+
internalType: string;
|
|
1861
|
+
name: string;
|
|
1862
|
+
type: string;
|
|
1863
|
+
})[];
|
|
1864
|
+
stateMutability: string;
|
|
1865
|
+
type: string;
|
|
1866
|
+
anonymous?: undefined;
|
|
1867
|
+
} | {
|
|
1868
|
+
inputs: {
|
|
1869
|
+
internalType: string;
|
|
1870
|
+
name: string;
|
|
1871
|
+
type: string;
|
|
1872
|
+
}[];
|
|
1873
|
+
name: string;
|
|
1874
|
+
outputs: {
|
|
1875
|
+
components: ({
|
|
1876
|
+
internalType: string;
|
|
1877
|
+
name: string;
|
|
1878
|
+
type: string;
|
|
1879
|
+
components?: undefined;
|
|
1880
|
+
} | {
|
|
1881
|
+
components: {
|
|
1882
|
+
internalType: string;
|
|
1883
|
+
name: string;
|
|
1884
|
+
type: string;
|
|
1885
|
+
}[];
|
|
1886
|
+
internalType: string;
|
|
1887
|
+
name: string;
|
|
1888
|
+
type: string;
|
|
1889
|
+
})[];
|
|
1890
|
+
internalType: string;
|
|
1891
|
+
name: string;
|
|
1892
|
+
type: string;
|
|
1893
|
+
}[];
|
|
1894
|
+
stateMutability: string;
|
|
1895
|
+
type: string;
|
|
1896
|
+
anonymous?: undefined;
|
|
1897
|
+
} | {
|
|
1898
|
+
stateMutability: string;
|
|
1899
|
+
type: string;
|
|
1900
|
+
inputs?: undefined;
|
|
1901
|
+
anonymous?: undefined;
|
|
1902
|
+
name?: undefined;
|
|
1903
|
+
outputs?: undefined;
|
|
1904
|
+
})[];
|
|
1905
|
+
lensAbi: ({
|
|
1906
|
+
inputs: {
|
|
1907
|
+
internalType: string;
|
|
1908
|
+
name: string;
|
|
1909
|
+
type: string;
|
|
1910
|
+
}[];
|
|
1911
|
+
stateMutability: string;
|
|
1912
|
+
type: string;
|
|
1913
|
+
name?: undefined;
|
|
1914
|
+
outputs?: undefined;
|
|
1915
|
+
} | {
|
|
1916
|
+
inputs: never[];
|
|
1917
|
+
name: string;
|
|
1918
|
+
outputs: {
|
|
1919
|
+
internalType: string;
|
|
1920
|
+
name: string;
|
|
1921
|
+
type: string;
|
|
1922
|
+
}[];
|
|
1923
|
+
stateMutability: string;
|
|
1924
|
+
type: string;
|
|
1925
|
+
} | {
|
|
1926
|
+
inputs: {
|
|
1927
|
+
internalType: string;
|
|
1928
|
+
name: string;
|
|
1929
|
+
type: string;
|
|
1930
|
+
}[];
|
|
1931
|
+
name: string;
|
|
1932
|
+
outputs: {
|
|
1933
|
+
components: ({
|
|
1934
|
+
internalType: string;
|
|
1935
|
+
name: string;
|
|
1936
|
+
type: string;
|
|
1937
|
+
components?: undefined;
|
|
1938
|
+
} | {
|
|
1939
|
+
components: {
|
|
1940
|
+
internalType: string;
|
|
1941
|
+
name: string;
|
|
1942
|
+
type: string;
|
|
1943
|
+
}[];
|
|
1944
|
+
internalType: string;
|
|
1945
|
+
name: string;
|
|
1946
|
+
type: string;
|
|
1947
|
+
})[];
|
|
1948
|
+
internalType: string;
|
|
1949
|
+
name: string;
|
|
1950
|
+
type: string;
|
|
1951
|
+
}[];
|
|
1952
|
+
stateMutability: string;
|
|
1953
|
+
type: string;
|
|
1954
|
+
})[];
|
|
1955
|
+
takerAbi: ({
|
|
1956
|
+
inputs: {
|
|
1957
|
+
internalType: string;
|
|
1958
|
+
name: string;
|
|
1959
|
+
type: string;
|
|
1960
|
+
}[];
|
|
1961
|
+
stateMutability: string;
|
|
1962
|
+
type: string;
|
|
1963
|
+
name?: undefined;
|
|
1964
|
+
outputs?: undefined;
|
|
1965
|
+
} | {
|
|
1966
|
+
inputs: {
|
|
1967
|
+
internalType: string;
|
|
1968
|
+
name: string;
|
|
1969
|
+
type: string;
|
|
1970
|
+
}[];
|
|
1971
|
+
name: string;
|
|
1972
|
+
outputs: {
|
|
1973
|
+
internalType: string;
|
|
1974
|
+
name: string;
|
|
1975
|
+
type: string;
|
|
1976
|
+
}[];
|
|
1977
|
+
stateMutability: string;
|
|
1978
|
+
type: string;
|
|
1979
|
+
} | {
|
|
1980
|
+
stateMutability: string;
|
|
1981
|
+
type: string;
|
|
1982
|
+
inputs?: undefined;
|
|
1983
|
+
name?: undefined;
|
|
1984
|
+
outputs?: undefined;
|
|
1985
|
+
})[];
|
|
1559
1986
|
chainName: string;
|
|
1560
1987
|
chainId: number;
|
|
1561
1988
|
twapVersion: number;
|
|
@@ -1565,14 +1992,36 @@ export declare const chainConfig: (chainId: number) => {
|
|
|
1565
1992
|
minChunkSizeUsd: number;
|
|
1566
1993
|
nativeToken: {
|
|
1567
1994
|
address: string;
|
|
1568
|
-
decimals: number;
|
|
1569
1995
|
symbol: string;
|
|
1996
|
+
decimals: number;
|
|
1570
1997
|
logoUrl: string;
|
|
1571
1998
|
};
|
|
1572
1999
|
wToken: {
|
|
2000
|
+
symbol: string;
|
|
1573
2001
|
address: string;
|
|
1574
2002
|
decimals: number;
|
|
2003
|
+
weth: boolean;
|
|
2004
|
+
logoUrl: string;
|
|
2005
|
+
};
|
|
2006
|
+
} | {
|
|
2007
|
+
chainName: string;
|
|
2008
|
+
chainId: number;
|
|
2009
|
+
twapVersion: number;
|
|
2010
|
+
twapAddress: string;
|
|
2011
|
+
lensAddress: string;
|
|
2012
|
+
bidDelaySeconds: number;
|
|
2013
|
+
minChunkSizeUsd: number;
|
|
2014
|
+
nativeToken: {
|
|
2015
|
+
address: string;
|
|
1575
2016
|
symbol: string;
|
|
2017
|
+
decimals: number;
|
|
2018
|
+
logoUrl: string;
|
|
2019
|
+
};
|
|
2020
|
+
wToken: {
|
|
2021
|
+
symbol: string;
|
|
2022
|
+
address: string;
|
|
2023
|
+
decimals: number;
|
|
2024
|
+
weth: boolean;
|
|
1576
2025
|
logoUrl: string;
|
|
1577
2026
|
};
|
|
1578
2027
|
twapAbi: ({
|
|
@@ -1961,14 +2410,15 @@ export declare const chainConfig: (chainId: number) => {
|
|
|
1961
2410
|
minChunkSizeUsd: number;
|
|
1962
2411
|
nativeToken: {
|
|
1963
2412
|
address: string;
|
|
1964
|
-
decimals: number;
|
|
1965
2413
|
symbol: string;
|
|
2414
|
+
decimals: number;
|
|
1966
2415
|
logoUrl: string;
|
|
1967
2416
|
};
|
|
1968
2417
|
wToken: {
|
|
2418
|
+
symbol: string;
|
|
1969
2419
|
address: string;
|
|
1970
2420
|
decimals: number;
|
|
1971
|
-
|
|
2421
|
+
weth: boolean;
|
|
1972
2422
|
logoUrl: string;
|
|
1973
2423
|
};
|
|
1974
2424
|
} | {
|
|
@@ -2179,14 +2629,15 @@ export declare const chainConfig: (chainId: number) => {
|
|
|
2179
2629
|
minChunkSizeUsd: number;
|
|
2180
2630
|
nativeToken: {
|
|
2181
2631
|
address: string;
|
|
2182
|
-
decimals: number;
|
|
2183
2632
|
symbol: string;
|
|
2633
|
+
decimals: number;
|
|
2184
2634
|
logoUrl: string;
|
|
2185
2635
|
};
|
|
2186
2636
|
wToken: {
|
|
2637
|
+
symbol: string;
|
|
2187
2638
|
address: string;
|
|
2188
2639
|
decimals: number;
|
|
2189
|
-
|
|
2640
|
+
weth: boolean;
|
|
2190
2641
|
logoUrl: string;
|
|
2191
2642
|
};
|
|
2192
2643
|
};
|
package/dist/src/configs.js
CHANGED
|
@@ -19,6 +19,7 @@ var ParaswapOnlyDex;
|
|
|
19
19
|
ParaswapOnlyDex["SpookySwap"] = "SpookySwap";
|
|
20
20
|
ParaswapOnlyDex["Pangolin"] = "PangolinSwap";
|
|
21
21
|
ParaswapOnlyDex["TraderJoe"] = "TraderJoe";
|
|
22
|
+
ParaswapOnlyDex["Thena"] = "";
|
|
22
23
|
})(ParaswapOnlyDex = exports.ParaswapOnlyDex || (exports.ParaswapOnlyDex = {}));
|
|
23
24
|
var OdosOnlyDex;
|
|
24
25
|
(function (OdosOnlyDex) {
|
|
@@ -30,28 +31,9 @@ const defaultAbis = {
|
|
|
30
31
|
takerAbi: Taker_json_1.default.abi,
|
|
31
32
|
};
|
|
32
33
|
exports.ChainConfigs = {
|
|
33
|
-
eth: Object.assign({ chainName: "eth", chainId: 1, twapVersion: 0, twapAddress: "", lensAddress: "", bidDelaySeconds: 60, minChunkSizeUsd: 100, nativeToken:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
symbol: "ETH",
|
|
37
|
-
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg",
|
|
38
|
-
}, wToken: {
|
|
39
|
-
address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
40
|
-
decimals: 18,
|
|
41
|
-
symbol: "WETH",
|
|
42
|
-
logoUrl: "https://tokens.1inch.io/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png",
|
|
43
|
-
} }, defaultAbis),
|
|
44
|
-
arb: Object.assign({ chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0xD63430c74C8E70D9dbdCA04C6a9E6E9E929028DA", lensAddress: "0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: {
|
|
45
|
-
address: web3_candies_1.zeroAddress,
|
|
46
|
-
decimals: 18,
|
|
47
|
-
symbol: "ETH",
|
|
48
|
-
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg",
|
|
49
|
-
}, wToken: {
|
|
50
|
-
address: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
|
51
|
-
decimals: 18,
|
|
52
|
-
symbol: "WETH",
|
|
53
|
-
logoUrl: "https://tokens.1inch.io/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png",
|
|
54
|
-
} }, defaultAbis),
|
|
34
|
+
eth: Object.assign({ chainName: "eth", chainId: 1, twapVersion: 0, twapAddress: "", lensAddress: "", bidDelaySeconds: 60, minChunkSizeUsd: 100, nativeToken: web3_candies_1.networks.eth.native, wToken: web3_candies_1.networks.eth.wToken }, defaultAbis),
|
|
35
|
+
bsc: Object.assign({ chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0x25a0A78f5ad07b2474D3D42F1c1432178465936d", lensAddress: "0x3b7C090857a4068e16396550423ebadae502768F", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: web3_candies_1.networks.bsc.native, wToken: web3_candies_1.networks.bsc.wToken }, defaultAbis),
|
|
36
|
+
arb: Object.assign({ chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0xD63430c74C8E70D9dbdCA04C6a9E6E9E929028DA", lensAddress: "0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: web3_candies_1.networks.arb.native, wToken: web3_candies_1.networks.arb.wToken }, defaultAbis),
|
|
55
37
|
ftm: {
|
|
56
38
|
chainName: "ftm",
|
|
57
39
|
chainId: 250,
|
|
@@ -60,44 +42,14 @@ exports.ChainConfigs = {
|
|
|
60
42
|
lensAddress: "0x042799657E971855eD619046aeDf7F30DB56d2D6",
|
|
61
43
|
bidDelaySeconds: 60,
|
|
62
44
|
minChunkSizeUsd: 10,
|
|
63
|
-
nativeToken:
|
|
64
|
-
|
|
65
|
-
decimals: 18,
|
|
66
|
-
symbol: "FTM",
|
|
67
|
-
logoUrl: "https://app.1inch.io/assets/images/network-logos/fantom.svg",
|
|
68
|
-
},
|
|
69
|
-
wToken: {
|
|
70
|
-
address: "0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",
|
|
71
|
-
decimals: 18,
|
|
72
|
-
symbol: "WFTM",
|
|
73
|
-
logoUrl: "https://tokens.1inch.io/0x4e15361fd6b4bb609fa63c81a2be19d873717870.png",
|
|
74
|
-
},
|
|
45
|
+
nativeToken: web3_candies_1.networks.ftm.native,
|
|
46
|
+
wToken: web3_candies_1.networks.ftm.wToken,
|
|
75
47
|
twapAbi: legacy_abi_1.twapAbiV3,
|
|
76
48
|
lensAbi: legacy_abi_1.lensAbiV3,
|
|
77
49
|
takerAbi: legacy_abi_1.takerAbiV3,
|
|
78
50
|
},
|
|
79
|
-
poly: Object.assign({ chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0xceFf098C9199c5d9cf24078dc14Eb8F787631cC0", lensAddress: "0x8ffde23Fba2d7Aea9C3CBf2d5B7B533BB46754a8", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken:
|
|
80
|
-
|
|
81
|
-
decimals: 18,
|
|
82
|
-
symbol: "MATIC",
|
|
83
|
-
logoUrl: "https://app.1inch.io/assets/images/network-logos/polygon.svg",
|
|
84
|
-
}, wToken: {
|
|
85
|
-
address: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
|
|
86
|
-
decimals: 18,
|
|
87
|
-
symbol: "WMATIC",
|
|
88
|
-
logoUrl: "https://tokens.1inch.io/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
89
|
-
} }, defaultAbis),
|
|
90
|
-
avax: Object.assign({ chainName: "avax", chainId: 43114, twapVersion: 4, twapAddress: "0xF2687e119B0A4aB00bED9c9F425403566D605020", lensAddress: "0xfA1e5Da0Cbb780b891Cd635264354a9F4d3A726E", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: {
|
|
91
|
-
address: web3_candies_1.zeroAddress,
|
|
92
|
-
decimals: 18,
|
|
93
|
-
symbol: "AVAX",
|
|
94
|
-
logoUrl: "https://app.1inch.io/assets/images/network-logos/avalanche.svg",
|
|
95
|
-
}, wToken: {
|
|
96
|
-
address: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",
|
|
97
|
-
decimals: 18,
|
|
98
|
-
symbol: "WAVAX",
|
|
99
|
-
logoUrl: "https://tokens.1inch.io/0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7.png",
|
|
100
|
-
} }, defaultAbis),
|
|
51
|
+
poly: Object.assign({ chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0xceFf098C9199c5d9cf24078dc14Eb8F787631cC0", lensAddress: "0x8ffde23Fba2d7Aea9C3CBf2d5B7B533BB46754a8", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: web3_candies_1.networks.poly.native, wToken: web3_candies_1.networks.poly.wToken }, defaultAbis),
|
|
52
|
+
avax: Object.assign({ chainName: "avax", chainId: 43114, twapVersion: 4, twapAddress: "0xF2687e119B0A4aB00bED9c9F425403566D605020", lensAddress: "0xfA1e5Da0Cbb780b891Cd635264354a9F4d3A726E", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: web3_candies_1.networks.avax.native, wToken: web3_candies_1.networks.avax.wToken }, defaultAbis),
|
|
101
53
|
};
|
|
102
54
|
exports.Configs = {
|
|
103
55
|
SpiritSwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { partner: "SpiritSwap", exchangeAddress: "0xAd19179201be5A51D1cBd3bB2fC651BB05822404", exchangeType: "ParaswapExchange", pathfinderKey: ParaswapOnlyDex.SpiritSwap }),
|
|
@@ -106,6 +58,7 @@ exports.Configs = {
|
|
|
106
58
|
PangolinDaas: Object.assign(Object.assign({}, exports.ChainConfigs.avax), { partner: "PangolinDaas", exchangeAddress: "0x1579EED0527781B1A748043AA1f59a3858Ace4a7", exchangeType: "PangolinDaasExchange", pathfinderKey: ParaswapOnlyDex.Pangolin }),
|
|
107
59
|
QuickSwap: Object.assign(Object.assign({}, exports.ChainConfigs.poly), { partner: "QuickSwap", exchangeAddress: "0x26D0ec4Be402BCE03AAa8aAf0CF67e9428ba54eF", exchangeType: "ParaswapExchange", pathfinderKey: ParaswapOnlyDex.QuickSwap }),
|
|
108
60
|
Chronos: Object.assign(Object.assign({}, exports.ChainConfigs.arb), { partner: "Chronos", exchangeAddress: "0xA0b07F9a11dFb01388149abBdbc5B4f2196600AB", exchangeType: "OdosExchange", pathfinderKey: OdosOnlyDex.Chronos }),
|
|
61
|
+
Thena: Object.assign(Object.assign({}, exports.ChainConfigs.bsc), { partner: "Thena", exchangeAddress: "0xD63430c74C8E70D9dbdCA04C6a9E6E9E929028DA", exchangeType: "ParaswapExchange", pathfinderKey: ParaswapOnlyDex.Thena }),
|
|
109
62
|
};
|
|
110
63
|
const chainConfig = (chainId) => lodash_1.default.find(exports.ChainConfigs, (c) => c.chainId === chainId);
|
|
111
64
|
exports.chainConfig = chainConfig;
|
package/dist/src/paraswap.js
CHANGED
|
@@ -45,9 +45,7 @@ var Paraswap;
|
|
|
45
45
|
data = yield buildSwapData(route, exchangeAdapter);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
catch (e) {
|
|
49
|
-
console.error(e);
|
|
50
|
-
}
|
|
48
|
+
catch (e) { }
|
|
51
49
|
return { dstAmount: (0, bignumber_js_1.default)(route.destAmount), srcUsd: (0, bignumber_js_1.default)(route.srcUSD), dstUsd: (0, bignumber_js_1.default)(route.destUSD), data, path };
|
|
52
50
|
});
|
|
53
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbs-network/twap",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/orbs-network/twap.git"
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"test:ftm": "NETWORK=FTM BLOCK=39800909 hardhat test",
|
|
32
32
|
"test:poly": "NETWORK=POLY BLOCK=29174252 hardhat test",
|
|
33
33
|
"test:avax": "NETWORK=AVAX BLOCK=15609313 hardhat test",
|
|
34
|
-
"test:arb": "NETWORK=ARB hardhat test"
|
|
34
|
+
"test:arb": "NETWORK=ARB hardhat test",
|
|
35
|
+
"test:bsc": "NETWORK=BSC hardhat test"
|
|
35
36
|
},
|
|
36
37
|
"prettier": {
|
|
37
38
|
"printWidth": 120
|