@paraswap/dex-lib 3.8.7 → 3.8.8

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 (196) hide show
  1. package/.vscode/launch.json +53 -0
  2. package/.vscode/settings.json +2 -0
  3. package/.vscode/tasks.json +15 -0
  4. package/build/abi/AaveV1_lending_pool.json +27 -0
  5. package/build/abi/maverick-v2/MaverickV2Router.json +778 -0
  6. package/build/abi/platypus/asset.json +490 -0
  7. package/build/abi/platypus/avax-pool.json +820 -0
  8. package/build/abi/platypus/oracle.json +119 -0
  9. package/build/abi/platypus/pool.json +677 -0
  10. package/build/abi/smardex/all/smardex-router.json +648 -0
  11. package/build/abi/smardex/layer-1/smardex-factory.json +242 -0
  12. package/build/abi/smardex/layer-1/smardex-pool.json +506 -0
  13. package/build/abi/smardex/layer-2/smardex-factory.json +185 -0
  14. package/build/abi/smardex/layer-2/smardex-pool.json +578 -0
  15. package/build/abi/swaap-v1/pool.json +1346 -0
  16. package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +52 -0
  17. package/build/abi/wombat/pool.json +1289 -0
  18. package/build/dex/aave-v1/aave-v1.d.ts +34 -0
  19. package/build/dex/aave-v1/aave-v1.js +181 -0
  20. package/build/dex/aave-v1/aave-v1.js.map +1 -0
  21. package/build/dex/aave-v1/config.d.ts +11 -0
  22. package/build/dex/aave-v1/config.js +20 -0
  23. package/build/dex/aave-v1/config.js.map +1 -0
  24. package/build/dex/aave-v1/tokens-mainnet.json +134 -0
  25. package/build/dex/aave-v1/tokens.d.ts +3 -0
  26. package/build/dex/aave-v1/tokens.js +50 -0
  27. package/build/dex/aave-v1/tokens.js.map +1 -0
  28. package/build/dex/aave-v1/types.d.ts +12 -0
  29. package/build/dex/aave-v1/types.js +3 -0
  30. package/build/dex/aave-v1/types.js.map +1 -0
  31. package/build/dex/aave-v2/tokens-avalanche.json +44 -0
  32. package/build/dex/aave-v2/tokens-mainnet.json +188 -0
  33. package/build/dex/aave-v2/tokens-polygon.json +44 -0
  34. package/build/dex/aave-v3-stata/aave-v3-stata.js +1 -1
  35. package/build/dex/aave-v3-stata/aave-v3-stata.js.map +1 -1
  36. package/build/dex/bProtocol.d.ts +18 -0
  37. package/build/dex/bProtocol.js +39 -0
  38. package/build/dex/bProtocol.js.map +1 -0
  39. package/build/dex/bancor.d.ts +26 -0
  40. package/build/dex/bancor.js +58 -0
  41. package/build/dex/bancor.js.map +1 -0
  42. package/build/dex/compound.d.ts +18 -0
  43. package/build/dex/compound.js +46 -0
  44. package/build/dex/compound.js.map +1 -0
  45. package/build/dex/curve-v2.d.ts +58 -0
  46. package/build/dex/curve-v2.js +180 -0
  47. package/build/dex/curve-v2.js.map +1 -0
  48. package/build/dex/dodo-v1.d.ts +33 -0
  49. package/build/dex/dodo-v1.js +63 -0
  50. package/build/dex/dodo-v1.js.map +1 -0
  51. package/build/dex/lido.d.ts +19 -0
  52. package/build/dex/lido.js +42 -0
  53. package/build/dex/lido.js.map +1 -0
  54. package/build/dex/maker-psm/scripts/gem.abi.json +136 -0
  55. package/build/dex/maker-psm/scripts/validate-state.d.ts +0 -0
  56. package/build/dex/maker-psm/scripts/validate-state.js +185 -0
  57. package/build/dex/maker-psm/scripts/validate-state.js.map +1 -0
  58. package/build/dex/maker-psm/scripts/vat.abi.json +243 -0
  59. package/build/dex/onebit.d.ts +25 -0
  60. package/build/dex/onebit.js +42 -0
  61. package/build/dex/onebit.js.map +1 -0
  62. package/build/dex/platypus/asset.d.ts +14 -0
  63. package/build/dex/platypus/asset.js +97 -0
  64. package/build/dex/platypus/asset.js.map +1 -0
  65. package/build/dex/platypus/config.d.ts +11 -0
  66. package/build/dex/platypus/config.js +69 -0
  67. package/build/dex/platypus/config.js.map +1 -0
  68. package/build/dex/platypus/platypus.d.ts +63 -0
  69. package/build/dex/platypus/platypus.js +487 -0
  70. package/build/dex/platypus/platypus.js.map +1 -0
  71. package/build/dex/platypus/pool-avax.d.ts +8 -0
  72. package/build/dex/platypus/pool-avax.js +54 -0
  73. package/build/dex/platypus/pool-avax.js.map +1 -0
  74. package/build/dex/platypus/pool-base.d.ts +19 -0
  75. package/build/dex/platypus/pool-base.js +86 -0
  76. package/build/dex/platypus/pool-base.js.map +1 -0
  77. package/build/dex/platypus/pool-pure.d.ts +8 -0
  78. package/build/dex/platypus/pool-pure.js +37 -0
  79. package/build/dex/platypus/pool-pure.js.map +1 -0
  80. package/build/dex/platypus/pool-subscriber.d.ts +14 -0
  81. package/build/dex/platypus/pool-subscriber.js +167 -0
  82. package/build/dex/platypus/pool-subscriber.js.map +1 -0
  83. package/build/dex/platypus/pool.d.ts +8 -0
  84. package/build/dex/platypus/pool.js +58 -0
  85. package/build/dex/platypus/pool.js.map +1 -0
  86. package/build/dex/platypus/types.d.ts +92 -0
  87. package/build/dex/platypus/types.js +10 -0
  88. package/build/dex/platypus/types.js.map +1 -0
  89. package/build/dex/quickswap/spiritswap-v3.d.ts +6 -0
  90. package/build/dex/quickswap/spiritswap-v3.js +19 -0
  91. package/build/dex/quickswap/spiritswap-v3.js.map +1 -0
  92. package/build/dex/smardex/config.d.ts +4 -0
  93. package/build/dex/smardex/config.js +64 -0
  94. package/build/dex/smardex/config.js.map +1 -0
  95. package/build/dex/smardex/constants.d.ts +18 -0
  96. package/build/dex/smardex/constants.js +33 -0
  97. package/build/dex/smardex/constants.js.map +1 -0
  98. package/build/dex/smardex/sdk/constants.d.ts +6 -0
  99. package/build/dex/smardex/sdk/constants.js +13 -0
  100. package/build/dex/smardex/sdk/constants.js.map +1 -0
  101. package/build/dex/smardex/sdk/core.d.ts +113 -0
  102. package/build/dex/smardex/sdk/core.js +499 -0
  103. package/build/dex/smardex/sdk/core.js.map +1 -0
  104. package/build/dex/smardex/sdk/errors.d.ts +15 -0
  105. package/build/dex/smardex/sdk/errors.js +22 -0
  106. package/build/dex/smardex/sdk/errors.js.map +1 -0
  107. package/build/dex/smardex/sdk/types.d.ts +62 -0
  108. package/build/dex/smardex/sdk/types.js +3 -0
  109. package/build/dex/smardex/sdk/types.js.map +1 -0
  110. package/build/dex/smardex/sdk/utils.d.ts +44 -0
  111. package/build/dex/smardex/sdk/utils.js +133 -0
  112. package/build/dex/smardex/sdk/utils.js.map +1 -0
  113. package/build/dex/smardex/smardex-event-pool.d.ts +28 -0
  114. package/build/dex/smardex/smardex-event-pool.js +119 -0
  115. package/build/dex/smardex/smardex-event-pool.js.map +1 -0
  116. package/build/dex/smardex/smardex.d.ts +65 -0
  117. package/build/dex/smardex/smardex.js +519 -0
  118. package/build/dex/smardex/smardex.js.map +1 -0
  119. package/build/dex/smardex/types.d.ts +55 -0
  120. package/build/dex/smardex/types.js +3 -0
  121. package/build/dex/smardex/types.js.map +1 -0
  122. package/build/dex/smoothy.d.ts +26 -0
  123. package/build/dex/smoothy.js +48 -0
  124. package/build/dex/smoothy.js.map +1 -0
  125. package/build/dex/solidly/forks-override/cone.d.ts +22 -0
  126. package/build/dex/solidly/forks-override/cone.js +53 -0
  127. package/build/dex/solidly/forks-override/cone.js.map +1 -0
  128. package/build/dex/solidly/forks-override/solisnek.d.ts +8 -0
  129. package/build/dex/solidly/forks-override/solisnek.js +15 -0
  130. package/build/dex/solidly/forks-override/solisnek.js.map +1 -0
  131. package/build/dex/solidly-v3/scripts/check-event-pool-event.d.ts +1 -0
  132. package/build/dex/solidly-v3/scripts/check-event-pool-event.js +53 -0
  133. package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +1 -0
  134. package/build/dex/stable-pool.d.ts +28 -0
  135. package/build/dex/stable-pool.js +55 -0
  136. package/build/dex/stable-pool.js.map +1 -0
  137. package/build/dex/swaap-v1/config.d.ts +17 -0
  138. package/build/dex/swaap-v1/config.js +56 -0
  139. package/build/dex/swaap-v1/config.js.map +1 -0
  140. package/build/dex/swaap-v1/constants.d.ts +6 -0
  141. package/build/dex/swaap-v1/constants.js +17 -0
  142. package/build/dex/swaap-v1/constants.js.map +1 -0
  143. package/build/dex/swaap-v1/libraries/ChainlinkUtils.d.ts +25 -0
  144. package/build/dex/swaap-v1/libraries/ChainlinkUtils.js +62 -0
  145. package/build/dex/swaap-v1/libraries/ChainlinkUtils.js.map +1 -0
  146. package/build/dex/swaap-v1/libraries/Const.d.ts +18 -0
  147. package/build/dex/swaap-v1/libraries/Const.js +26 -0
  148. package/build/dex/swaap-v1/libraries/Const.js.map +1 -0
  149. package/build/dex/swaap-v1/libraries/GeometricBrownianMotion.d.ts +77 -0
  150. package/build/dex/swaap-v1/libraries/GeometricBrownianMotion.js +316 -0
  151. package/build/dex/swaap-v1/libraries/GeometricBrownianMotion.js.map +1 -0
  152. package/build/dex/swaap-v1/libraries/LogExpMath.d.ts +75 -0
  153. package/build/dex/swaap-v1/libraries/LogExpMath.js +418 -0
  154. package/build/dex/swaap-v1/libraries/LogExpMath.js.map +1 -0
  155. package/build/dex/swaap-v1/libraries/MathMMM.d.ts +185 -0
  156. package/build/dex/swaap-v1/libraries/MathMMM.js +453 -0
  157. package/build/dex/swaap-v1/libraries/MathMMM.js.map +1 -0
  158. package/build/dex/swaap-v1/libraries/Num.d.ts +31 -0
  159. package/build/dex/swaap-v1/libraries/Num.js +167 -0
  160. package/build/dex/swaap-v1/libraries/Num.js.map +1 -0
  161. package/build/dex/swaap-v1/libraries/PoolQuotations.d.ts +23 -0
  162. package/build/dex/swaap-v1/libraries/PoolQuotations.js +131 -0
  163. package/build/dex/swaap-v1/libraries/PoolQuotations.js.map +1 -0
  164. package/build/dex/swaap-v1/libraries/Struct.d.ts +56 -0
  165. package/build/dex/swaap-v1/libraries/Struct.js +3 -0
  166. package/build/dex/swaap-v1/libraries/Struct.js.map +1 -0
  167. package/build/dex/swaap-v1/swaap-v1-pool.d.ts +45 -0
  168. package/build/dex/swaap-v1/swaap-v1-pool.js +656 -0
  169. package/build/dex/swaap-v1/swaap-v1-pool.js.map +1 -0
  170. package/build/dex/swaap-v1/swaap-v1.d.ts +62 -0
  171. package/build/dex/swaap-v1/swaap-v1.js +383 -0
  172. package/build/dex/swaap-v1/swaap-v1.js.map +1 -0
  173. package/build/dex/swaap-v1/types.d.ts +106 -0
  174. package/build/dex/swaap-v1/types.js +9 -0
  175. package/build/dex/swaap-v1/types.js.map +1 -0
  176. package/build/dex/trader-joe-v2.1.d.ts +43 -0
  177. package/build/dex/trader-joe-v2.1.js +79 -0
  178. package/build/dex/trader-joe-v2.1.js.map +1 -0
  179. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +17 -0
  180. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +64 -0
  181. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +1 -0
  182. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +17 -0
  183. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +79 -0
  184. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +1 -0
  185. package/config.ts +1946 -0
  186. package/package.json +1 -1
  187. package/src/dex/aave-v3-stata/aave-v3-stata.ts +1 -1
  188. package/src/dex/dexs.txt +58 -0
  189. package/.idea/aws.xml +0 -17
  190. package/.idea/codeStyles/Project.xml +0 -19
  191. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  192. package/.idea/misc.xml +0 -6
  193. package/.idea/modules.xml +0 -8
  194. package/.idea/paraswap-dex-lib.iml +0 -9
  195. package/.idea/prettier.xml +0 -7
  196. package/.idea/vcs.xml +0 -6
