@paraswap/dex-lib 3.8.14 → 3.8.15

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 (237) hide show
  1. package/.vscode/launch.json +6 -43
  2. package/.vscode/settings.json +2 -1
  3. package/build/abi/Uncompressor.json +250 -0
  4. package/build/abi/concentrator/arUSD.json +568 -0
  5. package/build/abi/concentrator/arUSD5115.json +1746 -0
  6. package/build/abi/fx-protocol/FxMarket.json +1284 -0
  7. package/build/abi/{wombat/pool.json → fx-protocol/FxUSD.json} +541 -603
  8. package/build/abi/fx-protocol/weETHOralce.json +676 -0
  9. package/build/abi/integral/factory.json +333 -0
  10. package/build/abi/integral/oracle.json +501 -0
  11. package/build/abi/integral/pool.json +1041 -0
  12. package/build/abi/integral/relayer.json +1536 -0
  13. package/build/abi/oswap/oswap.abi.json +452 -0
  14. package/build/dex/aave-v1/aave-v1.d.ts +1 -2
  15. package/build/dex/aave-v1/aave-v1.js +0 -23
  16. package/build/dex/aave-v1/aave-v1.js.map +1 -1
  17. package/build/dex/compound.js +1 -1
  18. package/build/dex/compound.js.map +1 -1
  19. package/build/dex/concentrator-arusd/concentrator-arusd-event.d.ts +17 -0
  20. package/build/dex/concentrator-arusd/concentrator-arusd-event.js +66 -0
  21. package/build/dex/concentrator-arusd/concentrator-arusd-event.js.map +1 -0
  22. package/build/dex/concentrator-arusd/concentrator-arusd.d.ts +41 -0
  23. package/build/dex/concentrator-arusd/concentrator-arusd.js +188 -0
  24. package/build/dex/concentrator-arusd/concentrator-arusd.js.map +1 -0
  25. package/build/dex/concentrator-arusd/config.d.ts +3 -0
  26. package/build/dex/concentrator-arusd/config.js +14 -0
  27. package/build/dex/concentrator-arusd/config.js.map +1 -0
  28. package/build/dex/concentrator-arusd/types.d.ts +14 -0
  29. package/build/dex/concentrator-arusd/types.js +3 -0
  30. package/build/dex/concentrator-arusd/types.js.map +1 -0
  31. package/build/dex/concentrator-arusd/utils.d.ts +4 -0
  32. package/build/dex/concentrator-arusd/utils.js +27 -0
  33. package/build/dex/concentrator-arusd/utils.js.map +1 -0
  34. package/build/dex/etherfi/etherfi.d.ts +26 -0
  35. package/build/dex/etherfi/etherfi.js +96 -0
  36. package/build/dex/etherfi/etherfi.js.map +1 -0
  37. package/build/dex/fx-protocol-rusd/config.d.ts +3 -0
  38. package/build/dex/fx-protocol-rusd/config.js +15 -0
  39. package/build/dex/fx-protocol-rusd/config.js.map +1 -0
  40. package/build/dex/fx-protocol-rusd/fx-protocol-rusd-event.d.ts +18 -0
  41. package/build/dex/fx-protocol-rusd/fx-protocol-rusd-event.js +71 -0
  42. package/build/dex/fx-protocol-rusd/fx-protocol-rusd-event.js.map +1 -0
  43. package/build/dex/fx-protocol-rusd/fx-protocol-rusd.d.ts +39 -0
  44. package/build/dex/fx-protocol-rusd/fx-protocol-rusd.js +201 -0
  45. package/build/dex/fx-protocol-rusd/fx-protocol-rusd.js.map +1 -0
  46. package/build/dex/fx-protocol-rusd/types.d.ts +13 -0
  47. package/build/dex/fx-protocol-rusd/types.js +3 -0
  48. package/build/dex/fx-protocol-rusd/types.js.map +1 -0
  49. package/build/dex/fx-protocol-rusd/utils.d.ts +4 -0
  50. package/build/dex/fx-protocol-rusd/utils.js +26 -0
  51. package/build/dex/fx-protocol-rusd/utils.js.map +1 -0
  52. package/build/dex/index.js +4 -0
  53. package/build/dex/index.js.map +1 -1
  54. package/build/dex/integral/config.d.ts +4 -0
  55. package/build/dex/integral/config.js +20 -0
  56. package/build/dex/integral/config.js.map +1 -0
  57. package/build/dex/integral/context.d.ts +40 -0
  58. package/build/dex/integral/context.js +158 -0
  59. package/build/dex/integral/context.js.map +1 -0
  60. package/build/dex/integral/helpers.d.ts +17 -0
  61. package/build/dex/integral/helpers.js +157 -0
  62. package/build/dex/integral/helpers.js.map +1 -0
  63. package/build/dex/integral/integral-factory.d.ts +24 -0
  64. package/build/dex/integral/integral-factory.js +95 -0
  65. package/build/dex/integral/integral-factory.js.map +1 -0
  66. package/build/dex/integral/integral-pool.d.ts +50 -0
  67. package/build/dex/integral/integral-pool.js +149 -0
  68. package/build/dex/integral/integral-pool.js.map +1 -0
  69. package/build/dex/integral/integral-pricing.d.ts +18 -0
  70. package/build/dex/integral/integral-pricing.js +114 -0
  71. package/build/dex/integral/integral-pricing.js.map +1 -0
  72. package/build/dex/integral/integral-relayer.d.ts +42 -0
  73. package/build/dex/integral/integral-relayer.js +192 -0
  74. package/build/dex/integral/integral-relayer.js.map +1 -0
  75. package/build/dex/integral/integral-token.d.ts +27 -0
  76. package/build/dex/integral/integral-token.js +59 -0
  77. package/build/dex/integral/integral-token.js.map +1 -0
  78. package/build/dex/integral/integral.d.ts +41 -0
  79. package/build/dex/integral/integral.js +377 -0
  80. package/build/dex/integral/integral.js.map +1 -0
  81. package/build/dex/integral/types.d.ts +84 -0
  82. package/build/dex/integral/types.js +9 -0
  83. package/build/dex/integral/types.js.map +1 -0
  84. package/build/dex/integral/utils-e2e.d.ts +9 -0
  85. package/build/dex/integral/utils-e2e.js +131 -0
  86. package/build/dex/integral/utils-e2e.js.map +1 -0
  87. package/build/dex/integral/utils.d.ts +17 -0
  88. package/build/dex/integral/utils.js +94 -0
  89. package/build/dex/integral/utils.js.map +1 -0
  90. package/build/dex/oswap/config.d.ts +5 -0
  91. package/build/dex/oswap/config.js +31 -0
  92. package/build/dex/oswap/config.js.map +1 -0
  93. package/build/dex/oswap/oswap-pool.d.ts +51 -0
  94. package/build/dex/oswap/oswap-pool.js +150 -0
  95. package/build/dex/oswap/oswap-pool.js.map +1 -0
  96. package/build/dex/oswap/oswap.d.ts +46 -0
  97. package/build/dex/oswap/oswap.js +266 -0
  98. package/build/dex/oswap/oswap.js.map +1 -0
  99. package/build/dex/oswap/types.d.ts +20 -0
  100. package/build/dex/oswap/types.js +3 -0
  101. package/build/dex/oswap/types.js.map +1 -0
  102. package/build/dex/platypus/platypus.d.ts +1 -2
  103. package/build/dex/platypus/platypus.js +0 -45
  104. package/build/dex/platypus/platypus.js.map +1 -1
  105. package/build/dex/sdai/config.d.ts +11 -0
  106. package/build/dex/sdai/config.js +21 -0
  107. package/build/dex/sdai/config.js.map +1 -0
  108. package/build/dex/sdai/constants.d.ts +2 -0
  109. package/build/dex/sdai/constants.js +6 -0
  110. package/build/dex/sdai/constants.js.map +1 -0
  111. package/build/dex/sdai/scripts/validate-state.js +102 -0
  112. package/build/dex/sdai/scripts/validate-state.js.map +1 -0
  113. package/build/dex/sdai/sdai-pool.d.ts +16 -0
  114. package/build/dex/sdai/sdai-pool.js +85 -0
  115. package/build/dex/sdai/sdai-pool.js.map +1 -0
  116. package/build/dex/sdai/sdai.d.ts +51 -0
  117. package/build/dex/sdai/sdai.js +172 -0
  118. package/build/dex/sdai/sdai.js.map +1 -0
  119. package/build/dex/sdai/types.d.ts +21 -0
  120. package/build/dex/sdai/types.js +11 -0
  121. package/build/dex/sdai/types.js.map +1 -0
  122. package/build/dex/sdai/utils.d.ts +4 -0
  123. package/build/dex/sdai/utils.js +39 -0
  124. package/build/dex/sdai/utils.js.map +1 -0
  125. package/build/dex/stable-pool.js +8 -1
  126. package/build/dex/stable-pool.js.map +1 -1
  127. package/build/dex/swaap-v1/swaap-v1.d.ts +1 -2
  128. package/build/dex/swaap-v1/swaap-v1.js +0 -14
  129. package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
  130. package/build/executor/compressor/Compressor.d.ts +23 -0
  131. package/build/executor/compressor/Compressor.js +144 -0
  132. package/build/executor/compressor/Compressor.js.map +1 -0
  133. package/build/executor/compressor/compress.d.ts +17 -0
  134. package/build/executor/compressor/compress.js +187 -0
  135. package/build/executor/compressor/compress.js.map +1 -0
  136. package/build/executor/compressor/compress_functions/addressSubstitution.d.ts +6 -0
  137. package/build/executor/compressor/compress_functions/addressSubstitution.js +29 -0
  138. package/build/executor/compressor/compress_functions/addressSubstitution.js.map +1 -0
  139. package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.d.ts +10 -0
  140. package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.js +40 -0
  141. package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.js.map +1 -0
  142. package/build/executor/compressor/compress_functions/byteSubstitution.d.ts +11 -0
  143. package/build/executor/compressor/compress_functions/byteSubstitution.js +64 -0
  144. package/build/executor/compressor/compress_functions/byteSubstitution.js.map +1 -0
  145. package/build/executor/compressor/compress_functions/ffSubstitution.d.ts +7 -0
  146. package/build/executor/compressor/compress_functions/ffSubstitution.js +54 -0
  147. package/build/executor/compressor/compress_functions/ffSubstitution.js.map +1 -0
  148. package/build/executor/compressor/compress_functions/findLongestAndSubstitute.d.ts +8 -0
  149. package/build/executor/compressor/compress_functions/findLongestAndSubstitute.js +67 -0
  150. package/build/executor/compressor/compress_functions/findLongestAndSubstitute.js.map +1 -0
  151. package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.d.ts +8 -0
  152. package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.js +61 -0
  153. package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.js.map +1 -0
  154. package/build/executor/compressor/compress_functions/reverseAddressSubstitution.d.ts +6 -0
  155. package/build/executor/compressor/compress_functions/reverseAddressSubstitution.js +37 -0
  156. package/build/executor/compressor/compress_functions/reverseAddressSubstitution.js.map +1 -0
  157. package/build/executor/compressor/compress_functions/searchUnusedBytes.d.ts +9 -0
  158. package/build/executor/compressor/compress_functions/searchUnusedBytes.js +33 -0
  159. package/build/executor/compressor/compress_functions/searchUnusedBytes.js.map +1 -0
  160. package/build/executor/compressor/fetchSaved.js +17 -0
  161. package/build/executor/compressor/fetchSaved.js.map +1 -0
  162. package/build/executor/compressor/utils/computeCostL2.d.ts +2 -0
  163. package/build/executor/compressor/utils/computeCostL2.js +14 -0
  164. package/build/executor/compressor/utils/computeCostL2.js.map +1 -0
  165. package/build/executor/compressor/utils/findLongestDuplicatedString.d.ts +2 -0
  166. package/build/executor/compressor/utils/findLongestDuplicatedString.js +30 -0
  167. package/build/executor/compressor/utils/findLongestDuplicatedString.js.map +1 -0
  168. package/build/executor/compressor/utils/getAllIndexes.d.ts +2 -0
  169. package/build/executor/compressor/utils/getAllIndexes.js +12 -0
  170. package/build/executor/compressor/utils/getAllIndexes.js.map +1 -0
  171. package/build/executor/compressor/utils/getByteForAddress.d.ts +2 -0
  172. package/build/executor/compressor/utils/getByteForAddress.js +14 -0
  173. package/build/executor/compressor/utils/getByteForAddress.js.map +1 -0
  174. package/build/executor/compressor/utils/intTo2Bytes.d.ts +2 -0
  175. package/build/executor/compressor/utils/intTo2Bytes.js +14 -0
  176. package/build/executor/compressor/utils/intTo2Bytes.js.map +1 -0
  177. package/build/executor/compressor/utils/intTo3Bytes.d.ts +2 -0
  178. package/build/executor/compressor/utils/intTo3Bytes.js +18 -0
  179. package/build/executor/compressor/utils/intTo3Bytes.js.map +1 -0
  180. package/build/executor/compressor/utils/intToByte.d.ts +2 -0
  181. package/build/executor/compressor/utils/intToByte.js +10 -0
  182. package/build/executor/compressor/utils/intToByte.js.map +1 -0
  183. package/package.json +1 -1
  184. package/src/abi/concentrator/arUSD.json +568 -0
  185. package/src/abi/concentrator/arUSD5115.json +1746 -0
  186. package/src/abi/fx-protocol/FxMarket.json +1284 -0
  187. package/src/abi/fx-protocol/FxUSD.json +1227 -0
  188. package/src/abi/fx-protocol/weETHOralce.json +676 -0
  189. package/src/dex/concentrator-arusd/concentrator-arusd-e2e.test.ts +92 -0
  190. package/src/dex/concentrator-arusd/concentrator-arusd-event.ts +100 -0
  191. package/src/dex/concentrator-arusd/concentrator-arusd-integration.test.ts +104 -0
  192. package/src/dex/concentrator-arusd/concentrator-arusd.ts +269 -0
  193. package/src/dex/concentrator-arusd/concetrator-arusd-events.test.ts +97 -0
  194. package/src/dex/concentrator-arusd/config.ts +13 -0
  195. package/src/dex/concentrator-arusd/types.ts +16 -0
  196. package/src/dex/concentrator-arusd/utils.ts +36 -0
  197. package/src/dex/fx-protocol-rusd/config.ts +14 -0
  198. package/src/dex/fx-protocol-rusd/fx-protocol-e2e.test.ts +96 -0
  199. package/src/dex/fx-protocol-rusd/fx-protocol-events.test.ts +101 -0
  200. package/src/dex/fx-protocol-rusd/fx-protocol-integration.test.ts +104 -0
  201. package/src/dex/fx-protocol-rusd/fx-protocol-rusd-event.ts +112 -0
  202. package/src/dex/fx-protocol-rusd/fx-protocol-rusd.ts +282 -0
  203. package/src/dex/fx-protocol-rusd/types.ts +16 -0
  204. package/src/dex/fx-protocol-rusd/utils.ts +47 -0
  205. package/src/dex/index.ts +4 -0
  206. package/src/dex/wsteth/wsteth-integration.test.ts +0 -1
  207. package/tests/constants-e2e.ts +10 -0
  208. package/.vscode/tasks.json +0 -15
  209. package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +0 -52
  210. package/build/dex/aave-v2/tokens-avalanche.json +0 -44
  211. package/build/dex/aave-v2/tokens-mainnet.json +0 -188
  212. package/build/dex/aave-v2/tokens-polygon.json +0 -44
  213. package/build/dex/maker-psm/scripts/gem.abi.json +0 -136
  214. package/build/dex/maker-psm/scripts/validate-state.js +0 -185
  215. package/build/dex/maker-psm/scripts/validate-state.js.map +0 -1
  216. package/build/dex/maker-psm/scripts/vat.abi.json +0 -243
  217. package/build/dex/solidly-v3/scripts/check-event-pool-event.js +0 -53
  218. package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +0 -1
  219. package/build/dex/trader-joe-v2.1/base.d.ts +0 -18
  220. package/build/dex/trader-joe-v2.1/base.js +0 -99
  221. package/build/dex/trader-joe-v2.1/base.js.map +0 -1
  222. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +0 -7
  223. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +0 -20
  224. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +0 -1
  225. package/build/dex/trader-joe-v2.1/trader-joe-v2.2.d.ts +0 -7
  226. package/build/dex/trader-joe-v2.1/trader-joe-v2.2.js +0 -20
  227. package/build/dex/trader-joe-v2.1/trader-joe-v2.2.js.map +0 -1
  228. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +0 -17
  229. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +0 -64
  230. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +0 -1
  231. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +0 -17
  232. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +0 -79
  233. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +0 -1
  234. package/config.ts +0 -1946
  235. package/src/dex/dexs.txt +0 -58
  236. /package/build/dex/{solidly-v3/scripts/check-event-pool-event.d.ts → sdai/scripts/validate-state.d.ts} +0 -0
  237. /package/build/{dex/maker-psm/scripts/validate-state.d.ts → executor/compressor/fetchSaved.d.ts} +0 -0
