@paraswap/dex-lib 4.1.0 → 4.1.1

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 (256) hide show
  1. package/build/abi/Aave_GSM.json +751 -0
  2. package/build/abi/Balancer.json +257 -0
  3. package/build/abi/BalancerV2.json +1179 -0
  4. package/build/abi/{integral/relayer.json → RamsesV2Pool.abi.json} +850 -832
  5. package/build/abi/RamsesV2Quoter.abi.json +274 -0
  6. package/build/abi/USDM.json +807 -0
  7. package/build/abi/UniswapV2Router.json +397 -0
  8. package/build/abi/angle-transmuter/ChainlinkAccessControlledOffchainAggregator.json +1246 -0
  9. package/build/abi/{integral/oracle.json → angle-transmuter/ChainlinkEACAggregatorProxy.json} +247 -239
  10. package/build/abi/curve-v1/CurveBUSDv2.abi.json +1356 -0
  11. package/build/abi/curve-v1/CurveTokenV1.json +305 -0
  12. package/build/abi/curve-v1/CurveTokenV2.json +318 -0
  13. package/build/abi/curve-v1/CurveV1StableNg.json +1452 -0
  14. package/build/abi/curve-v1/CurveV2Swap.json +700 -0
  15. package/build/abi/curve-v1/FactoryCryptoRegistry.json +316 -0
  16. package/build/abi/curve-v1/FactoryRegistry.json +508 -0
  17. package/build/abi/curve-v1/StableSwapAave.json +1152 -0
  18. package/build/abi/curve-v1/StableSwapBUSD.json +814 -0
  19. package/build/abi/curve-v1/StableSwapCompound.json +814 -0
  20. package/build/abi/curve-v1/StableSwapIDLE.json +1253 -0
  21. package/build/abi/curve-v1/StableSwapPax.json +865 -0
  22. package/build/abi/curve-v1/StableSwapSnow.json +900 -0
  23. package/build/abi/{integral/pool.json → curve-v1/StableSwapUSDN.json} +450 -487
  24. package/build/abi/curve-v1/StableSwapUSDT.json +814 -0
  25. package/build/abi/curve-v1/StableSwapY.json +814 -0
  26. package/build/abi/inception/inception-ineth-pool.json +1062 -0
  27. package/build/abi/inception/inception-ineth.json +609 -0
  28. package/build/abi/inception/inception-ratio-feed.json +329 -0
  29. package/build/abi/inception/inception-vault.json +991 -0
  30. package/build/abi/kyberdmm/kyber-storage.abi.json +824 -0
  31. package/build/abi/kyberdmm.abi.json +1148 -0
  32. package/build/abi/maverick-v2/MaverickV2Quoter.json +278 -0
  33. package/build/abi/nerve/nerve-metapool.json +790 -0
  34. package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +193 -0
  35. package/build/abi/velodrome-slipstream/VelodromeSlipstreamQuoterV2.abi.json +267 -0
  36. package/build/dex/aave-v1/aave-v1.d.ts +2 -1
  37. package/build/dex/aave-v1/aave-v1.js +22 -0
  38. package/build/dex/aave-v1/aave-v1.js.map +1 -1
  39. package/build/dex/balancer-v1/balancer-pools.json +33333 -0
  40. package/build/dex/bebop/websocket-fetcher.d.ts +35 -0
  41. package/build/dex/bebop/websocket-fetcher.js +87 -0
  42. package/build/dex/bebop/websocket-fetcher.js.map +1 -0
  43. package/build/dex/cables/cables.d.ts +1 -1
  44. package/build/dex/cables/cables.js +26 -7
  45. package/build/dex/cables/cables.js.map +1 -1
  46. package/build/dex/idle-dao/idle-dao-pool.d.ts +56 -0
  47. package/build/dex/idle-dao/idle-dao-pool.js +176 -0
  48. package/build/dex/idle-dao/idle-dao-pool.js.map +1 -0
  49. package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +16 -0
  50. package/build/dex/idle-dao/idle-dao-pooling-pool.js +57 -0
  51. package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +1 -0
  52. package/build/dex/idle-dao/scripts.d.ts +9 -0
  53. package/build/dex/idle-dao/scripts.js +552 -0
  54. package/build/dex/idle-dao/scripts.js.map +1 -0
  55. package/build/dex/inception/config.d.ts +4 -0
  56. package/build/dex/inception/config.js +109 -0
  57. package/build/dex/inception/config.js.map +1 -0
  58. package/build/dex/inception/inception-event-pool.d.ts +16 -0
  59. package/build/dex/inception/inception-event-pool.js +51 -0
  60. package/build/dex/inception/inception-event-pool.js.map +1 -0
  61. package/build/dex/{integral/integral.d.ts → inception/inception-native.d.ts} +21 -19
  62. package/build/dex/inception/inception-native.js +131 -0
  63. package/build/dex/inception/inception-native.js.map +1 -0
  64. package/build/dex/inception/inception-pool.d.ts +18 -0
  65. package/build/dex/inception/inception-pool.js +32 -0
  66. package/build/dex/inception/inception-pool.js.map +1 -0
  67. package/build/dex/inception/inception-price-feed.d.ts +19 -0
  68. package/build/dex/inception/inception-price-feed.js +51 -0
  69. package/build/dex/inception/inception-price-feed.js.map +1 -0
  70. package/build/dex/inception/inception.d.ts +43 -0
  71. package/build/dex/inception/inception.js +204 -0
  72. package/build/dex/inception/inception.js.map +1 -0
  73. package/build/dex/inception/tokens.d.ts +9 -0
  74. package/build/dex/inception/tokens.js +28 -0
  75. package/build/dex/inception/tokens.js.map +1 -0
  76. package/build/dex/inception/types.d.ts +22 -0
  77. package/build/dex/inception/types.js +3 -0
  78. package/build/dex/inception/types.js.map +1 -0
  79. package/build/dex/inception/utils.d.ts +6 -0
  80. package/build/dex/inception/utils.js +37 -0
  81. package/build/dex/inception/utils.js.map +1 -0
  82. package/build/dex/jarvis.d.ts +2 -1
  83. package/build/dex/jarvis.js +58 -0
  84. package/build/dex/jarvis.js.map +1 -1
  85. package/build/dex/platypus/platypus.d.ts +2 -1
  86. package/build/dex/platypus/platypus.js +31 -0
  87. package/build/dex/platypus/platypus.js.map +1 -1
  88. package/build/dex/swaap-v1/swaap-v1.d.ts +2 -1
  89. package/build/dex/swaap-v1/swaap-v1.js +10 -0
  90. package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
  91. package/build/dex/zerox/index.d.ts +4 -26
  92. package/build/dex/zerox/index.js +50 -42
  93. package/build/dex/zerox/index.js.map +1 -1
  94. package/build/dex/zerox/types.d.ts +29 -0
  95. package/build/dex/zerox/types.js +8 -1
  96. package/build/dex/zerox/types.js.map +1 -1
  97. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +16 -0
  98. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +16 -0
  99. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +16 -0
  100. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +16 -0
  101. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-dai-usdc-eth.json +16 -0
  102. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-eth-usdc-dai.json +16 -0
  103. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +16 -0
  104. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdt-usdc-dai.json +16 -0
  105. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-eth-usdc.json +9 -0
  106. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-eth.json +9 -0
  107. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-wbtc.json +9 -0
  108. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-eth-steth.json +9 -0
  109. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-steth-eth.json +9 -0
  110. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-usdc-usdt.json +9 -0
  111. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-eth-usdc.json +9 -0
  112. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-eth.json +9 -0
  113. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-usdt.json +9 -0
  114. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +12 -0
  115. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +7 -0
  116. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +7 -0
  117. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-dai-usdc-eth.json +7 -0
  118. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-eth-usdc-dai.json +7 -0
  119. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +12 -0
  120. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-eth-usdc.json +7 -0
  121. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-usdc-eth.json +7 -0
  122. package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +78 -0
  123. package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +81 -0
  124. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +78 -0
  125. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +78 -0
  126. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-dai-usdc-eth.json +81 -0
  127. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-eth-usdc-dai.json +81 -0
  128. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +81 -0
  129. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdt-usdc-dai.json +81 -0
  130. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-eth-usdc.json +64 -0
  131. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-eth.json +85 -0
  132. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-wbtc.json +64 -0
  133. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-eth-steth.json +52 -0
  134. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-steth-eth.json +52 -0
  135. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-usdc-usdt.json +52 -0
  136. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-eth-usdc.json +55 -0
  137. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-eth.json +55 -0
  138. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-usdt.json +55 -0
  139. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +23 -0
  140. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +37 -0
  141. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +23 -0
  142. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +23 -0
  143. package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +51 -0
  144. package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-univ3-usdt-dai-eth.json +58 -0
  145. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +23 -0
  146. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +23 -0
  147. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +9 -0
  148. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +16 -0
  149. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +23 -0
  150. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +12 -0
  151. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +7 -0
  152. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +12 -0
  153. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +12 -0
  154. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +7 -0
  155. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-univ3-usdt-dai-eth.json +7 -0
  156. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +7 -0
  157. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +7 -0
  158. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +7 -0
  159. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +7 -0
  160. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +130 -0
  161. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +136 -0
  162. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +100 -0
  163. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +100 -0
  164. package/build/executor/fixtures/executor02/routes/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +166 -0
  165. package/build/executor/fixtures/executor02/routes/price-route-multiswap-univ3-usdt-dai-eth.json +190 -0
  166. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +114 -0
  167. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +114 -0
  168. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +55 -0
  169. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +73 -0
  170. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +82 -0
  171. package/build/generic-swap-transaction-builder.js +4 -1
  172. package/build/generic-swap-transaction-builder.js.map +1 -1
  173. package/package.json +1 -1
  174. package/src/dex/cables/cables-e2e.test.ts +40 -40
  175. package/src/dex/cables/cables.ts +37 -10
  176. package/src/generic-swap-transaction-builder.ts +7 -1
  177. package/.idea/aws.xml +0 -17
  178. package/.idea/codeStyles/Project.xml +0 -19
  179. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  180. package/.idea/misc.xml +0 -6
  181. package/.idea/modules.xml +0 -8
  182. package/.idea/paraswap-dex-lib.iml +0 -9
  183. package/.idea/prettier.xml +0 -7
  184. package/.idea/vcs.xml +0 -6
  185. package/build/abi/integral/factory.json +0 -333
  186. package/build/dex/bProtocol.d.ts +0 -18
  187. package/build/dex/bProtocol.js +0 -39
  188. package/build/dex/bProtocol.js.map +0 -1
  189. package/build/dex/bancor.d.ts +0 -26
  190. package/build/dex/bancor.js +0 -58
  191. package/build/dex/bancor.js.map +0 -1
  192. package/build/dex/compound.d.ts +0 -18
  193. package/build/dex/compound.js +0 -46
  194. package/build/dex/compound.js.map +0 -1
  195. package/build/dex/curve-v2.d.ts +0 -58
  196. package/build/dex/curve-v2.js +0 -180
  197. package/build/dex/curve-v2.js.map +0 -1
  198. package/build/dex/dodo-v1.d.ts +0 -33
  199. package/build/dex/dodo-v1.js +0 -63
  200. package/build/dex/dodo-v1.js.map +0 -1
  201. package/build/dex/fluid-dex/fluid-dex-generate-pool.d.ts +0 -49
  202. package/build/dex/fluid-dex/fluid-dex-generate-pool.js +0 -104
  203. package/build/dex/fluid-dex/fluid-dex-generate-pool.js.map +0 -1
  204. package/build/dex/integral/config.d.ts +0 -4
  205. package/build/dex/integral/config.js +0 -20
  206. package/build/dex/integral/config.js.map +0 -1
  207. package/build/dex/integral/context.d.ts +0 -40
  208. package/build/dex/integral/context.js +0 -158
  209. package/build/dex/integral/context.js.map +0 -1
  210. package/build/dex/integral/integral-factory.d.ts +0 -24
  211. package/build/dex/integral/integral-factory.js +0 -95
  212. package/build/dex/integral/integral-factory.js.map +0 -1
  213. package/build/dex/integral/integral-pool.d.ts +0 -50
  214. package/build/dex/integral/integral-pool.js +0 -149
  215. package/build/dex/integral/integral-pool.js.map +0 -1
  216. package/build/dex/integral/integral-pricing.d.ts +0 -18
  217. package/build/dex/integral/integral-pricing.js +0 -114
  218. package/build/dex/integral/integral-pricing.js.map +0 -1
  219. package/build/dex/integral/integral-relayer.d.ts +0 -42
  220. package/build/dex/integral/integral-relayer.js +0 -192
  221. package/build/dex/integral/integral-relayer.js.map +0 -1
  222. package/build/dex/integral/integral-token.d.ts +0 -27
  223. package/build/dex/integral/integral-token.js +0 -59
  224. package/build/dex/integral/integral-token.js.map +0 -1
  225. package/build/dex/integral/integral.js +0 -376
  226. package/build/dex/integral/integral.js.map +0 -1
  227. package/build/dex/integral/types.d.ts +0 -85
  228. package/build/dex/integral/types.js +0 -9
  229. package/build/dex/integral/types.js.map +0 -1
  230. package/build/dex/integral/utils-e2e.d.ts +0 -9
  231. package/build/dex/integral/utils-e2e.js +0 -131
  232. package/build/dex/integral/utils-e2e.js.map +0 -1
  233. package/build/dex/integral/utils.d.ts +0 -17
  234. package/build/dex/integral/utils.js +0 -94
  235. package/build/dex/integral/utils.js.map +0 -1
  236. package/build/dex/lido.d.ts +0 -19
  237. package/build/dex/lido.js +0 -42
  238. package/build/dex/lido.js.map +0 -1
  239. package/build/dex/onebit.d.ts +0 -25
  240. package/build/dex/onebit.js +0 -42
  241. package/build/dex/onebit.js.map +0 -1
  242. package/build/dex/smoothy.d.ts +0 -26
  243. package/build/dex/smoothy.js +0 -48
  244. package/build/dex/smoothy.js.map +0 -1
  245. package/build/dex/stable-pool.d.ts +0 -28
  246. package/build/dex/stable-pool.js +0 -62
  247. package/build/dex/stable-pool.js.map +0 -1
  248. package/build/dex/trader-joe-v2.1/optimizer.d.ts +0 -2
  249. package/build/dex/trader-joe-v2.1/optimizer.js +0 -47
  250. package/build/dex/trader-joe-v2.1/optimizer.js.map +0 -1
  251. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +0 -7
  252. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +0 -20
  253. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +0 -1
  254. package/build/dex/trader-joe-v2.1.d.ts +0 -43
  255. package/build/dex/trader-joe-v2.1.js +0 -79
  256. package/build/dex/trader-joe-v2.1.js.map +0 -1
