@paraswap/dex-lib 3.8.22 → 3.8.23-remove-logs-oswap

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 (375) hide show
  1. package/.vscode/launch.json +16 -0
  2. package/.vscode/settings.json +3 -0
  3. package/build/abi/AaveV1_lending_pool.json +27 -0
  4. package/build/abi/Uncompressor.json +250 -0
  5. package/build/abi/infusion/InfusionFactory.json +147 -0
  6. package/build/abi/infusion/InfusionPair.json +658 -0
  7. package/build/abi/infusion/InfusionRouter.json +442 -0
  8. package/build/abi/integral/factory.json +333 -0
  9. package/build/abi/integral/oracle.json +501 -0
  10. package/build/abi/integral/pool.json +1041 -0
  11. package/build/abi/integral/relayer.json +1536 -0
  12. package/build/abi/oswap/oswap.abi.json +452 -0
  13. package/build/abi/platypus/asset.json +490 -0
  14. package/build/abi/platypus/avax-pool.json +820 -0
  15. package/build/abi/platypus/oracle.json +119 -0
  16. package/build/abi/platypus/pool.json +677 -0
  17. package/build/abi/smardex/all/smardex-router.json +648 -0
  18. package/build/abi/smardex/layer-1/smardex-factory.json +242 -0
  19. package/build/abi/smardex/layer-1/smardex-pool.json +506 -0
  20. package/build/abi/smardex/layer-2/smardex-factory.json +185 -0
  21. package/build/abi/smardex/layer-2/smardex-pool.json +578 -0
  22. package/build/abi/swaap-v1/pool.json +1346 -0
  23. package/build/dex/aave-v1/aave-v1.d.ts +33 -0
  24. package/build/dex/aave-v1/aave-v1.js +158 -0
  25. package/build/dex/aave-v1/aave-v1.js.map +1 -0
  26. package/build/dex/aave-v1/config.d.ts +11 -0
  27. package/build/dex/aave-v1/config.js +20 -0
  28. package/build/dex/aave-v1/config.js.map +1 -0
  29. package/build/dex/aave-v1/tokens-mainnet.json +134 -0
  30. package/build/dex/aave-v1/tokens.d.ts +3 -0
  31. package/build/dex/aave-v1/tokens.js +50 -0
  32. package/build/dex/aave-v1/tokens.js.map +1 -0
  33. package/build/dex/aave-v1/types.d.ts +12 -0
  34. package/build/dex/aave-v1/types.js +3 -0
  35. package/build/dex/aave-v1/types.js.map +1 -0
  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/etherfi/etherfi.d.ts +26 -0
  52. package/build/dex/etherfi/etherfi.js +96 -0
  53. package/build/dex/etherfi/etherfi.js.map +1 -0
  54. package/build/dex/generic-rfq/rate-fetcher.js +1 -1
  55. package/build/dex/generic-rfq/rate-fetcher.js.map +1 -1
  56. package/build/dex/index.js +4 -0
  57. package/build/dex/index.js.map +1 -1
  58. package/build/dex/infusion/config.d.ts +3 -0
  59. package/build/dex/infusion/config.js +20 -0
  60. package/build/dex/infusion/config.js.map +1 -0
  61. package/build/dex/infusion/infusion-stable-pool.d.ts +4 -0
  62. package/build/dex/infusion/infusion-stable-pool.js +74 -0
  63. package/build/dex/infusion/infusion-stable-pool.js.map +1 -0
  64. package/build/dex/infusion/infusion.d.ts +51 -0
  65. package/build/dex/infusion/infusion.js +457 -0
  66. package/build/dex/infusion/infusion.js.map +1 -0
  67. package/build/dex/infusion/types.d.ts +45 -0
  68. package/build/dex/infusion/types.js +3 -0
  69. package/build/dex/infusion/types.js.map +1 -0
  70. package/build/dex/infusion/utils/isStablePair.d.ts +2 -0
  71. package/build/dex/infusion/utils/isStablePair.js +18 -0
  72. package/build/dex/infusion/utils/isStablePair.js.map +1 -0
  73. package/build/dex/integral/config.d.ts +4 -0
  74. package/build/dex/integral/config.js +20 -0
  75. package/build/dex/integral/config.js.map +1 -0
  76. package/build/dex/integral/context.d.ts +40 -0
  77. package/build/dex/integral/context.js +158 -0
  78. package/build/dex/integral/context.js.map +1 -0
  79. package/build/dex/integral/helpers.d.ts +17 -0
  80. package/build/dex/integral/helpers.js +157 -0
  81. package/build/dex/integral/helpers.js.map +1 -0
  82. package/build/dex/integral/integral-factory.d.ts +24 -0
  83. package/build/dex/integral/integral-factory.js +95 -0
  84. package/build/dex/integral/integral-factory.js.map +1 -0
  85. package/build/dex/integral/integral-pool.d.ts +50 -0
  86. package/build/dex/integral/integral-pool.js +149 -0
  87. package/build/dex/integral/integral-pool.js.map +1 -0
  88. package/build/dex/integral/integral-pricing.d.ts +18 -0
  89. package/build/dex/integral/integral-pricing.js +114 -0
  90. package/build/dex/integral/integral-pricing.js.map +1 -0
  91. package/build/dex/integral/integral-relayer.d.ts +42 -0
  92. package/build/dex/integral/integral-relayer.js +192 -0
  93. package/build/dex/integral/integral-relayer.js.map +1 -0
  94. package/build/dex/integral/integral-token.d.ts +27 -0
  95. package/build/dex/integral/integral-token.js +59 -0
  96. package/build/dex/integral/integral-token.js.map +1 -0
  97. package/build/dex/integral/integral.d.ts +41 -0
  98. package/build/dex/integral/integral.js +376 -0
  99. package/build/dex/integral/integral.js.map +1 -0
  100. package/build/dex/integral/types.d.ts +85 -0
  101. package/build/dex/integral/types.js +9 -0
  102. package/build/dex/integral/types.js.map +1 -0
  103. package/build/dex/integral/utils-e2e.d.ts +9 -0
  104. package/build/dex/integral/utils-e2e.js +131 -0
  105. package/build/dex/integral/utils-e2e.js.map +1 -0
  106. package/build/dex/integral/utils.d.ts +17 -0
  107. package/build/dex/integral/utils.js +94 -0
  108. package/build/dex/integral/utils.js.map +1 -0
  109. package/build/dex/lido.d.ts +19 -0
  110. package/build/dex/lido.js +42 -0
  111. package/build/dex/lido.js.map +1 -0
  112. package/build/dex/lite-psm/lite-psm.js +2 -5
  113. package/build/dex/lite-psm/lite-psm.js.map +1 -1
  114. package/build/dex/maker-psm/maker-psm.js +2 -6
  115. package/build/dex/maker-psm/maker-psm.js.map +1 -1
  116. package/build/dex/maverick-v2/config.js +4 -0
  117. package/build/dex/maverick-v2/config.js.map +1 -1
  118. package/build/dex/maverick-v2/maverick-math/maverick-pool-math.js +4 -0
  119. package/build/dex/maverick-v2/maverick-math/maverick-pool-math.js.map +1 -1
  120. package/build/dex/maverick-v2/maverick-v2-pool.d.ts +1 -1
  121. package/build/dex/maverick-v2/maverick-v2-pool.js +8 -8
  122. package/build/dex/maverick-v2/maverick-v2-pool.js.map +1 -1
  123. package/build/dex/maverick-v2/maverick-v2.d.ts +5 -4
  124. package/build/dex/maverick-v2/maverick-v2.js +73 -63
  125. package/build/dex/maverick-v2/maverick-v2.js.map +1 -1
  126. package/build/dex/maverick-v2/types.d.ts +4 -0
  127. package/build/dex/onebit.d.ts +25 -0
  128. package/build/dex/onebit.js +42 -0
  129. package/build/dex/onebit.js.map +1 -0
  130. package/build/dex/oswap/config.d.ts +5 -0
  131. package/build/dex/oswap/config.js +31 -0
  132. package/build/dex/oswap/config.js.map +1 -0
  133. package/build/dex/oswap/oswap-pool.d.ts +51 -0
  134. package/build/dex/oswap/oswap-pool.js +150 -0
  135. package/build/dex/oswap/oswap-pool.js.map +1 -0
  136. package/build/dex/oswap/oswap.d.ts +46 -0
  137. package/build/dex/oswap/oswap.js +273 -0
  138. package/build/dex/oswap/oswap.js.map +1 -0
  139. package/build/dex/oswap/types.d.ts +20 -0
  140. package/build/dex/oswap/types.js +3 -0
  141. package/build/dex/oswap/types.js.map +1 -0
  142. package/build/dex/platypus/asset.d.ts +14 -0
  143. package/build/dex/platypus/asset.js +97 -0
  144. package/build/dex/platypus/asset.js.map +1 -0
  145. package/build/dex/platypus/config.d.ts +11 -0
  146. package/build/dex/platypus/config.js +69 -0
  147. package/build/dex/platypus/config.js.map +1 -0
  148. package/build/dex/platypus/platypus.d.ts +62 -0
  149. package/build/dex/platypus/platypus.js +442 -0
  150. package/build/dex/platypus/platypus.js.map +1 -0
  151. package/build/dex/platypus/pool-avax.d.ts +8 -0
  152. package/build/dex/platypus/pool-avax.js +54 -0
  153. package/build/dex/platypus/pool-avax.js.map +1 -0
  154. package/build/dex/platypus/pool-base.d.ts +19 -0
  155. package/build/dex/platypus/pool-base.js +86 -0
  156. package/build/dex/platypus/pool-base.js.map +1 -0
  157. package/build/dex/platypus/pool-pure.d.ts +8 -0
  158. package/build/dex/platypus/pool-pure.js +37 -0
  159. package/build/dex/platypus/pool-pure.js.map +1 -0
  160. package/build/dex/platypus/pool-subscriber.d.ts +14 -0
  161. package/build/dex/platypus/pool-subscriber.js +167 -0
  162. package/build/dex/platypus/pool-subscriber.js.map +1 -0
  163. package/build/dex/platypus/pool.d.ts +8 -0
  164. package/build/dex/platypus/pool.js +58 -0
  165. package/build/dex/platypus/pool.js.map +1 -0
  166. package/build/dex/platypus/types.d.ts +92 -0
  167. package/build/dex/platypus/types.js +10 -0
  168. package/build/dex/platypus/types.js.map +1 -0
  169. package/build/dex/quickswap/spiritswap-v3.d.ts +6 -0
  170. package/build/dex/quickswap/spiritswap-v3.js +19 -0
  171. package/build/dex/quickswap/spiritswap-v3.js.map +1 -0
  172. package/build/dex/sdai/config.d.ts +11 -0
  173. package/build/dex/sdai/config.js +21 -0
  174. package/build/dex/sdai/config.js.map +1 -0
  175. package/build/dex/sdai/constants.d.ts +2 -0
  176. package/build/dex/sdai/constants.js +6 -0
  177. package/build/dex/sdai/constants.js.map +1 -0
  178. package/build/dex/sdai/scripts/validate-state.d.ts +1 -0
  179. package/build/dex/sdai/scripts/validate-state.js +102 -0
  180. package/build/dex/sdai/scripts/validate-state.js.map +1 -0
  181. package/build/dex/sdai/sdai-pool.d.ts +16 -0
  182. package/build/dex/sdai/sdai-pool.js +85 -0
  183. package/build/dex/sdai/sdai-pool.js.map +1 -0
  184. package/build/dex/sdai/sdai.d.ts +51 -0
  185. package/build/dex/sdai/sdai.js +172 -0
  186. package/build/dex/sdai/sdai.js.map +1 -0
  187. package/build/dex/sdai/types.d.ts +21 -0
  188. package/build/dex/sdai/types.js +11 -0
  189. package/build/dex/sdai/types.js.map +1 -0
  190. package/build/dex/sdai/utils.d.ts +4 -0
  191. package/build/dex/sdai/utils.js +39 -0
  192. package/build/dex/sdai/utils.js.map +1 -0
  193. package/build/dex/smardex/config.d.ts +4 -0
  194. package/build/dex/smardex/config.js +64 -0
  195. package/build/dex/smardex/config.js.map +1 -0
  196. package/build/dex/smardex/constants.d.ts +18 -0
  197. package/build/dex/smardex/constants.js +33 -0
  198. package/build/dex/smardex/constants.js.map +1 -0
  199. package/build/dex/smardex/sdk/constants.d.ts +6 -0
  200. package/build/dex/smardex/sdk/constants.js +13 -0
  201. package/build/dex/smardex/sdk/constants.js.map +1 -0
  202. package/build/dex/smardex/sdk/core.d.ts +113 -0
  203. package/build/dex/smardex/sdk/core.js +499 -0
  204. package/build/dex/smardex/sdk/core.js.map +1 -0
  205. package/build/dex/smardex/sdk/errors.d.ts +15 -0
  206. package/build/dex/smardex/sdk/errors.js +22 -0
  207. package/build/dex/smardex/sdk/errors.js.map +1 -0
  208. package/build/dex/smardex/sdk/types.d.ts +62 -0
  209. package/build/dex/smardex/sdk/types.js +3 -0
  210. package/build/dex/smardex/sdk/types.js.map +1 -0
  211. package/build/dex/smardex/sdk/utils.d.ts +44 -0
  212. package/build/dex/smardex/sdk/utils.js +133 -0
  213. package/build/dex/smardex/sdk/utils.js.map +1 -0
  214. package/build/dex/smardex/smardex-event-pool.d.ts +28 -0
  215. package/build/dex/smardex/smardex-event-pool.js +119 -0
  216. package/build/dex/smardex/smardex-event-pool.js.map +1 -0
  217. package/build/dex/smardex/smardex.d.ts +65 -0
  218. package/build/dex/smardex/smardex.js +519 -0
  219. package/build/dex/smardex/smardex.js.map +1 -0
  220. package/build/dex/smardex/types.d.ts +55 -0
  221. package/build/dex/smardex/types.js +3 -0
  222. package/build/dex/smardex/types.js.map +1 -0
  223. package/build/dex/smoothy.d.ts +26 -0
  224. package/build/dex/smoothy.js +48 -0
  225. package/build/dex/smoothy.js.map +1 -0
  226. package/build/dex/solidly/forks-override/cone.d.ts +22 -0
  227. package/build/dex/solidly/forks-override/cone.js +53 -0
  228. package/build/dex/solidly/forks-override/cone.js.map +1 -0
  229. package/build/dex/solidly/forks-override/solisnek.d.ts +8 -0
  230. package/build/dex/solidly/forks-override/solisnek.js +15 -0
  231. package/build/dex/solidly/forks-override/solisnek.js.map +1 -0
  232. package/build/dex/stable-pool.d.ts +28 -0
  233. package/build/dex/stable-pool.js +62 -0
  234. package/build/dex/stable-pool.js.map +1 -0
  235. package/build/dex/swaap-v1/config.d.ts +17 -0
  236. package/build/dex/swaap-v1/config.js +56 -0
  237. package/build/dex/swaap-v1/config.js.map +1 -0
  238. package/build/dex/swaap-v1/constants.d.ts +6 -0
  239. package/build/dex/swaap-v1/constants.js +17 -0
  240. package/build/dex/swaap-v1/constants.js.map +1 -0
  241. package/build/dex/swaap-v1/libraries/ChainlinkUtils.d.ts +25 -0
  242. package/build/dex/swaap-v1/libraries/ChainlinkUtils.js +62 -0
  243. package/build/dex/swaap-v1/libraries/ChainlinkUtils.js.map +1 -0
  244. package/build/dex/swaap-v1/libraries/Const.d.ts +18 -0
  245. package/build/dex/swaap-v1/libraries/Const.js +26 -0
  246. package/build/dex/swaap-v1/libraries/Const.js.map +1 -0
  247. package/build/dex/swaap-v1/libraries/GeometricBrownianMotion.d.ts +77 -0
  248. package/build/dex/swaap-v1/libraries/GeometricBrownianMotion.js +316 -0
  249. package/build/dex/swaap-v1/libraries/GeometricBrownianMotion.js.map +1 -0
  250. package/build/dex/swaap-v1/libraries/LogExpMath.d.ts +75 -0
  251. package/build/dex/swaap-v1/libraries/LogExpMath.js +418 -0
  252. package/build/dex/swaap-v1/libraries/LogExpMath.js.map +1 -0
  253. package/build/dex/swaap-v1/libraries/MathMMM.d.ts +185 -0
  254. package/build/dex/swaap-v1/libraries/MathMMM.js +453 -0
  255. package/build/dex/swaap-v1/libraries/MathMMM.js.map +1 -0
  256. package/build/dex/swaap-v1/libraries/Num.d.ts +31 -0
  257. package/build/dex/swaap-v1/libraries/Num.js +167 -0
  258. package/build/dex/swaap-v1/libraries/Num.js.map +1 -0
  259. package/build/dex/swaap-v1/libraries/PoolQuotations.d.ts +23 -0
  260. package/build/dex/swaap-v1/libraries/PoolQuotations.js +131 -0
  261. package/build/dex/swaap-v1/libraries/PoolQuotations.js.map +1 -0
  262. package/build/dex/swaap-v1/libraries/Struct.d.ts +56 -0
  263. package/build/dex/swaap-v1/libraries/Struct.js +3 -0
  264. package/build/dex/swaap-v1/libraries/Struct.js.map +1 -0
  265. package/build/dex/swaap-v1/swaap-v1-pool.d.ts +45 -0
  266. package/build/dex/swaap-v1/swaap-v1-pool.js +656 -0
  267. package/build/dex/swaap-v1/swaap-v1-pool.js.map +1 -0
  268. package/build/dex/swaap-v1/swaap-v1.d.ts +61 -0
  269. package/build/dex/swaap-v1/swaap-v1.js +369 -0
  270. package/build/dex/swaap-v1/swaap-v1.js.map +1 -0
  271. package/build/dex/swaap-v1/types.d.ts +106 -0
  272. package/build/dex/swaap-v1/types.js +9 -0
  273. package/build/dex/swaap-v1/types.js.map +1 -0
  274. package/build/dex/trader-joe-v2.1/optimizer.js +1 -4
  275. package/build/dex/trader-joe-v2.1/optimizer.js.map +1 -1
  276. package/build/dex/trader-joe-v2.1.d.ts +43 -0
  277. package/build/dex/trader-joe-v2.1.js +79 -0
  278. package/build/dex/trader-joe-v2.1.js.map +1 -0
  279. package/build/executor/compressor/Compressor.d.ts +23 -0
  280. package/build/executor/compressor/Compressor.js +144 -0
  281. package/build/executor/compressor/Compressor.js.map +1 -0
  282. package/build/executor/compressor/compress.d.ts +17 -0
  283. package/build/executor/compressor/compress.js +187 -0
  284. package/build/executor/compressor/compress.js.map +1 -0
  285. package/build/executor/compressor/compress_functions/addressSubstitution.d.ts +6 -0
  286. package/build/executor/compressor/compress_functions/addressSubstitution.js +29 -0
  287. package/build/executor/compressor/compress_functions/addressSubstitution.js.map +1 -0
  288. package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.d.ts +10 -0
  289. package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.js +40 -0
  290. package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.js.map +1 -0
  291. package/build/executor/compressor/compress_functions/byteSubstitution.d.ts +11 -0
  292. package/build/executor/compressor/compress_functions/byteSubstitution.js +64 -0
  293. package/build/executor/compressor/compress_functions/byteSubstitution.js.map +1 -0
  294. package/build/executor/compressor/compress_functions/ffSubstitution.d.ts +7 -0
  295. package/build/executor/compressor/compress_functions/ffSubstitution.js +54 -0
  296. package/build/executor/compressor/compress_functions/ffSubstitution.js.map +1 -0
  297. package/build/executor/compressor/compress_functions/findLongestAndSubstitute.d.ts +8 -0
  298. package/build/executor/compressor/compress_functions/findLongestAndSubstitute.js +67 -0
  299. package/build/executor/compressor/compress_functions/findLongestAndSubstitute.js.map +1 -0
  300. package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.d.ts +8 -0
  301. package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.js +61 -0
  302. package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.js.map +1 -0
  303. package/build/executor/compressor/compress_functions/reverseAddressSubstitution.d.ts +6 -0
  304. package/build/executor/compressor/compress_functions/reverseAddressSubstitution.js +37 -0
  305. package/build/executor/compressor/compress_functions/reverseAddressSubstitution.js.map +1 -0
  306. package/build/executor/compressor/compress_functions/searchUnusedBytes.d.ts +9 -0
  307. package/build/executor/compressor/compress_functions/searchUnusedBytes.js +33 -0
  308. package/build/executor/compressor/compress_functions/searchUnusedBytes.js.map +1 -0
  309. package/build/executor/compressor/fetchSaved.d.ts +0 -0
  310. package/build/executor/compressor/fetchSaved.js +17 -0
  311. package/build/executor/compressor/fetchSaved.js.map +1 -0
  312. package/build/executor/compressor/utils/computeCostL2.d.ts +2 -0
  313. package/build/executor/compressor/utils/computeCostL2.js +14 -0
  314. package/build/executor/compressor/utils/computeCostL2.js.map +1 -0
  315. package/build/executor/compressor/utils/findLongestDuplicatedString.d.ts +2 -0
  316. package/build/executor/compressor/utils/findLongestDuplicatedString.js +30 -0
  317. package/build/executor/compressor/utils/findLongestDuplicatedString.js.map +1 -0
  318. package/build/executor/compressor/utils/getAllIndexes.d.ts +2 -0
  319. package/build/executor/compressor/utils/getAllIndexes.js +12 -0
  320. package/build/executor/compressor/utils/getAllIndexes.js.map +1 -0
  321. package/build/executor/compressor/utils/getByteForAddress.d.ts +2 -0
  322. package/build/executor/compressor/utils/getByteForAddress.js +14 -0
  323. package/build/executor/compressor/utils/getByteForAddress.js.map +1 -0
  324. package/build/executor/compressor/utils/intTo2Bytes.d.ts +2 -0
  325. package/build/executor/compressor/utils/intTo2Bytes.js +14 -0
  326. package/build/executor/compressor/utils/intTo2Bytes.js.map +1 -0
  327. package/build/executor/compressor/utils/intTo3Bytes.d.ts +2 -0
  328. package/build/executor/compressor/utils/intTo3Bytes.js +18 -0
  329. package/build/executor/compressor/utils/intTo3Bytes.js.map +1 -0
  330. package/build/executor/compressor/utils/intToByte.d.ts +2 -0
  331. package/build/executor/compressor/utils/intToByte.js +10 -0
  332. package/build/executor/compressor/utils/intToByte.js.map +1 -0
  333. package/package.json +1 -1
  334. package/src/abi/infusion/InfusionFactory.json +147 -0
  335. package/src/abi/infusion/InfusionPair.json +658 -0
  336. package/src/abi/infusion/InfusionRouter.json +442 -0
  337. package/src/abi/maverick-v2/MaverickV2Router.json +778 -0
  338. package/src/abi/oswap/oswap.abi.json +452 -0
  339. package/src/dex/generic-rfq/rate-fetcher.ts +6 -5
  340. package/src/dex/index.ts +4 -0
  341. package/src/dex/infusion/config.ts +21 -0
  342. package/src/dex/infusion/infusion-e2e.test.ts +110 -0
  343. package/src/dex/infusion/infusion-integration.test.ts +232 -0
  344. package/src/dex/infusion/infusion-stable-pool.ts +91 -0
  345. package/src/dex/infusion/infusion.ts +652 -0
  346. package/src/dex/infusion/types.ts +60 -0
  347. package/src/dex/infusion/utils/isStablePair.ts +18 -0
  348. package/src/dex/lite-psm/lite-psm.ts +2 -5
  349. package/src/dex/maker-psm/maker-psm.ts +2 -6
  350. package/src/dex/maverick-v2/config.ts +4 -0
  351. package/src/dex/maverick-v2/maverick-math/maverick-pool-math.ts +5 -0
  352. package/src/dex/maverick-v2/maverick-v2-e2e.test.ts +21 -43
  353. package/src/dex/maverick-v2/maverick-v2-integration.test.ts +100 -96
  354. package/src/dex/maverick-v2/maverick-v2-pool.ts +8 -8
  355. package/src/dex/maverick-v2/maverick-v2.ts +111 -81
  356. package/src/dex/maverick-v2/types.ts +4 -0
  357. package/src/dex/oswap/config.ts +32 -0
  358. package/src/dex/oswap/oswap-e2e.test.ts +91 -0
  359. package/src/dex/oswap/oswap-events.test.ts +88 -0
  360. package/src/dex/oswap/oswap-integration.test.ts +291 -0
  361. package/src/dex/oswap/oswap-pool.ts +190 -0
  362. package/src/dex/oswap/oswap.ts +392 -0
  363. package/src/dex/oswap/types.ts +29 -0
  364. package/tests/constants-e2e.ts +10 -1
  365. package/.idea/aws.xml +0 -17
  366. package/.idea/codeStyles/Project.xml +0 -19
  367. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  368. package/.idea/misc.xml +0 -6
  369. package/.idea/modules.xml +0 -8
  370. package/.idea/paraswap-dex-lib.iml +0 -9
  371. package/.idea/prettier.xml +0 -7
  372. package/.idea/vcs.xml +0 -6
  373. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +0 -7
  374. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +0 -20
  375. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +0 -1
