@paraswap/dex-lib 2.28.11-ramses-v2 → 2.28.11

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 (140) hide show
  1. package/build/config.d.ts +0 -1
  2. package/build/config.js +9 -1
  3. package/build/config.js.map +1 -1
  4. package/build/dex/algebra/algebra.d.ts +1 -1
  5. package/build/dex/algebra/algebra.js +2 -0
  6. package/build/dex/algebra/algebra.js.map +1 -1
  7. package/build/dex/algebra/config.js +0 -1
  8. package/build/dex/algebra/config.js.map +1 -1
  9. package/build/dex/algebra/lib/TickTable.js +51 -40
  10. package/build/dex/algebra/lib/TickTable.js.map +1 -1
  11. package/build/dex/{ramses-v2 → test-dex}/config.d.ts +1 -1
  12. package/build/dex/test-dex/config.js +15 -0
  13. package/build/dex/test-dex/config.js.map +1 -0
  14. package/build/dex/test-dex/test-dex-pool.d.ts +39 -0
  15. package/build/dex/test-dex/test-dex-pool.js +63 -0
  16. package/build/dex/test-dex/test-dex-pool.js.map +1 -0
  17. package/build/dex/test-dex/test-dex.d.ts +37 -0
  18. package/build/dex/test-dex/test-dex.js +126 -0
  19. package/build/dex/test-dex/test-dex.js.map +1 -0
  20. package/build/dex/test-dex/types.d.ts +6 -0
  21. package/build/dex/{pancakeswap-v3 → test-dex}/types.js.map +1 -1
  22. package/build/dex/uniswap-v3/config.js +0 -22
  23. package/build/dex/uniswap-v3/config.js.map +1 -1
  24. package/build/dex/uniswap-v3/types.d.ts +1 -6
  25. package/build/dex/uniswap-v3/types.js.map +1 -1
  26. package/build/dex/uniswap-v3/uniswap-v3-pool.d.ts +2 -3
  27. package/build/dex/uniswap-v3/uniswap-v3-pool.js +2 -5
  28. package/build/dex/uniswap-v3/uniswap-v3-pool.js.map +1 -1
  29. package/build/dex/uniswap-v3/uniswap-v3.js +3 -7
  30. package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
  31. package/build/dex/woo-fi-v2/woo-fi-math.d.ts +16 -0
  32. package/build/dex/woo-fi-v2/woo-fi-math.js +137 -0
  33. package/build/dex/woo-fi-v2/woo-fi-math.js.map +1 -0
  34. package/build/types.d.ts +1 -0
  35. package/package.json +1 -1
  36. package/src/config.ts +11 -1
  37. package/src/dex/algebra/algebra-integration.test.ts +194 -16
  38. package/src/dex/algebra/algebra.ts +5 -1
  39. package/src/dex/algebra/config.ts +0 -1
  40. package/src/dex/algebra/lib/TickTable.ts +75 -74
  41. package/src/dex/uniswap-v3/config.ts +0 -22
  42. package/src/dex/uniswap-v3/types.ts +1 -7
  43. package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +354 -445
  44. package/src/dex/uniswap-v3/uniswap-v3-integration.test.ts +13 -171
  45. package/src/dex/uniswap-v3/uniswap-v3-pool.ts +4 -9
  46. package/src/dex/uniswap-v3/uniswap-v3.ts +2 -7
  47. package/src/types.ts +1 -0
  48. package/tests/constants-e2e.ts +5 -1
  49. package/.idea/aws.xml +0 -17
  50. package/.idea/codeStyles/Project.xml +0 -19
  51. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  52. package/.idea/misc.xml +0 -6
  53. package/.idea/modules.xml +0 -8
  54. package/.idea/paraswap-dex-lib.iml +0 -9
  55. package/.idea/vcs.xml +0 -6
  56. package/build/abi/RamsesV2StateMulticall.abi.json +0 -891
  57. package/build/abi/algebra/AlgebraPool.abi.json +0 -727
  58. package/build/abi/curve-v1/StableSwapFRXETH.json +0 -889
  59. package/build/abi/curve-v1/StableSwapWBETH.json +0 -1223
  60. package/build/abi/wBETH.json +0 -1527
  61. package/build/dex/algebra/algebra-pool.d.ts +0 -46
  62. package/build/dex/algebra/algebra-pool.js +0 -336
  63. package/build/dex/algebra/algebra-pool.js.map +0 -1
  64. package/build/dex/curve-v1/pools/frxETHpool.d.ts +0 -7
  65. package/build/dex/curve-v1/pools/frxETHpool.js +0 -27
  66. package/build/dex/curve-v1/pools/frxETHpool.js.map +0 -1
  67. package/build/dex/curve-v1/pools/wbETHpool.d.ts +0 -29
  68. package/build/dex/curve-v1/pools/wbETHpool.js +0 -408
  69. package/build/dex/curve-v1/pools/wbETHpool.js.map +0 -1
  70. package/build/dex/pancakeswap-v3/types.d.ts +0 -14
  71. package/build/dex/ramses-v2/config.js +0 -28
  72. package/build/dex/ramses-v2/config.js.map +0 -1
  73. package/build/dex/ramses-v2/constants.d.ts +0 -28
  74. package/build/dex/ramses-v2/constants.js +0 -35
  75. package/build/dex/ramses-v2/constants.js.map +0 -1
  76. package/build/dex/ramses-v2/contract-math/BitMath.d.ts +0 -4
  77. package/build/dex/ramses-v2/contract-math/BitMath.js +0 -93
  78. package/build/dex/ramses-v2/contract-math/BitMath.js.map +0 -1
  79. package/build/dex/ramses-v2/contract-math/FixedPoint128.d.ts +0 -3
  80. package/build/dex/ramses-v2/contract-math/FixedPoint128.js +0 -8
  81. package/build/dex/ramses-v2/contract-math/FixedPoint128.js.map +0 -1
  82. package/build/dex/ramses-v2/contract-math/FixedPoint96.d.ts +0 -4
  83. package/build/dex/ramses-v2/contract-math/FixedPoint96.js +0 -9
  84. package/build/dex/ramses-v2/contract-math/FixedPoint96.js.map +0 -1
  85. package/build/dex/ramses-v2/contract-math/FullMath.d.ts +0 -4
  86. package/build/dex/ramses-v2/contract-math/FullMath.js +0 -19
  87. package/build/dex/ramses-v2/contract-math/FullMath.js.map +0 -1
  88. package/build/dex/ramses-v2/contract-math/LiquidityMath.d.ts +0 -3
  89. package/build/dex/ramses-v2/contract-math/LiquidityMath.js +0 -22
  90. package/build/dex/ramses-v2/contract-math/LiquidityMath.js.map +0 -1
  91. package/build/dex/ramses-v2/contract-math/Oracle.d.ts +0 -10
  92. package/build/dex/ramses-v2/contract-math/Oracle.js +0 -133
  93. package/build/dex/ramses-v2/contract-math/Oracle.js.map +0 -1
  94. package/build/dex/ramses-v2/contract-math/SqrtPriceMath.d.ts +0 -10
  95. package/build/dex/ramses-v2/contract-math/SqrtPriceMath.js +0 -91
  96. package/build/dex/ramses-v2/contract-math/SqrtPriceMath.js.map +0 -1
  97. package/build/dex/ramses-v2/contract-math/SwapMath.d.ts +0 -8
  98. package/build/dex/ramses-v2/contract-math/SwapMath.js +0 -70
  99. package/build/dex/ramses-v2/contract-math/SwapMath.js.map +0 -1
  100. package/build/dex/ramses-v2/contract-math/Tick.d.ts +0 -7
  101. package/build/dex/ramses-v2/contract-math/Tick.js +0 -45
  102. package/build/dex/ramses-v2/contract-math/Tick.js.map +0 -1
  103. package/build/dex/ramses-v2/contract-math/TickBitMap.d.ts +0 -8
  104. package/build/dex/ramses-v2/contract-math/TickBitMap.js +0 -87
  105. package/build/dex/ramses-v2/contract-math/TickBitMap.js.map +0 -1
  106. package/build/dex/ramses-v2/contract-math/TickMath.d.ts +0 -8
  107. package/build/dex/ramses-v2/contract-math/TickMath.js +0 -162
  108. package/build/dex/ramses-v2/contract-math/TickMath.js.map +0 -1
  109. package/build/dex/ramses-v2/contract-math/UnsafeMath.d.ts +0 -3
  110. package/build/dex/ramses-v2/contract-math/UnsafeMath.js +0 -10
  111. package/build/dex/ramses-v2/contract-math/UnsafeMath.js.map +0 -1
  112. package/build/dex/ramses-v2/contract-math/uniswap-v3-math.d.ts +0 -18
  113. package/build/dex/ramses-v2/contract-math/uniswap-v3-math.js +0 -392
  114. package/build/dex/ramses-v2/contract-math/uniswap-v3-math.js.map +0 -1
  115. package/build/dex/ramses-v2/contract-math/utils.d.ts +0 -3
  116. package/build/dex/ramses-v2/contract-math/utils.js +0 -16
  117. package/build/dex/ramses-v2/contract-math/utils.js.map +0 -1
  118. package/build/dex/ramses-v2/ramses-v2-pool.d.ts +0 -42
  119. package/build/dex/ramses-v2/ramses-v2-pool.js +0 -307
  120. package/build/dex/ramses-v2/ramses-v2-pool.js.map +0 -1
  121. package/build/dex/ramses-v2/ramses-v2.d.ts +0 -61
  122. package/build/dex/ramses-v2/ramses-v2.js +0 -690
  123. package/build/dex/ramses-v2/ramses-v2.js.map +0 -1
  124. package/build/dex/ramses-v2/types.d.ts +0 -154
  125. package/build/dex/ramses-v2/types.js +0 -9
  126. package/build/dex/ramses-v2/types.js.map +0 -1
  127. package/build/dex/ramses-v2/utils.d.ts +0 -6
  128. package/build/dex/ramses-v2/utils.js +0 -71
  129. package/build/dex/ramses-v2/utils.js.map +0 -1
  130. package/build/dex/solidly/forks-override/ramses.d.ts +0 -8
  131. package/build/dex/solidly/forks-override/ramses.js +0 -15
  132. package/build/dex/solidly/forks-override/ramses.js.map +0 -1
  133. package/build/dex/uniswap-v3/forks/ramses-v2/utils.d.ts +0 -4
  134. package/build/dex/uniswap-v3/forks/ramses-v2/utils.js +0 -63
  135. package/build/dex/uniswap-v3/forks/ramses-v2/utils.js.map +0 -1
  136. package/src/abi/RamsesV2Pool.abi.json +0 -1554
  137. package/src/abi/RamsesV2Quoter.abi.json +0 -274
  138. package/src/abi/RamsesV2StateMulticall.abi.json +0 -891
  139. package/src/dex/uniswap-v3/forks/ramses-v2/utils.ts +0 -72
  140. /package/build/dex/{pancakeswap-v3 → test-dex}/types.js +0 -0
