@kittycorn-labs/universal-router-sdk 1.4.42 → 2.0.0

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 (244) hide show
  1. package/README.md +312 -0
  2. package/dist/cjs/src/abis/UniversalRouter.json +740 -0
  3. package/dist/{entities → cjs/src/entities}/Command.d.ts +12 -12
  4. package/dist/cjs/src/entities/Command.js +9 -0
  5. package/dist/cjs/src/entities/Command.js.map +1 -0
  6. package/dist/cjs/src/entities/actions/across.d.ts +21 -0
  7. package/dist/cjs/src/entities/actions/across.js +7 -0
  8. package/dist/cjs/src/entities/actions/across.js.map +1 -0
  9. package/dist/{entities → cjs/src/entities}/actions/index.d.ts +3 -2
  10. package/dist/cjs/src/entities/actions/index.js +7 -0
  11. package/dist/cjs/src/entities/actions/index.js.map +1 -0
  12. package/dist/cjs/src/entities/actions/uniswap.d.ts +94 -0
  13. package/dist/cjs/src/entities/actions/uniswap.js +740 -0
  14. package/dist/cjs/src/entities/actions/uniswap.js.map +1 -0
  15. package/dist/{entities → cjs/src/entities}/actions/unwrapWETH.d.ts +12 -12
  16. package/dist/cjs/src/entities/actions/unwrapWETH.js +33 -0
  17. package/dist/cjs/src/entities/actions/unwrapWETH.js.map +1 -0
  18. package/dist/{entities → cjs/src/entities}/index.d.ts +2 -2
  19. package/dist/cjs/src/entities/index.js +6 -0
  20. package/dist/cjs/src/entities/index.js.map +1 -0
  21. package/dist/cjs/src/index.d.ts +19 -0
  22. package/dist/cjs/src/index.js +43 -0
  23. package/dist/cjs/src/index.js.map +1 -0
  24. package/dist/cjs/src/kittycorn.d.ts +9 -0
  25. package/dist/cjs/src/kittycorn.js +26 -0
  26. package/dist/cjs/src/kittycorn.js.map +1 -0
  27. package/dist/cjs/src/swapRouter.d.ts +123 -0
  28. package/dist/cjs/src/swapRouter.js +445 -0
  29. package/dist/cjs/src/swapRouter.js.map +1 -0
  30. package/dist/cjs/src/types/encodeSwaps.d.ts +197 -0
  31. package/dist/cjs/src/types/encodeSwaps.js +3 -0
  32. package/dist/cjs/src/types/encodeSwaps.js.map +1 -0
  33. package/dist/{utils → cjs/src/utils}/commandParser.d.ts +36 -34
  34. package/dist/cjs/src/utils/commandParser.js +154 -0
  35. package/dist/cjs/src/utils/commandParser.js.map +1 -0
  36. package/dist/cjs/src/utils/computeEncodeSwapsAmounts.d.ts +8 -0
  37. package/dist/cjs/src/utils/computeEncodeSwapsAmounts.js +46 -0
  38. package/dist/cjs/src/utils/computeEncodeSwapsAmounts.js.map +1 -0
  39. package/dist/{utils → cjs/src/utils}/constants.d.ts +46 -30
  40. package/dist/cjs/src/utils/constants.js +777 -0
  41. package/dist/cjs/src/utils/constants.js.map +1 -0
  42. package/dist/cjs/src/utils/directTransfers.d.ts +15 -0
  43. package/dist/cjs/src/utils/directTransfers.js +381 -0
  44. package/dist/cjs/src/utils/directTransfers.js.map +1 -0
  45. package/dist/cjs/src/utils/eip712.d.ts +17 -0
  46. package/dist/cjs/src/utils/eip712.js +44 -0
  47. package/dist/cjs/src/utils/eip712.js.map +1 -0
  48. package/dist/cjs/src/utils/encodeSwapStep.d.ts +4 -0
  49. package/dist/cjs/src/utils/encodeSwapStep.js +62 -0
  50. package/dist/cjs/src/utils/encodeSwapStep.js.map +1 -0
  51. package/dist/cjs/src/utils/encodeV4Action.d.ts +7 -0
  52. package/dist/cjs/src/utils/encodeV4Action.js +84 -0
  53. package/dist/cjs/src/utils/encodeV4Action.js.map +1 -0
  54. package/dist/{utils → cjs/src/utils}/getCurrencyAddress.d.ts +2 -2
  55. package/dist/cjs/src/utils/getCurrencyAddress.js +9 -0
  56. package/dist/cjs/src/utils/getCurrencyAddress.js.map +1 -0
  57. package/dist/{utils → cjs/src/utils}/inputTokens.d.ts +23 -23
  58. package/dist/cjs/src/utils/inputTokens.js +58 -0
  59. package/dist/cjs/src/utils/inputTokens.js.map +1 -0
  60. package/dist/cjs/src/utils/normalizeEncodeSwapsSpec.d.ts +6 -0
  61. package/dist/cjs/src/utils/normalizeEncodeSwapsSpec.js +34 -0
  62. package/dist/cjs/src/utils/normalizeEncodeSwapsSpec.js.map +1 -0
  63. package/dist/{utils → cjs/src/utils}/numbers.d.ts +7 -6
  64. package/dist/cjs/src/utils/numbers.js +27 -0
  65. package/dist/cjs/src/utils/numbers.js.map +1 -0
  66. package/dist/{utils → cjs/src/utils}/pathCurrency.d.ts +3 -3
  67. package/dist/cjs/src/utils/pathCurrency.js +27 -0
  68. package/dist/cjs/src/utils/pathCurrency.js.map +1 -0
  69. package/dist/cjs/src/utils/portionFees.d.ts +14 -0
  70. package/dist/cjs/src/utils/portionFees.js +40 -0
  71. package/dist/cjs/src/utils/portionFees.js.map +1 -0
  72. package/dist/cjs/src/utils/routerBalanceSteps.d.ts +31 -0
  73. package/dist/cjs/src/utils/routerBalanceSteps.js +293 -0
  74. package/dist/cjs/src/utils/routerBalanceSteps.js.map +1 -0
  75. package/dist/{utils → cjs/src/utils}/routerCommands.d.ts +77 -64
  76. package/dist/cjs/src/utils/routerCommands.js +331 -0
  77. package/dist/cjs/src/utils/routerCommands.js.map +1 -0
  78. package/dist/{utils → cjs/src/utils}/routerTradeAdapter.d.ts +73 -73
  79. package/dist/cjs/src/utils/routerTradeAdapter.js +139 -0
  80. package/dist/cjs/src/utils/routerTradeAdapter.js.map +1 -0
  81. package/dist/cjs/src/utils/toV4URVersion.d.ts +3 -0
  82. package/dist/cjs/src/utils/toV4URVersion.js +17 -0
  83. package/dist/cjs/src/utils/toV4URVersion.js.map +1 -0
  84. package/dist/cjs/src/utils/validateEncodeSwaps.d.ts +2 -0
  85. package/dist/cjs/src/utils/validateEncodeSwaps.js +344 -0
  86. package/dist/cjs/src/utils/validateEncodeSwaps.js.map +1 -0
  87. package/dist/esm/package.json +1 -0
  88. package/dist/esm/src/abis/UniversalRouter.json +740 -0
  89. package/dist/esm/src/entities/Command.d.ts +12 -0
  90. package/dist/esm/src/entities/Command.js +6 -0
  91. package/dist/esm/src/entities/Command.js.map +1 -0
  92. package/dist/esm/src/entities/actions/across.d.ts +21 -0
  93. package/dist/esm/src/entities/actions/across.js +3 -0
  94. package/dist/esm/src/entities/actions/across.js.map +1 -0
  95. package/dist/esm/src/entities/actions/index.d.ts +3 -0
  96. package/dist/esm/src/entities/actions/index.js +4 -0
  97. package/dist/esm/src/entities/actions/index.js.map +1 -0
  98. package/dist/esm/src/entities/actions/uniswap.d.ts +94 -0
  99. package/dist/esm/src/entities/actions/uniswap.js +735 -0
  100. package/dist/esm/src/entities/actions/uniswap.js.map +1 -0
  101. package/dist/esm/src/entities/actions/unwrapWETH.d.ts +12 -0
  102. package/dist/esm/src/entities/actions/unwrapWETH.js +28 -0
  103. package/dist/esm/src/entities/actions/unwrapWETH.js.map +1 -0
  104. package/dist/esm/src/entities/index.d.ts +2 -0
  105. package/dist/esm/src/entities/index.js +3 -0
  106. package/dist/esm/src/entities/index.js.map +1 -0
  107. package/dist/esm/src/index.d.ts +19 -0
  108. package/dist/esm/src/index.js +15 -0
  109. package/dist/esm/src/index.js.map +1 -0
  110. package/dist/esm/src/kittycorn.d.ts +9 -0
  111. package/dist/esm/src/kittycorn.js +22 -0
  112. package/dist/esm/src/kittycorn.js.map +1 -0
  113. package/dist/esm/src/swapRouter.d.ts +123 -0
  114. package/dist/esm/src/swapRouter.js +440 -0
  115. package/dist/esm/src/swapRouter.js.map +1 -0
  116. package/dist/esm/src/types/encodeSwaps.d.ts +197 -0
  117. package/dist/esm/src/types/encodeSwaps.js +2 -0
  118. package/dist/esm/src/types/encodeSwaps.js.map +1 -0
  119. package/dist/esm/src/utils/commandParser.d.ts +36 -0
  120. package/dist/esm/src/utils/commandParser.js +146 -0
  121. package/dist/esm/src/utils/commandParser.js.map +1 -0
  122. package/dist/esm/src/utils/computeEncodeSwapsAmounts.d.ts +8 -0
  123. package/dist/esm/src/utils/computeEncodeSwapsAmounts.js +41 -0
  124. package/dist/esm/src/utils/computeEncodeSwapsAmounts.js.map +1 -0
  125. package/dist/esm/src/utils/constants.d.ts +46 -0
  126. package/dist/esm/src/utils/constants.js +768 -0
  127. package/dist/esm/src/utils/constants.js.map +1 -0
  128. package/dist/esm/src/utils/directTransfers.d.ts +15 -0
  129. package/dist/esm/src/utils/directTransfers.js +369 -0
  130. package/dist/esm/src/utils/directTransfers.js.map +1 -0
  131. package/dist/esm/src/utils/eip712.d.ts +17 -0
  132. package/dist/esm/src/utils/eip712.js +39 -0
  133. package/dist/esm/src/utils/eip712.js.map +1 -0
  134. package/dist/esm/src/utils/encodeSwapStep.d.ts +4 -0
  135. package/dist/esm/src/utils/encodeSwapStep.js +58 -0
  136. package/dist/esm/src/utils/encodeSwapStep.js.map +1 -0
  137. package/dist/esm/src/utils/encodeV4Action.d.ts +7 -0
  138. package/dist/esm/src/utils/encodeV4Action.js +80 -0
  139. package/dist/esm/src/utils/encodeV4Action.js.map +1 -0
  140. package/dist/esm/src/utils/getCurrencyAddress.d.ts +2 -0
  141. package/dist/esm/src/utils/getCurrencyAddress.js +5 -0
  142. package/dist/esm/src/utils/getCurrencyAddress.js.map +1 -0
  143. package/dist/esm/src/utils/inputTokens.d.ts +23 -0
  144. package/dist/esm/src/utils/inputTokens.js +51 -0
  145. package/dist/esm/src/utils/inputTokens.js.map +1 -0
  146. package/dist/esm/src/utils/normalizeEncodeSwapsSpec.d.ts +6 -0
  147. package/dist/esm/src/utils/normalizeEncodeSwapsSpec.js +27 -0
  148. package/dist/esm/src/utils/normalizeEncodeSwapsSpec.js.map +1 -0
  149. package/dist/esm/src/utils/numbers.d.ts +7 -0
  150. package/dist/esm/src/utils/numbers.js +19 -0
  151. package/dist/esm/src/utils/numbers.js.map +1 -0
  152. package/dist/esm/src/utils/pathCurrency.d.ts +3 -0
  153. package/dist/esm/src/utils/pathCurrency.js +23 -0
  154. package/dist/esm/src/utils/pathCurrency.js.map +1 -0
  155. package/dist/esm/src/utils/portionFees.d.ts +14 -0
  156. package/dist/esm/src/utils/portionFees.js +35 -0
  157. package/dist/esm/src/utils/portionFees.js.map +1 -0
  158. package/dist/esm/src/utils/routerBalanceSteps.d.ts +31 -0
  159. package/dist/esm/src/utils/routerBalanceSteps.js +282 -0
  160. package/dist/esm/src/utils/routerBalanceSteps.js.map +1 -0
  161. package/dist/esm/src/utils/routerCommands.d.ts +77 -0
  162. package/dist/esm/src/utils/routerCommands.js +326 -0
  163. package/dist/esm/src/utils/routerCommands.js.map +1 -0
  164. package/dist/esm/src/utils/routerTradeAdapter.d.ts +73 -0
  165. package/dist/esm/src/utils/routerTradeAdapter.js +134 -0
  166. package/dist/esm/src/utils/routerTradeAdapter.js.map +1 -0
  167. package/dist/esm/src/utils/toV4URVersion.d.ts +3 -0
  168. package/dist/esm/src/utils/toV4URVersion.js +13 -0
  169. package/dist/esm/src/utils/toV4URVersion.js.map +1 -0
  170. package/dist/esm/src/utils/validateEncodeSwaps.d.ts +2 -0
  171. package/dist/esm/src/utils/validateEncodeSwaps.js +339 -0
  172. package/dist/esm/src/utils/validateEncodeSwaps.js.map +1 -0
  173. package/dist/types/src/entities/Command.d.ts +13 -0
  174. package/dist/types/src/entities/Command.d.ts.map +1 -0
  175. package/dist/types/src/entities/actions/across.d.ts +22 -0
  176. package/dist/types/src/entities/actions/across.d.ts.map +1 -0
  177. package/dist/types/src/entities/actions/index.d.ts +4 -0
  178. package/dist/types/src/entities/actions/index.d.ts.map +1 -0
  179. package/dist/types/src/entities/actions/uniswap.d.ts +95 -0
  180. package/dist/types/src/entities/actions/uniswap.d.ts.map +1 -0
  181. package/dist/types/src/entities/actions/unwrapWETH.d.ts +13 -0
  182. package/dist/types/src/entities/actions/unwrapWETH.d.ts.map +1 -0
  183. package/dist/types/src/entities/index.d.ts +3 -0
  184. package/dist/types/src/entities/index.d.ts.map +1 -0
  185. package/dist/types/src/index.d.ts +20 -0
  186. package/dist/types/src/index.d.ts.map +1 -0
  187. package/dist/types/src/kittycorn.d.ts +10 -0
  188. package/dist/types/src/kittycorn.d.ts.map +1 -0
  189. package/dist/types/src/swapRouter.d.ts +124 -0
  190. package/dist/types/src/swapRouter.d.ts.map +1 -0
  191. package/dist/types/src/types/encodeSwaps.d.ts +198 -0
  192. package/dist/types/src/types/encodeSwaps.d.ts.map +1 -0
  193. package/dist/types/src/utils/commandParser.d.ts +37 -0
  194. package/dist/types/src/utils/commandParser.d.ts.map +1 -0
  195. package/dist/types/src/utils/computeEncodeSwapsAmounts.d.ts +9 -0
  196. package/dist/types/src/utils/computeEncodeSwapsAmounts.d.ts.map +1 -0
  197. package/dist/types/src/utils/constants.d.ts +47 -0
  198. package/dist/types/src/utils/constants.d.ts.map +1 -0
  199. package/dist/types/src/utils/directTransfers.d.ts +16 -0
  200. package/dist/types/src/utils/directTransfers.d.ts.map +1 -0
  201. package/dist/types/src/utils/eip712.d.ts +18 -0
  202. package/dist/types/src/utils/eip712.d.ts.map +1 -0
  203. package/dist/types/src/utils/encodeSwapStep.d.ts +5 -0
  204. package/dist/types/src/utils/encodeSwapStep.d.ts.map +1 -0
  205. package/dist/types/src/utils/encodeV4Action.d.ts +8 -0
  206. package/dist/types/src/utils/encodeV4Action.d.ts.map +1 -0
  207. package/dist/types/src/utils/getCurrencyAddress.d.ts +3 -0
  208. package/dist/types/src/utils/getCurrencyAddress.d.ts.map +1 -0
  209. package/dist/types/src/utils/inputTokens.d.ts +24 -0
  210. package/dist/types/src/utils/inputTokens.d.ts.map +1 -0
  211. package/dist/types/src/utils/normalizeEncodeSwapsSpec.d.ts +7 -0
  212. package/dist/types/src/utils/normalizeEncodeSwapsSpec.d.ts.map +1 -0
  213. package/dist/types/src/utils/numbers.d.ts +8 -0
  214. package/dist/types/src/utils/numbers.d.ts.map +1 -0
  215. package/dist/types/src/utils/pathCurrency.d.ts +4 -0
  216. package/dist/types/src/utils/pathCurrency.d.ts.map +1 -0
  217. package/dist/types/src/utils/portionFees.d.ts +15 -0
  218. package/dist/types/src/utils/portionFees.d.ts.map +1 -0
  219. package/dist/types/src/utils/routerBalanceSteps.d.ts +32 -0
  220. package/dist/types/src/utils/routerBalanceSteps.d.ts.map +1 -0
  221. package/dist/types/src/utils/routerCommands.d.ts +78 -0
  222. package/dist/types/src/utils/routerCommands.d.ts.map +1 -0
  223. package/dist/types/src/utils/routerTradeAdapter.d.ts +74 -0
  224. package/dist/types/src/utils/routerTradeAdapter.d.ts.map +1 -0
  225. package/dist/types/src/utils/toV4URVersion.d.ts +4 -0
  226. package/dist/types/src/utils/toV4URVersion.d.ts.map +1 -0
  227. package/dist/types/src/utils/validateEncodeSwaps.d.ts +3 -0
  228. package/dist/types/src/utils/validateEncodeSwaps.d.ts.map +1 -0
  229. package/package.json +33 -52
  230. package/dist/entities/actions/uniswap.d.ts +0 -30
  231. package/dist/index.d.ts +0 -10
  232. package/dist/index.js +0 -8
  233. package/dist/swapRouter.d.ts +0 -37
  234. package/dist/test/forge/writeInterop.d.ts +0 -2
  235. package/dist/test/utils/addresses.d.ts +0 -5
  236. package/dist/test/utils/hexToDecimalString.d.ts +0 -2
  237. package/dist/test/utils/permit2.d.ts +0 -7
  238. package/dist/test/utils/uniswapData.d.ts +0 -25
  239. package/dist/universal-router-sdk.cjs.development.js +0 -1500
  240. package/dist/universal-router-sdk.cjs.development.js.map +0 -1
  241. package/dist/universal-router-sdk.cjs.production.min.js +0 -2
  242. package/dist/universal-router-sdk.cjs.production.min.js.map +0 -1
  243. package/dist/universal-router-sdk.esm.js +0 -1493
  244. package/dist/universal-router-sdk.esm.js.map +0 -1