@@ -0,0 +1,392 @@
1
+ import { Interface } from '@ethersproject/abi';
2
+ import { AsyncOrSync } from 'ts-essentials';
3
+ import {
4
+ Token,
5
+ Address,
6
+ ExchangePrices,
7
+ PoolPrices,
8
+ AdapterExchangeParam,
9
+ PoolLiquidity,
10
+ Logger,
11
+ NumberAsString,
12
+ DexExchangeParam,
13
+ } from '../../types';
14
+ import { SwapSide, Network } from '../../constants';
15
+ import * as CALLDATA_GAS_COST from '../../calldata-gas-cost';
16
+ import { getDexKeysWithNetwork, getBigIntPow } from '../../utils';
17
+ import { Context, IDex } from '../../dex/idex';
18
+ import { IDexHelper } from '../../dex-helper/idex-helper';
19
+ import { OSwapData, OSwapPool, OSwapPoolState } from './types';
20
+ import {
21
+ SimpleExchange,
22
+ getLocalDeadlineAsFriendlyPlaceholder,
23
+ } from '../simple-exchange';
24
+ import { OSwapConfig, Adapters, OSWAP_GAS_COST } from './config';
25
+ import { OSwapEventPool } from './oswap-pool';
26
+ import OSwapABI from '../../abi/oswap/oswap.abi.json';
27
+ import { extractReturnAmountPosition } from '../../executor/utils';
28
+
29
+ export class OSwap extends SimpleExchange implements IDex<OSwapData> {
30
+ readonly eventPools: { [id: string]: OSwapEventPool } = {};
31
+
32
+ readonly hasConstantPriceLargeAmounts = false;
33
+
34
+ // This may change in the future, but currently OSwap does not support native ETH.
35
+ readonly needWrapNative = true;
36
+
37
+ readonly isFeeOnTransferSupported = false;
38
+
39
+ public static dexKeysWithNetwork: { key: string; networks: Network[] }[] =
40
+ getDexKeysWithNetwork(OSwapConfig);
41
+
42
+ logger: Logger;
43
+
44
+ readonly iOSwap: Interface;
45
+
46
+ readonly pools: [OSwapPool];
47
+
48
+ constructor(
49
+ readonly network: Network,
50
+ readonly dexKey: string,
51
+ readonly dexHelper: IDexHelper,
52
+ protected adapters = Adapters[network] || {},
53
+ ) {
54
+ super(dexHelper, dexKey);
55
+ this.logger = dexHelper.getLogger(dexKey);
56
+ this.iOSwap = new Interface(OSwapABI);
57
+
58
+ this.pools = OSwapConfig[dexKey][network].pools;
59
+
60
+ // Create an OSwapEventPool per pool, to track each pool's state by subscribing to on-chain events.
61
+ for (const pool of this.pools) {
62
+ this.eventPools[pool.id] = new OSwapEventPool(
63
+ dexKey,
64
+ pool,
65
+ network,
66
+ dexHelper,
67
+ this.logger,
68
+ );
69
+ }
70
+ }
71
+
72
+ // Returns the list of contract adapters (name and index)
73
+ // for a buy/sell. Return null if there are no adapters.
74
+ getAdapters(side: SwapSide): { name: string; index: number }[] | null {
75
+ return null;
76
+ }
77
+
78
+ // Returns the pool matching the specified token pair or null if none found.
79
+ // Note: OSwap V1 does not support more than 1 pool per pair.
80
+ getPoolByTokenPair(srcToken: Token, destToken: Token): OSwapPool | null {
81
+ const srcAddress = srcToken.address.toLowerCase();
82
+ const destAddress = destToken.address.toLowerCase();
83
+
84
+ // A pair must have 2 different tokens.
85
+ if (srcAddress === destAddress) return null;
86
+
87
+ for (const pool of this.pools) {
88
+ if (
89
+ (srcAddress === pool.token0 && destAddress === pool.token1) ||
90
+ (srcAddress === pool.token1 && destAddress === pool.token0)
91
+ ) {
92
+ return pool;
93
+ }
94
+ }
95
+ return null;
96
+ }
97
+
98
+ getPoolById(id: string): OSwapPool | null {
99
+ for (const pool of this.pools) {
100
+ if (pool.id === id) return pool;
101
+ }
102
+ return null;
103
+ }
104
+
105
+ // Returns a list of pool using the token.
106
+ getPoolsByTokenAddress(tokenAddress: Address): OSwapPool[] {
107
+ const address = tokenAddress.toLowerCase();
108
+ let pools: OSwapPool[] = [];
109
+ for (const pool of this.pools) {
110
+ if (address === pool.token0 || address === pool.token1) {
111
+ pools.push(pool);
112
+ }
113
+ }
114
+ return pools;
115
+ }
116
+
117
+ // Returns the list of pool identifiers that can be used
118
+ // for a given swap. poolIdentifiers must be unique
119
+ // across DEXes. It is recommended to use
120
+ // ${dexKey}_${poolAddress} as a poolIdentifier
121
+ async getPoolIdentifiers(
122
+ srcToken: Token,
123
+ destToken: Token,
124
+ side: SwapSide,
125
+ blockNumber: number,
126
+ ): Promise<string[]> {
127
+ const pool = this.getPoolByTokenPair(srcToken, destToken);
128
+ return pool ? [pool.id] : [];
129
+ }
130
+
131
+ // Sell: Given "amount" of "from" token, how much of "to" token will be received by the trader.
132
+ // Buy: Given "amount" of "dest" token, how much of "to" token is required from the trader.
133
+ // Note: OSwap traderate is at precision 36.
134
+ calcPrice(
135
+ pool: OSwapPool,
136
+ state: OSwapPoolState,
137
+ from: Token,
138
+ amount: bigint,
139
+ side: SwapSide,
140
+ checkLiquidity = true,
141
+ ): bigint {
142
+ const rate =
143
+ from.address.toLowerCase() === pool.token0
144
+ ? BigInt(state.traderate0)
145
+ : BigInt(state.traderate1);
146
+
147
+ const price =
148
+ side === SwapSide.SELL
149
+ ? (amount * rate) / getBigIntPow(36)
150
+ : (amount * getBigIntPow(36)) / rate;
151
+
152
+ if (
153
+ checkLiquidity &&
154
+ !this.hasEnoughLiquidity(pool, state, from, amount, price, side)
155
+ ) {
156
+ throw new Error('Not enough liquidity');
157
+ }
158
+
159
+ return price;
160
+ }
161
+
162
+ // Returns true if the pool has enough liquidity for the swap. False otherwise.
163
+ hasEnoughLiquidity(
164
+ pool: OSwapPool,
165
+ state: OSwapPoolState,
166
+ from: Token,
167
+ amount: bigint,
168
+ needed: bigint,
169
+ side: SwapSide,
170
+ ): boolean {
171
+ if (side === SwapSide.SELL) {
172
+ return from.address.toLowerCase() === pool.token0
173
+ ? needed <= BigInt(state.balance1)
174
+ : needed <= BigInt(state.balance0);
175
+ }
176
+ // SwapSide.BUY
177
+ return from.address.toLowerCase() === pool.token0
178
+ ? amount <= BigInt(state.balance1)
179
+ : amount <= BigInt(state.balance0);
180
+ }
181
+
182
+ // Returns pool prices for amounts.
183
+ // If limitPools is defined only pools in limitPools
184
+ // should be used. If limitPools is undefined then
185
+ // any pool can be used.
186
+ async getPricesVolume(
187
+ srcToken: Token,
188
+ destToken: Token,
189
+ amounts: bigint[],
190
+ side: SwapSide,
191
+ blockNumber: number,
192
+ limitPools?: string[],
193
+ ): Promise<null | ExchangePrices<OSwapData>> {
194
+ try {
195
+ // Get the pool to use.
196
+ const pool = this.getPoolByTokenPair(srcToken, destToken);
197
+ if (!pool) return null;
198
+
199
+ // Make sure the pool meets the optional limitPools filter.
200
+ if (limitPools && !limitPools.includes(pool.id)) return null;
201
+
202
+ const eventPool = this.eventPools[pool.id];
203
+
204
+ if (!eventPool) {
205
+ this.logger.error(`OSwap pool ${pool.id}: No EventPool found.`);
206
+
207
+ return null;
208
+ }
209
+
210
+ const state = await eventPool.getStateOrGenerate(blockNumber);
211
+
212
+ // Calculate the prices
213
+ const unitAmount = getBigIntPow(18);
214
+ const unitPrice = this.calcPrice(
215
+ pool,
216
+ state,
217
+ srcToken,
218
+ unitAmount,
219
+ side,
220
+ false,
221
+ );
222
+ const prices = amounts.map(amount =>
223
+ this.calcPrice(pool, state, srcToken, amount, side),
224
+ );
225
+
226
+ return [
227
+ {
228
+ prices,
229
+ unit: unitPrice,
230
+ data: {
231
+ pool: pool.address,
232
+ path: [srcToken.address, destToken.address],
233
+ },
234
+ exchange: this.dexKey,
235
+ poolIdentifier: pool.id,
236
+ gasCost: OSWAP_GAS_COST,
237
+ poolAddresses: [pool.address],
238
+ },
239
+ ];
240
+ } catch (e) {
241
+ this.logger.error(
242
+ `Error_getPricesVolume ${srcToken.address || srcToken.symbol}, ${
243
+ destToken.address || destToken.symbol
244
+ }, ${side}:`,
245
+ e,
246
+ );
247
+
248
+ return null;
249
+ }
250
+ }
251
+
252
+ // Returns estimated gas cost of calldata for this DEX in multiSwap
253
+ getCalldataGasCost(poolPrices: PoolPrices<OSwapData>): number | number[] {
254
+ return (
255
+ CALLDATA_GAS_COST.DEX_OVERHEAD +
256
+ // ParentStruct header
257
+ CALLDATA_GAS_COST.OFFSET_SMALL +
258
+ // ParentStruct -> path[] header
259
+ CALLDATA_GAS_COST.OFFSET_SMALL +
260
+ // ParentStruct -> path length
261
+ CALLDATA_GAS_COST.LENGTH_SMALL +
262
+ // ParentStruct -> path[0]
263
+ CALLDATA_GAS_COST.ADDRESS +
264
+ // ParentStruct -> path[1]
265
+ CALLDATA_GAS_COST.ADDRESS +
266
+ // ParentStruct -> receiver header
267
+ CALLDATA_GAS_COST.OFFSET_SMALL +
268
+ // ParentStruct -> receiver
269
+ CALLDATA_GAS_COST.ADDRESS
270
+ );
271
+ }
272
+
273
+ // Encode params required by the exchange adapter
274
+ // Used for multiSwap, buy & megaSwap
275
+ getAdapterParam(
276
+ srcToken: string,
277
+ destToken: string,
278
+ srcAmount: string,
279
+ destAmount: string,
280
+ data: OSwapData,
281
+ side: SwapSide,
282
+ ): AdapterExchangeParam {
283
+ return {
284
+ targetExchange: data.pool,
285
+ payload: '',
286
+ networkFee: '0',
287
+ };
288
+ }
289
+
290
+ // Encode call data used by simpleSwap like routers
291
+ // Used for simpleSwap & simpleBuy
292
+ getDexParam(
293
+ srcToken: Address,
294
+ destToken: Address,
295
+ srcAmount: NumberAsString,
296
+ destAmount: NumberAsString,
297
+ recipient: Address,
298
+ data: OSwapData,
299
+ side: SwapSide,
300
+ _: Context,
301
+ executorAddress: Address,
302
+ ): DexExchangeParam {
303
+ let method: string;
304
+ let args: any;
305
+ let returnAmountPos: number | undefined = undefined;
306
+
307
+ const deadline = getLocalDeadlineAsFriendlyPlaceholder();
308
+ if (side === SwapSide.SELL) {
309
+ method = 'swapExactTokensForTokens';
310
+ returnAmountPos = extractReturnAmountPosition(
311
+ this.iOSwap,
312
+ method,
313
+ 'amounts',
314
+ 1,
315
+ );
316
+ args = [srcAmount, destAmount, data.path, recipient, deadline];
317
+ } else {
318
+ method = 'swapTokensForExactTokens';
319
+ args = [destAmount, srcAmount, data.path, recipient, deadline];
320
+ }
321
+
322
+ const swapData = this.iOSwap.encodeFunctionData(method, args);
323
+
324
+ return {
325
+ needWrapNative: this.needWrapNative,
326
+ dexFuncHasRecipient: true,
327
+ exchangeData: swapData,
328
+ targetExchange: data.pool,
329
+ returnAmountPos,
330
+ };
331
+ }
332
+
333
+ // This is called once before getTopPoolsForToken is
334
+ // called for multiple tokens. This can be helpful to
335
+ // update common state required for calculating
336
+ // getTopPoolsForToken. It is optional for a DEX
337
+ // to implement this
338
+ async updatePoolState(): Promise<void> {
339
+ return Promise.resolve();
340
+ }
341
+
342
+ // Returns a list of top pools based on liquidity. Max
343
+ // limit number pools should be returned.
344
+ async getTopPoolsForToken(
345
+ tokenAddress: Address,
346
+ limit: number,
347
+ ): Promise<PoolLiquidity[]> {
348
+ // Get the list of pools using the token.
349
+ const pools = this.getPoolsByTokenAddress(tokenAddress);
350
+ if (!pools.length) return [];
351
+
352
+ const results = await Promise.all<PoolLiquidity>(
353
+ pools.map(async pool => {
354
+ // Get the pool's balance and its USD value.
355
+ const eventPool = this.eventPools[pool.id];
356
+ const blockNumber =
357
+ await this.dexHelper.web3Provider.eth.getBlockNumber();
358
+ const state = await eventPool.getStateOrGenerate(blockNumber);
359
+
360
+ const usd0 = await this.dexHelper.getTokenUSDPrice(
361
+ { address: pool.token0, decimals: 18 },
362
+ BigInt(state.balance0),
363
+ );
364
+ const usd1 = await this.dexHelper.getTokenUSDPrice(
365
+ { address: pool.token1, decimals: 18 },
366
+ BigInt(state.balance1),
367
+ );
368
+
369
+ // Get the other token in the pair.
370
+ const pairedToken =
371
+ pool.token0 === tokenAddress.toLowerCase()
372
+ ? { address: pool.token1, decimals: 18 }
373
+ : { address: pool.token0, decimals: 18 };
374
+
375
+ return {
376
+ exchange: this.dexKey,
377
+ address: pool.address,
378
+ connectorTokens: [pairedToken],
379
+ liquidityUSD: usd0 + usd1,
380
+ };
381
+ }),
382
+ );
383
+ return results
384
+ .filter(r => r)
385
+ .sort((a, b) => a.liquidityUSD - b.liquidityUSD)
386
+ .slice(0, limit);
387
+ }
388
+
389
+ // This is optional function in case if your implementation has acquired any resources
390
+ // you need to release for graceful shutdown. For example, it may be any interval timer
391
+ releaseResources(): AsyncOrSync<void> {}
392
+ }
@@ -0,0 +1,29 @@
1
+ import { Address } from '../../types';
2
+
3
+ // OSwapPoolState is the state of the event subscriber. It is the minimum
4
+ // set of parameters required to compute pool prices.
5
+ export type OSwapPoolState = {
6
+ traderate0: string;
7
+ traderate1: string;
8
+ balance0: string;
9
+ balance1: string;
10
+ };
11
+
12
+ // OSwapPoolState is the state of the event subscriber. It is the minimum
13
+ // set of parameters required to compute pool prices.
14
+ export type OSwapData = {
15
+ pool: Address;
16
+ path: Address[];
17
+ };
18
+
19
+ // Each pool has a contract address and token pairs.
20
+ export type OSwapPool = {
21
+ id: string;
22
+ address: Address;
23
+ token0: Address;
24
+ token1: Address;
25
+ };
26
+
27
+ export type DexParams = {
28
+ pools: [OSwapPool];
29
+ };
@@ -1248,6 +1248,10 @@ export const Tokens: {
1248
1248
  address: '0x6ab707aca953edaefbc4fd23ba73294241490620',
1249
1249
  decimals: 6,
1250
1250
  },
