@paraswap/dex-lib 2.12.9 → 2.12.10

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 (50) hide show
  1. package/.idea/aws.xml +17 -0
  2. package/.idea/codeStyles/Project.xml +19 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  5. package/.idea/misc.xml +6 -0
  6. package/.idea/modules.xml +8 -0
  7. package/.idea/paraswap-dex-lib.iml +9 -0
  8. package/.idea/runConfigurations.xml +10 -0
  9. package/.idea/vcs.xml +6 -0
  10. package/build/dex/aave-v3/tokens/arbitrum.json +50 -0
  11. package/build/dex/aave-v3/tokens/avalanche.json +74 -0
  12. package/build/dex/aave-v3/tokens/fantom.json +62 -0
  13. package/build/dex/aave-v3/tokens/optimism.json +50 -0
  14. package/build/dex/aave-v3/tokens/polygon.json +116 -0
  15. package/build/dex/balancer-v2/balancer-v2.js +32 -5
  16. package/build/dex/balancer-v2/balancer-v2.js.map +1 -1
  17. package/build/dex/balancer-v2/types.d.ts +10 -3
  18. package/build/dex/balancer-v2/types.js +10 -3
  19. package/build/dex/balancer-v2/types.js.map +1 -1
  20. package/build/dex/balancer-v2/utils.js +8 -1
  21. package/build/dex/balancer-v2/utils.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +58 -0
  24. package/src/dex/balancer-v2/balancer-v2.ts +32 -5
  25. package/src/dex/balancer-v2/types.ts +10 -3
  26. package/src/dex/balancer-v2/utils.ts +8 -1
  27. package/tests/constants-e2e.ts +5 -0
  28. package/build/abi/maverick/pool.json +0 -913
  29. package/build/abi/maverick/router.json +0 -703
  30. package/build/dex/maverick/config.d.ts +0 -4
  31. package/build/dex/maverick/config.js +0 -20
  32. package/build/dex/maverick/config.js.map +0 -1
  33. package/build/dex/maverick/maverick-math/maverick-pool-math.d.ts +0 -67
  34. package/build/dex/maverick/maverick-math/maverick-pool-math.js +0 -406
  35. package/build/dex/maverick/maverick-math/maverick-pool-math.js.map +0 -1
  36. package/build/dex/maverick/maverick-math/maverick-sol-math.d.ts +0 -17
  37. package/build/dex/maverick/maverick-math/maverick-sol-math.js +0 -139
  38. package/build/dex/maverick/maverick-math/maverick-sol-math.js.map +0 -1
  39. package/build/dex/maverick/maverick-pool.d.ts +0 -41
  40. package/build/dex/maverick/maverick-pool.js +0 -130
  41. package/build/dex/maverick/maverick-pool.js.map +0 -1
  42. package/build/dex/maverick/maverick.d.ts +0 -42
  43. package/build/dex/maverick/maverick.js +0 -174
  44. package/build/dex/maverick/maverick.js.map +0 -1
  45. package/build/dex/maverick/subgraph-queries.d.ts +0 -4
  46. package/build/dex/maverick/subgraph-queries.js +0 -114
  47. package/build/dex/maverick/subgraph-queries.js.map +0 -1
  48. package/build/dex/maverick/types.d.ts +0 -46
  49. package/build/dex/maverick/types.js +0 -3
  50. package/build/dex/maverick/types.js.map +0 -1
