@paraswap/dex-lib 2.37.1 → 2.37.2

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 (86) hide show
  1. package/build/abi/quickPerps/fast-price-events.json +70 -0
  2. package/build/abi/quickPerps/fast-price-feed.json +748 -0
  3. package/build/abi/quickPerps/reader.json +313 -0
  4. package/build/abi/quickPerps/vault-price-feed.json +477 -0
  5. package/build/abi/quickPerps/vault.json +1953 -0
  6. package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +193 -0
  7. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +285 -0
  8. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +583 -0
  9. package/build/abi/woo-fi/WooFeeManager.abi.json +318 -0
  10. package/build/abi/woo-fi/WooPP.abi.json +548 -0
  11. package/build/abi/woo-fi/Wooracle.abi.json +260 -0
  12. package/build/dex/aave-v3/tokens/arbitrum.json +50 -0
  13. package/build/dex/aave-v3/tokens/avalanche.json +74 -0
  14. package/build/dex/aave-v3/tokens/fantom.json +62 -0
  15. package/build/dex/aave-v3/tokens/optimism.json +50 -0
  16. package/build/dex/aave-v3/tokens/polygon.json +116 -0
  17. package/build/dex/balancer-v2/LinearMath.d.ts +19 -0
  18. package/build/dex/balancer-v2/LinearMath.js +179 -0
  19. package/build/dex/balancer-v2/LinearMath.js.map +1 -0
  20. package/build/dex/balancer-v2/LinearPool.d.ts +47 -0
  21. package/build/dex/balancer-v2/LinearPool.js +324 -0
  22. package/build/dex/balancer-v2/LinearPool.js.map +1 -0
  23. package/build/dex/balancer-v2/PhantomStablePool.d.ts +47 -0
  24. package/build/dex/balancer-v2/PhantomStablePool.js +294 -0
  25. package/build/dex/balancer-v2/PhantomStablePool.js.map +1 -0
  26. package/build/dex/balancer-v2/StableMath.d.ts +9 -0
  27. package/build/dex/balancer-v2/StableMath.js +272 -0
  28. package/build/dex/balancer-v2/StableMath.js.map +1 -0
  29. package/build/dex/balancer-v2/balancer-v2-pool.d.ts +75 -0
  30. package/build/dex/balancer-v2/balancer-v2-pool.js +417 -0
  31. package/build/dex/balancer-v2/balancer-v2-pool.js.map +1 -0
  32. package/build/dex/index.js +7 -2
  33. package/build/dex/index.js.map +1 -1
  34. package/build/dex/maverick-v1/scripts/event-sequence.d.ts +1 -0
  35. package/build/dex/maverick-v1/scripts/event-sequence.js +110 -0
  36. package/build/dex/maverick-v1/scripts/event-sequence.js.map +1 -0
  37. package/build/dex/quickswap/camelot-v3.d.ts +6 -0
  38. package/build/dex/quickswap/camelot-v3.js +19 -0
  39. package/build/dex/quickswap/camelot-v3.js.map +1 -0
  40. package/build/dex/quickswap/zyberswap-v3.d.ts +6 -0
  41. package/build/dex/quickswap/zyberswap-v3.js +19 -0
  42. package/build/dex/quickswap/zyberswap-v3.js.map +1 -0
  43. package/build/dex/quickswap-v3.d.ts +21 -0
  44. package/build/dex/quickswap-v3.js +40 -0
  45. package/build/dex/quickswap-v3.js.map +1 -0
  46. package/build/dex/test-dex/config.d.ts +4 -0
  47. package/build/dex/test-dex/config.js +15 -0
  48. package/build/dex/test-dex/config.js.map +1 -0
  49. package/build/dex/test-dex/test-dex-pool.d.ts +39 -0
  50. package/build/dex/test-dex/test-dex-pool.js +63 -0
  51. package/build/dex/test-dex/test-dex-pool.js.map +1 -0
  52. package/build/dex/test-dex/test-dex.d.ts +37 -0
  53. package/build/dex/test-dex/test-dex.js +126 -0
  54. package/build/dex/test-dex/test-dex.js.map +1 -0
  55. package/build/dex/test-dex/types.d.ts +6 -0
  56. package/build/dex/test-dex/types.js +3 -0
  57. package/build/dex/test-dex/types.js.map +1 -0
  58. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.d.ts +12 -0
  59. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js +23 -0
  60. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js.map +1 -0
  61. package/build/dex/woo-fi/config.d.ts +4 -0
  62. package/build/dex/woo-fi/config.js +141 -0
  63. package/build/dex/woo-fi/config.js.map +1 -0
  64. package/build/dex/woo-fi/constants.d.ts +5 -0
  65. package/build/dex/woo-fi/constants.js +20 -0
  66. package/build/dex/woo-fi/constants.js.map +1 -0
  67. package/build/dex/woo-fi/types.d.ts +48 -0
  68. package/build/dex/woo-fi/types.js +3 -0
  69. package/build/dex/woo-fi/types.js.map +1 -0
  70. package/build/dex/woo-fi/woo-fi-decimal-math.d.ts +14 -0
  71. package/build/dex/woo-fi/woo-fi-decimal-math.js +42 -0
  72. package/build/dex/woo-fi/woo-fi-decimal-math.js.map +1 -0
  73. package/build/dex/woo-fi/woo-fi-math.d.ts +31 -0
  74. package/build/dex/woo-fi/woo-fi-math.js +300 -0
  75. package/build/dex/woo-fi/woo-fi-math.js.map +1 -0
  76. package/build/dex/woo-fi/woo-fi.d.ts +65 -0
  77. package/build/dex/woo-fi/woo-fi.js +480 -0
  78. package/build/dex/woo-fi/woo-fi.js.map +1 -0
  79. package/build/dex/woo-fi-v2/woo-fi-math.d.ts +16 -0
  80. package/build/dex/woo-fi-v2/woo-fi-math.js +137 -0
  81. package/build/dex/woo-fi-v2/woo-fi-math.js.map +1 -0
  82. package/build/workers.d.ts +0 -0
  83. package/build/workers.js +2 -0
  84. package/build/workers.js.map +1 -0
  85. package/package.json +1 -1
  86. package/src/dex/index.ts +6 -3