1251
+ GHO: {
1252
+ address: '0x7dff72693f6a4149b17e7c6314655f6a9f7c8b33',
1253
+ decimals: 18,
1254
+ },
1251
1255
  },
1252
1256
  [Network.OPTIMISM]: {
1253
1257
  DAI: {
@@ -1381,6 +1385,10 @@ export const Tokens: {
1381
1385
  },
1382
1386
  },
1383
1387
  [Network.BASE]: {
1388
+ wstETH: {
1389
+ address: `0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452`,
1390
+ decimals: 18,
1391
+ },
1384
1392
  PRIME: {
1385
1393
  address: '0xfA980cEd6895AC314E7dE34Ef1bFAE90a5AdD21b',
1386
1394
  decimals: 18,
@@ -1755,6 +1763,7 @@ export const Holders: {
1755
1763
  stataUSDT: '0xc5042f9d9a18e95547864438455c8f05b4987399',
1756
1764
  aaveUSDT: '0xAfa788fab589fe61C23DF76905558f4734444D67',
1757
1765
  crvUSD: '0x9755e99bdb99495d3d31d953785d993c6df8552e',
1766
+ GHO: '0xda39E48523770197EF3CbB70C1bf1cCCF9B4b1E7',
1758
1767
  },
1759
1768
  [Network.OPTIMISM]: {
1760
1769
  ETH: '0xF6D4E5a7c5215F91f59a95065190CCa24bf64554',
@@ -1798,7 +1807,7 @@ export const Holders: {
1798
1807
  PRIME: '0xe3879b7359695f802d6FD56Bb76fD82C362Dafd6',
1799
1808
  ETH: '0xd34ea7278e6bd48defe656bbe263aef11101469c',
1800
1809
  MAV: '0xf977814e90da44bfa03b6295a0616a897441acec',
1801
- USDC: '0xaac391f166f33cdaefaa4afa6616a3bea66b694d',
1810
+ USDC: '0x21bD501F86A0B5cE0907651Df3368DA905B300A9',
1802
1811
  USDbC: '0x4bb6b2efe7036020ba6f02a05602546c9f25bf28',
1803
1812
  DAI: '0x20f03e26968b179025f65c1f4afadfd3959c8d03',
1804
1813
  BAL: '0x854b004700885a61107b458f11ecc169a019b764',
package/.idea/aws.xml DELETED
@@ -1,17 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="accountSettings">
4
- <option name="activeProfile" value="profile:default" />
5
- <option name="activeRegion" value="us-east-1" />
6
- <option name="recentlyUsedProfiles">
7
- <list>
8
- <option value="profile:default" />
9
- </list>
10
- </option>
11
- <option name="recentlyUsedRegions">
12
- <list>
13
- <option value="us-east-1" />
14
- </list>
15
- </option>
16
- </component>
17
- </project>
@@ -1,19 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <ScalaCodeStyleSettings>
4
- <option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
5
- </ScalaCodeStyleSettings>
6
- <TypeScriptCodeStyleSettings version="0">
7
- <option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACKETS" value="true" />
8
- <option name="USE_DOUBLE_QUOTES" value="false" />
9
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
10
- </TypeScriptCodeStyleSettings>
11
- <codeStyleSettings language="TypeScript">
12
- <indentOptions>
13
- <option name="INDENT_SIZE" value="2" />
14
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
15
- <option name="TAB_SIZE" value="2" />
16
- </indentOptions>
17
- </codeStyleSettings>
18
- </code_scheme>
19
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
4
- </state>
5
- </component>
package/.idea/misc.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/paraswap-dex-lib.iml" filepath="$PROJECT_DIR$/.idea/paraswap-dex-lib.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="PrettierConfiguration">
4
- <option name="myRunOnSave" value="true" />
5
- <option name="myRunOnReformat" value="true" />
6
- </component>
7
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>
@@ -1,7 +0,0 @@
1
- import { IDexHelper } from '../../dex-helper';
2
- import { BaseTraderJoeV2 } from './base';
3
- export declare class TraderJoeV21 extends BaseTraderJoeV2 {
4
- static dexKeys: string[];
5
- needWrapNative: boolean;
6
- constructor(dexHelper: IDexHelper);
7
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TraderJoeV21 = void 0;
7
- const abi_1 = require("@ethersproject/abi");
8
- const TraderJoeV21Router_json_1 = __importDefault(require("../../abi/TraderJoeV21Router.json"));
9
- const config_1 = require("./config");
10
- const base_1 = require("./base");
11
- class TraderJoeV21 extends base_1.BaseTraderJoeV2 {
12
- constructor(dexHelper) {
13
- super(dexHelper, 'traderjoev2.1', config_1.TRADERJOE_V2_1_ROUTER_ADDRESS[dexHelper.config.data.network], '2');
14
- this.needWrapNative = true;
15
- this.exchangeRouterInterface = new abi_1.Interface(TraderJoeV21Router_json_1.default);
16
- }
17
- }
18
- exports.TraderJoeV21 = TraderJoeV21;
19
- TraderJoeV21.dexKeys = ['traderjoev2.1'];
20
- //# sourceMappingURL=trader-joe-v2.1-new.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trader-joe-v2.1-new.js","sourceRoot":"","sources":["../../../src/dex/trader-joe-v2.1/trader-joe-v2.1-new.ts"],"names":[],"mappings":";;;;;;AACA,4CAA6D;AAC7D,gGAAsE;AACtE,qCAAyD;AACzD,iCAAyC;AAEzC,MAAa,YAAa,SAAQ,sBAAe;IAI/C,YAAY,SAAqB;QAC/B,KAAK,CACH,SAAS,EACT,eAAe,EACf,sCAA6B,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAC5D,GAAG,CACJ,CAAC;QARJ,mBAAc,GAAG,IAAI,CAAC;QAUpB,IAAI,CAAC,uBAAuB,GAAG,IAAI,eAAS,CAC1C,iCAAuC,CACxC,CAAC;IACJ,CAAC;;AAfH,oCAgBC;AAfQ,oBAAO,GAAG,CAAC,eAAe,CAAC,CAAC"}