@@ -1,274 +0,0 @@
1
- [
2
- {
3
- "inputs": [],
4
- "stateMutability": "nonpayable",
5
- "type": "constructor"
6
- },
7
- {
8
- "inputs": [],
9
- "name": "WETH9",
10
- "outputs": [
11
- {
12
- "internalType": "address",
13
- "name": "",
14
- "type": "address"
15
- }
16
- ],
17
- "stateMutability": "view",
18
- "type": "function"
19
- },
20
- {
21
- "inputs": [],
22
- "name": "factory",
23
- "outputs": [
24
- {
25
- "internalType": "address",
26
- "name": "",
27
- "type": "address"
28
- }
29
- ],
30
- "stateMutability": "view",
31
- "type": "function"
32
- },
33
- {
34
- "inputs": [
35
- {
36
- "internalType": "address",
37
- "name": "_factory",
38
- "type": "address"
39
- },
40
- {
41
- "internalType": "address",
42
- "name": "_WETH9",
43
- "type": "address"
44
- }
45
- ],
46
- "name": "initialize",
47
- "outputs": [],
48
- "stateMutability": "nonpayable",
49
- "type": "function"
50
- },
51
- {
52
- "inputs": [
53
- {
54
- "internalType": "bytes",
55
- "name": "path",
56
- "type": "bytes"
57
- },
58
- {
59
- "internalType": "uint256",
60
- "name": "amountIn",
61
- "type": "uint256"
62
- }
63
- ],
64
- "name": "quoteExactInput",
65
- "outputs": [
66
- {
67
- "internalType": "uint256",
68
- "name": "amountOut",
69
- "type": "uint256"
70
- },
71
- {
72
- "internalType": "uint160[]",
73
- "name": "sqrtPriceX96AfterList",
74
- "type": "uint160[]"
75
- },
76
- {
77
- "internalType": "uint32[]",
78
- "name": "initializedTicksCrossedList",
79
- "type": "uint32[]"
80
- },
81
- {
82
- "internalType": "uint256",
83
- "name": "gasEstimate",
84
- "type": "uint256"
85
- }
86
- ],
87
- "stateMutability": "nonpayable",
88
- "type": "function"
89
- },
90
- {
91
- "inputs": [
92
- {
93
- "components": [
94
- {
95
- "internalType": "address",
96
- "name": "tokenIn",
97
- "type": "address"
98
- },
99
- {
100
- "internalType": "address",
101
- "name": "tokenOut",
102
- "type": "address"
103
- },
104
- {
105
- "internalType": "uint256",
106
- "name": "amountIn",
107
- "type": "uint256"
108
- },
109
- {
110
- "internalType": "uint24",
111
- "name": "fee",
112
- "type": "uint24"
113
- },
114
- {
115
- "internalType": "uint160",
116
- "name": "sqrtPriceLimitX96",
117
- "type": "uint160"
118
- }
119
- ],
120
- "internalType": "struct IQuoterV2.QuoteExactInputSingleParams",
121
- "name": "params",
122
- "type": "tuple"
123
- }
124
- ],
125
- "name": "quoteExactInputSingle",
126
- "outputs": [
127
- {
128
- "internalType": "uint256",
129
- "name": "amountOut",
130
- "type": "uint256"
131
- },
132
- {
133
- "internalType": "uint160",
134
- "name": "sqrtPriceX96After",
135
- "type": "uint160"
136
- },
137
- {
138
- "internalType": "uint32",
139
- "name": "initializedTicksCrossed",
140
- "type": "uint32"
141
- },
142
- {
143
- "internalType": "uint256",
144
- "name": "gasEstimate",
145
- "type": "uint256"
146
- }
147
- ],
148
- "stateMutability": "nonpayable",
149
- "type": "function"
150
- },
151
- {
152
- "inputs": [
153
- {
154
- "internalType": "bytes",
155
- "name": "path",
156
- "type": "bytes"
157
- },
158
- {
159
- "internalType": "uint256",
160
- "name": "amountOut",
161
- "type": "uint256"
162
- }
163
- ],
164
- "name": "quoteExactOutput",
165
- "outputs": [
166
- {
167
- "internalType": "uint256",
168
- "name": "amountIn",
169
- "type": "uint256"
170
- },
171
- {
172
- "internalType": "uint160[]",
173
- "name": "sqrtPriceX96AfterList",
174
- "type": "uint160[]"
175
- },
176
- {
177
- "internalType": "uint32[]",
178
- "name": "initializedTicksCrossedList",
179
- "type": "uint32[]"
180
- },
181
- {
182
- "internalType": "uint256",
183
- "name": "gasEstimate",
184
- "type": "uint256"
185
- }
186
- ],
187
- "stateMutability": "nonpayable",
188
- "type": "function"
189
- },
190
- {
191
- "inputs": [
192
- {
193
- "components": [
194
- {
195
- "internalType": "address",
196
- "name": "tokenIn",
197
- "type": "address"
198
- },
199
- {
200
- "internalType": "address",
201
- "name": "tokenOut",
202
- "type": "address"
203
- },
204
- {
205
- "internalType": "uint256",
206
- "name": "amount",
207
- "type": "uint256"
208
- },
209
- {
210
- "internalType": "uint24",
211
- "name": "fee",
212
- "type": "uint24"
213
- },
214
- {
215
- "internalType": "uint160",
216
- "name": "sqrtPriceLimitX96",
217
- "type": "uint160"
218
- }
219
- ],
220
- "internalType": "struct IQuoterV2.QuoteExactOutputSingleParams",
221
- "name": "params",
222
- "type": "tuple"
223
- }
224
- ],
225
- "name": "quoteExactOutputSingle",
226
- "outputs": [
227
- {
228
- "internalType": "uint256",
229
- "name": "amountIn",
230
- "type": "uint256"
231
- },
232
- {
233
- "internalType": "uint160",
234
- "name": "sqrtPriceX96After",
235
- "type": "uint160"
236
- },
237
- {
238
- "internalType": "uint32",
239
- "name": "initializedTicksCrossed",
240
- "type": "uint32"
241
- },
242
- {
243
- "internalType": "uint256",
244
- "name": "gasEstimate",
245
- "type": "uint256"
246
- }
247
- ],
248
- "stateMutability": "nonpayable",
249
- "type": "function"
250
- },
251
- {
252
- "inputs": [
253
- {
254
- "internalType": "int256",
255
- "name": "amount0Delta",
256
- "type": "int256"
257
- },
258
- {
259
- "internalType": "int256",
260
- "name": "amount1Delta",
261
- "type": "int256"
262
- },
263
- {
264
- "internalType": "bytes",
265
- "name": "path",
266
- "type": "bytes"
267
- }
268
- ],
269
- "name": "ramsesV2SwapCallback",
270
- "outputs": [],
271
- "stateMutability": "view",
272
- "type": "function"
273
- }
274
- ]