@@ -0,0 +1,313 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "name": "BASIS_POINTS_DIVISOR",
5
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
6
+ "stateMutability": "view",
7
+ "type": "function"
8
+ },
9
+ {
10
+ "inputs": [],
11
+ "name": "POSITION_PROPS_LENGTH",
12
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
13
+ "stateMutability": "view",
14
+ "type": "function"
15
+ },
16
+ {
17
+ "inputs": [],
18
+ "name": "PRICE_PRECISION",
19
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
20
+ "stateMutability": "view",
21
+ "type": "function"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "USDQ_DECIMALS",
26
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
27
+ "stateMutability": "view",
28
+ "type": "function"
29
+ },
30
+ {
31
+ "inputs": [
32
+ {
33
+ "internalType": "contract IVault",
34
+ "name": "_vault",
35
+ "type": "address"
36
+ },
37
+ { "internalType": "address", "name": "_tokenIn", "type": "address" },
38
+ { "internalType": "address", "name": "_tokenOut", "type": "address" },
39
+ { "internalType": "uint256", "name": "_amountIn", "type": "uint256" }
40
+ ],
41
+ "name": "getAmountOut",
42
+ "outputs": [
43
+ { "internalType": "uint256", "name": "", "type": "uint256" },
44
+ { "internalType": "uint256", "name": "", "type": "uint256" }
45
+ ],
46
+ "stateMutability": "view",
47
+ "type": "function"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "internalType": "contract IVault",
53
+ "name": "_vault",
54
+ "type": "address"
55
+ },
56
+ { "internalType": "address", "name": "_tokenIn", "type": "address" },
57
+ { "internalType": "address", "name": "_tokenOut", "type": "address" },
58
+ { "internalType": "uint256", "name": "_amountIn", "type": "uint256" }
59
+ ],
60
+ "name": "getFeeBasisPoints",
61
+ "outputs": [
62
+ { "internalType": "uint256", "name": "", "type": "uint256" },
63
+ { "internalType": "uint256", "name": "", "type": "uint256" },
64
+ { "internalType": "uint256", "name": "", "type": "uint256" }
65
+ ],
66
+ "stateMutability": "view",
67
+ "type": "function"
68
+ },
69
+ {
70
+ "inputs": [
71
+ { "internalType": "address", "name": "_vault", "type": "address" },
72
+ { "internalType": "address[]", "name": "_tokens", "type": "address[]" }
73
+ ],
74
+ "name": "getFees",
75
+ "outputs": [
76
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
77
+ ],
78
+ "stateMutability": "view",
79
+ "type": "function"
80
+ },
81
+ {
82
+ "inputs": [
83
+ { "internalType": "address", "name": "_vault", "type": "address" },
84
+ { "internalType": "address", "name": "_weth", "type": "address" },
85
+ { "internalType": "uint256", "name": "_usdqAmount", "type": "uint256" },
86
+ { "internalType": "address[]", "name": "_tokens", "type": "address[]" }
87
+ ],
88
+ "name": "getFullVaultTokenInfo",
89
+ "outputs": [
90
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
91
+ ],
92
+ "stateMutability": "view",
93
+ "type": "function"
94
+ },
95
+ {
96
+ "inputs": [
97
+ { "internalType": "address", "name": "_vault", "type": "address" },
98
+ { "internalType": "address", "name": "_weth", "type": "address" },
99
+ { "internalType": "address[]", "name": "_tokens", "type": "address[]" }
100
+ ],
101
+ "name": "getFundingRates",
102
+ "outputs": [
103
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
104
+ ],
105
+ "stateMutability": "view",
106
+ "type": "function"
107
+ },
108
+ {
109
+ "inputs": [
110
+ {
111
+ "internalType": "contract IVault",
112
+ "name": "_vault",
113
+ "type": "address"
114
+ },
115
+ { "internalType": "address", "name": "_tokenIn", "type": "address" },
116
+ { "internalType": "address", "name": "_tokenOut", "type": "address" }
117
+ ],
118
+ "name": "getMaxAmountIn",
119
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
120
+ "stateMutability": "view",
121
+ "type": "function"
122
+ },
123
+ {
124
+ "inputs": [
125
+ { "internalType": "address", "name": "_vault", "type": "address" },
126
+ { "internalType": "address", "name": "_account", "type": "address" },
127
+ {
128
+ "internalType": "address[]",
129
+ "name": "_collateralTokens",
130
+ "type": "address[]"
131
+ },
132
+ {
133
+ "internalType": "address[]",
134
+ "name": "_indexTokens",
135
+ "type": "address[]"
136
+ },
137
+ { "internalType": "bool[]", "name": "_isLong", "type": "bool[]" }
138
+ ],
139
+ "name": "getPositions",
140
+ "outputs": [
141
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
142
+ ],
143
+ "stateMutability": "view",
144
+ "type": "function"
145
+ },
146
+ {
147
+ "inputs": [
148
+ {
149
+ "internalType": "contract IVaultPriceFeed",
150
+ "name": "_priceFeed",
151
+ "type": "address"
152
+ },
153
+ { "internalType": "address[]", "name": "_tokens", "type": "address[]" }
154
+ ],
155
+ "name": "getPrices",
156
+ "outputs": [
157
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
158
+ ],
159
+ "stateMutability": "view",
160
+ "type": "function"
161
+ },
162
+ {
163
+ "inputs": [
164
+ { "internalType": "address", "name": "_account", "type": "address" },
165
+ {
166
+ "internalType": "address[]",
167
+ "name": "_yieldTrackers",
168
+ "type": "address[]"
169
+ }
170
+ ],
171
+ "name": "getStakingInfo",
172
+ "outputs": [
173
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
174
+ ],
175
+ "stateMutability": "view",
176
+ "type": "function"
177
+ },
178
+ {
179
+ "inputs": [
180
+ { "internalType": "address", "name": "_account", "type": "address" },
181
+ { "internalType": "address[]", "name": "_tokens", "type": "address[]" }
182
+ ],
183
+ "name": "getTokenBalances",
184
+ "outputs": [
185
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
186
+ ],
187
+ "stateMutability": "view",
188
+ "type": "function"
189
+ },
190
+ {
191
+ "inputs": [
192
+ { "internalType": "address", "name": "_account", "type": "address" },
193
+ { "internalType": "address[]", "name": "_tokens", "type": "address[]" }
194
+ ],
195
+ "name": "getTokenBalancesWithSupplies",
196
+ "outputs": [
197
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
198
+ ],
199
+ "stateMutability": "view",
200
+ "type": "function"
201
+ },
202
+ {
203
+ "inputs": [
204
+ {
205
+ "internalType": "contract IERC20",
206
+ "name": "_token",
207
+ "type": "address"
208
+ },
209
+ {
210
+ "internalType": "address[]",
211
+ "name": "_excludedAccounts",
212
+ "type": "address[]"
213
+ }
214
+ ],
215
+ "name": "getTokenSupply",
216
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
217
+ "stateMutability": "view",
218
+ "type": "function"
219
+ },
220
+ {
221
+ "inputs": [
222
+ {
223
+ "internalType": "contract IERC20",
224
+ "name": "_token",
225
+ "type": "address"
226
+ },
227
+ { "internalType": "address[]", "name": "_accounts", "type": "address[]" }
228
+ ],
229
+ "name": "getTotalBalance",
230
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
231
+ "stateMutability": "view",
232
+ "type": "function"
233
+ },
234
+ {
235
+ "inputs": [
236
+ {
237
+ "internalType": "address[]",
238
+ "name": "_yieldTokens",
239
+ "type": "address[]"
240
+ }
241
+ ],
242
+ "name": "getTotalStaked",
243
+ "outputs": [
244
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
245
+ ],
246
+ "stateMutability": "view",
247
+ "type": "function"
248
+ },
249
+ {
250
+ "inputs": [
251
+ { "internalType": "address", "name": "_vault", "type": "address" },
252
+ { "internalType": "address", "name": "_weth", "type": "address" },
253
+ { "internalType": "uint256", "name": "_usdqAmount", "type": "uint256" },
254
+ { "internalType": "address[]", "name": "_tokens", "type": "address[]" }
255
+ ],
256
+ "name": "getVaultTokenInfo",
257
+ "outputs": [
258
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
259
+ ],
260
+ "stateMutability": "view",
261
+ "type": "function"
262
+ },
263
+ {
264
+ "inputs": [
265
+ { "internalType": "address", "name": "_vault", "type": "address" },
266
+ { "internalType": "address", "name": "_weth", "type": "address" },
267
+ { "internalType": "uint256", "name": "_usdqAmount", "type": "uint256" },
268
+ { "internalType": "address[]", "name": "_tokens", "type": "address[]" }
269
+ ],
270
+ "name": "getVaultTokenInfoV2",
271
+ "outputs": [
272
+ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }
273
+ ],
274
+ "stateMutability": "view",
275
+ "type": "function"
276
+ },
277
+ {
278
+ "inputs": [],
279
+ "name": "gov",
280
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
281
+ "stateMutability": "view",
282
+ "type": "function"
283
+ },
284
+ {
285
+ "inputs": [],
286
+ "name": "hasMaxGlobalShortSizes",
287
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
288
+ "stateMutability": "view",
289
+ "type": "function"
290
+ },
291
+ {
292
+ "inputs": [
293
+ {
294
+ "internalType": "bool",
295
+ "name": "_hasMaxGlobalShortSizes",
296
+ "type": "bool"
297
+ }
298
+ ],
299
+ "name": "setConfig",
300
+ "outputs": [],
301
+ "stateMutability": "nonpayable",
302
+ "type": "function"
303
+ },
304
+ {
305
+ "inputs": [
306
+ { "internalType": "address", "name": "_gov", "type": "address" }
307
+ ],
308
+ "name": "setGov",
309
+ "outputs": [],
310
+ "stateMutability": "nonpayable",
311
+ "type": "function"
312
+ }
313
+ ]