@@ -0,0 +1,242 @@
1
+ [
2
+ { "inputs": [], "name": "EmptyPair", "type": "error" },
3
+ { "inputs": [], "name": "WhitelistNotClosed", "type": "error" },
4
+ { "inputs": [], "name": "WhitelistNotOpen", "type": "error" },
5
+ {
6
+ "anonymous": false,
7
+ "inputs": [
8
+ {
9
+ "indexed": true,
10
+ "internalType": "address",
11
+ "name": "previousFeeTo",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "indexed": true,
16
+ "internalType": "address",
17
+ "name": "newFeeTo",
18
+ "type": "address"
19
+ }
20
+ ],
21
+ "name": "FeeToUpdated",
22
+ "type": "event"
23
+ },
24
+ {
25
+ "anonymous": false,
26
+ "inputs": [
27
+ {
28
+ "indexed": true,
29
+ "internalType": "uint256",
30
+ "name": "feesLP",
31
+ "type": "uint256"
32
+ },
33
+ {
34
+ "indexed": true,
35
+ "internalType": "uint256",
36
+ "name": "feesPool",
37
+ "type": "uint256"
38
+ }
39
+ ],
40
+ "name": "FeesChanged",
41
+ "type": "event"
42
+ },
43
+ {
44
+ "anonymous": false,
45
+ "inputs": [
46
+ {
47
+ "indexed": true,
48
+ "internalType": "address",
49
+ "name": "previousOwner",
50
+ "type": "address"
51
+ },
52
+ {
53
+ "indexed": true,
54
+ "internalType": "address",
55
+ "name": "newOwner",
56
+ "type": "address"
57
+ }
58
+ ],
59
+ "name": "OwnershipTransferred",
60
+ "type": "event"
61
+ },
62
+ {
63
+ "anonymous": false,
64
+ "inputs": [
65
+ {
66
+ "indexed": true,
67
+ "internalType": "address",
68
+ "name": "token0",
69
+ "type": "address"
70
+ },
71
+ {
72
+ "indexed": true,
73
+ "internalType": "address",
74
+ "name": "token1",
75
+ "type": "address"
76
+ },
77
+ {
78
+ "indexed": false,
79
+ "internalType": "address",
80
+ "name": "pair",
81
+ "type": "address"
82
+ },
83
+ {
84
+ "indexed": false,
85
+ "internalType": "uint256",
86
+ "name": "totalPair",
87
+ "type": "uint256"
88
+ }
89
+ ],
90
+ "name": "PairAdded",
91
+ "type": "event"
92
+ },
93
+ {
94
+ "anonymous": false,
95
+ "inputs": [
96
+ {
97
+ "indexed": true,
98
+ "internalType": "address",
99
+ "name": "token0",
100
+ "type": "address"
101
+ },
102
+ {
103
+ "indexed": true,
104
+ "internalType": "address",
105
+ "name": "token1",
106
+ "type": "address"
107
+ },
108
+ {
109
+ "indexed": false,
110
+ "internalType": "address",
111
+ "name": "pair",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "indexed": false,
116
+ "internalType": "uint256",
117
+ "name": "totalPair",
118
+ "type": "uint256"
119
+ }
120
+ ],
121
+ "name": "PairCreated",
122
+ "type": "event"
123
+ },
124
+ {
125
+ "inputs": [
126
+ { "internalType": "address", "name": "_pair", "type": "address" }
127
+ ],
128
+ "name": "addPair",
129
+ "outputs": [],
130
+ "stateMutability": "nonpayable",
131
+ "type": "function"
132
+ },
133
+ {
134
+ "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
135
+ "name": "allPairs",
136
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
137
+ "stateMutability": "view",
138
+ "type": "function"
139
+ },
140
+ {
141
+ "inputs": [],
142
+ "name": "allPairsLength",
143
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
144
+ "stateMutability": "view",
145
+ "type": "function"
146
+ },
147
+ {
148
+ "inputs": [],
149
+ "name": "closeWhitelist",
150
+ "outputs": [],
151
+ "stateMutability": "nonpayable",
152
+ "type": "function"
153
+ },
154
+ {
155
+ "inputs": [
156
+ { "internalType": "address", "name": "_tokenA", "type": "address" },
157
+ { "internalType": "address", "name": "_tokenB", "type": "address" }
158
+ ],
159
+ "name": "createPair",
160
+ "outputs": [
161
+ { "internalType": "address", "name": "pair_", "type": "address" }
162
+ ],
163
+ "stateMutability": "nonpayable",
164
+ "type": "function"
165
+ },
166
+ {
167
+ "inputs": [],
168
+ "name": "feeTo",
169
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
170
+ "stateMutability": "view",
171
+ "type": "function"
172
+ },
173
+ {
174
+ "inputs": [],
175
+ "name": "getDefaultFees",
176
+ "outputs": [
177
+ { "internalType": "uint128", "name": "feesLP_", "type": "uint128" },
178
+ { "internalType": "uint128", "name": "feesPool_", "type": "uint128" }
179
+ ],
180
+ "stateMutability": "view",
181
+ "type": "function"
182
+ },
183
+ {
184
+ "inputs": [
185
+ { "internalType": "address", "name": "", "type": "address" },
186
+ { "internalType": "address", "name": "", "type": "address" }
187
+ ],
188
+ "name": "getPair",
189
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
190
+ "stateMutability": "view",
191
+ "type": "function"
192
+ },
193
+ {
194
+ "inputs": [],
195
+ "name": "owner",
196
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
197
+ "stateMutability": "view",
198
+ "type": "function"
199
+ },
200
+ {
201
+ "inputs": [],
202
+ "name": "renounceOwnership",
203
+ "outputs": [],
204
+ "stateMutability": "nonpayable",
205
+ "type": "function"
206
+ },
207
+ {
208
+ "inputs": [
209
+ { "internalType": "address", "name": "_feeTo", "type": "address" }
210
+ ],
211
+ "name": "setFeeTo",
212
+ "outputs": [],
213
+ "stateMutability": "nonpayable",
214
+ "type": "function"
215
+ },
216
+ {
217
+ "inputs": [
218
+ { "internalType": "uint128", "name": "_feesLP", "type": "uint128" },
219
+ { "internalType": "uint128", "name": "_feesPool", "type": "uint128" }
220
+ ],
221
+ "name": "setFees",
222
+ "outputs": [],
223
+ "stateMutability": "nonpayable",
224
+ "type": "function"
225
+ },
226
+ {
227
+ "inputs": [
228
+ { "internalType": "address", "name": "newOwner", "type": "address" }
229
+ ],
230
+ "name": "transferOwnership",
231
+ "outputs": [],
232
+ "stateMutability": "nonpayable",
233
+ "type": "function"
234
+ },
235
+ {
236
+ "inputs": [],
237
+ "name": "whitelistOpen",
238
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
239
+ "stateMutability": "view",
240
+ "type": "function"
241
+ }
242
+ ]