@@ -0,0 +1,768 @@
1
+ import { BigNumber } from '@ethersproject/bignumber';
2
+ // Members must stay declared oldest-to-newest: the isAtLeast* helpers derive their version
3
+ // ordering from this declaration order.
4
+ export var UniversalRouterVersion;
5
+ (function (UniversalRouterVersion) {
6
+ UniversalRouterVersion["V1_2"] = "1.2";
7
+ UniversalRouterVersion["V2_0"] = "2.0";
8
+ UniversalRouterVersion["V2_1_1"] = "2.1.1";
9
+ UniversalRouterVersion["V2_1_2"] = "2.1.2";
10
+ UniversalRouterVersion["V2_2_0"] = "2.2.0";
11
+ })(UniversalRouterVersion || (UniversalRouterVersion = {}));
12
+ /** Version assumed when a caller does not pass `urVersion`; kept at V2_0 for backward compatibility. */
13
+ export const DEFAULT_UR_VERSION = UniversalRouterVersion.V2_0;
14
+ // Enum order, not string comparison: '2.1.1-rc.1' would sort >= '2.1.1', and unknown values must be index -1.
15
+ const VERSION_ORDER = Object.values(UniversalRouterVersion);
16
+ function isAtLeast(version, minimum) {
17
+ return !!version && VERSION_ORDER.indexOf(version) >= VERSION_ORDER.indexOf(minimum);
18
+ }
19
+ /**
20
+ * Check if a UniversalRouterVersion is at least V2_1_1.
21
+ * Duplicated from @kittycorn-labs/v4-sdk's isAtLeastV2_1_1 (which operates on URVersion)
22
+ * to avoid coupling universal-router-sdk's version logic to v4-sdk.
23
+ */
24
+ export function isAtLeastV2_1_1(version) {
25
+ return isAtLeast(version, UniversalRouterVersion.V2_1_1);
26
+ }
27
+ /** Check if a UniversalRouterVersion is at least V2_0, the first router with the position-manager commands. */
28
+ export function isAtLeastV2_0(version) {
29
+ return isAtLeast(version, UniversalRouterVersion.V2_0);
30
+ }
31
+ const WETH_NOT_SUPPORTED_ON_CHAIN = '0x0000000000000000000000000000000000000000';
32
+ const SWAP_PROXY_DEPLOY_ADDRESS = '0x02E5be68D46DAc0B524905bfF209cf47EE6dB2a9';
33
+ // Todo: Change `CHAIN_CONFIGS` to pull the UR address with v4
34
+ export const CHAIN_CONFIGS = {
35
+ // mainnet
36
+ [1]: {
37
+ weth: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
38
+ nativeErc20BalanceAlias: false,
39
+ routerConfigs: {
40
+ [UniversalRouterVersion.V1_2]: {
41
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
42
+ creationBlock: 17143817,
43
+ },
44
+ [UniversalRouterVersion.V2_0]: {
45
+ address: '0x66a9893cc07d91d95644aedd05d03f95e1dba8af',
46
+ creationBlock: 21689092,
47
+ },
48
+ [UniversalRouterVersion.V2_1_1]: {
49
+ address: '0x4C82D1fBFe28C977cBB58D8C7FF8FCF9F70a2cCA',
50
+ creationBlock: 24680568,
51
+ },
52
+ [UniversalRouterVersion.V2_1_2]: {
53
+ address: '0x23617e59A5925b2A4Bf75d73ff6711cD0b29De85',
54
+ creationBlock: 25999984,
55
+ },
56
+ [UniversalRouterVersion.V2_2_0]: {
57
+ address: '0xab863E752Bf67D8DCDD929EaAe9Be9dc83Fb3BbB',
58
+ creationBlock: 26006366,
59
+ },
60
+ },
61
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
62
+ },
63
+ // goerli
64
+ [5]: {
65
+ weth: '0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6',
66
+ nativeErc20BalanceAlias: false,
67
+ routerConfigs: {
68
+ [UniversalRouterVersion.V1_2]: {
69
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
70
+ creationBlock: 8940568,
71
+ },
72
+ [UniversalRouterVersion.V2_0]: {
73
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
74
+ creationBlock: 8940568,
75
+ },
76
+ },
77
+ },
78
+ // sepolia
79
+ [11155111]: {
80
+ weth: '0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14',
81
+ nativeErc20BalanceAlias: false,
82
+ routerConfigs: {
83
+ [UniversalRouterVersion.V1_2]: {
84
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
85
+ creationBlock: 3543575,
86
+ },
87
+ [UniversalRouterVersion.V2_0]: {
88
+ address: '0x3a9d48ab9751398bbfa63ad67599bb04e4bdf98b',
89
+ creationBlock: 7259601,
90
+ },
91
+ [UniversalRouterVersion.V2_1_1]: {
92
+ address: '0x7DfD4F31be6814D2906BDE155c3e1B146EAc1468',
93
+ creationBlock: 11343084,
94
+ },
95
+ [UniversalRouterVersion.V2_1_2]: {
96
+ address: '0x7E4f6c5e954Da5c61B3423D81E2277431Ac043f3',
97
+ creationBlock: 11726370,
98
+ },
99
+ [UniversalRouterVersion.V2_2_0]: {
100
+ address: '0x5093f1CDED83d99FfEd6602dA6260672ae16787c',
101
+ creationBlock: 11732372,
102
+ },
103
+ },
104
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
105
+ },
106
+ // polygon
107
+ [137]: {
108
+ weth: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
109
+ nativeErc20BalanceAlias: true,
110
+ routerConfigs: {
111
+ [UniversalRouterVersion.V1_2]: {
112
+ address: '0xec7BE89e9d109e7e3Fec59c222CF297125FEFda2',
113
+ creationBlock: 52210153,
114
+ },
115
+ [UniversalRouterVersion.V2_0]: {
116
+ address: '0x1095692a6237d83c6a72f3f5efedb9a670c49223',
117
+ creationBlock: 66980401,
118
+ },
119
+ [UniversalRouterVersion.V2_1_1]: {
120
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
121
+ creationBlock: 84336468,
122
+ },
123
+ [UniversalRouterVersion.V2_1_2]: {
124
+ address: '0xDc264714F68d84CF29BC605589405E78bDBE7C9f',
125
+ creationBlock: 93985021,
126
+ },
127
+ },
128
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
129
+ },
130
+ //polygon mumbai
131
+ [80001]: {
132
+ weth: '0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889',
133
+ nativeErc20BalanceAlias: true,
134
+ routerConfigs: {
135
+ [UniversalRouterVersion.V1_2]: {
136
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
137
+ creationBlock: 35176052,
138
+ },
139
+ [UniversalRouterVersion.V2_0]: {
140
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
141
+ creationBlock: 35176052,
142
+ },
143
+ },
144
+ },
145
+ //optimism
146
+ [10]: {
147
+ weth: '0x4200000000000000000000000000000000000006',
148
+ nativeErc20BalanceAlias: false,
149
+ routerConfigs: {
150
+ [UniversalRouterVersion.V1_2]: {
151
+ address: '0xCb1355ff08Ab38bBCE60111F1bb2B784bE25D7e8',
152
+ creationBlock: 114702266,
153
+ },
154
+ [UniversalRouterVersion.V2_0]: {
155
+ address: '0x851116d9223fabed8e56c0e6b8ad0c31d98b3507',
156
+ creationBlock: 130947687,
157
+ },
158
+ [UniversalRouterVersion.V2_1_1]: {
159
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
160
+ creationBlock: 149097062,
161
+ },
162
+ [UniversalRouterVersion.V2_1_2]: {
163
+ address: '0xC09255D86DB563cBc11C2fCf4a0C512e160111B4',
164
+ creationBlock: 157042185,
165
+ },
166
+ },
167
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
168
+ },
169
+ // optimism goerli
170
+ [420]: {
171
+ weth: '0x4200000000000000000000000000000000000006',
172
+ nativeErc20BalanceAlias: false,
173
+ routerConfigs: {
174
+ [UniversalRouterVersion.V1_2]: {
175
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
176
+ creationBlock: 8887728,
177
+ },
178
+ [UniversalRouterVersion.V2_0]: {
179
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
180
+ creationBlock: 8887728,
181
+ },
182
+ },
183
+ },
184
+ // arbitrum
185
+ [42161]: {
186
+ weth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
187
+ nativeErc20BalanceAlias: false,
188
+ routerConfigs: {
189
+ [UniversalRouterVersion.V1_2]: {
190
+ address: '0x5E325eDA8064b456f4781070C0738d849c824258',
191
+ creationBlock: 169472836,
192
+ },
193
+ [UniversalRouterVersion.V2_0]: {
194
+ address: '0xa51afafe0263b40edaef0df8781ea9aa03e381a3',
195
+ creationBlock: 297842906,
196
+ },
197
+ [UniversalRouterVersion.V2_1_1]: {
198
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
199
+ creationBlock: 442902181,
200
+ },
201
+ [UniversalRouterVersion.V2_1_2]: {
202
+ address: '0x2d01411773c8C24805306E89A41F7855C3c4Fe65',
203
+ creationBlock: 506233838,
204
+ },
205
+ },
206
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
207
+ },
208
+ // arbitrum goerli
209
+ [421613]: {
210
+ weth: '0xe39Ab88f8A4777030A534146A9Ca3B52bd5D43A3',
211
+ nativeErc20BalanceAlias: false,
212
+ routerConfigs: {
213
+ [UniversalRouterVersion.V1_2]: {
214
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
215
+ creationBlock: 18815277,
216
+ },
217
+ [UniversalRouterVersion.V2_0]: {
218
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
219
+ creationBlock: 18815277,
220
+ },
221
+ },
222
+ },
223
+ // celo
224
+ [42220]: {
225
+ weth: WETH_NOT_SUPPORTED_ON_CHAIN,
226
+ nativeErc20BalanceAlias: true,
227
+ routerConfigs: {
228
+ [UniversalRouterVersion.V1_2]: {
229
+ address: '0x643770e279d5d0733f21d6dc03a8efbabf3255b4',
230
+ creationBlock: 21407637,
231
+ },
232
+ [UniversalRouterVersion.V2_0]: {
233
+ address: '0xcb695bc5D3Aa22cAD1E6DF07801b061a05A0233A',
234
+ creationBlock: 47387857,
235
+ },
236
+ [UniversalRouterVersion.V2_1_1]: {
237
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
238
+ creationBlock: 61893766,
239
+ },
240
+ [UniversalRouterVersion.V2_1_2]: {
241
+ address: '0xe2023F3FA515cF070e07fD9d51c1d236e07843f4',
242
+ creationBlock: 77782041,
243
+ },
244
+ },
245
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
246
+ },
247
+ // celo alfajores
248
+ [44787]: {
249
+ weth: WETH_NOT_SUPPORTED_ON_CHAIN,
250
+ nativeErc20BalanceAlias: true,
251
+ routerConfigs: {
252
+ [UniversalRouterVersion.V1_2]: {
253
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
254
+ creationBlock: 17566658,
255
+ },
256
+ [UniversalRouterVersion.V2_0]: {
257
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
258
+ creationBlock: 17566658,
259
+ },
260
+ },
261
+ },
262
+ // binance smart chain
263
+ [56]: {
264
+ weth: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',
265
+ nativeErc20BalanceAlias: false,
266
+ routerConfigs: {
267
+ [UniversalRouterVersion.V1_2]: {
268
+ address: '0x4Dae2f939ACf50408e13d58534Ff8c2776d45265',
269
+ creationBlock: 35160263,
270
+ },
271
+ [UniversalRouterVersion.V2_0]: {
272
+ address: '0x1906c1d672b88cd1b9ac7593301ca990f94eae07',
273
+ creationBlock: 45970616,
274
+ },
275
+ [UniversalRouterVersion.V2_1_1]: {
276
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
277
+ creationBlock: 87208607,
278
+ },
279
+ [UniversalRouterVersion.V2_1_2]: {
280
+ address: '0xDc264714F68d84CF29BC605589405E78bDBE7C9f',
281
+ creationBlock: 122489907,
282
+ },
283
+ },
284
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
285
+ },
286
+ // avalanche
287
+ [43114]: {
288
+ weth: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',
289
+ nativeErc20BalanceAlias: false,
290
+ routerConfigs: {
291
+ [UniversalRouterVersion.V1_2]: {
292
+ address: '0x4Dae2f939ACf50408e13d58534Ff8c2776d45265',
293
+ creationBlock: 40237257,
294
+ },
295
+ [UniversalRouterVersion.V2_0]: {
296
+ address: '0x94b75331ae8d42c1b61065089b7d48fe14aa73b7',
297
+ creationBlock: 56195395,
298
+ },
299
+ [UniversalRouterVersion.V2_1_1]: {
300
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
301
+ creationBlock: 80616324,
302
+ },
303
+ [UniversalRouterVersion.V2_1_2]: {
304
+ address: '0x661E93cca42AfacB172121EF892830cA3b70F08d',
305
+ creationBlock: 95539189,
306
+ },
307
+ },
308
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
309
+ },
310
+ // base goerli
311
+ [84531]: {
312
+ weth: '0x4200000000000000000000000000000000000006',
313
+ nativeErc20BalanceAlias: false,
314
+ routerConfigs: {
315
+ [UniversalRouterVersion.V1_2]: {
316
+ address: '0xd0872d928672ae2ff74bdb2f5130ac12229cafaf',
317
+ creationBlock: 6915289,
318
+ },
319
+ [UniversalRouterVersion.V2_0]: {
320
+ address: '0xd0872d928672ae2ff74bdb2f5130ac12229cafaf',
321
+ creationBlock: 6915289,
322
+ },
323
+ },
324
+ },
325
+ // base mainnet
326
+ [8453]: {
327
+ weth: '0x4200000000000000000000000000000000000006',
328
+ nativeErc20BalanceAlias: false,
329
+ routerConfigs: {
330
+ [UniversalRouterVersion.V1_2]: {
331
+ address: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
332
+ creationBlock: 9107268,
333
+ },
334
+ [UniversalRouterVersion.V2_0]: {
335
+ address: '0x6ff5693b99212da76ad316178a184ab56d299b43',
336
+ creationBlock: 25350999,
337
+ },
338
+ [UniversalRouterVersion.V2_1_1]: {
339
+ address: '0xfdf682f51fe81aa4898f0ae2163d8a55c127fbc7',
340
+ creationBlock: 43501203,
341
+ },
342
+ [UniversalRouterVersion.V2_1_2]: {
343
+ address: '0xd6145b2D3F379919E8CdEda7B97e37c4b2Ca9c40',
344
+ creationBlock: 51446913,
345
+ },
346
+ [UniversalRouterVersion.V2_2_0]: {
347
+ address: '0xbe2257d1aafbe6b73f67a9ac971c2f0b344bb3c5',
348
+ creationBlock: 51740773,
349
+ },
350
+ },
351
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
352
+ },
353
+ // blast
354
+ [81457]: {
355
+ weth: '0x4300000000000000000000000000000000000004',
356
+ nativeErc20BalanceAlias: false,
357
+ routerConfigs: {
358
+ [UniversalRouterVersion.V1_2]: {
359
+ address: '0x643770E279d5D0733F21d6DC03A8efbABf3255B4',
360
+ creationBlock: 1116444,
361
+ },
362
+ [UniversalRouterVersion.V2_0]: {
363
+ address: '0xeabbcb3e8e415306207ef514f660a3f820025be3',
364
+ creationBlock: 14377319,
365
+ },
366
+ [UniversalRouterVersion.V2_1_1]: {
367
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
368
+ creationBlock: 32492192,
369
+ },
370
+ [UniversalRouterVersion.V2_1_2]: {
371
+ address: '0x661E93cca42AfacB172121EF892830cA3b70F08d',
372
+ creationBlock: 40435962,
373
+ },
374
+ },
375
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
376
+ },
377
+ // zora
378
+ [7777777]: {
379
+ weth: '0x4200000000000000000000000000000000000006',
380
+ nativeErc20BalanceAlias: false,
381
+ routerConfigs: {
382
+ [UniversalRouterVersion.V1_2]: {
383
+ address: '0x2986d9721A49838ab4297b695858aF7F17f38014',
384
+ creationBlock: 11832155,
385
+ },
386
+ [UniversalRouterVersion.V2_0]: {
387
+ address: '0x3315ef7ca28db74abadc6c44570efdf06b04b020',
388
+ creationBlock: 25434544,
389
+ },
390
+ [UniversalRouterVersion.V2_1_1]: {
391
+ address: '0xFdf682F51FE81Aa4898F0AE2163d8A55c127fbC7',
392
+ creationBlock: 43550401,
393
+ },
394
+ [UniversalRouterVersion.V2_1_2]: {
395
+ address: '0xF025e0Fe9E331A0eF05c2ad3C4E9C64b625cda6f',
396
+ creationBlock: 51493994,
397
+ },
398
+ },
399
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
400
+ },
401
+ // zksync
402
+ [324]: {
403
+ weth: '0x5aea5775959fbc2557cc8789bc1bf90a239d9a91',
404
+ nativeErc20BalanceAlias: false,
405
+ routerConfigs: {
406
+ [UniversalRouterVersion.V1_2]: {
407
+ address: '0x28731BCC616B5f51dD52CF2e4dF0E78dD1136C06',
408
+ creationBlock: 12640979,
409
+ },
410
+ [UniversalRouterVersion.V2_0]: {
411
+ address: '0x28731BCC616B5f51dD52CF2e4dF0E78dD1136C06',
412
+ creationBlock: 12640979,
413
+ },
414
+ },
415
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
416
+ },
417
+ // worldchain
418
+ [480]: {
419
+ weth: '0x4200000000000000000000000000000000000006',
420
+ nativeErc20BalanceAlias: false,
421
+ routerConfigs: {
422
+ [UniversalRouterVersion.V1_2]: {
423
+ address: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
424
+ creationBlock: 4063979,
425
+ },
426
+ [UniversalRouterVersion.V2_0]: {
427
+ address: '0x8ac7bee993bb44dab564ea4bc9ea67bf9eb5e743',
428
+ creationBlock: 9111895,
429
+ },
430
+ [UniversalRouterVersion.V2_1_1]: {
431
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
432
+ creationBlock: 27228771,
433
+ },
434
+ [UniversalRouterVersion.V2_1_2]: {
435
+ address: '0xF025e0Fe9E331A0eF05c2ad3C4E9C64b625cda6f',
436
+ creationBlock: 35173079,
437
+ },
438
+ },
439
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
440
+ },
441
+ // unichain sepolia
442
+ [1301]: {
443
+ weth: '0x4200000000000000000000000000000000000006',
444
+ nativeErc20BalanceAlias: false,
445
+ routerConfigs: {
446
+ [UniversalRouterVersion.V1_2]: {
447
+ address: '0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6',
448
+ creationBlock: 1241811,
449
+ },
450
+ [UniversalRouterVersion.V2_0]: {
451
+ address: '0xf70536b3bcc1bd1a972dc186a2cf84cc6da6be5d',
452
+ creationBlock: 7100543,
453
+ },
454
+ [UniversalRouterVersion.V2_1_1]: {
455
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
456
+ creationBlock: 46987997,
457
+ },
458
+ [UniversalRouterVersion.V2_1_2]: {
459
+ address: '0xDf38F24fE153761634Be942F9d859f3DBA857E95',
460
+ creationBlock: 62830804,
461
+ },
462
+ },
463
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
464
+ },
465
+ // unichain mainnet
466
+ [130]: {
467
+ weth: '0x4200000000000000000000000000000000000006',
468
+ nativeErc20BalanceAlias: false,
469
+ routerConfigs: {
470
+ [UniversalRouterVersion.V1_2]: {
471
+ address: '0x4D73A4411CA1c660035e4AECC8270E5DdDEC8C17',
472
+ creationBlock: 23678,
473
+ },
474
+ [UniversalRouterVersion.V2_0]: {
475
+ address: '0xef740bf23acae26f6492b10de645d6b98dc8eaf3',
476
+ creationBlock: 6819690,
477
+ },
478
+ [UniversalRouterVersion.V2_1_1]: {
479
+ address: '0xFdf682F51FE81Aa4898F0AE2163d8A55c127fbC7',
480
+ creationBlock: 43044663,
481
+ },
482
+ [UniversalRouterVersion.V2_1_2]: {
483
+ address: '0xD1b797D92d87B688193A2B976eFc8D577D204343',
484
+ creationBlock: 58934463,
485
+ },
486
+ },
487
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
488
+ },
489
+ // monad testnet
490
+ [10143]: {
491
+ weth: '0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701',
492
+ nativeErc20BalanceAlias: false,
493
+ routerConfigs: {
494
+ [UniversalRouterVersion.V1_2]: {
495
+ address: '0x3ae6d8a282d67893e17aa70ebffb33ee5aa65893',
496
+ creationBlock: 23678,
497
+ },
498
+ [UniversalRouterVersion.V2_0]: {
499
+ address: '0x3ae6d8a282d67893e17aa70ebffb33ee5aa65893',
500
+ creationBlock: 23678,
501
+ },
502
+ },
503
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
504
+ },
505
+ // base sepolia
506
+ [84532]: {
507
+ weth: '0x4200000000000000000000000000000000000006',
508
+ nativeErc20BalanceAlias: false,
509
+ routerConfigs: {
510
+ [UniversalRouterVersion.V1_2]: {
511
+ address: '0x492e6456d9528771018deb9e87ef7750ef184104',
512
+ creationBlock: 20216585,
513
+ },
514
+ [UniversalRouterVersion.V2_0]: {
515
+ address: '0x492e6456d9528771018deb9e87ef7750ef184104',
516
+ creationBlock: 20216585,
517
+ },
518
+ [UniversalRouterVersion.V2_1_1]: {
519
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
520
+ creationBlock: 39035624,
521
+ },
522
+ [UniversalRouterVersion.V2_1_2]: {
523
+ address: '0x8702463e73f74d0b6765aBceb314Ef07aCb92650',
524
+ creationBlock: 46958874,
525
+ },
526
+ },
527
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
528
+ },
529
+ // soneium
530
+ [1868]: {
531
+ weth: '0x4200000000000000000000000000000000000006',
532
+ nativeErc20BalanceAlias: false,
533
+ routerConfigs: {
534
+ [UniversalRouterVersion.V1_2]: {
535
+ address: '0x0e2850543f69f678257266e0907ff9a58b3f13de',
536
+ creationBlock: 3254782,
537
+ },
538
+ [UniversalRouterVersion.V2_0]: {
539
+ address: '0x0e2850543f69f678257266e0907ff9a58b3f13de',
540
+ creationBlock: 3254782,
541
+ },
542
+ [UniversalRouterVersion.V2_1_1]: {
543
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
544
+ creationBlock: 20352508,
545
+ },
546
+ [UniversalRouterVersion.V2_1_2]: {
547
+ address: '0x661E93cca42AfacB172121EF892830cA3b70F08d',
548
+ creationBlock: 28273507,
549
+ },
550
+ },
551
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
552
+ },
553
+ // monad
554
+ [143]: {
555
+ weth: '0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A',
556
+ nativeErc20BalanceAlias: false,
557
+ routerConfigs: {
558
+ [UniversalRouterVersion.V1_2]: {
559
+ address: '0x0d97dc33264bfc1c226207428a79b26757fb9dc3',
560
+ creationBlock: 29255937,
561
+ },
562
+ [UniversalRouterVersion.V2_0]: {
563
+ address: '0x0d97dc33264bfc1c226207428a79b26757fb9dc3',
564
+ creationBlock: 29255937,
565
+ },
566
+ [UniversalRouterVersion.V2_1_1]: {
567
+ address: '0xFdf682F51FE81Aa4898F0AE2163d8A55c127fbC7',
568
+ creationBlock: 62239835,
569
+ },
570
+ [UniversalRouterVersion.V2_1_2]: {
571
+ address: '0xa6CE4F10d83dBdDAc17E68e1837ca9cE6a1b596e',
572
+ creationBlock: 105721635,
573
+ },
574
+ },
575
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
576
+ },
577
+ // linea
578
+ [59144]: {
579
+ weth: '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f',
580
+ nativeErc20BalanceAlias: false,
581
+ routerConfigs: {
582
+ [UniversalRouterVersion.V2_0]: {
583
+ address: '0x661e93cca42afacb172121ef892830ca3b70f08d',
584
+ creationBlock: 28974980,
585
+ },
586
+ [UniversalRouterVersion.V2_1_1]: {
587
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
588
+ creationBlock: 29782392,
589
+ },
590
+ [UniversalRouterVersion.V2_1_2]: {
591
+ address: '0xDc264714F68d84CF29BC605589405E78bDBE7C9f',
592
+ creationBlock: 32065952,
593
+ },
594
+ },
595
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
596
+ },
597
+ // tempo
598
+ [4217]: {
599
+ weth: WETH_NOT_SUPPORTED_ON_CHAIN,
600
+ nativeErc20BalanceAlias: true,
601
+ routerConfigs: {
602
+ [UniversalRouterVersion.V2_0]: {
603
+ address: '0x1febb76be10aaf3a1402f04e8e835f2c382f7914',
604
+ creationBlock: 6458546,
605
+ },
606
+ [UniversalRouterVersion.V2_1_1]: {
607
+ address: '0xFdf682F51FE81Aa4898F0AE2163d8A55c127fbC7',
608
+ creationBlock: 10065560,
609
+ },
610
+ [UniversalRouterVersion.V2_1_2]: {
611
+ address: '0x182a927119D56008d921126764bF884221b10f59',
612
+ creationBlock: 40003559,
613
+ },
614
+ },
615
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
616
+ },
617
+ // megaeth
618
+ [4326]: {
619
+ weth: '0x4200000000000000000000000000000000000006',
620
+ nativeErc20BalanceAlias: false,
621
+ routerConfigs: {
622
+ [UniversalRouterVersion.V2_0]: {
623
+ address: '0x48fd03529d2a91be835f07f6b72f53b4aad6093d',
624
+ creationBlock: 7009661,
625
+ },
626
+ // MegaETH skipped v2.1.1: it went 2.0 -> 2.1.2.
627
+ [UniversalRouterVersion.V2_1_2]: {
628
+ address: '0xAedd1CF4C14e833140A61E9C0d2b73a64795c823',
629
+ creationBlock: 26887500,
630
+ },
631
+ },
632
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
633
+ },
634
+ // arc
635
+ [5042]: {
636
+ weth: WETH_NOT_SUPPORTED_ON_CHAIN,
637
+ nativeErc20BalanceAlias: true,
638
+ routerConfigs: {
639
+ [UniversalRouterVersion.V2_1_1]: {
640
+ address: '0x4fca4a51ab4f23a7447b3284fbd7d73289a89fb1',
641
+ creationBlock: 1950059,
642
+ },
643
+ [UniversalRouterVersion.V2_1_2]: {
644
+ address: '0x8702463e73f74d0b6765aBceb314Ef07aCb92650',
645
+ creationBlock: 21402239,
646
+ },
647
+ },
648
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
649
+ },
650
+ // robinhood
651
+ [4663]: {
652
+ weth: '0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73',
653
+ nativeErc20BalanceAlias: false,
654
+ routerConfigs: {
655
+ [UniversalRouterVersion.V2_1_1]: {
656
+ address: '0x8876789976decbfcbbbe364623c63652db8c0904',
657
+ creationBlock: 18127,
658
+ },
659
+ [UniversalRouterVersion.V2_1_2]: {
660
+ address: '0x204FAca1764B154221e35c0d20aBb3c525710498',
661
+ creationBlock: 65727895,
662
+ },
663
+ },
664
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
665
+ },
666
+ // ink
667
+ [57073]: {
668
+ weth: '0x4200000000000000000000000000000000000006',
669
+ nativeErc20BalanceAlias: false,
670
+ routerConfigs: {
671
+ [UniversalRouterVersion.V2_0]: {
672
+ address: '0x112908dac86e20e7241b0927479ea3bf935d1fa0',
673
+ creationBlock: 4580586,
674
+ },
675
+ // No v2.1.1 router is deployed on Ink
676
+ [UniversalRouterVersion.V2_1_2]: {
677
+ address: '0x661E93cca42AfacB172121EF892830cA3b70F08d',
678
+ creationBlock: 56186042,
679
+ },
680
+ [UniversalRouterVersion.V2_2_0]: {
681
+ address: '0x315e413a11ab0df498ef83873012430ca36638ae',
682
+ creationBlock: 56772481,
683
+ },
684
+ },
685
+ // SwapProxy on Ink is not at the deterministic SWAP_PROXY_DEPLOY_ADDRESS
686
+ swapProxy: '0x0000000085E102724e78eCd2F45DC9cA239Affad',
687
+ },
688
+ // elysium
689
+ [99901]: {
690
+ // WHYPE: Elysium's gas token is HYPE
691
+ weth: '0xbA876237B0F021A6c6D852d6c26E107997cC5E81',
692
+ nativeErc20BalanceAlias: false,
693
+ routerConfigs: {
694
+ // Only 2.1.2 and 2.2.0 are deployed on Elysium
695
+ [UniversalRouterVersion.V2_1_2]: {
696
+ address: '0xA13f7611115752DEB2B13813BDDE16A5073e4b45',
697
+ creationBlock: 256483,
698
+ },
699
+ // Not the superseded 0x1BD4d69B…3B0D, which is wired to a stale PermissionsAdapterFactory
700
+ [UniversalRouterVersion.V2_2_0]: {
701
+ address: '0x1B341FDD55d56F8E08409A2C25DDFad93Eb03C1a',
702
+ creationBlock: 257585,
703
+ },
704
+ },
705
+ // SwapProxy on Elysium is not at the deterministic SWAP_PROXY_DEPLOY_ADDRESS
706
+ swapProxy: '0x0000000085E102724e78eCd2F45DC9cA239Affad',
707
+ },
708
+ // xlayer
709
+ [196]: {
710
+ weth: '0xe538905cf8410324e03A5A23C1c177a474D59b2b',
711
+ nativeErc20BalanceAlias: false,
712
+ routerConfigs: {
713
+ [UniversalRouterVersion.V2_0]: {
714
+ address: '0x5507749f2c558bb3e162c6e90c314c092e7372ff',
715
+ creationBlock: 47680350,
716
+ },
717
+ [UniversalRouterVersion.V2_1_1]: {
718
+ address: '0x8B844f885672f333Bc0042cB669255f93a4C1E6b',
719
+ creationBlock: 55072165,
720
+ },
721
+ [UniversalRouterVersion.V2_1_2]: {
722
+ address: '0x1cd182C94fcF42277B80DBB9060F88024809E61E',
723
+ creationBlock: 70914540,
724
+ },
725
+ },
726
+ swapProxy: SWAP_PROXY_DEPLOY_ADDRESS,
727
+ },
728
+ };
729
+ export const UNIVERSAL_ROUTER_ADDRESS = (version, chainId) => {
730
+ if (!(chainId in CHAIN_CONFIGS))
731
+ throw new Error(`Universal Router not deployed on chain ${chainId}`);
732
+ const config = CHAIN_CONFIGS[chainId].routerConfigs[version];
733
+ if (!config)
734
+ throw new Error(`Universal Router version ${version} not deployed on chain ${chainId}`);
735
+ return config.address;
736
+ };
737
+ export const SWAP_PROXY_ADDRESS = (chainId) => {
738
+ if (!(chainId in CHAIN_CONFIGS))
739
+ throw new Error(`SwapProxy not deployed on chain ${chainId}`);
740
+ const proxy = CHAIN_CONFIGS[chainId].swapProxy;
741
+ if (!proxy)
742
+ throw new Error(`SwapProxy not configured for chain ${chainId}`);
743
+ return proxy;
744
+ };
745
+ export const UNIVERSAL_ROUTER_CREATION_BLOCK = (version, chainId) => {
746
+ if (!(chainId in CHAIN_CONFIGS))
747
+ throw new Error(`Universal Router not deployed on chain ${chainId}`);
748
+ const config = CHAIN_CONFIGS[chainId].routerConfigs[version];
749
+ if (!config)
750
+ throw new Error(`Universal Router version ${version} not deployed on chain ${chainId}`);
751
+ return config.creationBlock;
752
+ };
753
+ export const WETH_ADDRESS = (chainId) => {
754
+ if (!(chainId in CHAIN_CONFIGS))
755
+ throw new Error(`Universal Router not deployed on chain ${chainId}`);
756
+ if (CHAIN_CONFIGS[chainId].weth == WETH_NOT_SUPPORTED_ON_CHAIN)
757
+ throw new Error(`Chain ${chainId} does not have WETH`);
758
+ return CHAIN_CONFIGS[chainId].weth;
759
+ };
760
+ export const CONTRACT_BALANCE = BigNumber.from(2).pow(255);
761
+ export const ETH_ADDRESS = '0x0000000000000000000000000000000000000000';
762
+ export const E_ETH_ADDRESS = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';
763
+ export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
764
+ export const MAX_UINT256 = BigNumber.from(2).pow(256).sub(1);
765
+ export const MAX_UINT160 = BigNumber.from(2).pow(160).sub(1);
766
+ export const SENDER_AS_RECIPIENT = '0x0000000000000000000000000000000000000001';
767
+ export const ROUTER_AS_RECIPIENT = '0x0000000000000000000000000000000000000002';
768
+ //# sourceMappingURL=constants.js.map