@paraswap/dex-lib 2.37.2 → 2.37.3

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 (135) hide show
  1. package/build/abi/pancakeswap-v3/PancakeswapV3Factory.abi.json +300 -0
  2. package/build/abi/uniswap-v3/UniswapV3Factory.abi.json +148 -0
  3. package/build/dex/algebra/algebra-factory.d.ts +25 -0
  4. package/build/dex/algebra/algebra-factory.js +43 -0
  5. package/build/dex/algebra/algebra-factory.js.map +1 -0
  6. package/build/dex/algebra/algebra.d.ts +3 -0
  7. package/build/dex/algebra/algebra.js +27 -5
  8. package/build/dex/algebra/algebra.js.map +1 -1
  9. package/build/dex/algebra/config.js +0 -1
  10. package/build/dex/algebra/config.js.map +1 -1
  11. package/build/dex/algebra/types.d.ts +1 -1
  12. package/build/dex/{woo-fi → hello}/config.d.ts +1 -1
  13. package/build/dex/{test-dex → hello}/config.js +3 -3
  14. package/build/dex/hello/config.js.map +1 -0
  15. package/build/dex/{test-dex/test-dex-pool.d.ts → hello/hello-pool.d.ts} +4 -4
  16. package/build/dex/{test-dex/test-dex-pool.js → hello/hello-pool.js} +9 -8
  17. package/build/dex/hello/hello-pool.js.map +1 -0
  18. package/build/dex/{test-dex/test-dex.d.ts → hello/hello.d.ts} +8 -8
  19. package/build/dex/{test-dex/test-dex.js → hello/hello.js} +7 -7
  20. package/build/dex/hello/hello.js.map +1 -0
  21. package/build/dex/{test-dex → hello}/types.d.ts +1 -1
  22. package/build/dex/{woo-fi → hello}/types.js.map +1 -1
  23. package/build/dex/{test-dex → my-test-dex}/config.d.ts +1 -1
  24. package/build/dex/my-test-dex/config.js +15 -0
  25. package/build/dex/my-test-dex/config.js.map +1 -0
  26. package/build/dex/my-test-dex/my-test-dex-pool.d.ts +39 -0
  27. package/build/dex/my-test-dex/my-test-dex-pool.js +64 -0
  28. package/build/dex/my-test-dex/my-test-dex-pool.js.map +1 -0
  29. package/build/dex/my-test-dex/my-test-dex.d.ts +37 -0
  30. package/build/dex/my-test-dex/my-test-dex.js +126 -0
  31. package/build/dex/my-test-dex/my-test-dex.js.map +1 -0
  32. package/build/dex/my-test-dex/types.d.ts +6 -0
  33. package/build/dex/{test-dex → my-test-dex}/types.js.map +1 -1
  34. package/build/dex/pancakeswap-v3/pancakeswap-v3-factory.d.ts +26 -0
  35. package/build/dex/pancakeswap-v3/pancakeswap-v3-factory.js +44 -0
  36. package/build/dex/pancakeswap-v3/pancakeswap-v3-factory.js.map +1 -0
  37. package/build/dex/pancakeswap-v3/pancakeswap-v3.d.ts +3 -0
  38. package/build/dex/pancakeswap-v3/pancakeswap-v3.js +26 -2
  39. package/build/dex/pancakeswap-v3/pancakeswap-v3.js.map +1 -1
  40. package/build/dex/uniswap-v3/types.d.ts +1 -0
  41. package/build/dex/uniswap-v3/types.js.map +1 -1
  42. package/build/dex/uniswap-v3/uniswap-v3-factory.d.ts +26 -0
  43. package/build/dex/uniswap-v3/uniswap-v3-factory.js +44 -0
  44. package/build/dex/uniswap-v3/uniswap-v3-factory.js.map +1 -0
  45. package/build/dex/uniswap-v3/uniswap-v3.d.ts +3 -0
  46. package/build/dex/uniswap-v3/uniswap-v3.js +26 -2
  47. package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
  48. package/build/dex-helper/dummy-dex-helper.js +3 -0
  49. package/build/dex-helper/dummy-dex-helper.js.map +1 -1
  50. package/build/dex-helper/icache.d.ts +1 -0
  51. package/package.json +1 -1
  52. package/src/abi/pancakeswap-v3/PancakeswapV3Factory.abi.json +300 -0
  53. package/src/dex/algebra/algebra-factory.ts +70 -0
  54. package/src/dex/algebra/algebra.ts +47 -6
  55. package/src/dex/algebra/config.ts +0 -1
  56. package/src/dex/algebra/types.ts +2 -1
  57. package/src/dex/pancakeswap-v3/pancakeswap-v3-factory.ts +73 -0
  58. package/src/dex/pancakeswap-v3/pancakeswap-v3.ts +50 -2
  59. package/src/dex/uniswap-v3/types.ts +2 -0
  60. package/src/dex/uniswap-v3/uniswap-v3-factory.ts +73 -0
  61. package/src/dex/uniswap-v3/uniswap-v3.ts +47 -2
  62. package/src/dex-helper/dummy-dex-helper.ts +4 -0
  63. package/src/dex-helper/icache.ts +2 -0
  64. package/build/abi/quickPerps/fast-price-events.json +0 -70
  65. package/build/abi/quickPerps/fast-price-feed.json +0 -748
  66. package/build/abi/quickPerps/reader.json +0 -313
  67. package/build/abi/quickPerps/vault-price-feed.json +0 -477
  68. package/build/abi/quickPerps/vault.json +0 -1953
  69. package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +0 -193
  70. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +0 -285
  71. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +0 -583
  72. package/build/abi/woo-fi/WooFeeManager.abi.json +0 -318
  73. package/build/abi/woo-fi/WooPP.abi.json +0 -548
  74. package/build/abi/woo-fi/Wooracle.abi.json +0 -260
  75. package/build/dex/aave-v3/tokens/arbitrum.json +0 -50
  76. package/build/dex/aave-v3/tokens/avalanche.json +0 -74
  77. package/build/dex/aave-v3/tokens/fantom.json +0 -62
  78. package/build/dex/aave-v3/tokens/optimism.json +0 -50
  79. package/build/dex/aave-v3/tokens/polygon.json +0 -116
  80. package/build/dex/balancer-v2/LinearMath.d.ts +0 -19
  81. package/build/dex/balancer-v2/LinearMath.js +0 -179
  82. package/build/dex/balancer-v2/LinearMath.js.map +0 -1
  83. package/build/dex/balancer-v2/LinearPool.d.ts +0 -47
  84. package/build/dex/balancer-v2/LinearPool.js +0 -324
  85. package/build/dex/balancer-v2/LinearPool.js.map +0 -1
  86. package/build/dex/balancer-v2/PhantomStablePool.d.ts +0 -47
  87. package/build/dex/balancer-v2/PhantomStablePool.js +0 -294
  88. package/build/dex/balancer-v2/PhantomStablePool.js.map +0 -1
  89. package/build/dex/balancer-v2/StableMath.d.ts +0 -9
  90. package/build/dex/balancer-v2/StableMath.js +0 -272
  91. package/build/dex/balancer-v2/StableMath.js.map +0 -1
  92. package/build/dex/balancer-v2/balancer-v2-pool.d.ts +0 -75
  93. package/build/dex/balancer-v2/balancer-v2-pool.js +0 -417
  94. package/build/dex/balancer-v2/balancer-v2-pool.js.map +0 -1
  95. package/build/dex/maverick-v1/scripts/event-sequence.d.ts +0 -1
  96. package/build/dex/maverick-v1/scripts/event-sequence.js +0 -110
  97. package/build/dex/maverick-v1/scripts/event-sequence.js.map +0 -1
  98. package/build/dex/quickswap/camelot-v3.d.ts +0 -6
  99. package/build/dex/quickswap/camelot-v3.js +0 -19
  100. package/build/dex/quickswap/camelot-v3.js.map +0 -1
  101. package/build/dex/quickswap/zyberswap-v3.d.ts +0 -6
  102. package/build/dex/quickswap/zyberswap-v3.js +0 -19
  103. package/build/dex/quickswap/zyberswap-v3.js.map +0 -1
  104. package/build/dex/quickswap-v3.d.ts +0 -21
  105. package/build/dex/quickswap-v3.js +0 -40
  106. package/build/dex/quickswap-v3.js.map +0 -1
  107. package/build/dex/test-dex/config.js.map +0 -1
  108. package/build/dex/test-dex/test-dex-pool.js.map +0 -1
  109. package/build/dex/test-dex/test-dex.js.map +0 -1
  110. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.d.ts +0 -12
  111. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js +0 -23
  112. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js.map +0 -1
  113. package/build/dex/woo-fi/config.js +0 -141
  114. package/build/dex/woo-fi/config.js.map +0 -1
  115. package/build/dex/woo-fi/constants.d.ts +0 -5
  116. package/build/dex/woo-fi/constants.js +0 -20
  117. package/build/dex/woo-fi/constants.js.map +0 -1
  118. package/build/dex/woo-fi/types.d.ts +0 -48
  119. package/build/dex/woo-fi/woo-fi-decimal-math.d.ts +0 -14
  120. package/build/dex/woo-fi/woo-fi-decimal-math.js +0 -42
  121. package/build/dex/woo-fi/woo-fi-decimal-math.js.map +0 -1
  122. package/build/dex/woo-fi/woo-fi-math.d.ts +0 -31
  123. package/build/dex/woo-fi/woo-fi-math.js +0 -300
  124. package/build/dex/woo-fi/woo-fi-math.js.map +0 -1
  125. package/build/dex/woo-fi/woo-fi.d.ts +0 -65
  126. package/build/dex/woo-fi/woo-fi.js +0 -480
  127. package/build/dex/woo-fi/woo-fi.js.map +0 -1
  128. package/build/dex/woo-fi-v2/woo-fi-math.d.ts +0 -16
  129. package/build/dex/woo-fi-v2/woo-fi-math.js +0 -137
  130. package/build/dex/woo-fi-v2/woo-fi-math.js.map +0 -1
  131. package/build/workers.d.ts +0 -0
  132. package/build/workers.js +0 -2
  133. package/build/workers.js.map +0 -1
  134. /package/build/dex/{test-dex → hello}/types.js +0 -0
  135. /package/build/dex/{woo-fi → my-test-dex}/types.js +0 -0
@@ -1,313 +0,0 @@
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
- ]