sushi 6.1.3 → 6.1.4

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 (413) hide show
  1. package/_cjs/evm/abi/bentoBoxV1Abi/index.js +2 -2
  2. package/_cjs/evm/abi/bentoBoxV1Abi/index.js.map +1 -1
  3. package/_cjs/evm/abi/cloneRewarderTimeAbi/index.js +1 -1
  4. package/_cjs/evm/abi/cloneRewarderTimeAbi/index.js.map +1 -1
  5. package/_cjs/evm/abi/eip2612Abi/index.js +1 -1
  6. package/_cjs/evm/abi/eip2612Abi/index.js.map +1 -1
  7. package/_cjs/evm/abi/erc20Abi/index.js +5 -5
  8. package/_cjs/evm/abi/erc20Abi/index.js.map +1 -1
  9. package/_cjs/evm/abi/furoVestingAbi/index.js +1 -1
  10. package/_cjs/evm/abi/furoVestingAbi/index.js.map +1 -1
  11. package/_cjs/evm/abi/masterChefV1Abi/index.js +1 -1
  12. package/_cjs/evm/abi/masterChefV1Abi/index.js.map +1 -1
  13. package/_cjs/evm/abi/masterChefV2Abi/index.js +3 -3
  14. package/_cjs/evm/abi/masterChefV2Abi/index.js.map +1 -1
  15. package/_cjs/evm/abi/miniChefAbi/index.js +1 -1
  16. package/_cjs/evm/abi/miniChefAbi/index.js.map +1 -1
  17. package/_cjs/evm/abi/miniChefV2Abi/index.js +1 -1
  18. package/_cjs/evm/abi/miniChefV2Abi/index.js.map +1 -1
  19. package/_cjs/evm/abi/nonfungiblePositionManagerAbi/index.js +3 -3
  20. package/_cjs/evm/abi/nonfungiblePositionManagerAbi/index.js.map +1 -1
  21. package/_cjs/evm/abi/permit2Abi/index.js +1 -1
  22. package/_cjs/evm/abi/permit2Abi/index.js.map +1 -1
  23. package/_cjs/evm/abi/squidRouterAbi/index.js +1 -1
  24. package/_cjs/evm/abi/squidRouterAbi/index.js.map +1 -1
  25. package/_cjs/evm/abi/stargateAdapterAbi/index.js +1 -1
  26. package/_cjs/evm/abi/stargateAdapterAbi/index.js.map +1 -1
  27. package/_cjs/evm/abi/stargateFeeLibraryV03Abi/index.js +5 -5
  28. package/_cjs/evm/abi/stargateFeeLibraryV03Abi/index.js.map +1 -1
  29. package/_cjs/evm/abi/stargatePoolAbi/index.js +4 -4
  30. package/_cjs/evm/abi/stargatePoolAbi/index.js.map +1 -1
  31. package/_cjs/evm/abi/tridentConstantPoolAbi/index.js +3 -3
  32. package/_cjs/evm/abi/tridentConstantPoolAbi/index.js.map +1 -1
  33. package/_cjs/evm/abi/uniswapV2PairAbi/index.js +3 -3
  34. package/_cjs/evm/abi/uniswapV2PairAbi/index.js.map +1 -1
  35. package/_cjs/evm/abi/uniswapV2RouterAbi/index.js +2 -2
  36. package/_cjs/evm/abi/uniswapV2RouterAbi/index.js.map +1 -1
  37. package/_cjs/evm/abi/v3baseAbi/index.js +1 -1
  38. package/_cjs/evm/abi/v3baseAbi/index.js.map +1 -1
  39. package/_cjs/evm/abi/weth9Abi/index.js +7 -7
  40. package/_cjs/evm/abi/weth9Abi/index.js.map +1 -1
  41. package/_cjs/evm/api/index.js +1 -1
  42. package/_cjs/evm/api/index.js.map +1 -1
  43. package/_cjs/evm/api/types.js +2 -2
  44. package/_cjs/evm/api/types.js.map +1 -1
  45. package/_cjs/evm/chain/chains.js.map +1 -1
  46. package/_cjs/evm/config/drpc.js.map +1 -1
  47. package/_cjs/evm/config/features/index.js +5 -5
  48. package/_cjs/evm/config/features/index.js.map +1 -1
  49. package/_cjs/evm/config/features/sushiswap.js +4 -3
  50. package/_cjs/evm/config/features/sushiswap.js.map +1 -1
  51. package/_cjs/evm/config/index.js +2 -2
  52. package/_cjs/evm/config/index.js.map +1 -1
  53. package/_cjs/evm/config/subgraphs/subgraphs/blade.js +1 -13
  54. package/_cjs/evm/config/subgraphs/subgraphs/blade.js.map +1 -1
  55. package/_cjs/evm/config/subgraphs/subgraphs/blocks.js +1 -12
  56. package/_cjs/evm/config/subgraphs/subgraphs/blocks.js.map +1 -1
  57. package/_cjs/evm/config/subgraphs/subgraphs/index.js +2 -2
  58. package/_cjs/evm/config/subgraphs/subgraphs/index.js.map +1 -1
  59. package/_cjs/evm/config/subgraphs/subgraphs/sushiswap-v2.js +1 -11
  60. package/_cjs/evm/config/subgraphs/subgraphs/sushiswap-v2.js.map +1 -1
  61. package/_cjs/evm/config/subgraphs/subgraphs/sushiswap-v3.js +1 -11
  62. package/_cjs/evm/config/subgraphs/subgraphs/sushiswap-v3.js.map +1 -1
  63. package/_cjs/evm/config/tokens/token-maps/default-bases.js.map +1 -1
  64. package/_cjs/evm/config/tokens/token-maps/stables.js +1 -1
  65. package/_cjs/evm/config/tokens/token-maps/stables.js.map +1 -1
  66. package/_cjs/evm/config/tokens/tokens/index.js +13 -13
  67. package/_cjs/evm/config/tokens/tokens/index.js.map +1 -1
  68. package/_cjs/evm/config/tokens/wrapped-native.js.map +1 -1
  69. package/_cjs/evm/currency/native.js.map +1 -1
  70. package/_cjs/evm/currency/token.js +2 -2
  71. package/_cjs/evm/currency/token.js.map +1 -1
  72. package/_cjs/evm/token-list/index.js +1 -1
  73. package/_cjs/evm/token-list/index.js.map +1 -1
  74. package/_cjs/evm/types/index.js.map +1 -1
  75. package/_cjs/evm/types/sushi-pool/index.js +1 -1
  76. package/_cjs/evm/types/sushi-pool/index.js.map +1 -1
  77. package/_cjs/evm/types/sushi-position/index.js +1 -1
  78. package/_cjs/evm/types/sushi-position/index.js.map +1 -1
  79. package/_cjs/generic/chain/index.js.map +1 -1
  80. package/_cjs/generic/currency/token.js +1 -1
  81. package/_cjs/generic/currency/token.js.map +1 -1
  82. package/_cjs/generic/format/number.js +1 -1
  83. package/_cjs/generic/format/number.js.map +1 -1
  84. package/_cjs/generic/math/index.js +6 -6
  85. package/_cjs/generic/math/index.js.map +1 -1
  86. package/_cjs/generic/utils/id.js +4 -1
  87. package/_cjs/generic/utils/id.js.map +1 -1
  88. package/_cjs/kvm/currency/token.js.map +1 -1
  89. package/_cjs/mvm/currency/token.js +3 -0
  90. package/_cjs/mvm/currency/token.js.map +1 -1
  91. package/_cjs/tvm/abi/factoryAbi/index.js +1 -1
  92. package/_cjs/tvm/abi/factoryAbi/index.js.map +1 -1
  93. package/_cjs/tvm/abi/pairAbi/index.js +8 -8
  94. package/_cjs/tvm/abi/pairAbi/index.js.map +1 -1
  95. package/_cjs/tvm/abi/routerAbi/index.js +1 -1
  96. package/_cjs/tvm/abi/routerAbi/index.js.map +1 -1
  97. package/_cjs/tvm/abi/trc20Abi/index.js +7 -7
  98. package/_cjs/tvm/abi/trc20Abi/index.js.map +1 -1
  99. package/_cjs/tvm/abi/wtrxAbi/index.js +11 -11
  100. package/_cjs/tvm/abi/wtrxAbi/index.js.map +1 -1
  101. package/_cjs/tvm/config/tokens/index.js +1 -1
  102. package/_cjs/tvm/config/tokens/index.js.map +1 -1
  103. package/_cjs/tvm/config/tokens/tokens/index.js +43 -43
  104. package/_cjs/tvm/config/tokens/tokens/index.js.map +1 -1
  105. package/_cjs/tvm/currency/native.js.map +1 -1
  106. package/_cjs/tvm/currency/token.js +2 -2
  107. package/_cjs/tvm/currency/token.js.map +1 -1
  108. package/_esm/evm/abi/bentoBoxV1Abi/index.js +2 -2
  109. package/_esm/evm/abi/bentoBoxV1Abi/index.js.map +1 -1
  110. package/_esm/evm/abi/cloneRewarderTimeAbi/index.js +1 -1
  111. package/_esm/evm/abi/cloneRewarderTimeAbi/index.js.map +1 -1
  112. package/_esm/evm/abi/eip2612Abi/index.js +1 -1
  113. package/_esm/evm/abi/eip2612Abi/index.js.map +1 -1
  114. package/_esm/evm/abi/erc20Abi/index.js +5 -5
  115. package/_esm/evm/abi/erc20Abi/index.js.map +1 -1
  116. package/_esm/evm/abi/furoVestingAbi/index.js +1 -1
  117. package/_esm/evm/abi/furoVestingAbi/index.js.map +1 -1
  118. package/_esm/evm/abi/masterChefV1Abi/index.js +1 -1
  119. package/_esm/evm/abi/masterChefV1Abi/index.js.map +1 -1
  120. package/_esm/evm/abi/masterChefV2Abi/index.js +3 -3
  121. package/_esm/evm/abi/masterChefV2Abi/index.js.map +1 -1
  122. package/_esm/evm/abi/miniChefAbi/index.js +1 -1
  123. package/_esm/evm/abi/miniChefAbi/index.js.map +1 -1
  124. package/_esm/evm/abi/miniChefV2Abi/index.js +1 -1
  125. package/_esm/evm/abi/miniChefV2Abi/index.js.map +1 -1
  126. package/_esm/evm/abi/nonfungiblePositionManagerAbi/index.js +3 -3
  127. package/_esm/evm/abi/nonfungiblePositionManagerAbi/index.js.map +1 -1
  128. package/_esm/evm/abi/permit2Abi/index.js +1 -1
  129. package/_esm/evm/abi/permit2Abi/index.js.map +1 -1
  130. package/_esm/evm/abi/squidRouterAbi/index.js +1 -1
  131. package/_esm/evm/abi/squidRouterAbi/index.js.map +1 -1
  132. package/_esm/evm/abi/stargateAdapterAbi/index.js +1 -1
  133. package/_esm/evm/abi/stargateAdapterAbi/index.js.map +1 -1
  134. package/_esm/evm/abi/stargateFeeLibraryV03Abi/index.js +5 -5
  135. package/_esm/evm/abi/stargateFeeLibraryV03Abi/index.js.map +1 -1
  136. package/_esm/evm/abi/stargatePoolAbi/index.js +4 -4
  137. package/_esm/evm/abi/stargatePoolAbi/index.js.map +1 -1
  138. package/_esm/evm/abi/tridentConstantPoolAbi/index.js +3 -3
  139. package/_esm/evm/abi/tridentConstantPoolAbi/index.js.map +1 -1
  140. package/_esm/evm/abi/uniswapV2PairAbi/index.js +3 -3
  141. package/_esm/evm/abi/uniswapV2PairAbi/index.js.map +1 -1
  142. package/_esm/evm/abi/uniswapV2RouterAbi/index.js +2 -2
  143. package/_esm/evm/abi/uniswapV2RouterAbi/index.js.map +1 -1
  144. package/_esm/evm/abi/v3baseAbi/index.js +1 -1
  145. package/_esm/evm/abi/v3baseAbi/index.js.map +1 -1
  146. package/_esm/evm/abi/weth9Abi/index.js +7 -7
  147. package/_esm/evm/abi/weth9Abi/index.js.map +1 -1
  148. package/_esm/evm/api/index.js +1 -1
  149. package/_esm/evm/api/index.js.map +1 -1
  150. package/_esm/evm/api/swap.js.map +1 -1
  151. package/_esm/evm/api/types.js +2 -2
  152. package/_esm/evm/api/types.js.map +1 -1
  153. package/_esm/evm/chain/chains.js.map +1 -1
  154. package/_esm/evm/config/drpc.js.map +1 -1
  155. package/_esm/evm/config/features/index.js +5 -5
  156. package/_esm/evm/config/features/index.js.map +1 -1
  157. package/_esm/evm/config/features/sushiswap.js +2 -1
  158. package/_esm/evm/config/features/sushiswap.js.map +1 -1
  159. package/_esm/evm/config/index.js +2 -2
  160. package/_esm/evm/config/index.js.map +1 -1
  161. package/_esm/evm/config/subgraphs/subgraphs/blade.js +0 -12
  162. package/_esm/evm/config/subgraphs/subgraphs/blade.js.map +1 -1
  163. package/_esm/evm/config/subgraphs/subgraphs/blocks.js +0 -11
  164. package/_esm/evm/config/subgraphs/subgraphs/blocks.js.map +1 -1
  165. package/_esm/evm/config/subgraphs/subgraphs/index.js +2 -2
  166. package/_esm/evm/config/subgraphs/subgraphs/index.js.map +1 -1
  167. package/_esm/evm/config/subgraphs/subgraphs/sushiswap-v2.js +0 -10
  168. package/_esm/evm/config/subgraphs/subgraphs/sushiswap-v2.js.map +1 -1
  169. package/_esm/evm/config/subgraphs/subgraphs/sushiswap-v3.js +0 -10
  170. package/_esm/evm/config/subgraphs/subgraphs/sushiswap-v3.js.map +1 -1
  171. package/_esm/evm/config/tokens/token-maps/default-bases.js +1 -2
  172. package/_esm/evm/config/tokens/token-maps/default-bases.js.map +1 -1
  173. package/_esm/evm/config/tokens/token-maps/default-quote.js +1 -1
  174. package/_esm/evm/config/tokens/token-maps/default-quote.js.map +1 -1
  175. package/_esm/evm/config/tokens/token-maps/lsds.js +1 -1
  176. package/_esm/evm/config/tokens/token-maps/lsds.js.map +1 -1
  177. package/_esm/evm/config/tokens/token-maps/stables.js +2 -2
  178. package/_esm/evm/config/tokens/token-maps/stables.js.map +1 -1
  179. package/_esm/evm/config/tokens/tokens/index.js +13 -13
  180. package/_esm/evm/config/tokens/tokens/index.js.map +1 -1
  181. package/_esm/evm/config/tokens/wrapped-native.js.map +1 -1
  182. package/_esm/evm/currency/native.js.map +1 -1
  183. package/_esm/evm/currency/token.js +2 -2
  184. package/_esm/evm/currency/token.js.map +1 -1
  185. package/_esm/evm/pool/sushiswap-v2/sushiswap-v2-pool.js +2 -2
  186. package/_esm/evm/pool/sushiswap-v2/sushiswap-v2-pool.js.map +1 -1
  187. package/_esm/evm/pool/sushiswap-v3/entities/Multicall.js.map +1 -1
  188. package/_esm/evm/pool/sushiswap-v3/entities/NonfungiblePositionManager.js.map +1 -1
  189. package/_esm/evm/pool/sushiswap-v3/entities/SelfPermit.js.map +1 -1
  190. package/_esm/evm/token-list/index.js +1 -1
  191. package/_esm/evm/token-list/index.js.map +1 -1
  192. package/_esm/evm/types/index.js.map +1 -1
  193. package/_esm/evm/types/sushi-pool/index.js +1 -1
  194. package/_esm/evm/types/sushi-pool/index.js.map +1 -1
  195. package/_esm/evm/types/sushi-position/index.js +1 -1
  196. package/_esm/evm/types/sushi-position/index.js.map +1 -1
  197. package/_esm/generic/chain/index.js.map +1 -1
  198. package/_esm/generic/currency/token.js +1 -1
  199. package/_esm/generic/currency/token.js.map +1 -1
  200. package/_esm/generic/format/number.js +1 -1
  201. package/_esm/generic/format/number.js.map +1 -1
  202. package/_esm/generic/math/index.js +4 -4
  203. package/_esm/generic/math/index.js.map +1 -1
  204. package/_esm/generic/utils/id.js +5 -1
  205. package/_esm/generic/utils/id.js.map +1 -1
  206. package/_esm/kvm/currency/token.js.map +1 -1
  207. package/_esm/mvm/currency/token.js +3 -0
  208. package/_esm/mvm/currency/token.js.map +1 -1
  209. package/_esm/tvm/abi/factoryAbi/index.js +1 -1
  210. package/_esm/tvm/abi/factoryAbi/index.js.map +1 -1
  211. package/_esm/tvm/abi/pairAbi/index.js +8 -8
  212. package/_esm/tvm/abi/pairAbi/index.js.map +1 -1
  213. package/_esm/tvm/abi/routerAbi/index.js +1 -1
  214. package/_esm/tvm/abi/routerAbi/index.js.map +1 -1
  215. package/_esm/tvm/abi/trc20Abi/index.js +7 -7
  216. package/_esm/tvm/abi/trc20Abi/index.js.map +1 -1
  217. package/_esm/tvm/abi/wtrxAbi/index.js +11 -11
  218. package/_esm/tvm/abi/wtrxAbi/index.js.map +1 -1
  219. package/_esm/tvm/config/tokens/index.js +1 -1
  220. package/_esm/tvm/config/tokens/index.js.map +1 -1
  221. package/_esm/tvm/config/tokens/tokens/index.js +43 -43
  222. package/_esm/tvm/config/tokens/tokens/index.js.map +1 -1
  223. package/_esm/tvm/currency/currency.js.map +1 -1
  224. package/_esm/tvm/currency/native.js.map +1 -1
  225. package/_esm/tvm/currency/token.js +2 -2
  226. package/_esm/tvm/currency/token.js.map +1 -1
  227. package/_types/evm/abi/bentoBoxV1Abi/index.d.ts +2 -2
  228. package/_types/evm/abi/bentoBoxV1Abi/index.d.ts.map +1 -1
  229. package/_types/evm/abi/cloneRewarderTimeAbi/index.d.ts +1 -1
  230. package/_types/evm/abi/cloneRewarderTimeAbi/index.d.ts.map +1 -1
  231. package/_types/evm/abi/eip2612Abi/index.d.ts +1 -1
  232. package/_types/evm/abi/eip2612Abi/index.d.ts.map +1 -1
  233. package/_types/evm/abi/erc20Abi/index.d.ts +5 -5
  234. package/_types/evm/abi/erc20Abi/index.d.ts.map +1 -1
  235. package/_types/evm/abi/furoVestingAbi/index.d.ts +1 -1
  236. package/_types/evm/abi/furoVestingAbi/index.d.ts.map +1 -1
  237. package/_types/evm/abi/masterChefV1Abi/index.d.ts +1 -1
  238. package/_types/evm/abi/masterChefV1Abi/index.d.ts.map +1 -1
  239. package/_types/evm/abi/masterChefV2Abi/index.d.ts +3 -3
  240. package/_types/evm/abi/masterChefV2Abi/index.d.ts.map +1 -1
  241. package/_types/evm/abi/miniChefAbi/index.d.ts +1 -1
  242. package/_types/evm/abi/miniChefAbi/index.d.ts.map +1 -1
  243. package/_types/evm/abi/miniChefV2Abi/index.d.ts +1 -1
  244. package/_types/evm/abi/miniChefV2Abi/index.d.ts.map +1 -1
  245. package/_types/evm/abi/nonfungiblePositionManagerAbi/index.d.ts +3 -3
  246. package/_types/evm/abi/nonfungiblePositionManagerAbi/index.d.ts.map +1 -1
  247. package/_types/evm/abi/permit2Abi/index.d.ts +1 -1
  248. package/_types/evm/abi/permit2Abi/index.d.ts.map +1 -1
  249. package/_types/evm/abi/squidRouterAbi/index.d.ts +1 -1
  250. package/_types/evm/abi/squidRouterAbi/index.d.ts.map +1 -1
  251. package/_types/evm/abi/stargateAdapterAbi/index.d.ts +1 -1
  252. package/_types/evm/abi/stargateAdapterAbi/index.d.ts.map +1 -1
  253. package/_types/evm/abi/stargateFeeLibraryV03Abi/index.d.ts +5 -5
  254. package/_types/evm/abi/stargateFeeLibraryV03Abi/index.d.ts.map +1 -1
  255. package/_types/evm/abi/stargatePoolAbi/index.d.ts +4 -4
  256. package/_types/evm/abi/stargatePoolAbi/index.d.ts.map +1 -1
  257. package/_types/evm/abi/tridentConstantPoolAbi/index.d.ts +3 -3
  258. package/_types/evm/abi/tridentConstantPoolAbi/index.d.ts.map +1 -1
  259. package/_types/evm/abi/uniswapV2PairAbi/index.d.ts +3 -3
  260. package/_types/evm/abi/uniswapV2PairAbi/index.d.ts.map +1 -1
  261. package/_types/evm/abi/uniswapV2RouterAbi/index.d.ts +2 -2
  262. package/_types/evm/abi/uniswapV2RouterAbi/index.d.ts.map +1 -1
  263. package/_types/evm/abi/v3baseAbi/index.d.ts +1 -1
  264. package/_types/evm/abi/v3baseAbi/index.d.ts.map +1 -1
  265. package/_types/evm/abi/weth9Abi/index.d.ts +7 -7
  266. package/_types/evm/abi/weth9Abi/index.d.ts.map +1 -1
  267. package/_types/evm/api/index.d.ts +1 -1
  268. package/_types/evm/api/index.d.ts.map +1 -1
  269. package/_types/evm/api/quote.d.ts +22 -22
  270. package/_types/evm/api/swap.d.ts +17 -17
  271. package/_types/evm/api/swap.d.ts.map +1 -1
  272. package/_types/evm/api/types.d.ts +2 -2
  273. package/_types/evm/api/types.d.ts.map +1 -1
  274. package/_types/evm/chain/chains.d.ts.map +1 -1
  275. package/_types/evm/config/drpc.d.ts.map +1 -1
  276. package/_types/evm/config/features/index.d.ts +5 -5
  277. package/_types/evm/config/features/index.d.ts.map +1 -1
  278. package/_types/evm/config/features/sushiswap.d.ts +2 -2
  279. package/_types/evm/config/features/sushiswap.d.ts.map +1 -1
  280. package/_types/evm/config/index.d.ts +2 -2
  281. package/_types/evm/config/index.d.ts.map +1 -1
  282. package/_types/evm/config/subgraphs/subgraphs/blade.d.ts +0 -2
  283. package/_types/evm/config/subgraphs/subgraphs/blade.d.ts.map +1 -1
  284. package/_types/evm/config/subgraphs/subgraphs/blocks.d.ts +0 -2
  285. package/_types/evm/config/subgraphs/subgraphs/blocks.d.ts.map +1 -1
  286. package/_types/evm/config/subgraphs/subgraphs/index.d.ts +2 -2
  287. package/_types/evm/config/subgraphs/subgraphs/index.d.ts.map +1 -1
  288. package/_types/evm/config/subgraphs/subgraphs/sushiswap-v2.d.ts +0 -3
  289. package/_types/evm/config/subgraphs/subgraphs/sushiswap-v2.d.ts.map +1 -1
  290. package/_types/evm/config/subgraphs/subgraphs/sushiswap-v3.d.ts +0 -3
  291. package/_types/evm/config/subgraphs/subgraphs/sushiswap-v3.d.ts.map +1 -1
  292. package/_types/evm/config/tokens/token-maps/default-bases.d.ts.map +1 -1
  293. package/_types/evm/config/tokens/tokens/index.d.ts +13 -13
  294. package/_types/evm/config/tokens/tokens/index.d.ts.map +1 -1
  295. package/_types/evm/config/tokens/wrapped-native.d.ts.map +1 -1
  296. package/_types/evm/currency/native.d.ts.map +1 -1
  297. package/_types/evm/currency/token.d.ts +1 -1
  298. package/_types/evm/currency/token.d.ts.map +1 -1
  299. package/_types/evm/pool/sushiswap-v2/zod.d.ts +24 -24
  300. package/_types/evm/pool/sushiswap-v3/entities/Multicall.d.ts.map +1 -1
  301. package/_types/evm/pool/sushiswap-v3/entities/NonfungiblePositionManager.d.ts.map +1 -1
  302. package/_types/evm/pool/sushiswap-v3/entities/SelfPermit.d.ts.map +1 -1
  303. package/_types/evm/token-list/index.d.ts +1 -1
  304. package/_types/evm/token-list/index.d.ts.map +1 -1
  305. package/_types/evm/types/index.d.ts +2 -2
  306. package/_types/evm/types/index.d.ts.map +1 -1
  307. package/_types/evm/types/sushi-pool/index.d.ts +1 -1
  308. package/_types/evm/types/sushi-pool/index.d.ts.map +1 -1
  309. package/_types/evm/types/sushi-position/index.d.ts +1 -1
  310. package/_types/evm/types/sushi-position/index.d.ts.map +1 -1
  311. package/_types/generic/chain/chains.d.ts +2 -2
  312. package/_types/generic/chain/index.d.ts +1 -1
  313. package/_types/generic/chain/index.d.ts.map +1 -1
  314. package/_types/generic/currency/token.d.ts.map +1 -1
  315. package/_types/generic/math/index.d.ts +4 -4
  316. package/_types/generic/math/index.d.ts.map +1 -1
  317. package/_types/generic/utils/id.d.ts.map +1 -1
  318. package/_types/kvm/currency/token.d.ts.map +1 -1
  319. package/_types/mvm/currency/token.d.ts +1 -0
  320. package/_types/mvm/currency/token.d.ts.map +1 -1
  321. package/_types/tvm/abi/factoryAbi/index.d.ts +1 -1
  322. package/_types/tvm/abi/factoryAbi/index.d.ts.map +1 -1
  323. package/_types/tvm/abi/pairAbi/index.d.ts +8 -8
  324. package/_types/tvm/abi/pairAbi/index.d.ts.map +1 -1
  325. package/_types/tvm/abi/routerAbi/index.d.ts +1 -1
  326. package/_types/tvm/abi/routerAbi/index.d.ts.map +1 -1
  327. package/_types/tvm/abi/trc20Abi/index.d.ts +7 -7
  328. package/_types/tvm/abi/trc20Abi/index.d.ts.map +1 -1
  329. package/_types/tvm/abi/wtrxAbi/index.d.ts +11 -11
  330. package/_types/tvm/abi/wtrxAbi/index.d.ts.map +1 -1
  331. package/_types/tvm/config/tokens/index.d.ts +1 -1
  332. package/_types/tvm/config/tokens/index.d.ts.map +1 -1
  333. package/_types/tvm/config/tokens/tokens/index.d.ts +43 -43
  334. package/_types/tvm/config/tokens/tokens/index.d.ts.map +1 -1
  335. package/_types/tvm/currency/currency.d.ts.map +1 -1
  336. package/_types/tvm/currency/native.d.ts.map +1 -1
  337. package/_types/tvm/currency/token.d.ts +1 -1
  338. package/_types/tvm/currency/token.d.ts.map +1 -1
  339. package/evm/abi/bentoBoxV1Abi/index.ts +2 -2
  340. package/evm/abi/cloneRewarderTimeAbi/index.ts +1 -1
  341. package/evm/abi/eip2612Abi/index.ts +1 -1
  342. package/evm/abi/erc20Abi/index.ts +5 -5
  343. package/evm/abi/furoVestingAbi/index.ts +1 -1
  344. package/evm/abi/masterChefV1Abi/index.ts +1 -1
  345. package/evm/abi/masterChefV2Abi/index.ts +3 -3
  346. package/evm/abi/miniChefAbi/index.ts +1 -1
  347. package/evm/abi/miniChefV2Abi/index.ts +1 -1
  348. package/evm/abi/nonfungiblePositionManagerAbi/index.ts +3 -3
  349. package/evm/abi/permit2Abi/index.ts +1 -1
  350. package/evm/abi/squidRouterAbi/index.ts +1 -1
  351. package/evm/abi/stargateAdapterAbi/index.ts +1 -1
  352. package/evm/abi/stargateFeeLibraryV03Abi/index.ts +5 -5
  353. package/evm/abi/stargatePoolAbi/index.ts +4 -4
  354. package/evm/abi/tridentConstantPoolAbi/index.ts +3 -3
  355. package/evm/abi/uniswapV2PairAbi/index.ts +3 -3
  356. package/evm/abi/uniswapV2RouterAbi/index.ts +2 -2
  357. package/evm/abi/v3baseAbi/index.ts +1 -1
  358. package/evm/abi/weth9Abi/index.ts +7 -7
  359. package/evm/api/index.ts +1 -1
  360. package/evm/api/quote.test.ts +1 -1
  361. package/evm/api/swap.test.ts +1 -1
  362. package/evm/api/swap.ts +1 -1
  363. package/evm/api/types.ts +2 -2
  364. package/evm/chain/chains.ts +1 -2
  365. package/evm/chain/define-chain.ts +1 -1
  366. package/evm/config/drpc.ts +5 -1
  367. package/evm/config/features/index.ts +5 -5
  368. package/evm/config/features/sushiswap.ts +5 -3
  369. package/evm/config/index.ts +2 -2
  370. package/evm/config/subgraphs/subgraph-url.test.ts +1 -2
  371. package/evm/config/subgraphs/subgraphs/blade.ts +0 -16
  372. package/evm/config/subgraphs/subgraphs/blocks.ts +0 -15
  373. package/evm/config/subgraphs/subgraphs/index.ts +2 -2
  374. package/evm/config/subgraphs/subgraphs/sushiswap-v2.ts +0 -20
  375. package/evm/config/subgraphs/subgraphs/sushiswap-v3.ts +0 -20
  376. package/evm/config/tokens/token-maps/default-bases.ts +6 -7
  377. package/evm/config/tokens/token-maps/default-quote.ts +1 -1
  378. package/evm/config/tokens/token-maps/lsds.ts +1 -1
  379. package/evm/config/tokens/token-maps/stables.ts +4 -4
  380. package/evm/config/tokens/tokens/index.ts +13 -14
  381. package/evm/config/tokens/wrapped-native.ts +5 -2
  382. package/evm/currency/native.ts +3 -1
  383. package/evm/currency/token.ts +5 -2
  384. package/evm/pool/sushiswap-v2/sushiswap-v2-pool.test.ts +1 -0
  385. package/evm/pool/sushiswap-v2/sushiswap-v2-pool.ts +3 -3
  386. package/evm/pool/sushiswap-v3/entities/Multicall.ts +1 -1
  387. package/evm/pool/sushiswap-v3/entities/NonfungiblePositionManager.test.ts +1 -1
  388. package/evm/pool/sushiswap-v3/entities/NonfungiblePositionManager.ts +1 -1
  389. package/evm/pool/sushiswap-v3/entities/SelfPermit.ts +1 -1
  390. package/evm/token-list/index.ts +1 -1
  391. package/evm/types/index.ts +2 -2
  392. package/evm/types/sushi-pool/index.ts +1 -1
  393. package/evm/types/sushi-position/index.ts +1 -1
  394. package/generic/chain/index.ts +1 -1
  395. package/generic/currency/currency.test-d.ts +50 -2
  396. package/generic/currency/token.ts +1 -2
  397. package/generic/format/number.ts +1 -1
  398. package/generic/math/index.ts +4 -4
  399. package/generic/utils/id.ts +5 -1
  400. package/kvm/chain/define-chain.ts +1 -1
  401. package/kvm/currency/token.ts +4 -2
  402. package/mvm/currency/token.ts +13 -2
  403. package/package.json +1 -1
  404. package/tvm/abi/factoryAbi/index.ts +1 -1
  405. package/tvm/abi/pairAbi/index.ts +8 -8
  406. package/tvm/abi/routerAbi/index.ts +1 -1
  407. package/tvm/abi/trc20Abi/index.ts +7 -7
  408. package/tvm/abi/wtrxAbi/index.ts +11 -11
  409. package/tvm/config/tokens/index.ts +1 -1
  410. package/tvm/config/tokens/tokens/index.ts +43 -43
  411. package/tvm/currency/currency.ts +2 -2
  412. package/tvm/currency/native.ts +4 -2
  413. package/tvm/currency/token.ts +6 -3