@@ -1,243 +0,0 @@
1
- [
2
- {
3
- "inputs": [
4
- { "internalType": "address", "name": "gemJoin_", "type": "address" },
5
- { "internalType": "address", "name": "daiJoin_", "type": "address" },
6
- { "internalType": "address", "name": "vow_", "type": "address" }
7
- ],
8
- "stateMutability": "nonpayable",
9
- "type": "constructor"
10
- },
11
- {
12
- "anonymous": false,
13
- "inputs": [
14
- {
15
- "indexed": true,
16
- "internalType": "address",
17
- "name": "owner",
18
- "type": "address"
19
- },
20
- {
21
- "indexed": false,
22
- "internalType": "uint256",
23
- "name": "value",
24
- "type": "uint256"
25
- },
26
- {
27
- "indexed": false,
28
- "internalType": "uint256",
29
- "name": "fee",
30
- "type": "uint256"
31
- }
32
- ],
33
- "name": "BuyGem",
34
- "type": "event"
35
- },
36
- {
37
- "anonymous": false,
38
- "inputs": [
39
- {
40
- "indexed": false,
41
- "internalType": "address",
42
- "name": "user",
43
- "type": "address"
44
- }
45
- ],
46
- "name": "Deny",
47
- "type": "event"
48
- },
49
- {
50
- "anonymous": false,
51
- "inputs": [
52
- {
53
- "indexed": true,
54
- "internalType": "bytes32",
55
- "name": "what",
56
- "type": "bytes32"
57
- },
58
- {
59
- "indexed": false,
60
- "internalType": "uint256",
61
- "name": "data",
62
- "type": "uint256"
63
- }
64
- ],
65
- "name": "File",
66
- "type": "event"
67
- },
68
- {
69
- "anonymous": false,
70
- "inputs": [
71
- {
72
- "indexed": false,
73
- "internalType": "address",
74
- "name": "user",
75
- "type": "address"
76
- }
77
- ],
78
- "name": "Rely",
79
- "type": "event"
80
- },
81
- {
82
- "anonymous": false,
83
- "inputs": [
84
- {
85
- "indexed": true,
86
- "internalType": "address",
87
- "name": "owner",
88
- "type": "address"
89
- },
90
- {
91
- "indexed": false,
92
- "internalType": "uint256",
93
- "name": "value",
94
- "type": "uint256"
95
- },
96
- {
97
- "indexed": false,
98
- "internalType": "uint256",
99
- "name": "fee",
100
- "type": "uint256"
101
- }
102
- ],
103
- "name": "SellGem",
104
- "type": "event"
105
- },
106
- {
107
- "inputs": [
108
- { "internalType": "address", "name": "usr", "type": "address" },
109
- { "internalType": "uint256", "name": "gemAmt", "type": "uint256" }
110
- ],
111
- "name": "buyGem",
112
- "outputs": [],
113
- "stateMutability": "nonpayable",
114
- "type": "function"
115
- },
116
- {
117
- "inputs": [],
118
- "name": "dai",
119
- "outputs": [
120
- { "internalType": "contract DaiAbstract", "name": "", "type": "address" }
121
- ],
122
- "stateMutability": "view",
123
- "type": "function"
124
- },
125
- {
126
- "inputs": [],
127
- "name": "daiJoin",
128
- "outputs": [
129
- {
130
- "internalType": "contract DaiJoinAbstract",
131
- "name": "",
132
- "type": "address"
133
- }
134
- ],
135
- "stateMutability": "view",
136
- "type": "function"
137
- },
138
- {
139
- "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }],
140
- "name": "deny",
141
- "outputs": [],
142
- "stateMutability": "nonpayable",
143
- "type": "function"
144
- },
145
- {
146
- "inputs": [
147
- { "internalType": "bytes32", "name": "what", "type": "bytes32" },
148
- { "internalType": "uint256", "name": "data", "type": "uint256" }
149
- ],
150
- "name": "file",
151
- "outputs": [],
152
- "stateMutability": "nonpayable",
153
- "type": "function"
154
- },
155
- {
156
- "inputs": [],
157
- "name": "gemJoin",
158
- "outputs": [
159
- {
160
- "internalType": "contract AuthGemJoinAbstract",
161
- "name": "",
162
- "type": "address"
163
- }
164
- ],
165
- "stateMutability": "view",
166
- "type": "function"
167
- },
168
- {
169
- "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }],
170
- "name": "hope",
171
- "outputs": [],
172
- "stateMutability": "nonpayable",
173
- "type": "function"
174
- },
175
- {
176
- "inputs": [],
177
- "name": "ilk",
178
- "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
179
- "stateMutability": "view",
180
- "type": "function"
181
- },
182
- {
183
- "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }],
184
- "name": "nope",
185
- "outputs": [],
186
- "stateMutability": "nonpayable",
187
- "type": "function"
188
- },
189
- {
190
- "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }],
191
- "name": "rely",
192
- "outputs": [],
193
- "stateMutability": "nonpayable",
194
- "type": "function"
195
- },
196
- {
197
- "inputs": [
198
- { "internalType": "address", "name": "usr", "type": "address" },
199
- { "internalType": "uint256", "name": "gemAmt", "type": "uint256" }
200
- ],
201
- "name": "sellGem",
202
- "outputs": [],
203
- "stateMutability": "nonpayable",
204
- "type": "function"
205
- },
206
- {
207
- "inputs": [],
208
- "name": "tin",
209
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
210
- "stateMutability": "view",
211
- "type": "function"
212
- },
213
- {
214
- "inputs": [],
215
- "name": "tout",
216
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
217
- "stateMutability": "view",
218
- "type": "function"
219
- },
220
- {
221
- "inputs": [],
222
- "name": "vat",
223
- "outputs": [
224
- { "internalType": "contract VatAbstract", "name": "", "type": "address" }
225
- ],
226
- "stateMutability": "view",
227
- "type": "function"
228
- },
229
- {
230
- "inputs": [],
231
- "name": "vow",
232
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
233
- "stateMutability": "view",
234
- "type": "function"
235
- },
236
- {
237
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
238
- "name": "wards",
239
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
240
- "stateMutability": "view",
241
- "type": "function"
242
- }
243
- ]
@@ -1,53 +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
- /* eslint-disable no-console */
7
- const dotenv_1 = __importDefault(require("dotenv"));
8
- dotenv_1.default.config();
9
- const constants_1 = require("../../../constants");
10
- const dex_helper_1 = require("../../../dex-helper");
11
- const config_1 = require("./../config");
12
- const solidly_v3_1 = require("../solidly-v3");
13
- const dex = 'SolidlyV3';
14
- const factory = config_1.SolidlyV3Config[dex][constants_1.Network.MAINNET].factory;
15
- const blockHeaders = {};
16
- async function checkForPoolEvents(startBlockNumber, endBlockNumber) {
17
- const network = constants_1.Network.MAINNET;
18
- const dexHelper = new dex_helper_1.DummyDexHelper(network);
19
- const solidlyV3 = new solidly_v3_1.SolidlyV3(network, dex, dexHelper);
20
- await solidlyV3.initializePricing(startBlockNumber);
21
- const logsToDispatch = await dexHelper.provider.getLogs({
22
- fromBlock: startBlockNumber,
23
- toBlock: endBlockNumber,
24
- address: factory,
25
- });
26
- const logsByBlockNumber = {};
27
- for (let log of logsToDispatch) {
28
- if (!logsByBlockNumber[log.blockNumber]) {
29
- logsByBlockNumber[log.blockNumber] = [];
30
- }
31
- logsByBlockNumber[log.blockNumber].push(log);
32
- }
33
- const sortedBlocks = Object.keys(logsByBlockNumber)
34
- .map(Number)
35
- .sort((a, b) => Number(a) - Number(b));
36
- for (let blockNumber of sortedBlocks) {
37
- if (!blockHeaders[blockNumber]) {
38
- blockHeaders[blockNumber] = await dexHelper.web3Provider.eth.getBlock(blockNumber);
39
- }
40
- await solidlyV3.factory?.update(logsByBlockNumber[blockNumber], {
41
- [blockNumber]: blockHeaders[blockNumber],
42
- });
43
- }
44
- return true;
45
- }
46
- async function main() {
47
- // event for https://etherscan.io/tx/0x2bef7c17f3f775525f076aeb20567ee25eb820e92aa8422fbfe4bed652fd2bd3
48
- checkForPoolEvents(18758010, 18758019);
49
- }
50
- main()
51
- .then(() => console.log('Done'))
52
- .catch(e => console.error(e));
53
- //# sourceMappingURL=check-event-pool-event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-event-pool-event.js","sourceRoot":"","sources":["../../../../src/dex/solidly-v3/scripts/check-event-pool-event.ts"],"names":[],"mappings":";;;;;AAAA,+BAA+B;AAC/B,oDAA4B;AAC5B,gBAAM,CAAC,MAAM,EAAE,CAAC;AAIhB,kDAA6C;AAC7C,oDAAqD;AACrD,wCAA8C;AAC9C,8CAA0C;AAE1C,MAAM,GAAG,GAAG,WAAW,CAAC;AACxB,MAAM,OAAO,GAAG,wBAAe,CAAC,GAAG,CAAC,CAAC,mBAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;AAC9D,MAAM,YAAY,GAAgC,EAAE,CAAC;AAErD,KAAK,UAAU,kBAAkB,CAC/B,gBAAwB,EACxB,cAAsB;IAEtB,MAAM,OAAO,GAAG,mBAAO,CAAC,OAAO,CAAC;IAChC,MAAM,SAAS,GAAG,IAAI,2BAAc,CAAC,OAAO,CAAC,CAAC;IAE9C,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;IACzD,MAAM,SAAS,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAEpD,MAAM,cAAc,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;QACtD,SAAS,EAAE,gBAAgB;QAC3B,OAAO,EAAE,cAAc;QACvB,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAA0B,EAAE,CAAC;IACpD,KAAK,IAAI,GAAG,IAAI,cAAc,EAAE;QAC9B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YACvC,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;SACzC;QACD,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC9C;IAED,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;SAChD,GAAG,CAAC,MAAM,CAAC;SACX,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzC,KAAK,IAAI,WAAW,IAAI,YAAY,EAAE;QACpC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE;YAC9B,YAAY,CAAC,WAAW,CAAC,GAAG,MAAM,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CACnE,WAAW,CACZ,CAAC;SACH;QAED,MAAM,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;YAC9D,CAAC,WAAW,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;SACzC,CAAC,CAAC;KACJ;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,uGAAuG;IACvG,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC;AAED,IAAI,EAAE;KACH,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;KAC/B,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- import { SwapSide } from '../../constants';
2
- import { AdapterExchangeParam, Address, DexExchangeParam, SimpleExchangeParam } from '../../types';
3
- import { IDexTxBuilder } from '../idex';
4
- import { IDexHelper } from '../../dex-helper';
5
- import { SimpleExchange } from '../simple-exchange';
6
- import { NumberAsString } from '@paraswap/core';
7
- import { AsyncOrSync } from 'ts-essentials';
8
- import { Interface } from '@ethersproject/abi';
9
- import { TraderJoeV2Data, TraderJoeV2RouterParam } from './types';
10
- export declare class BaseTraderJoeV2 extends SimpleExchange implements IDexTxBuilder<TraderJoeV2Data, TraderJoeV2RouterParam> {
11
- protected routerAddress: string;
12
- protected versionIndex: string;
13
- exchangeRouterInterface: Interface;
14
- constructor(dexHelper: IDexHelper, dexKey: string, routerAddress: string, versionIndex: string);
15
- getAdapterParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, data: TraderJoeV2Data, side: SwapSide): AdapterExchangeParam;
16
- getSimpleParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, data: TraderJoeV2Data, side: SwapSide): AsyncOrSync<SimpleExchangeParam>;
17
- getDexParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, recipient: Address, data: TraderJoeV2Data, side: SwapSide): DexExchangeParam;
18
- }
@@ -1,99 +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.BaseTraderJoeV2 = void 0;
7
- const constants_1 = require("../../constants");
8
- const simple_exchange_1 = require("../simple-exchange");
9
- const abi_1 = require("@ethersproject/abi");
10
- const TraderJoeV21Router_json_1 = __importDefault(require("../../abi/TraderJoeV21Router.json"));
11
- const types_1 = require("./types");
12
- const utils_1 = require("../../executor/utils");
13
- class BaseTraderJoeV2 extends simple_exchange_1.SimpleExchange {
14
- constructor(dexHelper, dexKey, routerAddress, versionIndex) {
15
- super(dexHelper, dexKey);
16
- this.routerAddress = routerAddress;
17
- this.versionIndex = versionIndex;
18
- this.exchangeRouterInterface = new abi_1.Interface(TraderJoeV21Router_json_1.default);
19
- }
20
- getAdapterParam(srcToken, destToken, srcAmount, destAmount, data, side) {
21
- let payload = this.abiCoder.encodeParameters(['tuple(tuple(uint256[],uint8[],address[]),uint256)'], [
22
- [
23
- [
24
- [
25
- data.binStep, // _pairBinSteps: uint256[]
26
- ],
27
- [
28
- this.versionIndex, // _versions: uint8[]
29
- ],
30
- [
31
- data.tokenIn,
32
- data.tokenOut, // _tokenPath: address[]
33
- ],
34
- ],
35
- (0, simple_exchange_1.getLocalDeadlineAsFriendlyPlaceholder)(), // _deadline: uint256
36
- ],
37
- ]);
38
- return {
39
- targetExchange: this.routerAddress,
40
- payload,
41
- networkFee: '0',
42
- };
43
- }
44
- getSimpleParam(srcToken, destToken, srcAmount, destAmount, data, side) {
45
- const swapFunction = side === constants_1.SwapSide.SELL
46
- ? types_1.TraderJoeV2RouterFunctions.swapExactTokensForTokens
47
- : types_1.TraderJoeV2RouterFunctions.swapTokensForExactTokens;
48
- const swapFunctionParams = side === constants_1.SwapSide.SELL
49
- ? [
50
- srcAmount,
51
- destAmount,
52
- [[data.binStep], [this.versionIndex], [srcToken, destToken]],
53
- this.augustusAddress,
54
- (0, simple_exchange_1.getLocalDeadlineAsFriendlyPlaceholder)(),
55
- ]
56
- : [
57
- destAmount,
58
- srcAmount,
59
- [[data.binStep], [this.versionIndex], [srcToken, destToken]],
60
- this.augustusAddress,
61
- (0, simple_exchange_1.getLocalDeadlineAsFriendlyPlaceholder)(),
62
- ];
63
- const swapData = this.exchangeRouterInterface.encodeFunctionData(swapFunction, swapFunctionParams);
64
- return this.buildSimpleParamWithoutWETHConversion(srcToken, srcAmount, destToken, destAmount, swapData, this.routerAddress);
65
- }
66
- getDexParam(srcToken, destToken, srcAmount, destAmount, recipient, data, side) {
67
- const swapFunction = side === constants_1.SwapSide.SELL
68
- ? types_1.TraderJoeV2RouterFunctions.swapExactTokensForTokens
69
- : types_1.TraderJoeV2RouterFunctions.swapTokensForExactTokens;
70
- const placeholder = (0, simple_exchange_1.getLocalDeadlineAsFriendlyPlaceholder)();
71
- const swapFunctionParams = side === constants_1.SwapSide.SELL
72
- ? [
73
- srcAmount,
74
- destAmount,
75
- [[data.binStep], [this.versionIndex], [srcToken, destToken]],
76
- recipient,
77
- placeholder,
78
- ]
79
- : [
80
- destAmount,
81
- srcAmount,
82
- [[data.binStep], [this.versionIndex], [srcToken, destToken]],
83
- recipient,
84
- placeholder,
85
- ];
86
- const swapData = this.exchangeRouterInterface.encodeFunctionData(swapFunction, swapFunctionParams);
87
- return {
88
- needWrapNative: this.needWrapNative,
89
- dexFuncHasRecipient: true,
90
- exchangeData: swapData,
91
- targetExchange: this.routerAddress,
92
- returnAmountPos: side === constants_1.SwapSide.SELL
93
- ? (0, utils_1.extractReturnAmountPosition)(this.exchangeRouterInterface, swapFunction, 'amountOut')
94
- : undefined,
95
- };
96
- }
97
- }
98
- exports.BaseTraderJoeV2 = BaseTraderJoeV2;
99
- //# sourceMappingURL=base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/dex/trader-joe-v2.1/base.ts"],"names":[],"mappings":"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"}
@@ -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"}
@@ -1,7 +0,0 @@
1
- import { IDexHelper } from '../../dex-helper';
2
- import { BaseTraderJoeV2 } from './base';
3
- export declare class TraderJoeV22 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.TraderJoeV22 = 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 TraderJoeV22 extends base_1.BaseTraderJoeV2 {
12
- constructor(dexHelper) {
13
- super(dexHelper, 'traderjoev2.2', config_1.TRADERJOE_V2_2_ROUTER_ADDRESS[dexHelper.config.data.network], '3');
14
- this.needWrapNative = true;
15
- this.exchangeRouterInterface = new abi_1.Interface(TraderJoeV21Router_json_1.default);
16
- }
17
- }
18
- exports.TraderJoeV22 = TraderJoeV22;
19
- TraderJoeV22.dexKeys = ['traderjoev2.2'];
20
- //# sourceMappingURL=trader-joe-v2.2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trader-joe-v2.2.js","sourceRoot":"","sources":["../../../src/dex/trader-joe-v2.1/trader-joe-v2.2.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"}
@@ -1,17 +0,0 @@
1
- import { Network, SwapSide } from '../../../../constants';
2
- import { IDexHelper } from '../../../../dex-helper';
3
- import { DexConfigMap, SimpleExchangeParam } from '../../../../types';
4
- import { DexParams, UniswapV3Data } from '../../types';
5
- import { UniswapV3 } from '../../uniswap-v3';
6
- export declare const AlienBaseV3Config: DexConfigMap<DexParams>;
7
- export declare class AlienBaseV3 extends UniswapV3 {
8
- protected network: Network;
9
- protected dexHelper: IDexHelper;
10
- static dexKeysWithNetwork: {
11
- key: string;
12
- networks: Network[];
13
- }[];
14
- constructor(network: Network, dexKey: string, dexHelper: IDexHelper);
15
- static getDirectFunctionName(): string[];
16
- getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: UniswapV3Data, side: SwapSide): Promise<SimpleExchangeParam>;
17
- }
@@ -1,64 +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.AlienBaseV3 = exports.AlienBaseV3Config = void 0;
7
- const abi_1 = require("@ethersproject/abi");
8
- const constants_1 = require("../../../../constants");
9
- const utils_1 = require("../../../../utils");
10
- const types_1 = require("../../types");
11
- const uniswap_v3_1 = require("../../uniswap-v3");
12
- const AlienBaseV3Router_abi_json_1 = __importDefault(require("../../../../abi/uniswap-v3/AlienBaseV3Router.abi.json"));
13
- exports.AlienBaseV3Config = {
14
- AlienBaseV3: {
15
- [constants_1.Network.BASE]: {
16
- factory: '0x0Fd83557b2be93617c9C1C1B6fd549401C74558C',
17
- quoter: '0x4fDBD73aD4B1DDde594BF05497C15f76308eFfb9',
18
- router: '0xB20C411FC84FBB27e78608C24d0056D974ea9411',
19
- supportedFees: [10000n, 3000n, 750n, 200n],
20
- stateMulticall: '0x7160f736c52e1e78e92FD4eE4D73e21A7Cf4F950',
21
- uniswapMulticall: '0x091e99cb1C49331a94dD62755D168E941AbD0693',
22
- chunksCount: 10,
23
- initRetryFrequency: 10,
24
- initHash: `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`,
25
- subgraphURL: 'https://api.studio.thegraph.com/query/59130/v3alb/0.3',
26
- },
27
- },
28
- };
29
- class AlienBaseV3 extends uniswap_v3_1.UniswapV3 {
30
- constructor(network, dexKey, dexHelper) {
31
- super(network, dexKey, dexHelper, {}, new abi_1.Interface(AlienBaseV3Router_abi_json_1.default), undefined, exports.AlienBaseV3Config[dexKey][network]);
32
- this.network = network;
33
- this.dexHelper = dexHelper;
34
- }
35
- static getDirectFunctionName() {
36
- return [];
37
- }
38
- async getSimpleParam(srcToken, destToken, srcAmount, destAmount, data, side) {
39
- const swapFunction = side === constants_1.SwapSide.SELL
40
- ? types_1.UniswapV3Functions.exactInput
41
- : types_1.UniswapV3Functions.exactOutput;
42
- const path = this._encodePath(data.path, side);
43
- const swapFunctionParams = side === constants_1.SwapSide.SELL
44
- ? {
45
- recipient: this.augustusAddress,
46
- amountIn: srcAmount,
47
- amountOutMinimum: destAmount,
48
- path,
49
- }
50
- : {
51
- recipient: this.augustusAddress,
52
- amountOut: destAmount,
53
- amountInMaximum: srcAmount,
54
- path,
55
- };
56
- const swapData = this.routerIface.encodeFunctionData(swapFunction, [
57
- swapFunctionParams,
58
- ]);
59
- return this.buildSimpleParamWithoutWETHConversion(srcToken, srcAmount, destToken, destAmount, swapData, this.config.router);
60
- }
61
- }
62
- exports.AlienBaseV3 = AlienBaseV3;
63
- AlienBaseV3.dexKeysWithNetwork = (0, utils_1.getDexKeysWithNetwork)(exports.AlienBaseV3Config);
64
- //# sourceMappingURL=alien-base-v3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alien-base-v3.js","sourceRoot":"","sources":["../../../../../src/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA+C;AAC/C,qDAA0D;AAG1D,6CAA0D;AAC1D,uCAMqB;AACrB,iDAA6C;AAC7C,uHAAyF;AAE5E,QAAA,iBAAiB,GAA4B;IACxD,WAAW,EAAE;QACX,CAAC,mBAAO,CAAC,IAAI,CAAC,EAAE;YACd,OAAO,EAAE,4CAA4C;YACrD,MAAM,EAAE,4CAA4C;YACpD,MAAM,EAAE,4CAA4C;YACpD,aAAa,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC;YAC1C,cAAc,EAAE,4CAA4C;YAC5D,gBAAgB,EAAE,4CAA4C;YAC9D,WAAW,EAAE,EAAE;YACf,kBAAkB,EAAE,EAAE;YACtB,QAAQ,EAAE,oEAAoE;YAC9E,WAAW,EAAE,uDAAuD;SACrE;KACF;CACF,CAAC;AAMF,MAAa,WAAY,SAAQ,sBAAS;IAIxC,YACY,OAAgB,EAC1B,MAAc,EACJ,SAAqB;QAE/B,KAAK,CACH,OAAO,EACP,MAAM,EACN,SAAS,EACT,EAAE,EACF,IAAI,eAAS,CAAC,oCAAoB,CAAC,EACnC,SAAS,EACT,yBAAiB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CACnC,CAAC;QAZQ,YAAO,GAAP,OAAO,CAAS;QAEhB,cAAS,GAAT,SAAS,CAAY;IAWjC,CAAC;IAED,MAAM,CAAC,qBAAqB;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAmB,EACnB,IAAc;QAEd,MAAM,YAAY,GAChB,IAAI,KAAK,oBAAQ,CAAC,IAAI;YACpB,CAAC,CAAC,0BAAkB,CAAC,UAAU;YAC/B,CAAC,CAAC,0BAAkB,CAAC,WAAW,CAAC;QAErC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/C,MAAM,kBAAkB,GACtB,IAAI,KAAK,oBAAQ,CAAC,IAAI;YACpB,CAAC,CAAC;gBACE,SAAS,EAAE,IAAI,CAAC,eAAe;gBAC/B,QAAQ,EAAE,SAAS;gBACnB,gBAAgB,EAAE,UAAU;gBAC5B,IAAI;aACL;YACH,CAAC,CAAC;gBACE,SAAS,EAAE,IAAI,CAAC,eAAe;gBAC/B,SAAS,EAAE,UAAU;gBACrB,eAAe,EAAE,SAAS;gBAC1B,IAAI;aACL,CAAC;QAER,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,YAAY,EAAE;YACjE,kBAAkB;SACnB,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,qCAAqC,CAC/C,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,IAAI,CAAC,MAAM,CAAC,MAAM,CACnB,CAAC;IACJ,CAAC;;AAjEH,kCAkEC;AAjEe,8BAAkB,GAC9B,IAAA,6BAAqB,EAAC,yBAAiB,CAAC,CAAC"}
@@ -1,17 +0,0 @@
1
- import { Network, SwapSide } from '../../../../constants';
2
- import { IDexHelper } from '../../../../dex-helper';
3
- import { DexConfigMap, SimpleExchangeParam } from '../../../../types';
4
- import { DexParams, UniswapV3Data } from '../../types';
5
- import { UniswapV3 } from '../../uniswap-v3';
6
- export declare const AlienBaseV3Config: DexConfigMap<DexParams>;
7
- export declare class AlienV3 extends UniswapV3 {
8
- protected network: Network;
9
- protected dexHelper: IDexHelper;
10
- static dexKeysWithNetwork: {
11
- key: string;
12
- networks: Network[];
13
- }[];
14
- constructor(network: Network, dexKey: string, dexHelper: IDexHelper);
15
- static getDirectFunctionName(): string[];
16
- getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: UniswapV3Data, side: SwapSide): Promise<SimpleExchangeParam>;
17
- }