@@ -1,333 +0,0 @@
1
- [
2
- {
3
- "inputs": [],
4
- "stateMutability": "nonpayable",
5
- "type": "constructor"
6
- },
7
- {
8
- "anonymous": false,
9
- "inputs": [
10
- {
11
- "indexed": false,
12
- "internalType": "address",
13
- "name": "owner",
14
- "type": "address"
15
- }
16
- ],
17
- "name": "OwnerSet",
18
- "type": "event"
19
- },
20
- {
21
- "anonymous": false,
22
- "inputs": [
23
- {
24
- "indexed": true,
25
- "internalType": "address",
26
- "name": "token0",
27
- "type": "address"
28
- },
29
- {
30
- "indexed": true,
31
- "internalType": "address",
32
- "name": "token1",
33
- "type": "address"
34
- },
35
- {
36
- "indexed": false,
37
- "internalType": "address",
38
- "name": "pair",
39
- "type": "address"
40
- },
41
- {
42
- "indexed": false,
43
- "internalType": "uint256",
44
- "name": "",
45
- "type": "uint256"
46
- }
47
- ],
48
- "name": "PairCreated",
49
- "type": "event"
50
- },
51
- {
52
- "inputs": [
53
- {
54
- "internalType": "uint256",
55
- "name": "",
56
- "type": "uint256"
57
- }
58
- ],
59
- "name": "allPairs",
60
- "outputs": [
61
- {
62
- "internalType": "address",
63
- "name": "",
64
- "type": "address"
65
- }
66
- ],
67
- "stateMutability": "view",
68
- "type": "function"
69
- },
70
- {
71
- "inputs": [],
72
- "name": "allPairsLength",
73
- "outputs": [
74
- {
75
- "internalType": "uint256",
76
- "name": "",
77
- "type": "uint256"
78
- }
79
- ],
80
- "stateMutability": "view",
81
- "type": "function"
82
- },
83
- {
84
- "inputs": [
85
- {
86
- "internalType": "address",
87
- "name": "tokenA",
88
- "type": "address"
89
- },
90
- {
91
- "internalType": "address",
92
- "name": "tokenB",
93
- "type": "address"
94
- },
95
- {
96
- "internalType": "address",
97
- "name": "to",
98
- "type": "address"
99
- }
100
- ],
101
- "name": "collect",
102
- "outputs": [],
103
- "stateMutability": "nonpayable",
104
- "type": "function"
105
- },
106
- {
107
- "inputs": [
108
- {
109
- "internalType": "address",
110
- "name": "tokenA",
111
- "type": "address"
112
- },
113
- {
114
- "internalType": "address",
115
- "name": "tokenB",
116
- "type": "address"
117
- },
118
- {
119
- "internalType": "address",
120
- "name": "oracle",
121
- "type": "address"
122
- },
123
- {
124
- "internalType": "address",
125
- "name": "trader",
126
- "type": "address"
127
- }
128
- ],
129
- "name": "createPair",
130
- "outputs": [
131
- {
132
- "internalType": "address",
133
- "name": "pair",
134
- "type": "address"
135
- }
136
- ],
137
- "stateMutability": "nonpayable",
138
- "type": "function"
139
- },
140
- {
141
- "inputs": [
142
- {
143
- "internalType": "address",
144
- "name": "",
145
- "type": "address"
146
- },
147
- {
148
- "internalType": "address",
149
- "name": "",
150
- "type": "address"
151
- }
152
- ],
153
- "name": "getPair",
154
- "outputs": [
155
- {
156
- "internalType": "address",
157
- "name": "",
158
- "type": "address"
159
- }
160
- ],
161
- "stateMutability": "view",
162
- "type": "function"
163
- },
164
- {
165
- "inputs": [],
166
- "name": "owner",
167
- "outputs": [
168
- {
169
- "internalType": "address",
170
- "name": "",
171
- "type": "address"
172
- }
173
- ],
174
- "stateMutability": "view",
175
- "type": "function"
176
- },
177
- {
178
- "inputs": [
179
- {
180
- "internalType": "address",
181
- "name": "tokenA",
182
- "type": "address"
183
- },
184
- {
185
- "internalType": "address",
186
- "name": "tokenB",
187
- "type": "address"
188
- },
189
- {
190
- "internalType": "uint256",
191
- "name": "fee",
192
- "type": "uint256"
193
- }
194
- ],
195
- "name": "setBurnFee",
196
- "outputs": [],
197
- "stateMutability": "nonpayable",
198
- "type": "function"
199
- },
200
- {
201
- "inputs": [
202
- {
203
- "internalType": "address",
204
- "name": "tokenA",
205
- "type": "address"
206
- },
207
- {
208
- "internalType": "address",
209
- "name": "tokenB",
210
- "type": "address"
211
- },
212
- {
213
- "internalType": "uint256",
214
- "name": "fee",
215
- "type": "uint256"
216
- }
217
- ],
218
- "name": "setMintFee",
219
- "outputs": [],
220
- "stateMutability": "nonpayable",
221
- "type": "function"
222
- },
223
- {
224
- "inputs": [
225
- {
226
- "internalType": "address",
227
- "name": "tokenA",
228
- "type": "address"
229
- },
230
- {
231
- "internalType": "address",
232
- "name": "tokenB",
233
- "type": "address"
234
- },
235
- {
236
- "internalType": "address",
237
- "name": "oracle",
238
- "type": "address"
239
- }
240
- ],
241
- "name": "setOracle",
242
- "outputs": [],
243
- "stateMutability": "nonpayable",
244
- "type": "function"
245
- },
246
- {
247
- "inputs": [
248
- {
249
- "internalType": "address",
250
- "name": "_owner",
251
- "type": "address"
252
- }
253
- ],
254
- "name": "setOwner",
255
- "outputs": [],
256
- "stateMutability": "nonpayable",
257
- "type": "function"
258
- },
259
- {
260
- "inputs": [
261
- {
262
- "internalType": "address",
263
- "name": "tokenA",
264
- "type": "address"
265
- },
266
- {
267
- "internalType": "address",
268
- "name": "tokenB",
269
- "type": "address"
270
- },
271
- {
272
- "internalType": "uint256",
273
- "name": "fee",
274
- "type": "uint256"
275
- }
276
- ],
277
- "name": "setSwapFee",
278
- "outputs": [],
279
- "stateMutability": "nonpayable",
280
- "type": "function"
281
- },
282
- {
283
- "inputs": [
284
- {
285
- "internalType": "address",
286
- "name": "tokenA",
287
- "type": "address"
288
- },
289
- {
290
- "internalType": "address",
291
- "name": "tokenB",
292
- "type": "address"
293
- },
294
- {
295
- "internalType": "address",
296
- "name": "trader",
297
- "type": "address"
298
- }
299
- ],
300
- "name": "setTrader",
301
- "outputs": [],
302
- "stateMutability": "nonpayable",
303
- "type": "function"
304
- },
305
- {
306
- "inputs": [
307
- {
308
- "internalType": "address",
309
- "name": "tokenA",
310
- "type": "address"
311
- },
312
- {
313
- "internalType": "address",
314
- "name": "tokenB",
315
- "type": "address"
316
- },
317
- {
318
- "internalType": "uint256",
319
- "name": "amount",
320
- "type": "uint256"
321
- },
322
- {
323
- "internalType": "address",
324
- "name": "to",
325
- "type": "address"
326
- }
327
- ],
328
- "name": "withdraw",
329
- "outputs": [],
330
- "stateMutability": "nonpayable",
331
- "type": "function"
332
- }
333
- ]
@@ -1,18 +0,0 @@
1
- import { Interface } from '@ethersproject/abi';
2
- import { SwapSide } from '../constants';
3
- import { AdapterExchangeParam, SimpleExchangeParam } from '../types';
4
- import { IDexTxBuilder } from './idex';
5
- import { SimpleExchange } from './simple-exchange';
6
- import { IDexHelper } from '../dex-helper';
7
- export declare type BProtocolData = {
8
- exchange: string;
9
- };
10
- declare type BProtocolParam = [lusdAmount: string, minEthReturn: string, dest: string];
11
- export declare class BProtocol extends SimpleExchange implements IDexTxBuilder<BProtocolData, BProtocolParam> {
12
- static dexKeys: string[];
13
- exchangeRouterInterface: Interface;
14
- constructor(dexHelper: IDexHelper);
15
- getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: BProtocolData, side: SwapSide): AdapterExchangeParam;
16
- getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: BProtocolData, side: SwapSide): Promise<SimpleExchangeParam>;
17
- }
18
- export {};
@@ -1,39 +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.BProtocol = void 0;
7
- const abi_1 = require("@ethersproject/abi");
8
- const simple_exchange_1 = require("./simple-exchange");
9
- const BProtocol_json_1 = __importDefault(require("../abi/BProtocol.json"));
10
- var BProtocolFunctions;
11
- (function (BProtocolFunctions) {
12
- BProtocolFunctions["swap"] = "swap";
13
- })(BProtocolFunctions || (BProtocolFunctions = {}));
14
- class BProtocol extends simple_exchange_1.SimpleExchange {
15
- constructor(dexHelper) {
16
- super(dexHelper, 'bprotocol');
17
- this.exchangeRouterInterface = new abi_1.Interface(BProtocol_json_1.default);
18
- }
19
- getAdapterParam(srcToken, destToken, srcAmount, destAmount, data, side) {
20
- return {
21
- targetExchange: data.exchange,
22
- payload: '0x',
23
- networkFee: '0',
24
- };
25
- }
26
- async getSimpleParam(srcToken, destToken, srcAmount, destAmount, data, side) {
27
- const swapFunction = BProtocolFunctions.swap;
28
- const swapFunctionParams = [
29
- srcAmount,
30
- destAmount,
31
- this.augustusAddress,
32
- ];
33
- const swapData = this.exchangeRouterInterface.encodeFunctionData(swapFunction, swapFunctionParams);
34
- return this.buildSimpleParamWithoutWETHConversion(srcToken, srcAmount, destToken, destAmount, swapData, data.exchange);
35
- }
36
- }
37
- exports.BProtocol = BProtocol;
38
- BProtocol.dexKeys = ['bprotocol'];
39
- //# sourceMappingURL=bProtocol.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bProtocol.js","sourceRoot":"","sources":["../../src/dex/bProtocol.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA6D;AAI7D,uDAAmD;AACnD,2EAAiD;AAOjD,IAAK,kBAEJ;AAFD,WAAK,kBAAkB;IACrB,mCAAa,CAAA;AACf,CAAC,EAFI,kBAAkB,KAAlB,kBAAkB,QAEtB;AAED,MAAa,SACX,SAAQ,gCAAc;IAMtB,YAAY,SAAqB;QAC/B,KAAK,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAC9B,IAAI,CAAC,uBAAuB,GAAG,IAAI,eAAS,CAC1C,wBAA8B,CAC/B,CAAC;IACJ,CAAC;IAED,eAAe,CACb,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAmB,EACnB,IAAc;QAEd,OAAO;YACL,cAAc,EAAE,IAAI,CAAC,QAAQ;YAC7B,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,GAAG;SAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAmB,EACnB,IAAc;QAEd,MAAM,YAAY,GAAG,kBAAkB,CAAC,IAAI,CAAC;QAC7C,MAAM,kBAAkB,GAAmB;YACzC,SAAS;YACT,UAAU;YACV,IAAI,CAAC,eAAe;SACrB,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAC9D,YAAY,EACZ,kBAAkB,CACnB,CAAC;QAEF,OAAO,IAAI,CAAC,qCAAqC,CAC/C,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,IAAI,CAAC,QAAQ,CACd,CAAC;IACJ,CAAC;;AAxDH,8BAyDC;AArDQ,iBAAO,GAAG,CAAC,WAAW,CAAC,CAAC"}
@@ -1,26 +0,0 @@
1
- import { Interface } from '@ethersproject/abi';
2
- import { SwapSide } from '../constants';
3
- import { AdapterExchangeParam, Address, SimpleExchangeParam } from '../types';
4
- import { IDexTxBuilder } from './idex';
5
- import { SimpleExchange } from './simple-exchange';
6
- import { IDexHelper } from '../dex-helper';
7
- export declare type BancorData = {
8
- minDestToken: string;
9
- path: Address[];
10
- bancorNetwork?: string;
11
- };
12
- declare type BancorParam = [
13
- path: Address[],
14
- srcAmount: string,
15
- minDestToken: string,
16
- affiliateAccount: string,
17
- affiliateFee: string
18
- ];
19
- export declare class Bancor extends SimpleExchange implements IDexTxBuilder<BancorData, BancorParam> {
20
- static dexKeys: string[];
21
- exchangeRouterInterface: Interface;
22
- constructor(dexHelper: IDexHelper);
23
- getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: BancorData, side: SwapSide): AdapterExchangeParam;
24
- getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: BancorData, side: SwapSide): Promise<SimpleExchangeParam>;
25
- }
26
- export {};
@@ -1,58 +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.Bancor = void 0;
7
- const abi_1 = require("@ethersproject/abi");
8
- const constants_1 = require("../constants");
9
- const simple_exchange_1 = require("./simple-exchange");
10
- const Bancor_json_1 = __importDefault(require("../abi/Bancor.json"));
11
- const BANCOR_NETWORK = {
12
- 1: '0x2F9EC37d6CcFFf1caB21733BdaDEdE11c823cCB0',
13
- };
14
- const BancorRegistry = {
15
- 1: '0x52ae12abe5d8bd778bd5397f99ca900624cfadd4',
16
- };
17
- var BancorFunctions;
18
- (function (BancorFunctions) {
19
- BancorFunctions["convert2"] = "convert2";
20
- })(BancorFunctions || (BancorFunctions = {}));
21
- class Bancor extends simple_exchange_1.SimpleExchange {
22
- constructor(dexHelper) {
23
- super(dexHelper, 'bancor');
24
- this.exchangeRouterInterface = new abi_1.Interface(Bancor_json_1.default);
25
- }
26
- getAdapterParam(srcToken, destToken, srcAmount, destAmount, data, side) {
27
- if (side === constants_1.SwapSide.BUY)
28
- throw new Error(`Buy not supported`);
29
- const { path } = data;
30
- const payload = this.abiCoder.encodeParameter({
31
- ParentStruct: {
32
- path: 'address[]',
33
- },
34
- }, { path });
35
- return {
36
- targetExchange: BancorRegistry[this.network],
37
- payload,
38
- networkFee: '0',
39
- };
40
- }
41
- async getSimpleParam(srcToken, destToken, srcAmount, destAmount, data, side) {
42
- if (side === constants_1.SwapSide.BUY)
43
- throw new Error(`Buy not supported`);
44
- const defaultArgs = [
45
- data.path,
46
- srcAmount,
47
- data.minDestToken || '1',
48
- constants_1.NULL_ADDRESS,
49
- '0',
50
- ];
51
- const swapMethod = BancorFunctions.convert2;
52
- const swapData = this.exchangeRouterInterface.encodeFunctionData(swapMethod, defaultArgs);
53
- return this.buildSimpleParamWithoutWETHConversion(srcToken, srcAmount, destToken, destAmount, swapData, data.bancorNetwork || BANCOR_NETWORK[this.network]);
54
- }
55
- }
56
- exports.Bancor = Bancor;
57
- Bancor.dexKeys = ['bancor'];
58
- //# sourceMappingURL=bancor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bancor.js","sourceRoot":"","sources":["../../src/dex/bancor.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA6D;AAC7D,4CAAsD;AAGtD,uDAAmD;AACnD,qEAA2C;AAI3C,MAAM,cAAc,GAAkC;IACpD,CAAC,EAAE,4CAA4C;CAChD,CAAC;AAEF,MAAM,cAAc,GAAkC;IACpD,CAAC,EAAE,4CAA4C;CAChD,CAAC;AAgBF,IAAK,eAEJ;AAFD,WAAK,eAAe;IAClB,wCAAqB,CAAA;AACvB,CAAC,EAFI,eAAe,KAAf,eAAe,QAEnB;AAED,MAAa,MACX,SAAQ,gCAAc;IAMtB,YAAY,SAAqB;QAC/B,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC3B,IAAI,CAAC,uBAAuB,GAAG,IAAI,eAAS,CAAC,qBAA2B,CAAC,CAAC;IAC5E,CAAC;IAED,eAAe,CACb,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAgB,EAChB,IAAc;QAEd,IAAI,IAAI,KAAK,oBAAQ,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAEhE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACtB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAC3C;YACE,YAAY,EAAE;gBACZ,IAAI,EAAE,WAAW;aAClB;SACF,EACD,EAAE,IAAI,EAAE,CACT,CAAC;QAEF,OAAO;YACL,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC;YAC5C,OAAO;YACP,UAAU,EAAE,GAAG;SAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAgB,EAChB,IAAc;QAEd,IAAI,IAAI,KAAK,oBAAQ,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAEhE,MAAM,WAAW,GAAG;YAClB,IAAI,CAAC,IAAI;YACT,SAAS;YACT,IAAI,CAAC,YAAY,IAAI,GAAG;YACxB,wBAAY;YACZ,GAAG;SACJ,CAAC;QACF,MAAM,UAAU,GAAG,eAAe,CAAC,QAAQ,CAAC;QAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAC9D,UAAU,EACV,WAAW,CACZ,CAAC;QAEF,OAAO,IAAI,CAAC,qCAAqC,CAC/C,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,IAAI,CAAC,aAAa,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CACnD,CAAC;IACJ,CAAC;;AAtEH,wBAuEC;AAnEQ,cAAO,GAAG,CAAC,QAAQ,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- import { Interface } from '@ethersproject/abi';
2
- import { SwapSide } from '../constants';
3
- import { AdapterExchangeParam, SimpleExchangeParam } from '../types';
4
- import { IDexTxBuilder } from './idex';
5
- import { SimpleExchange } from './simple-exchange';
6
- import { IDexHelper } from '../dex-helper';
7
- export declare type CompoundData = {
8
- fromCToken: boolean;
9
- };
10
- declare type CompoundParam = [srcAmount: string];
11
- export declare class Compound extends SimpleExchange implements IDexTxBuilder<CompoundData, CompoundParam> {
12
- static dexKeys: string[];
13
- cethInterface: Interface;
14
- constructor(dexHelper: IDexHelper);
15
- getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: CompoundData, side: SwapSide): AdapterExchangeParam;
16
- getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: CompoundData, side: SwapSide): Promise<SimpleExchangeParam>;
17
- }
18
- export {};
@@ -1,46 +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.Compound = void 0;
7
- const abi_1 = require("@ethersproject/abi");
8
- const constants_1 = require("../constants");
9
- const simple_exchange_1 = require("./simple-exchange");
10
- const Compound_CETH_json_1 = __importDefault(require("../abi/Compound_CETH.json")); // CETH abi
11
- const utils_1 = require("../utils");
12
- var CompoundFunctions;
13
- (function (CompoundFunctions) {
14
- CompoundFunctions["redeem"] = "redeem";
15
- CompoundFunctions["mint"] = "mint";
16
- })(CompoundFunctions || (CompoundFunctions = {}));
17
- class Compound extends simple_exchange_1.SimpleExchange {
18
- constructor(dexHelper) {
19
- super(dexHelper, 'compound');
20
- this.cethInterface = new abi_1.Interface(Compound_CETH_json_1.default);
21
- }
22
- getAdapterParam(srcToken, destToken, srcAmount, destAmount, data, side) {
23
- const cToken = data.fromCToken ? srcToken : destToken; // Warning
24
- const payload = this.abiCoder.encodeParameter({
25
- ParentStruct: {
26
- cToken: 'address',
27
- },
28
- }, { cToken });
29
- return {
30
- // target exchange is not used by the contract
31
- targetExchange: constants_1.NULL_ADDRESS,
32
- payload,
33
- networkFee: '0',
34
- };
35
- }
36
- async getSimpleParam(srcToken, destToken, srcAmount, destAmount, data, side) {
37
- const cToken = data.fromCToken ? srcToken : destToken;
38
- const swapData = (0, utils_1.isETHAddress)(srcToken)
39
- ? this.cethInterface.encodeFunctionData(CompoundFunctions.mint)
40
- : this.erc20Interface.encodeFunctionData(data.fromCToken ? CompoundFunctions.redeem : CompoundFunctions.mint, [srcAmount]);
41
- return this.buildSimpleParamWithoutWETHConversion(srcToken, srcAmount, destToken, destAmount, swapData, cToken);
42
- }
43
- }
44
- exports.Compound = Compound;
45
- Compound.dexKeys = ['compound'];
46
- //# sourceMappingURL=compound.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compound.js","sourceRoot":"","sources":["../../src/dex/compound.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA6D;AAC7D,4CAAsD;AAGtD,uDAAmD;AACnD,mFAA6C,CAAC,WAAW;AACzD,oCAAwC;AAQxC,IAAK,iBAGJ;AAHD,WAAK,iBAAiB;IACpB,sCAAiB,CAAA;IACjB,kCAAa,CAAA;AACf,CAAC,EAHI,iBAAiB,KAAjB,iBAAiB,QAGrB;AAED,MAAa,QACX,SAAQ,gCAAc;IAMtB,YAAY,SAAqB;QAC/B,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,eAAS,CAAC,4BAAsB,CAAC,CAAC;IAC7D,CAAC;IAED,eAAe,CACb,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAkB,EAClB,IAAc;QAEd,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU;QAEjE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAC3C;YACE,YAAY,EAAE;gBACZ,MAAM,EAAE,SAAS;aAClB;SACF,EACD,EAAE,MAAM,EAAE,CACX,CAAC;QAEF,OAAO;YACL,8CAA8C;YAC9C,cAAc,EAAE,wBAAY;YAC5B,OAAO;YACP,UAAU,EAAE,GAAG;SAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAkB,EAClB,IAAc;QAEd,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QACtD,MAAM,QAAQ,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAC;YACrC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,IAAI,CAAC;YAC/D,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CACpC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,EACnE,CAAC,SAAS,CAAC,CACZ,CAAC;QAEN,OAAO,IAAI,CAAC,qCAAqC,CAC/C,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,CACP,CAAC;IACJ,CAAC;;AA/DH,4BAgEC;AA5DQ,gBAAO,GAAG,CAAC,UAAU,CAAC,CAAC"}
@@ -1,58 +0,0 @@
1
- import { Interface } from '@ethersproject/abi';
2
- import { SwapSide } from '../constants';
3
- import { AdapterExchangeParam, Address, ExchangeTxInfo, NumberAsString, PreprocessTransactionOptions, SimpleExchangeParam, Token, TxInfo } from '../types';
4
- import { IDexTxBuilder } from './idex';
5
- import { SimpleExchange } from './simple-exchange';
6
- import { IDexHelper } from '../dex-helper';
7
- import { Logger } from 'log4js';
8
- import { OptimalSwapExchange } from '@paraswap/core';
9
- export declare enum CurveV2SwapType {
10
- EXCHANGE = 0,
11
- EXCHANGE_UNDERLYING = 1,
12
- EXCHANGE_GENERIC_FACTORY_ZAP = 2
13
- }
14
- declare type CurveV2Data = {
15
- i: number;
16
- j: number;
17
- exchange: string;
18
- originalPoolAddress: Address;
19
- swapType: CurveV2SwapType;
20
- isApproved?: boolean;
21
- };
22
- export declare type DirectCurveV2Param = [
23
- fromToken: Address,
24
- toToken: Address,
25
- exchange: Address,
26
- poolAddress: Address,
27
- fromAmount: NumberAsString,
28
- toAmount: NumberAsString,
29
- expectedAmount: NumberAsString,
30
- feePercent: NumberAsString,
31
- i: NumberAsString,
32
- j: NumberAsString,
33
- partner: Address,
34
- isApproved: boolean,
35
- swapType: CurveV2SwapType,
36
- beneficiary: Address,
37
- needWrapNative: boolean,
38
- permit: string,
39
- uuid: string
40
- ];
41
- export declare class CurveV2 extends SimpleExchange implements IDexTxBuilder<CurveV2Data, DirectCurveV2Param> {
42
- readonly dexHelper: IDexHelper;
43
- static dexKeys: string[];
44
- exchangeRouterInterface: Interface;
45
- genericFactoryZapIface: Interface;
46
- minConversionRate: string;
47
- needWrapNative: boolean;
48
- logger: Logger;
49
- readonly directSwapIface: Interface;
50
- constructor(dexHelper: IDexHelper);
51
- getAdapterParam(_0: string, _1: string, _2: string, _3: string, data: CurveV2Data, side: SwapSide): AdapterExchangeParam;
52
- getTokenFromAddress(address: Address): Token;
53
- preProcessTransaction(optimalSwapExchange: OptimalSwapExchange<CurveV2Data>, srcToken: Token, _0: Token, _1: SwapSide, options: PreprocessTransactionOptions): Promise<[OptimalSwapExchange<CurveV2Data>, ExchangeTxInfo]>;
54
- getDirectParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, expectedAmount: NumberAsString, data: CurveV2Data, side: SwapSide, permit: string, uuid: string, feePercent: NumberAsString, _0: NumberAsString, partner: string, beneficiary: string, contractMethod?: string): TxInfo<DirectCurveV2Param>;
55
- static getDirectFunctionName(): string[];
56
- getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: CurveV2Data, side: SwapSide): Promise<SimpleExchangeParam>;
57
- }
58
- export {};