@@ -1,4 +1,4 @@
1
- export * from './subgraphs/index.js'
2
1
  export * from './features/index.js'
3
- export * from './tokens/index.js'
4
2
  export * from './simple-constants.js'
3
+ export * from './subgraphs/index.js'
4
+ export * from './tokens/index.js'
@@ -1,8 +1,7 @@
1
1
  import { describe, expect, expectTypeOf, it } from 'vitest'
2
- import { getSushiSwapV3SubgraphUrl } from './subgraphs/sushiswap-v3.js'
3
-
4
2
  import { EvmChainId } from '../../chain/index.js'
5
3
  import { getBlocksSubgraphUrl } from './subgraphs/blocks.js'
4
+ import { getSushiSwapV3SubgraphUrl } from './subgraphs/sushiswap-v3.js'
6
5
 
7
6
  describe('subgraph urls', () => {
8
7
  it('with subgraph id matches', () => {
@@ -27,19 +27,3 @@ export const getBladeSubgraphUrl = getSubgraphUrlWrapper({
27
27
  },
28
28
  otherUrls: BLADE_OTHER_URLS,
29
29
  })<BladeChainId, 'COMPLETE'>()
30
-
31
- export const BladeSubgraphTemplateMap: Record<BladeChainId, string> =
32
- Object.fromEntries(
33
- Object.entries({
34
- ...BLADE_DECENTRALIZED_DEPLOYMENT_IDS,
35
- ...BLADE_DECENTRALIZED_SUBGRAPH_IDS,
36
- ...BLADE_OTHER_URLS,
37
- })
38
- .map(([chainId]) => {
39
- const url = getBladeSubgraphUrl(Number(chainId) as BladeChainId, {
40
- decentralizedKey: '${GRAPH_KEY}',
41
- })
42
- return [Number(chainId), url ? `https://${url}` : undefined]
43
- })
44
- .filter(([, url]) => !!url),
45
- ) as Record<BladeChainId, string>
@@ -54,18 +54,3 @@ export const getBlocksSubgraphUrl = getSubgraphUrlWrapper({
54
54
  decentralizedIds: wrapAsIdType(BLOCKS_DECENTRALIZED_IDS, 'deploymentId'),
55
55
  otherUrls: BLOCKS_OTHER_URLS,
56
56
  })<EvmChainId, 'PARTIAL'>()
57
-
58
- export const BlocksSubgraphTemplateMap: Record<EvmChainId, string> =
59
- Object.fromEntries(
60
- Object.entries({
61
- ...BLOCKS_DECENTRALIZED_IDS,
62
- ...BLOCKS_OTHER_URLS,
63
- })
64
- .map(([chainId]) => {
65
- const url = getBlocksSubgraphUrl(Number(chainId) as EvmChainId, {
66
- decentralizedKey: '${GRAPH_KEY}',
67
- })
68
- return [Number(chainId), url ? `https://${url}` : undefined]
69
- })
70
- .filter(([, url]) => !!url),
71
- ) as Record<EvmChainId, string>
@@ -1,9 +1,9 @@
1
+ export * from './blade.js'
1
2
  export * from './blocks.js'
3
+ export * from './data-api.js'
2
4
  export * from './master-chef-v1.js'
3
5
  export * from './master-chef-v2.js'
4
6
  export * from './mini-chef.js'
5
7
  export * from './sushi-bar.js'
6
8
  export * from './sushiswap-v2.js'
7
9
  export * from './sushiswap-v3.js'
8
- export * from './blade.js'
9
- export * from './data-api.js'
@@ -1,4 +1,3 @@
1
- import type { TestnetChainId } from '../../../../generic/chain/chains.js'
2
1
  import { EvmChainId } from '../../../chain/index.js'
3
2
  import type { SushiSwapV2ChainId } from '../../features/sushiswap-v2.js'
4
3
  import { getSubgraphUrlWrapper, wrapAsIdType } from '../get-subgraph-url.js'
@@ -57,22 +56,3 @@ export const getSushiSwapV2SubgraphUrl = getSubgraphUrlWrapper({
57
56
  },
58
57
  otherUrls: SUSHISWAP_V2_OTHER_URLS,
59
58
  })<SushiSwapV2ChainId, 'PARTIAL'>()
60
-
61
- export const V2SubgraphTemplateMap: Record<
62
- Exclude<SushiSwapV2ChainId, TestnetChainId>,
63
- string
64
- > = Object.fromEntries(
65
- Object.entries({
66
- ...SUSHISWAP_V2_DECENTRALIZED_DEPLOYMENT_IDS,
67
- ...SUSHISWAP_V2_DECENTRALIZED_SUBGRAPH_IDS,
68
- ...SUSHISWAP_V2_OTHER_URLS,
69
- })
70
- .map(([chainId]) => {
71
- const url = getSushiSwapV2SubgraphUrl(
72
- Number(chainId) as SushiSwapV2ChainId,
73
- { decentralizedKey: '${GRAPH_KEY}' },
74
- )
75
- return [Number(chainId), url ? `https://${url}` : undefined]
76
- })
77
- .filter(([, url]) => !!url),
78
- )
@@ -1,4 +1,3 @@
1
- import type { TestnetChainId } from '../../../../generic/chain/chains.js'
2
1
  import { EvmChainId } from '../../../chain/index.js'
3
2
  import type { SushiSwapV3ChainId } from '../../features/sushiswap-v3.js'
4
3
  import { getSubgraphUrlWrapper, wrapAsIdType } from '../get-subgraph-url.js'
@@ -54,22 +53,3 @@ export const getSushiSwapV3SubgraphUrl = getSubgraphUrlWrapper({
54
53
  },
55
54
  otherUrls: SUSHISWAP_V3_OTHER_URLS,
56
55
  })<SushiSwapV3ChainId, 'PARTIAL'>()
57
-
58
- export const V3SubgraphTemplateMap: Record<
59
- Exclude<SushiSwapV3ChainId, TestnetChainId>,
60
- string
61
- > = Object.fromEntries(
62
- Object.entries({
63
- ...SUSHISWAP_V3_DECENTRALIZED_DEPLOYMENT_IDS,
64
- ...SUSHISWAP_V3_DECENTRALIZED_SUBGRAPH_IDS,
65
- ...SUSHISWAP_V3_OTHER_URLS,
66
- })
67
- .map(([chainId]) => {
68
- const url = getSushiSwapV3SubgraphUrl(
69
- Number(chainId) as SushiSwapV3ChainId,
70
- { decentralizedKey: '${GRAPH_KEY}' },
71
- )
72
- return [Number(chainId), url ? `https://${url}` : undefined]
73
- })
74
- .filter(([, url]) => !!url),
75
- ) as Record<SushiSwapV3ChainId, string>
@@ -1,10 +1,14 @@
1
- import { getAddress as _getAddress } from 'viem/utils'
2
1
  import type { EvmCurrency } from '../../../../evm/currency/currency.js'
3
2
  import { EvmChainId } from '../../../chain/index.js'
4
3
  import {
5
4
  APE_USD,
6
5
  ARB,
7
6
  AUSD,
7
+ axlDAI,
8
+ axlETH,
9
+ axlUSDC,
10
+ axlUSDT,
11
+ axlWBTC,
8
12
  DAI,
9
13
  FRAX,
10
14
  GNO,
@@ -12,8 +16,8 @@ import {
12
16
  MIM,
13
17
  RBTC,
14
18
  SKL,
15
- SUSHI,
16
19
  SolvBTC,
20
+ SUSHI,
17
21
  USDB,
18
22
  USDC,
19
23
  USDT,
@@ -22,11 +26,6 @@ import {
22
26
  WETH9,
23
27
  ZETA_USDC_ETH,
24
28
  ZETA_USDT_ETH,
25
- axlDAI,
26
- axlETH,
27
- axlUSDC,
28
- axlUSDT,
29
- axlWBTC,
30
29
  } from '../../../config/tokens/tokens/index.js'
31
30
  import { EvmNative } from '../../../currency/native.js'
32
31
  import { EvmToken } from '../../../currency/token.js'
@@ -3,6 +3,7 @@ import {
3
3
  APE_USD,
4
4
  ARB,
5
5
  AUSD,
6
+ axlUSDC,
6
7
  BUSD,
7
8
  GNO,
8
9
  OP,
@@ -12,7 +13,6 @@ import {
12
13
  USDT,
13
14
  USDT0,
14
15
  WETH9,
15
- axlUSDC,
16
16
  } from '../../../config/tokens/tokens/index.js'
17
17
  import type { EvmCurrency } from '../../../currency/currency.js'
18
18
  import { EvmNative } from '../../../currency/native.js'
@@ -2,9 +2,9 @@ import type { EvmCurrency } from '../../../../evm/currency/currency.js'
2
2
  import { EvmChainId } from '../../../chain/chains.js'
3
3
  import {
4
4
  METH,
5
+ rETH,
5
6
  STONE,
6
7
  WstETH,
7
- rETH,
8
8
  } from '../../../config/tokens/tokens/index.js'
9
9
  import { EvmToken } from '../../../currency/token.js'
10
10
 
@@ -2,6 +2,7 @@ import type { EvmCurrency } from '../../../../evm/currency/currency.js'
2
2
  import { EvmChainId } from '../../../chain/chains.js'
3
3
  import {
4
4
  APE_USD,
5
+ axlUSDC,
5
6
  BASE_USDbC,
6
7
  BTTC_USDC_BSC,
7
8
  BTTC_USDC_ETHEREUM,
@@ -23,23 +24,22 @@ import {
23
24
  THUNDERCORE_ANY_BUSD,
24
25
  THUNDERCORE_ANY_USDC,
25
26
  THUNDERCORE_ANY_USDT,
27
+ USD_PLUS,
26
28
  USDB,
27
29
  USDC,
30
+ USDe,
28
31
  USDP,
29
32
  USDPLUS,
30
33
  USDT,
31
- USD_PLUS,
32
- USDe,
33
34
  ZETA_USDC_BSC,
34
35
  ZETA_USDC_ETH,
35
36
  ZETA_USDT_BSC,
36
37
  ZETA_USDT_ETH,
37
- axlUSDC,
38
38
  } from '../../../config/tokens/tokens/index.js'
39
39
  import { EvmToken } from '../../../currency/token.js'
40
40
  import { AUSD } from '../tokens/AUSD.js'
41
- import { USDT0 } from '../tokens/USDT0.js'
42
41
  import { HONEY } from '../tokens/berachain/HONEY.js'
42
+ import { USDT0 } from '../tokens/USDT0.js'
43
43
 
44
44
  export const STABLES = {
45
45
  [EvmChainId.ARBITRUM]: [
@@ -1,12 +1,3 @@
1
- export * from './ape/index.js'
2
- export * from './base/index.js'
3
- export * from './berachain/index.js'
4
- export * from './bttc/index.js'
5
- export * from './ethereum/index.js'
6
- export * from './filecoin/index.js'
7
- export * from './thundercore/index.js'
8
- export * from './zeta/index.js'
9
-
10
1
  export * from './AAVE.js'
11
2
  export * from './AERO.js'
12
3
  export * from './AGEUR.js'
@@ -15,6 +6,7 @@ export * from './ANKR.js'
15
6
  export * from './APE.js'
16
7
  export * from './ARB.js'
17
8
  export * from './AUSD.js'
9
+ export * from './ape/index.js'
18
10
  export * from './axlDAI.js'
19
11
  export * from './axlETH.js'
20
12
  export * from './axlUSDC.js'
@@ -23,14 +15,19 @@ export * from './axlWBTC.js'
23
15
  export * from './BAL.js'
24
16
  export * from './BCT.js'
25
17
  export * from './BUSD.js'
18
+ export * from './base/index.js'
19
+ export * from './berachain/index.js'
20
+ export * from './bttc/index.js'
26
21
  export * from './COMP.js'
27
22
  export * from './CRV.js'
28
23
  export * from './DAI.js'
29
24
  export * from './DOC.js'
30
25
  export * from './ENJ.js'
26
+ export * from './ethereum/index.js'
31
27
  export * from './FEI.js'
32
28
  export * from './FRAX.js'
33
29
  export * from './FXS.js'
30
+ export * from './filecoin/index.js'
34
31
  export * from './GALA.js'
35
32
  export * from './GNO.js'
36
33
  export * from './GNS.js'
@@ -57,13 +54,12 @@ export * from './OP.js'
57
54
  export * from './OPTICS_USDC.js'
58
55
  export * from './PRIMATE.js'
59
56
  export * from './QUICK.js'
60
- export * from './renBTC.js'
61
- export * from './rETH.js'
62
- export * from './rETH2.js'
63
57
  export * from './RBTC.js'
64
58
  export * from './RNDR.js'
59
+ export * from './rETH.js'
60
+ export * from './rETH2.js'
61
+ export * from './renBTC.js'
65
62
  export * from './SAND.js'
66
- export * from './sETH2.js'
67
63
  export * from './SGETH.js'
68
64
  export * from './SKL.js'
69
65
  export * from './SNX.js'
@@ -72,9 +68,11 @@ export * from './STG.js'
72
68
  export * from './STONE.js'
73
69
  export * from './SUSHI.js'
74
70
  export * from './SWISE.js'
71
+ export * from './sETH2.js'
75
72
  export * from './TEL.js'
76
73
  export * from './TRIBE.js'
77
74
  export * from './TUSD.js'
75
+ export * from './thundercore/index.js'
78
76
  export * from './UNI.js'
79
77
  export * from './USD_PLUS.js'
80
78
  export * from './USDB.js'
@@ -89,6 +87,7 @@ export * from './WBTC.js'
89
87
  export * from './WETH9.js'
90
88
  export * from './WRBTC.js'
91
89
  export * from './WstETH.js'
92
- export * from './xSolvBTC.js'
93
90
  export * from './XSUSHI.js'
91
+ export * from './xSolvBTC.js'
94
92
  export * from './YFI.js'
93
+ export * from './zeta/index.js'
@@ -1,5 +1,5 @@
1
- import { zeroAddress } from 'viem'
2
1
  import type { Address } from 'viem'
2
+ import { zeroAddress } from 'viem'
3
3
  import type { EvmCurrency } from '../../../evm/currency/currency.js'
4
4
  import { EvmChainId } from '../../chain/index.js'
5
5
  import { EvmToken } from '../../currency/token.js'
@@ -249,7 +249,10 @@ export const isWNativeSupported = (chainId: EvmChainId) =>
249
249
  export function isWrapOrUnwrap({
250
250
  from,
251
251
  to,
252
- }: { from: EvmCurrency; to: EvmCurrency }): boolean {
252
+ }: {
253
+ from: EvmCurrency
254
+ to: EvmCurrency
255
+ }): boolean {
253
256
  if (from.type === 'native' && from.wrap().isSame(to)) {
254
257
  return true
255
258
  }
@@ -55,7 +55,9 @@ export const serializedEvmNativeSchema = <
55
55
  TMetadata extends {} = CurrencyMetadata,
56
56
  >({
57
57
  metadata,
58
- }: { metadata?: z.ZodType<TMetadata> } = {}) =>
58
+ }: {
59
+ metadata?: z.ZodType<TMetadata>
60
+ } = {}) =>
59
61
  z.object({
60
62
  chainId: z.number().int().refine(isEvmChainId),
61
63
  symbol: z.string(),
@@ -25,13 +25,14 @@ export class EvmToken<
25
25
 
26
26
  constructor({
27
27
  origin,
28
+ address,
28
29
  ...rest
29
30
  }: {
30
31
  origin?: EvmTokenOrigin | undefined
31
32
  } & ConstructorParameters<
32
33
  typeof Token<EvmChainId, EvmAddress, TMetadata>
33
34
  >[0]) {
34
- super(rest)
35
+ super({ address: address.toLowerCase() as EvmAddress, ...rest })
35
36
  this.origin = origin
36
37
  }
37
38
 
@@ -77,7 +78,9 @@ export const serializedEvmTokenSchema = <
77
78
  TMetadata extends {} = CurrencyMetadata,
78
79
  >({
79
80
  metadata,
80
- }: { metadata?: z.ZodType<TMetadata> } = {}) =>
81
+ }: {
82
+ metadata?: z.ZodType<TMetadata>
83
+ } = {}) =>
81
84
  z.object({
82
85
  chainId: z.number().int().refine(isEvmChainId),
83
86
  address: z.string().refine(isEvmAddress),
@@ -7,6 +7,7 @@ import { EvmToken } from '../../currency/token.js'
7
7
  import { InsufficientInputAmountError } from '../../dex/errors.js'
8
8
  import { computeSushiSwapV2PoolAddress } from './compute-sushiswap-v2-pool-address.js'
9
9
  import { SushiSwapV2Pool } from './sushiswap-v2-pool.js'
10
+
10
11
  // import { EvmChainId, CurrencyAmount, Price, Token, V2_FACTORY_ADDRESSES, WETH9 } from '@uniswap/sdk-core'
11
12
 
12
13
  describe('computePairAddress', () => {
@@ -3,18 +3,18 @@ import type { Address } from 'viem'
3
3
  import { Amount } from '../../../generic/currency/amount.js'
4
4
  import { Price } from '../../../generic/currency/price.js'
5
5
  import {
6
+ _997,
7
+ _1000,
6
8
  FIVE,
7
9
  ONE,
8
10
  ZERO,
9
- _997,
10
- _1000,
11
11
  } from '../../../generic/math/constants.js'
12
12
  import { sqrt } from '../../../generic/math/sqrt.js'
13
13
  import type { BigintIsh } from '../../../generic/types/bigintish.js'
14
14
  import { getEvmChainById } from '../../chain/index.js'
15
15
  import {
16
- SUSHISWAP_V2_FACTORY_ADDRESS,
17
16
  isSushiSwapV2ChainId,
17
+ SUSHISWAP_V2_FACTORY_ADDRESS,
18
18
  } from '../../config/features/sushiswap-v2.js'
19
19
  import { EvmToken } from '../../currency/index.js'
20
20
  import {
@@ -1,4 +1,4 @@
1
- import { type Hex, encodeFunctionData } from 'viem'
1
+ import { encodeFunctionData, type Hex } from 'viem'
2
2
  import { multicallAbi_multicall } from '../../../abi/multicallAbi/multicallAbi_multicall.js'
3
3
 
4
4
  export abstract class Multicall {
@@ -1,7 +1,7 @@
1
1
  import invariant from 'tiny-invariant'
2
2
  import {
3
- type Hex,
4
3
  decodeAbiParameters,
4
+ type Hex,
5
5
  isHex,
6
6
  maxUint128,
7
7
  zeroAddress,
@@ -1,7 +1,7 @@
1
1
  import invariant from 'tiny-invariant'
2
2
  import {
3
- type Hex,
4
3
  encodeFunctionData,
4
+ type Hex,
5
5
  maxUint128,
6
6
  toHex,
7
7
  zeroAddress,
@@ -1,4 +1,4 @@
1
- import { type Hex, encodeFunctionData } from 'viem'
1
+ import { encodeFunctionData, type Hex } from 'viem'
2
2
  import type { BigintIsh } from '../../../../generic/index.js'
3
3
  import {
4
4
  selfPermitAbi_selfPermit,
@@ -1,2 +1,2 @@
1
- export * from './constants.js'
2
1
  export * from '@uniswap/token-lists'
2
+ export * from './constants.js'
@@ -1,4 +1,4 @@
1
+ export type * from './contract.js'
2
+ export type * from './id.js'
1
3
  export * from './sushi-pool/index.js'
2
4
  export * from './sushi-position/index.js'
3
- export type * from './id.js'
4
- export type * from './contract.js'
@@ -1,4 +1,3 @@
1
- export * from './protocol.js'
2
1
  export * from './maybe-nested-pool.js'
3
2
  export * from './pool-base.js'
4
3
  export * from './pool-history.js'
@@ -10,3 +9,4 @@ export * from './pool-v3.js'
10
9
  export * from './pool-with-aprs.js'
11
10
  export * from './pool-with-buckets.js'
12
11
  export * from './pool-with-incentives.js'
12
+ export * from './protocol.js'
@@ -1,3 +1,3 @@
1
+ export * from './sushi-position-base.js'
1
2
  export * from './sushi-position-staked.js'
2
3
  export * from './sushi-position-with-pool.js'
3
- export * from './sushi-position-base.js'
@@ -1,2 +1,2 @@
1
- export type * from './interface.js'
2
1
  export * from './chains.js'
2
+ export type * from './interface.js'
@@ -1,5 +1,5 @@
1
1
  import { it } from 'node:test'
2
- import { describe, expectTypeOf } from 'vitest'
2
+ import { describe, expect, expectTypeOf } from 'vitest'
3
3
  import * as z from 'zod'
4
4
  import type { EvmChainId } from '~/evm/chain/chains.js'
5
5
  import type { EvmCurrency } from '~/evm/currency/currency.js'
@@ -14,7 +14,7 @@ import {
14
14
  } from '../../evm/currency/token.js'
15
15
  import { MvmToken } from '../../mvm/currency/token.js'
16
16
  import { TvmNative } from '../../tvm/currency/native.js'
17
- import type { TvmToken } from '../../tvm/currency/token.js'
17
+ import { TvmToken } from '../../tvm/currency/token.js'
18
18
  import { getChainIdAddressFromId } from '../utils/id.js'
19
19
  import {
20
20
  BaseCurrency,
@@ -64,6 +64,54 @@ describe('generic/currency/currency.ts types', () => {
64
64
  expectTypeOf(evmMockNative.wrap()).toEqualTypeOf<EvmToken>()
65
65
  })
66
66
 
67
+ it('should lowercase the address - Evm / Mvm / Tvm', () => {
68
+ const evmMockToken = new EvmToken({
69
+ chainId: 1,
70
+ address: '0x1234567890ABCDEF1234567890ABCDEF12345678',
71
+ symbol: 'USDT',
72
+ name: 'Tether USD',
73
+ decimals: 6,
74
+ })
75
+
76
+ expect(evmMockToken.address).toBe(
77
+ '0x1234567890abcdef1234567890abcdef12345678',
78
+ )
79
+
80
+ const mvmMockToken = new MvmToken({
81
+ chainId: -1,
82
+ address: '0x1234567890ABCDEF1234567890ABCDEF12345678::mvm::token',
83
+ symbol: 'MVM',
84
+ name: 'MVM Token',
85
+ decimals: 18,
86
+ })
87
+
88
+ expect(mvmMockToken.address).toBe(
89
+ '0x1234567890abcdef1234567890abcdef12345678::mvm::token',
90
+ )
91
+
92
+ const tvmMockToken = new TvmToken({
93
+ chainId: -2,
94
+ address: 'T1234567890ABCDEF1234567890ABCDEF1',
95
+ symbol: 'TVM',
96
+ name: 'Tvm Token',
97
+ decimals: 18,
98
+ })
99
+
100
+ expect(tvmMockToken.address).toBe('t1234567890abcdef1234567890abcdef1')
101
+ })
102
+
103
+ it('should not lowercase the address - Kvm', () => {
104
+ const kvmMockToken = new KvmToken({
105
+ chainId: -3,
106
+ symbol: 'KVM',
107
+ name: 'Kvm Token',
108
+ decimals: 12,
109
+ address: 'My-Namespace.My-Token',
110
+ })
111
+
112
+ expect(kvmMockToken.address).toBe('My-Namespace.My-Token')
113
+ })
114
+
67
115
  it('should return the same chaintype - Mvm', () => {
68
116
  const mvmMockToken = new MvmToken({
69
117
  chainId: -1,
@@ -20,8 +20,7 @@ export abstract class Token<
20
20
  address: TAddress
21
21
  } & ConstructorParameters<typeof BaseCurrency<TChainId, TMetadata>>[0]) {
22
22
  super(rest)
23
-
24
- this.address = address.toLowerCase() as TAddress
23
+ this.address = address
25
24
  }
26
25
 
27
26
  override get id(): ID<TChainId, TAddress> {
@@ -78,7 +78,7 @@ export function withoutScientificNotation(value: string): string | undefined {
78
78
  const [integer, fraction] = m.split('.')
79
79
 
80
80
  const mantissa = (integer + (fraction ?? '')).replace(/^0+/, '')
81
- const exponent = Number.parseInt(n ?? 0) - (fraction ?? '').length
81
+ const exponent = Number.parseInt(n ?? 0, 10) - (fraction ?? '').length
82
82
 
83
83
  if (exponent >= 0) {
84
84
  return sign + mantissa + '0'.repeat(exponent)
@@ -1,9 +1,9 @@
1
- export * from './constants.js'
2
- export * from './percent.js'
3
- export * from './fraction.js'
4
1
  export { abs } from './abs.js'
2
+ export * from './constants.js'
5
3
  export { difference } from './difference.js'
4
+ export * from './fraction.js'
6
5
  export { maximum } from './maximum.js'
7
6
  export { minimum } from './minimum.js'
8
- export { sqrt } from './sqrt.js'
9
7
  export { numberToBigInt } from './number-to-bigint.js'
8
+ export * from './percent.js'
9
+ export { sqrt } from './sqrt.js'
@@ -1,4 +1,5 @@
1
1
  import { nativeAddress } from '../../evm/config/simple-constants.js'
2
+ import { isKvmTokenAddress } from '../../kvm/currency/token.js'
2
3
  import type { ChainId } from '../chain/chains.js'
3
4
  import type { ID } from '../types/id.js'
4
5
 
@@ -43,7 +44,10 @@ export function getIdFromChainIdAddress<
43
44
  )
44
45
  }
45
46
 
46
- address = address.toLowerCase() as TAddress
47
+ // Kvm addresses are case-sensitive
48
+ if (!isKvmTokenAddress(address)) {
49
+ address = address.toLowerCase() as TAddress
50
+ }
47
51
 
48
52
  if (address === nativeAddress && options.translateNative) {
49
53
  address = 'NATIVE' as TAddress
@@ -9,7 +9,7 @@ export type KvmChainType = 'kvm'
9
9
 
10
10
  type KvmChainBase<TChainId extends number, TChainKey extends string> = Chain<
11
11
  KvmChainType,
12
- // @ts-ignore infinite loop
12
+ // @ts-expect-error infinite loop
13
13
  TChainId,
14
14
  TChainKey,
15
15
  Readonly<string>,
@@ -2,7 +2,7 @@ import * as z from 'zod'
2
2
  import type { CurrencyMetadata } from '../../generic/currency/currency.js'
3
3
  import { Token } from '../../generic/currency/token.js'
4
4
 
5
- import { type KvmChainId, isKvmChainId } from '../chain/chains.js'
5
+ import { isKvmChainId, type KvmChainId } from '../chain/chains.js'
6
6
 
7
7
  export type KvmTokenAddress = `${string}.${string}` | 'coin'
8
8
 
@@ -61,7 +61,9 @@ export const serializedKvmTokenSchema = <
61
61
  TMetadata extends {} = CurrencyMetadata,
62
62
  >({
63
63
  metadata,
64
- }: { metadata?: z.ZodType<TMetadata> } = {}) =>
64
+ }: {
65
+ metadata?: z.ZodType<TMetadata>
66
+ } = {}) =>
65
67
  z.object({
66
68
  chainId: z.number().int().refine(isKvmChainId),
67
69
  address: z.string().refine(isKvmTokenAddress),
@@ -1,7 +1,7 @@
1
1
  import * as z from 'zod'
2
2
  import type { CurrencyMetadata } from '../../generic/currency/currency.js'
3
3
  import { Token } from '../../generic/currency/token.js'
4
- import { type MvmChainId, isMvmChainId } from '../chain/chains.js'
4
+ import { isMvmChainId, type MvmChainId } from '../chain/chains.js'
5
5
 
6
6
  export type MvmAddress = `0x${string}::${string}::${string}`
7
7
 
@@ -13,6 +13,15 @@ export function isMvmAddress(address: string): address is MvmAddress {
13
13
  export class MvmToken<
14
14
  TMetadata extends CurrencyMetadata = Record<string, unknown>,
15
15
  > extends Token<MvmChainId, MvmAddress, TMetadata> {
16
+ constructor({
17
+ address,
18
+ ...rest
19
+ }: ConstructorParameters<
20
+ typeof Token<MvmChainId, MvmAddress, TMetadata>
21
+ >[0]) {
22
+ super({ address: address.toLowerCase() as MvmAddress, ...rest })
23
+ }
24
+
16
25
  public override wrap(): MvmToken<TMetadata> {
17
26
  return this
18
27
  }
@@ -43,7 +52,9 @@ export const serializedMvmTokenSchema = <
43
52
  TMetadata extends {} = CurrencyMetadata,
44
53
  >({
45
54
  metadata,
46
- }: { metadata?: z.ZodType<TMetadata> } = {}) =>
55
+ }: {
56
+ metadata?: z.ZodType<TMetadata>
57
+ } = {}) =>
47
58
  z.object({
48
59
  chainId: z.number().int().refine(isMvmChainId),
49
60
  address: z.string().refine(isMvmAddress),