@@ -1,114 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchBaseTokenPools = exports.fetchQuoteTokenPools = exports.fetchPoolsFromTokens = exports.fetchAllPools = void 0;
4
- exports.fetchAllPools = `
5
- query($count: Int){
6
- pools(first: $count, orderBy: balanceUSD, orderDirection: desc) {
7
- id
8
- fee
9
- w
10
- h
11
- k
12
- paramChoice
13
- twauLookback
14
- uShiftMultiplier
15
- maxSpreadFee
16
- spreadFeeMultiplier
17
- protocolFeeRatio
18
- epsilon
19
- quoteBalance
20
- baseBalance
21
- base {
22
- id
23
- decimals
24
- symbol
25
- }
26
- quote {
27
- id
28
- decimals
29
- symbol
30
- }
31
- }
32
- }
33
- `;
34
- exports.fetchPoolsFromTokens = `
35
- query($count: Int, $from: [String], $to: [String]){
36
- pools(first: $count, orderBy: balanceUSD, orderDirection: desc, where: {quote_in: $from, base_in: $to}) {
37
- id
38
- fee
39
- w
40
- h
41
- k
42
- paramChoice
43
- twauLookback
44
- uShiftMultiplier
45
- maxSpreadFee
46
- spreadFeeMultiplier
47
- protocolFeeRatio
48
- epsilon
49
- quoteBalance
50
- baseBalance
51
- base {
52
- id
53
- decimals
54
- symbol
55
- }
56
- quote {
57
- id
58
- decimals
59
- symbol
60
- }
61
- }
62
- }
63
- `;
64
- exports.fetchQuoteTokenPools = `
65
- query($count: Int, $token: [String]){
66
- pools(first: $count, orderBy: balanceUSD, orderDirection: desc, where: {quote_in: $token}) {
67
- id
68
- fee
69
- w
70
- h
71
- k
72
- paramChoice
73
- quoteBalance
74
- baseBalance
75
- balanceUSD
76
- base {
77
- id
78
- decimals
79
- symbol
80
- }
81
- quote {
82
- id
83
- decimals
84
- symbol
85
- }
86
- }
87
- }
88
- `;
89
- exports.fetchBaseTokenPools = `
90
- query($count: Int, $token: [String]){
91
- pools(first: $count, orderBy: balanceUSD, orderDirection: desc, where: {base_in: $token}) {
92
- id
93
- fee
94
- w
95
- h
96
- k
97
- paramChoice
98
- quoteBalance
99
- baseBalance
100
- balanceUSD
101
- base {
102
- id
103
- decimals
104
- symbol
105
- }
106
- quote {
107
- id
108
- decimals
109
- symbol
110
- }
111
- }
112
- }
113
- `;
114
- //# sourceMappingURL=subgraph-queries.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subgraph-queries.js","sourceRoot":"","sources":["../../../src/dex/maverick/subgraph-queries.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B5B,CAAC;AAEW,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BnC,CAAC;AAEW,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBnC,CAAC;AAEW,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBlC,CAAC"}
@@ -1,46 +0,0 @@
1
- import { Address } from '../../types';
2
- export declare type MaverickPoolState = {
3
- quoteBalance: bigint;
4
- baseBalance: bigint;
5
- u: bigint;
6
- twau: bigint;
7
- lastTimestamp: bigint;
8
- };
9
- export declare type MaverickData = {
10
- w: number;
11
- k: number;
12
- h: number;
13
- fee: number;
14
- paramChoice: number;
15
- router: Address;
16
- pool: Address;
17
- quote: Address;
18
- base: Address;
19
- };
20
- export interface SubgraphToken {
21
- id: string;
22
- symbol: string;
23
- name: string;
24
- }
25
- export interface SubgraphPoolBase {
26
- id: string;
27
- w: number;
28
- k: number;
29
- h: number;
30
- fee: number;
31
- paramChoice: number;
32
- twauLookback: number;
33
- uShiftMultiplier: number;
34
- maxSpreadFee: number;
35
- spreadFeeMultiplier: number;
36
- protocolFeeRatio: number;
37
- epsilon: number;
38
- quote: SubgraphToken;
39
- base: SubgraphToken;
40
- }
41
- export declare type DexParams = {
42
- subgraphURL: string;
43
- factoryAddress: string;
44
- routerAddress: string;
45
- estimatorAddress: string;
46
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/dex/maverick/types.ts"],"names":[],"mappings":""}