@whetstone-research/doppler-sdk 0.0.1-alpha.9 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +726 -25
  3. package/dist/DopplerSDK.d.mts +45 -7
  4. package/dist/DopplerSDK.d.ts +45 -7
  5. package/dist/DopplerSDK.js +35 -12
  6. package/dist/DopplerSDK.mjs +34 -11
  7. package/dist/abis/bytecodes.d.mts +3 -2
  8. package/dist/abis/bytecodes.d.ts +3 -2
  9. package/dist/abis/bytecodes.js +9 -6
  10. package/dist/abis/bytecodes.mjs +1 -2
  11. package/dist/abis/index.d.mts +1507 -129
  12. package/dist/abis/index.d.ts +1507 -129
  13. package/dist/abis/index.js +43 -20
  14. package/dist/abis/index.mjs +2 -3
  15. package/dist/addresses.d.mts +16 -3
  16. package/dist/addresses.d.ts +16 -3
  17. package/dist/addresses.js +13 -5
  18. package/dist/addresses.mjs +2 -2
  19. package/dist/builders/DynamicAuctionBuilder.d.mts +119 -0
  20. package/dist/builders/DynamicAuctionBuilder.d.ts +119 -0
  21. package/dist/builders/DynamicAuctionBuilder.js +29 -0
  22. package/dist/builders/DynamicAuctionBuilder.js.map +1 -0
  23. package/dist/builders/DynamicAuctionBuilder.mjs +20 -0
  24. package/dist/builders/DynamicAuctionBuilder.mjs.map +1 -0
  25. package/dist/builders/MulticurveBuilder.d.mts +132 -0
  26. package/dist/builders/MulticurveBuilder.d.ts +132 -0
  27. package/dist/builders/MulticurveBuilder.js +29 -0
  28. package/dist/builders/MulticurveBuilder.js.map +1 -0
  29. package/dist/builders/MulticurveBuilder.mjs +20 -0
  30. package/dist/builders/MulticurveBuilder.mjs.map +1 -0
  31. package/dist/builders/StaticAuctionBuilder.d.mts +124 -0
  32. package/dist/builders/StaticAuctionBuilder.d.ts +124 -0
  33. package/dist/builders/StaticAuctionBuilder.js +29 -0
  34. package/dist/builders/StaticAuctionBuilder.js.map +1 -0
  35. package/dist/builders/StaticAuctionBuilder.mjs +20 -0
  36. package/dist/builders/StaticAuctionBuilder.mjs.map +1 -0
  37. package/dist/builders/index.d.mts +8 -0
  38. package/dist/builders/index.d.ts +8 -0
  39. package/dist/builders/index.js +56 -0
  40. package/dist/builders/index.js.map +1 -0
  41. package/dist/builders/index.mjs +23 -0
  42. package/dist/builders/index.mjs.map +1 -0
  43. package/dist/builders/shared.d.mts +116 -0
  44. package/dist/builders/shared.d.ts +116 -0
  45. package/dist/builders/shared.js +39 -0
  46. package/dist/builders/shared.js.map +1 -0
  47. package/dist/builders/shared.mjs +18 -0
  48. package/dist/builders/shared.mjs.map +1 -0
  49. package/dist/builders.d.mts +8 -131
  50. package/dist/builders.d.ts +8 -131
  51. package/dist/builders.js +44 -5
  52. package/dist/builders.mjs +22 -3
  53. package/dist/chunk-3PNCB4W5.js +4 -0
  54. package/dist/{chunk-KRN3ROUE.js.map → chunk-3PNCB4W5.js.map} +1 -1
  55. package/dist/chunk-3RK7LRAA.js +282 -0
  56. package/dist/chunk-3RK7LRAA.js.map +1 -0
  57. package/dist/chunk-4HM3ERBU.js +13 -0
  58. package/dist/chunk-4HM3ERBU.js.map +1 -0
  59. package/dist/{chunk-7W72MFJO.mjs → chunk-4TROGENW.mjs} +5 -4
  60. package/dist/chunk-4TROGENW.mjs.map +1 -0
  61. package/dist/chunk-5TL5V6UX.mjs +3 -0
  62. package/dist/{chunk-AZLFJNTG.mjs.map → chunk-5TL5V6UX.mjs.map} +1 -1
  63. package/dist/chunk-64AWG57M.mjs +192 -0
  64. package/dist/chunk-64AWG57M.mjs.map +1 -0
  65. package/dist/chunk-6KWCHTK3.js +166 -0
  66. package/dist/chunk-6KWCHTK3.js.map +1 -0
  67. package/dist/chunk-6OOWOPCX.js +1708 -0
  68. package/dist/chunk-6OOWOPCX.js.map +1 -0
  69. package/dist/chunk-7BBRPWQJ.js +257 -0
  70. package/dist/chunk-7BBRPWQJ.js.map +1 -0
  71. package/dist/{chunk-AQPINKEW.mjs → chunk-AKSEBAR7.mjs} +29 -19
  72. package/dist/chunk-AKSEBAR7.mjs.map +1 -0
  73. package/dist/chunk-AS64GWBX.js +204 -0
  74. package/dist/chunk-AS64GWBX.js.map +1 -0
  75. package/dist/chunk-AULFBXM5.mjs +331 -0
  76. package/dist/chunk-AULFBXM5.mjs.map +1 -0
  77. package/dist/chunk-AW3WR2D3.mjs +238 -0
  78. package/dist/chunk-AW3WR2D3.mjs.map +1 -0
  79. package/dist/chunk-BIQQ53O2.js +45 -0
  80. package/dist/chunk-BIQQ53O2.js.map +1 -0
  81. package/dist/chunk-C6MPV3CY.js +260 -0
  82. package/dist/chunk-C6MPV3CY.js.map +1 -0
  83. package/dist/{chunk-AYPP5JEQ.mjs → chunk-CLEQO6GU.mjs} +5 -5
  84. package/dist/chunk-CLEQO6GU.mjs.map +1 -0
  85. package/dist/chunk-CVHPLURA.js +147 -0
  86. package/dist/chunk-CVHPLURA.js.map +1 -0
  87. package/dist/chunk-D2RBCFNW.mjs +130 -0
  88. package/dist/chunk-D2RBCFNW.mjs.map +1 -0
  89. package/dist/chunk-ECD4FV3A.mjs +11 -0
  90. package/dist/chunk-ECD4FV3A.mjs.map +1 -0
  91. package/dist/chunk-EDJBZPMW.mjs +255 -0
  92. package/dist/chunk-EDJBZPMW.mjs.map +1 -0
  93. package/dist/chunk-FPAI4QYW.mjs +145 -0
  94. package/dist/chunk-FPAI4QYW.mjs.map +1 -0
  95. package/dist/chunk-HM25ZMO3.js +18 -0
  96. package/dist/chunk-HM25ZMO3.js.map +1 -0
  97. package/dist/chunk-IHC6UYKK.js +4 -0
  98. package/dist/{chunk-DRBRT57F.js.map → chunk-IHC6UYKK.js.map} +1 -1
  99. package/dist/{chunk-AXA7YT2G.mjs → chunk-J5BFFL3X.mjs} +87 -47
  100. package/dist/chunk-J5BFFL3X.mjs.map +1 -0
  101. package/dist/chunk-JIKAD4YL.js +4 -0
  102. package/dist/{chunk-KEXKKQVW.js.map → chunk-JIKAD4YL.js.map} +1 -1
  103. package/dist/{chunk-EFAPDN4J.js → chunk-JWEXGALU.js} +730 -33
  104. package/dist/chunk-JWEXGALU.js.map +1 -0
  105. package/dist/{chunk-4K5GBNQV.mjs → chunk-KDT76YQE.mjs} +52 -13
  106. package/dist/chunk-KDT76YQE.mjs.map +1 -0
  107. package/dist/chunk-LMQLMMEX.js +317 -0
  108. package/dist/chunk-LMQLMMEX.js.map +1 -0
  109. package/dist/{chunk-TOMVBPNZ.js → chunk-LS4TK6SX.js} +9 -4
  110. package/dist/chunk-LS4TK6SX.js.map +1 -0
  111. package/dist/chunk-M4WMHD3X.mjs +40 -0
  112. package/dist/chunk-M4WMHD3X.mjs.map +1 -0
  113. package/dist/chunk-MCOK3UFR.mjs +280 -0
  114. package/dist/chunk-MCOK3UFR.mjs.map +1 -0
  115. package/dist/chunk-MGQSQCFG.js +176 -0
  116. package/dist/chunk-MGQSQCFG.js.map +1 -0
  117. package/dist/chunk-MKE3BUL3.mjs +3 -0
  118. package/dist/{chunk-CYDWEPFL.mjs.map → chunk-MKE3BUL3.mjs.map} +1 -1
  119. package/dist/chunk-MNJ5OYPE.mjs +17 -0
  120. package/dist/chunk-MNJ5OYPE.mjs.map +1 -0
  121. package/dist/chunk-MNXD45J7.mjs +164 -0
  122. package/dist/chunk-MNXD45J7.mjs.map +1 -0
  123. package/dist/chunk-NGDPQC5E.js +333 -0
  124. package/dist/chunk-NGDPQC5E.js.map +1 -0
  125. package/dist/chunk-NNNCVFOH.mjs +16 -0
  126. package/dist/chunk-NNNCVFOH.mjs.map +1 -0
  127. package/dist/chunk-NZ4BJ2IC.mjs +315 -0
  128. package/dist/chunk-NZ4BJ2IC.mjs.map +1 -0
  129. package/dist/chunk-OKNM7ODQ.js +29 -0
  130. package/dist/chunk-OKNM7ODQ.js.map +1 -0
  131. package/dist/{chunk-DCFHANLR.mjs → chunk-OTG75GVH.mjs} +725 -34
  132. package/dist/chunk-OTG75GVH.mjs.map +1 -0
  133. package/dist/chunk-OZ6DGBRL.mjs +25 -0
  134. package/dist/chunk-OZ6DGBRL.mjs.map +1 -0
  135. package/dist/chunk-P25HBGP5.mjs +3 -0
  136. package/dist/chunk-P25HBGP5.mjs.map +1 -0
  137. package/dist/{chunk-XG7K4R56.js → chunk-P7KLEPVI.js} +52 -12
  138. package/dist/chunk-P7KLEPVI.js.map +1 -0
  139. package/dist/{chunk-OPKQMN46.mjs → chunk-PAPXGPJB.mjs} +9 -4
  140. package/dist/chunk-PAPXGPJB.mjs.map +1 -0
  141. package/dist/chunk-PCNXJAU5.js +19 -0
  142. package/dist/chunk-PCNXJAU5.js.map +1 -0
  143. package/dist/{chunk-PMIJTXU6.js → chunk-PD6HWEMG.js} +40 -30
  144. package/dist/chunk-PD6HWEMG.js.map +1 -0
  145. package/dist/{chunk-ER42VG7H.js → chunk-PH2KXREH.js} +20 -3
  146. package/dist/chunk-PH2KXREH.js.map +1 -0
  147. package/dist/chunk-Q5ERW5ZW.mjs +107 -0
  148. package/dist/chunk-Q5ERW5ZW.mjs.map +1 -0
  149. package/dist/chunk-Q7YNBSVH.js +28 -0
  150. package/dist/chunk-Q7YNBSVH.js.map +1 -0
  151. package/dist/{chunk-T644D54P.mjs → chunk-QKO2FZGN.mjs} +16 -4
  152. package/dist/chunk-QKO2FZGN.mjs.map +1 -0
  153. package/dist/{chunk-CIRZKWLL.js → chunk-RVFSRYI5.js} +5 -3
  154. package/dist/chunk-RVFSRYI5.js.map +1 -0
  155. package/dist/{chunk-KPBCG4X2.js → chunk-RW37KJ77.js} +11 -11
  156. package/dist/chunk-RW37KJ77.js.map +1 -0
  157. package/dist/chunk-SD7BHT2F.mjs +3 -0
  158. package/dist/chunk-SD7BHT2F.mjs.map +1 -0
  159. package/dist/chunk-SP5M57BG.mjs +258 -0
  160. package/dist/chunk-SP5M57BG.mjs.map +1 -0
  161. package/dist/chunk-TKSHYEYA.mjs +1706 -0
  162. package/dist/chunk-TKSHYEYA.mjs.map +1 -0
  163. package/dist/chunk-WTS75RUC.js +4 -0
  164. package/dist/chunk-WTS75RUC.js.map +1 -0
  165. package/dist/{chunk-EIRVZJTT.js → chunk-XRPIGMA2.js} +108 -68
  166. package/dist/chunk-XRPIGMA2.js.map +1 -0
  167. package/dist/chunk-XTKSM4QE.js +132 -0
  168. package/dist/chunk-XTKSM4QE.js.map +1 -0
  169. package/dist/chunk-XUE3CIJ5.mjs +174 -0
  170. package/dist/chunk-XUE3CIJ5.mjs.map +1 -0
  171. package/dist/chunk-YYUOLM6U.js +244 -0
  172. package/dist/chunk-YYUOLM6U.js.map +1 -0
  173. package/dist/chunk-ZH44DHVR.mjs +26 -0
  174. package/dist/chunk-ZH44DHVR.mjs.map +1 -0
  175. package/dist/chunk-ZPHOOG72.js +112 -0
  176. package/dist/chunk-ZPHOOG72.js.map +1 -0
  177. package/dist/constants.d.mts +7 -2
  178. package/dist/constants.d.ts +7 -2
  179. package/dist/constants.js +57 -38
  180. package/dist/constants.mjs +1 -2
  181. package/dist/deployments.generated.d.mts +2 -0
  182. package/dist/deployments.generated.d.ts +2 -0
  183. package/dist/deployments.generated.js +12 -0
  184. package/dist/deployments.generated.js.map +1 -0
  185. package/dist/deployments.generated.mjs +3 -0
  186. package/dist/deployments.generated.mjs.map +1 -0
  187. package/dist/entities/DopplerFactory.d.mts +139 -11
  188. package/dist/entities/DopplerFactory.d.ts +139 -11
  189. package/dist/entities/DopplerFactory.js +17 -7
  190. package/dist/entities/DopplerFactory.mjs +16 -6
  191. package/dist/entities/auction/DynamicAuction.d.mts +19 -4
  192. package/dist/entities/auction/DynamicAuction.d.ts +19 -4
  193. package/dist/entities/auction/DynamicAuction.js +6 -6
  194. package/dist/entities/auction/DynamicAuction.mjs +5 -5
  195. package/dist/entities/auction/MulticurvePool.d.mts +55 -0
  196. package/dist/entities/auction/MulticurvePool.d.ts +55 -0
  197. package/dist/entities/auction/MulticurvePool.js +18 -0
  198. package/dist/entities/auction/MulticurvePool.js.map +1 -0
  199. package/dist/entities/auction/MulticurvePool.mjs +9 -0
  200. package/dist/entities/auction/MulticurvePool.mjs.map +1 -0
  201. package/dist/entities/auction/StaticAuction.d.mts +6 -3
  202. package/dist/entities/auction/StaticAuction.d.ts +6 -3
  203. package/dist/entities/auction/StaticAuction.js +6 -6
  204. package/dist/entities/auction/StaticAuction.mjs +5 -5
  205. package/dist/entities/auction/index.d.mts +3 -0
  206. package/dist/entities/auction/index.d.ts +3 -0
  207. package/dist/entities/auction/index.js +16 -9
  208. package/dist/entities/auction/index.mjs +10 -7
  209. package/dist/entities/quoter/Quoter.d.mts +44 -2
  210. package/dist/entities/quoter/Quoter.d.ts +44 -2
  211. package/dist/entities/quoter/Quoter.js +6 -6
  212. package/dist/entities/quoter/Quoter.mjs +5 -5
  213. package/dist/entities/quoter/index.d.mts +3 -0
  214. package/dist/entities/quoter/index.d.ts +3 -0
  215. package/dist/entities/quoter/index.js +6 -6
  216. package/dist/entities/quoter/index.mjs +5 -5
  217. package/dist/entities/token/derc20/Derc20.d.mts +33 -7
  218. package/dist/entities/token/derc20/Derc20.d.ts +33 -7
  219. package/dist/entities/token/derc20/Derc20.js +4 -5
  220. package/dist/entities/token/derc20/Derc20.mjs +3 -4
  221. package/dist/entities/token/derc20/index.d.mts +3 -0
  222. package/dist/entities/token/derc20/index.d.ts +3 -0
  223. package/dist/entities/token/derc20/index.js +4 -5
  224. package/dist/entities/token/derc20/index.mjs +3 -4
  225. package/dist/entities/token/eth/Eth.d.mts +7 -3
  226. package/dist/entities/token/eth/Eth.d.ts +7 -3
  227. package/dist/entities/token/eth/Eth.js +2 -3
  228. package/dist/entities/token/eth/Eth.mjs +1 -2
  229. package/dist/entities/token/eth/index.d.mts +3 -0
  230. package/dist/entities/token/eth/index.d.ts +3 -0
  231. package/dist/entities/token/eth/index.js +2 -3
  232. package/dist/entities/token/eth/index.mjs +1 -2
  233. package/dist/entities/token/index.d.mts +3 -0
  234. package/dist/entities/token/index.d.ts +3 -0
  235. package/dist/entities/token/index.js +6 -7
  236. package/dist/entities/token/index.mjs +4 -5
  237. package/dist/index.d.mts +18 -6
  238. package/dist/index.d.ts +18 -6
  239. package/dist/index.js +305 -140
  240. package/dist/index.js.map +1 -1
  241. package/dist/index.mjs +32 -19
  242. package/dist/index.mjs.map +1 -1
  243. package/dist/types.d.mts +260 -22
  244. package/dist/types.d.ts +260 -22
  245. package/dist/types.js +12 -3
  246. package/dist/types.mjs +3 -2
  247. package/dist/utils/airlock.d.mts +11 -0
  248. package/dist/utils/airlock.d.ts +11 -0
  249. package/dist/utils/airlock.js +26 -0
  250. package/dist/utils/airlock.js.map +1 -0
  251. package/dist/utils/airlock.mjs +5 -0
  252. package/dist/utils/airlock.mjs.map +1 -0
  253. package/dist/utils/balanceDelta.d.mts +10 -0
  254. package/dist/utils/balanceDelta.d.ts +10 -0
  255. package/dist/utils/balanceDelta.js +12 -0
  256. package/dist/utils/balanceDelta.js.map +1 -0
  257. package/dist/utils/balanceDelta.mjs +3 -0
  258. package/dist/utils/balanceDelta.mjs.map +1 -0
  259. package/dist/utils/computeOptimalGamma.d.mts +7 -0
  260. package/dist/utils/computeOptimalGamma.d.ts +7 -0
  261. package/dist/utils/computeOptimalGamma.js +12 -0
  262. package/dist/utils/computeOptimalGamma.js.map +1 -0
  263. package/dist/utils/computeOptimalGamma.mjs +3 -0
  264. package/dist/utils/computeOptimalGamma.mjs.map +1 -0
  265. package/dist/utils/index.d.mts +11 -0
  266. package/dist/utils/index.d.ts +11 -0
  267. package/dist/utils/index.js +114 -24
  268. package/dist/utils/index.mjs +14 -4
  269. package/dist/utils/isToken0Expected.d.mts +13 -0
  270. package/dist/utils/isToken0Expected.d.ts +13 -0
  271. package/dist/utils/isToken0Expected.js +12 -0
  272. package/dist/utils/isToken0Expected.js.map +1 -0
  273. package/dist/utils/isToken0Expected.mjs +3 -0
  274. package/dist/utils/isToken0Expected.mjs.map +1 -0
  275. package/dist/utils/marketCapHelpers.d.mts +309 -0
  276. package/dist/utils/marketCapHelpers.d.ts +309 -0
  277. package/dist/utils/marketCapHelpers.js +54 -0
  278. package/dist/utils/marketCapHelpers.js.map +1 -0
  279. package/dist/utils/marketCapHelpers.mjs +5 -0
  280. package/dist/utils/marketCapHelpers.mjs.map +1 -0
  281. package/dist/utils/poolKey.d.mts +17 -0
  282. package/dist/utils/poolKey.d.ts +17 -0
  283. package/dist/utils/poolKey.js +12 -0
  284. package/dist/utils/poolKey.js.map +1 -0
  285. package/dist/utils/poolKey.mjs +3 -0
  286. package/dist/utils/poolKey.mjs.map +1 -0
  287. package/dist/utils/priceHelpers.d.mts +3 -3
  288. package/dist/utils/priceHelpers.d.ts +3 -3
  289. package/dist/utils/priceHelpers.js +10 -11
  290. package/dist/utils/priceHelpers.mjs +2 -3
  291. package/dist/utils/tickMath.d.mts +8 -1
  292. package/dist/utils/tickMath.d.ts +8 -1
  293. package/dist/utils/tickMath.js +17 -14
  294. package/dist/utils/tickMath.mjs +1 -2
  295. package/dist/utils/tokenAddressMiner.d.mts +30 -0
  296. package/dist/utils/tokenAddressMiner.d.ts +30 -0
  297. package/dist/utils/tokenAddressMiner.js +14 -0
  298. package/dist/utils/tokenAddressMiner.js.map +1 -0
  299. package/dist/utils/tokenAddressMiner.mjs +5 -0
  300. package/dist/utils/tokenAddressMiner.mjs.map +1 -0
  301. package/package.json +14 -11
  302. package/dist/__tests__/mocks/addresses.d.mts +0 -46
  303. package/dist/__tests__/mocks/addresses.d.ts +0 -46
  304. package/dist/__tests__/mocks/addresses.js +0 -53
  305. package/dist/__tests__/mocks/addresses.js.map +0 -1
  306. package/dist/__tests__/mocks/addresses.mjs +0 -44
  307. package/dist/__tests__/mocks/addresses.mjs.map +0 -1
  308. package/dist/__tests__/mocks/clients.d.mts +0 -22
  309. package/dist/__tests__/mocks/clients.d.ts +0 -22
  310. package/dist/__tests__/mocks/clients.js +0 -17036
  311. package/dist/__tests__/mocks/clients.js.map +0 -1
  312. package/dist/__tests__/mocks/clients.mjs +0 -17032
  313. package/dist/__tests__/mocks/clients.mjs.map +0 -1
  314. package/dist/chunk-2N5JZSZ4.js +0 -14
  315. package/dist/chunk-2N5JZSZ4.js.map +0 -1
  316. package/dist/chunk-4K5GBNQV.mjs.map +0 -1
  317. package/dist/chunk-7F5IXZLH.js +0 -308
  318. package/dist/chunk-7F5IXZLH.js.map +0 -1
  319. package/dist/chunk-7W72MFJO.mjs.map +0 -1
  320. package/dist/chunk-AQPINKEW.mjs.map +0 -1
  321. package/dist/chunk-AXA7YT2G.mjs.map +0 -1
  322. package/dist/chunk-AYPP5JEQ.mjs.map +0 -1
  323. package/dist/chunk-AZLFJNTG.mjs +0 -3
  324. package/dist/chunk-CIRZKWLL.js.map +0 -1
  325. package/dist/chunk-CIVGL27M.mjs +0 -160
  326. package/dist/chunk-CIVGL27M.mjs.map +0 -1
  327. package/dist/chunk-CYDWEPFL.mjs +0 -3
  328. package/dist/chunk-DCFHANLR.mjs.map +0 -1
  329. package/dist/chunk-DRBRT57F.js +0 -4
  330. package/dist/chunk-EFAPDN4J.js.map +0 -1
  331. package/dist/chunk-EIRVZJTT.js.map +0 -1
  332. package/dist/chunk-ER42VG7H.js.map +0 -1
  333. package/dist/chunk-FPGJKJIR.js +0 -872
  334. package/dist/chunk-FPGJKJIR.js.map +0 -1
  335. package/dist/chunk-HRFHDSNE.js +0 -180
  336. package/dist/chunk-HRFHDSNE.js.map +0 -1
  337. package/dist/chunk-IHBIBFZK.mjs +0 -12
  338. package/dist/chunk-IHBIBFZK.mjs.map +0 -1
  339. package/dist/chunk-JIDZBQ7R.mjs +0 -870
  340. package/dist/chunk-JIDZBQ7R.mjs.map +0 -1
  341. package/dist/chunk-KEXKKQVW.js +0 -42
  342. package/dist/chunk-KFD6U3LQ.mjs +0 -305
  343. package/dist/chunk-KFD6U3LQ.mjs.map +0 -1
  344. package/dist/chunk-KPBCG4X2.js.map +0 -1
  345. package/dist/chunk-KRN3ROUE.js +0 -4
  346. package/dist/chunk-KT7U37XS.mjs +0 -207
  347. package/dist/chunk-KT7U37XS.mjs.map +0 -1
  348. package/dist/chunk-LOROXNH3.mjs +0 -37
  349. package/dist/chunk-LOROXNH3.mjs.map +0 -1
  350. package/dist/chunk-LZO67TYV.mjs +0 -176
  351. package/dist/chunk-LZO67TYV.mjs.map +0 -1
  352. package/dist/chunk-MZ2UBC4M.mjs +0 -80
  353. package/dist/chunk-MZ2UBC4M.mjs.map +0 -1
  354. package/dist/chunk-OPKQMN46.mjs.map +0 -1
  355. package/dist/chunk-PMIJTXU6.js.map +0 -1
  356. package/dist/chunk-T644D54P.mjs.map +0 -1
  357. package/dist/chunk-TOMVBPNZ.js.map +0 -1
  358. package/dist/chunk-UHT4QLL7.js +0 -162
  359. package/dist/chunk-UHT4QLL7.js.map +0 -1
  360. package/dist/chunk-XG7K4R56.js.map +0 -1
  361. package/dist/chunk-YNP2HGJZ.js +0 -82
  362. package/dist/chunk-YNP2HGJZ.js.map +0 -1
  363. package/dist/chunk-ZAIP54LX.js +0 -209
  364. package/dist/chunk-ZAIP54LX.js.map +0 -1
  365. package/dist/magic-string.es-CBLXTCZP.js +0 -1304
  366. package/dist/magic-string.es-CBLXTCZP.js.map +0 -1
  367. package/dist/magic-string.es-QHA47FSB.mjs +0 -1298
  368. package/dist/magic-string.es-QHA47FSB.mjs.map +0 -1
@@ -1,207 +0,0 @@
1
- import { derc20Abi } from './chunk-DCFHANLR.mjs';
2
-
3
- // src/entities/token/derc20/Derc20.ts
4
- var Derc20 = class {
5
- constructor(publicClient, walletClient, address) {
6
- this.publicClient = publicClient;
7
- this.walletClient = walletClient;
8
- this.address = address;
9
- }
10
- /** Get the human-readable name of the token */
11
- async getName() {
12
- return await this.publicClient.readContract({
13
- address: this.address,
14
- abi: derc20Abi,
15
- functionName: "name"
16
- });
17
- }
18
- /** Get the symbol/ticker of the token */
19
- async getSymbol() {
20
- return await this.publicClient.readContract({
21
- address: this.address,
22
- abi: derc20Abi,
23
- functionName: "symbol"
24
- });
25
- }
26
- /** Get the number of decimals used for token divisions */
27
- async getDecimals() {
28
- return await this.publicClient.readContract({
29
- address: this.address,
30
- abi: derc20Abi,
31
- functionName: "decimals"
32
- });
33
- }
34
- /** Get the token URI for the token */
35
- async getTokenURI() {
36
- return await this.publicClient.readContract({
37
- address: this.address,
38
- abi: derc20Abi,
39
- functionName: "tokenURI"
40
- });
41
- }
42
- /**
43
- * Get the allowance granted by an owner to a spender
44
- * @param owner - The address that granted the allowance
45
- * @param spender - The address that can spend the tokens
46
- */
47
- async getAllowance(owner, spender) {
48
- return await this.publicClient.readContract({
49
- address: this.address,
50
- abi: derc20Abi,
51
- functionName: "allowance",
52
- args: [owner, spender]
53
- });
54
- }
55
- /**
56
- * Get the token balance of a specific account
57
- * @param account - Address to check balance for
58
- */
59
- async getBalanceOf(account) {
60
- return await this.publicClient.readContract({
61
- address: this.address,
62
- abi: derc20Abi,
63
- functionName: "balanceOf",
64
- args: [account]
65
- });
66
- }
67
- /** Get the total supply of tokens in circulation */
68
- async getTotalSupply() {
69
- return await this.publicClient.readContract({
70
- address: this.address,
71
- abi: derc20Abi,
72
- functionName: "totalSupply"
73
- });
74
- }
75
- /** Get the duration (in seconds) of the vesting period */
76
- async getVestingDuration() {
77
- return await this.publicClient.readContract({
78
- address: this.address,
79
- abi: derc20Abi,
80
- functionName: "vestingDuration"
81
- });
82
- }
83
- /** Get the timestamp when vesting begins */
84
- async getVestingStart() {
85
- return await this.publicClient.readContract({
86
- address: this.address,
87
- abi: derc20Abi,
88
- functionName: "vestingStart"
89
- });
90
- }
91
- /** Get the total amount of tokens allocated for vesting */
92
- async getVestedTotalAmount() {
93
- return await this.publicClient.readContract({
94
- address: this.address,
95
- abi: derc20Abi,
96
- functionName: "vestedTotalAmount"
97
- });
98
- }
99
- /** Get the amount of vested tokens available for a specific address */
100
- async getAvailableVestedAmount(account) {
101
- return await this.publicClient.readContract({
102
- address: this.address,
103
- abi: derc20Abi,
104
- functionName: "computeAvailableVestedAmount",
105
- args: [account]
106
- });
107
- }
108
- /** Get the current annual mint rate in tokens per year */
109
- async getYearlyMintRate() {
110
- return await this.publicClient.readContract({
111
- address: this.address,
112
- abi: derc20Abi,
113
- functionName: "yearlyMintRate"
114
- });
115
- }
116
- /** Get the pool address for the token */
117
- async getPool() {
118
- return await this.publicClient.readContract({
119
- address: this.address,
120
- abi: derc20Abi,
121
- functionName: "pool"
122
- });
123
- }
124
- /** Check if the liquidity pool is unlocked */
125
- async getIsPoolUnlocked() {
126
- return await this.publicClient.readContract({
127
- address: this.address,
128
- abi: derc20Abi,
129
- functionName: "isPoolUnlocked"
130
- });
131
- }
132
- /** Get the timestamp when token minting begins */
133
- async getCurrentYearStart() {
134
- return await this.publicClient.readContract({
135
- address: this.address,
136
- abi: derc20Abi,
137
- functionName: "currentYearStart"
138
- });
139
- }
140
- /** Get the timestamp of the last mint */
141
- async getLastMintTimestamp() {
142
- return await this.publicClient.readContract({
143
- address: this.address,
144
- abi: derc20Abi,
145
- functionName: "lastMintTimestamp"
146
- });
147
- }
148
- /**
149
- * Get detailed vesting information for a specific account
150
- * @param account - Address to retrieve vesting data for
151
- * @returns Object containing totalAmount and releasedAmount
152
- */
153
- async getVestingData(account) {
154
- const result = await this.publicClient.readContract({
155
- address: this.address,
156
- abi: derc20Abi,
157
- functionName: "getVestingDataOf",
158
- args: [account]
159
- });
160
- return {
161
- totalAmount: result[0],
162
- releasedAmount: result[1]
163
- };
164
- }
165
- // Write methods (require wallet client)
166
- /**
167
- * Approve a spender to transfer tokens on behalf of the owner
168
- * @param spender - Address that will be able to spend the tokens
169
- * @param value - Amount of tokens to approve
170
- * @returns Transaction hash
171
- */
172
- async approve(spender, value) {
173
- if (!this.walletClient) {
174
- throw new Error("Wallet client required for write operations");
175
- }
176
- const { request } = await this.publicClient.simulateContract({
177
- address: this.address,
178
- abi: derc20Abi,
179
- functionName: "approve",
180
- args: [spender, value],
181
- account: this.walletClient.account
182
- });
183
- return await this.walletClient.writeContract(request);
184
- }
185
- /**
186
- * Release vested tokens to the caller
187
- * @param amount - Amount of vested tokens to release
188
- * @returns Transaction hash
189
- */
190
- async release(amount) {
191
- if (!this.walletClient) {
192
- throw new Error("Wallet client required for write operations");
193
- }
194
- const { request } = await this.publicClient.simulateContract({
195
- address: this.address,
196
- abi: derc20Abi,
197
- functionName: "release",
198
- args: [amount],
199
- account: this.walletClient.account
200
- });
201
- return await this.walletClient.writeContract(request);
202
- }
203
- };
204
-
205
- export { Derc20 };
206
- //# sourceMappingURL=chunk-KT7U37XS.mjs.map
207
- //# sourceMappingURL=chunk-KT7U37XS.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/entities/token/derc20/Derc20.ts"],"names":[],"mappings":";;;AAQO,IAAM,SAAN,MAAa;AAAA,EAKlB,WAAA,CAAY,YAA4B,EAAA,YAAA,EAAwC,OAAkB,EAAA;AAChG,IAAA,IAAA,CAAK,YAAe,GAAA,YAAA;AACpB,IAAA,IAAA,CAAK,YAAe,GAAA,YAAA;AACpB,IAAA,IAAA,CAAK,OAAU,GAAA,OAAA;AAAA;AACjB;AAAA,EAGA,MAAM,OAA2B,GAAA;AAC/B,IAAO,OAAA,MAAM,IAAK,CAAA,YAAA,CAAa,YAAa,CAAA;AAAA,MAC1C,SAAS,IAAK,CAAA,OAAA;AAAA,MACd,GAAK,EAAA,SAAA;AAAA,MACL,YAAc,EAAA;AAAA,KACf,CAAA;AAAA;AACH;AAAA,EAGA,MAAM,SAA6B,GAAA;AACjC,IAAO,OAAA,MAAM,IAAK,CAAA,YAAA,CAAa,YAAa,CAAA;AAAA,MAC1C,SAAS,IAAK,CAAA,OAAA;AAAA,MACd,GAAK,EAAA,SAAA;AAAA,MACL,YAAc,EAAA;AAAA,KACf,CAAA;AAAA;AACH;AAAA,EAGA,MAAM,WAA+B,GAAA;AACnC,IAAO,OAAA,MAAM,IAAK,CAAA,YAAA,CAAa,YAAa,CAAA;AAAA,MAC1C,SAAS,IAAK,CAAA,OAAA;AAAA,MACd,GAAK,EAAA,SAAA;AAAA,MACL,YAAc,EAAA;AAAA,KACf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MACL,YAAc,EAAA,SAAA;AAAA,MACd,IAAA,EAAM,CAAC,OAAA,EAAS,KAAK,CAAA;AAAA,MACrB,OAAA,EAAS,KAAK,YAAa,CAAA;AAAA,KAC5B,CAAA;AAED,IAAA,OAAO,MAAM,IAAA,CAAK,YAAa,CAAA,aAAA,CAAc,OAAO,CAAA;AAAA;AACtD;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,QAAQ,MAAwC,EAAA;AACpD,IAAI,IAAA,CAAC,KAAK,YAAc,EAAA;AACtB,MAAM,MAAA,IAAI,MAAM,6CAA6C,CAAA;AAAA;AAG/D,IAAA,MAAM,EAAE,OAAQ,EAAA,GAAI,MAAM,IAAA,CAAK,aAAa,gBAAiB,CAAA;AAAA,MAC3D,SAAS,IAAK,CAAA,OAAA;AAAA,MACd,GAAK,EAAA,SAAA;AAAA,MACL,YAAc,EAAA,SAAA;AAAA,MACd,IAAA,EAAM,CAAC,MAAM,CAAA;AAAA,MACb,OAAA,EAAS,KAAK,YAAa,CAAA;AAAA,KAC5B,CAAA;AAED,IAAA,OAAO,MAAM,IAAA,CAAK,YAAa,CAAA,aAAA,CAAc,OAAO,CAAA;AAAA;AAExD","file":"chunk-KT7U37XS.mjs","sourcesContent":["import { type Address, type PublicClient, type WalletClient } from 'viem'\nimport { derc20Abi } from '../../../abis'\n\n/**\n * A class providing read and write access to a DERC20 token contract.\n * Enables querying standard ERC20 token properties along with custom vesting\n * and minting-related state information.\n */\nexport class Derc20 {\n private publicClient: PublicClient\n private walletClient?: WalletClient\n private address: Address\n \n constructor(publicClient: PublicClient, walletClient: WalletClient | undefined, address: Address) {\n this.publicClient = publicClient\n this.walletClient = walletClient\n this.address = address\n }\n \n /** Get the human-readable name of the token */\n async getName(): Promise<string> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'name',\n })\n }\n \n /** Get the symbol/ticker of the token */\n async getSymbol(): Promise<string> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'symbol',\n })\n }\n \n /** Get the number of decimals used for token divisions */\n async getDecimals(): Promise<number> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'decimals',\n })\n }\n \n /** Get the token URI for the token */\n async getTokenURI(): Promise<string> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'tokenURI',\n })\n }\n \n /**\n * Get the allowance granted by an owner to a spender\n * @param owner - The address that granted the allowance\n * @param spender - The address that can spend the tokens\n */\n async getAllowance(owner: Address, spender: Address): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'allowance',\n args: [owner, spender],\n })\n }\n \n /**\n * Get the token balance of a specific account\n * @param account - Address to check balance for\n */\n async getBalanceOf(account: Address): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'balanceOf',\n args: [account],\n })\n }\n \n /** Get the total supply of tokens in circulation */\n async getTotalSupply(): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'totalSupply',\n })\n }\n \n /** Get the duration (in seconds) of the vesting period */\n async getVestingDuration(): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'vestingDuration',\n })\n }\n \n /** Get the timestamp when vesting begins */\n async getVestingStart(): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'vestingStart',\n })\n }\n \n /** Get the total amount of tokens allocated for vesting */\n async getVestedTotalAmount(): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'vestedTotalAmount',\n })\n }\n \n /** Get the amount of vested tokens available for a specific address */\n async getAvailableVestedAmount(account: Address): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'computeAvailableVestedAmount',\n args: [account],\n })\n }\n \n /** Get the current annual mint rate in tokens per year */\n async getYearlyMintRate(): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'yearlyMintRate',\n })\n }\n \n /** Get the pool address for the token */\n async getPool(): Promise<Address> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'pool',\n })\n }\n \n /** Check if the liquidity pool is unlocked */\n async getIsPoolUnlocked(): Promise<boolean> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'isPoolUnlocked',\n })\n }\n \n /** Get the timestamp when token minting begins */\n async getCurrentYearStart(): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'currentYearStart',\n })\n }\n \n /** Get the timestamp of the last mint */\n async getLastMintTimestamp(): Promise<bigint> {\n return await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'lastMintTimestamp',\n })\n }\n \n /**\n * Get detailed vesting information for a specific account\n * @param account - Address to retrieve vesting data for\n * @returns Object containing totalAmount and releasedAmount\n */\n async getVestingData(account: Address): Promise<{\n totalAmount: bigint\n releasedAmount: bigint\n }> {\n const result = await this.publicClient.readContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'getVestingDataOf',\n args: [account],\n })\n \n return {\n totalAmount: result[0],\n releasedAmount: result[1],\n }\n }\n \n // Write methods (require wallet client)\n \n /**\n * Approve a spender to transfer tokens on behalf of the owner\n * @param spender - Address that will be able to spend the tokens\n * @param value - Amount of tokens to approve\n * @returns Transaction hash\n */\n async approve(spender: Address, value: bigint): Promise<`0x${string}`> {\n if (!this.walletClient) {\n throw new Error('Wallet client required for write operations')\n }\n \n const { request } = await this.publicClient.simulateContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'approve',\n args: [spender, value],\n account: this.walletClient.account,\n })\n \n return await this.walletClient.writeContract(request)\n }\n \n /**\n * Release vested tokens to the caller\n * @param amount - Amount of vested tokens to release\n * @returns Transaction hash\n */\n async release(amount: bigint): Promise<`0x${string}`> {\n if (!this.walletClient) {\n throw new Error('Wallet client required for write operations')\n }\n \n const { request } = await this.publicClient.simulateContract({\n address: this.address,\n abi: derc20Abi,\n functionName: 'release',\n args: [amount],\n account: this.walletClient.account,\n })\n \n return await this.walletClient.writeContract(request)\n }\n}"]}
@@ -1,37 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
- }) : x)(function(x) {
11
- if (typeof require !== "undefined") return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
- var __commonJS = (cb, mod) => function __require2() {
15
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
- };
17
- var __copyProps = (to, from, except, desc) => {
18
- if (from && typeof from === "object" || typeof from === "function") {
19
- for (let key of __getOwnPropNames(from))
20
- if (!__hasOwnProp.call(to, key) && key !== except)
21
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
- }
23
- return to;
24
- };
25
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
- // If the importer is in node compatibility mode or this is not an ESM
27
- // file that has been converted to a CommonJS file using a Babel-
28
- // compatible transform (i.e. "__esModule" has not been set), then set
29
- // "default" to the CommonJS "module.exports" for node compatibility.
30
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
- mod
32
- ));
33
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34
-
35
- export { __commonJS, __publicField, __require, __toESM };
36
- //# sourceMappingURL=chunk-LOROXNH3.mjs.map
37
- //# sourceMappingURL=chunk-LOROXNH3.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-LOROXNH3.mjs"}
@@ -1,176 +0,0 @@
1
- // src/addresses.ts
2
- var CHAIN_IDS = {
3
- MAINNET: 1,
4
- BASE: 8453,
5
- BASE_SEPOLIA: 84532,
6
- INK: 57073,
7
- UNICHAIN: 130,
8
- UNICHAIN_SEPOLIA: 1301
9
- };
10
- var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
11
- var ADDRESSES = {
12
- [CHAIN_IDS.MAINNET]: {
13
- // Mainnet addresses not yet deployed
14
- airlock: ZERO_ADDRESS,
15
- tokenFactory: ZERO_ADDRESS,
16
- v3Initializer: ZERO_ADDRESS,
17
- v3Quoter: ZERO_ADDRESS,
18
- v4Initializer: ZERO_ADDRESS,
19
- doppler: ZERO_ADDRESS,
20
- dopplerLens: ZERO_ADDRESS,
21
- dopplerDeployer: ZERO_ADDRESS,
22
- v2Migrator: ZERO_ADDRESS,
23
- v3Migrator: ZERO_ADDRESS,
24
- v4Migrator: ZERO_ADDRESS,
25
- poolManager: ZERO_ADDRESS,
26
- stateView: ZERO_ADDRESS,
27
- governanceFactory: ZERO_ADDRESS,
28
- universalRouter: ZERO_ADDRESS,
29
- permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
30
- weth: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
31
- uniswapV2Factory: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
32
- uniswapV3Factory: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
33
- },
34
- [CHAIN_IDS.BASE]: {
35
- airlock: "0x660eAaEdEBc968f8f3694354FA8EC0b4c5Ba8D12",
36
- tokenFactory: "0xFAafdE6a5b658684cC5eb0C5c2c755B00A246F45",
37
- v3Initializer: "0xaA47D2977d622DBdFD33eeF6a8276727c52EB4e5",
38
- v3Quoter: "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",
39
- lockableV3Initializer: "0xe0dc4012ac9c868f09c6e4b20d66ed46d6f258d0",
40
- v4Initializer: "0x82ac010c67f70bacf7655cd8948a4ad92a173cac",
41
- doppler: "0x2f2bacd46d3f5c9ee052ab392b73711db89129db",
42
- dopplerLens: "0x43d0d97ec9241a8f05a264f94b82a1d2e600f2b3",
43
- dopplerDeployer: "0x8350cAd81149A9944c2fb4276955FaAA7D61e836",
44
- poolManager: "0x498581ff718922c3f8e6a244956af099b2652b2b",
45
- stateView: "0xa3c0c9b65bad0b08107aa264b0f3db444b867a71",
46
- v2Migrator: "0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731",
47
- v3Migrator: "0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731",
48
- v4Migrator: "0xa24e35a5d71d02a59b41e7c93567626302da1958",
49
- governanceFactory: "0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9",
50
- noOpGovernanceFactory: "0xe7dfbd5b0a2c3b4464653a9becdc489229ef090e",
51
- streamableFeesLocker: "0x0a00775d71a42cd33d62780003035e7f5b47bd3a",
52
- universalRouter: "0x6ff5693b99212da76ad316178a184ab56d299b43",
53
- univ2Router02: "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",
54
- permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
55
- bundler: "0x136191B46478cAB023cbC01a36160C4Aad81677a",
56
- weth: "0x4200000000000000000000000000000000000006"
57
- },
58
- [CHAIN_IDS.BASE_SEPOLIA]: {
59
- airlock: "0x3411306ce66c9469bff1535ba955503c4bde1c6e",
60
- tokenFactory: "0xc69ba223c617f7d936b3cf2012aa644815dbe9ff",
61
- doppler404Factory: "0x80A27Feee1A22b9c68185ea64E7c2652286980B5",
62
- v3Initializer: "0x4c3062b9ccfdbcb10353f57c1b59a29d4c5cfa47",
63
- v3Quoter: "0xC5290058841028F1614F3A6F0F5816cAd0df5E27",
64
- lockableV3Initializer: "0x16ada5be50c3c2d94af5feae6b539c40a78ad53c",
65
- v4Initializer: "0x8e891d249f1ecbffa6143c03eb1b12843aef09d3",
66
- doppler: "0x60a039e4add40ca95e0475c11e8a4182d06c9aa0",
67
- dopplerLens: "0x4a8d81db741248a36d9eb3bc6ef648bf798b47a7",
68
- dopplerDeployer: "0x60a039e4add40ca95e0475c11e8a4182d06c9aa0",
69
- poolManager: "0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408",
70
- stateView: "0x571291b572ed32ce6751a2cb2486ebee8defb9b4",
71
- v2Migrator: "0x04a898f3722c38f9def707bd17dc78920efa977c",
72
- v3Migrator: "0xb2ec6559704467306d04322a5dc082b2af4562dd",
73
- v4Migrator: "0xb2ec6559704467306d04322a5dc082b2af4562dd",
74
- v4MigratorHook: "0x508812fcdd4972a59b66eb2cad3772279c052000",
75
- governanceFactory: "0x9dbfaadc8c0cb2c34ba698dd9426555336992e20",
76
- noOpGovernanceFactory: "0x916b8987e4ad325c10d58ed8dc2036a6ff5eb228",
77
- streamableFeesLocker: "0x4da7d7a8034510c0ffd38a9252237ae8dba3cb61",
78
- universalRouter: "0x492E6456D9528771018DeB9E87ef7750EF184104",
79
- univ2Router02: "0x1689E7B1F10000AE47eBfE339a4f69dECd19F602",
80
- permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
81
- bundler: "0xab7bacb0d5c2c10152f92d34e07f530eb3cb0fb1",
82
- weth: "0x4200000000000000000000000000000000000006"
83
- },
84
- [CHAIN_IDS.INK]: {
85
- airlock: "0x014E1c0bd34f3B10546E554CB33B3293fECDD056",
86
- tokenFactory: "0xFAafdE6a5b658684cC5eb0C5c2c755B00A246F45",
87
- v3Initializer: "0xaA47D2977d622DBdFD33eeF6a8276727c52EB4e5",
88
- v3Quoter: "0x96b572D2d880cf2Fa2563651BD23ADE6f5516652",
89
- v4Initializer: "0xC99b485499f78995C6F1640dbB1413c57f8BA684",
90
- doppler: "0xa82c66b6ddEb92089015C3565E05B5c9750b2d4B",
91
- dopplerLens: "0x3972c00f7ed4885e145823eb7c655375d275a1c5",
92
- dopplerDeployer: "0xa82c66b6ddEb92089015C3565E05B5c9750b2d4B",
93
- poolManager: "0x360e68faccca8ca495c1b759fd9eee466db9fb32",
94
- stateView: "0x76fd297e2d437cd7f76d50f01afe6160f86e9990",
95
- v2Migrator: "0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731",
96
- v3Migrator: "0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731",
97
- v4Migrator: "0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731",
98
- // Same as v2/v3 migrator
99
- governanceFactory: "0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9",
100
- noOpGovernanceFactory: ZERO_ADDRESS,
101
- // Not yet deployed
102
- streamableFeesLocker: ZERO_ADDRESS,
103
- // Not yet deployed
104
- universalRouter: "0x112908dac86e20e7241b0927479ea3bf935d1fa0",
105
- univ2Router02: "0xB3FB126ACDd5AdCA2f50Ac644a7a2303745f18b4",
106
- permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
107
- bundler: "0x136191B46478cAB023cbC01a36160C4Aad81677a",
108
- weth: ZERO_ADDRESS
109
- // TODO: Get INK WETH address
110
- },
111
- [CHAIN_IDS.UNICHAIN]: {
112
- airlock: "0x77EbfBAE15AD200758E9E2E61597c0B07d731254",
113
- tokenFactory: "0x43d0D97EC9241A8F05A264f94B82A1d2E600f2B3",
114
- v3Initializer: "0x9F4e56be80f08ba1A2445645EFa6d231E27b43ec",
115
- v3Quoter: "0x385A5cf5F83e99f7BB2852b6A19C3538b9FA7658",
116
- v4Initializer: "0x2F2BAcd46d3F5c9EE052Ab392b73711dB89129DB",
117
- doppler: "0x06FEFD02F0b6d9f57F52cfacFc113665Dfa20F0f",
118
- dopplerLens: "0x333e3c607b141b18ff6de9f258db6e77fe7491e0",
119
- dopplerDeployer: "0x06FEFD02F0b6d9f57F52cfacFc113665Dfa20F0f",
120
- poolManager: "0x1f98400000000000000000000000000000000004",
121
- stateView: "0x86e8631a016f9068c3f085faf484ee3f5fdee8f2",
122
- v2Migrator: "0xf6023127f6E937091D5B605680056A6D27524bad",
123
- v3Migrator: "0xf6023127f6E937091D5B605680056A6D27524bad",
124
- v4Migrator: "0xf6023127f6E937091D5B605680056A6D27524bad",
125
- // Same as v2/v3 migrator
126
- governanceFactory: "0x99C94B9Df930E1E21a4E4a2c105dBff21bF5c5aE",
127
- noOpGovernanceFactory: ZERO_ADDRESS,
128
- // Not yet deployed
129
- streamableFeesLocker: ZERO_ADDRESS,
130
- // Not yet deployed
131
- universalRouter: "0xef740bf23acae26f6492b10de645d6b98dc8eaf3",
132
- univ2Router02: "0x284f11109359a7e1306c3e447ef14d38400063ff",
133
- permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
134
- bundler: "0x91231cDdD8d6C86Df602070a3081478e074b97b7",
135
- weth: ZERO_ADDRESS
136
- // TODO: Get Unichain WETH address
137
- },
138
- [CHAIN_IDS.UNICHAIN_SEPOLIA]: {
139
- airlock: "0x651ab94B4777e2e4cdf96082d90C65bd947b73A4",
140
- tokenFactory: "0xC5E5a19a2ee32831Fcb8a81546979AF43936EbaA",
141
- v3Initializer: "0x7Fb9a622186B4660A5988C223ebb9d3690dD5007",
142
- v3Quoter: "0x6Dd37329A1A225a6Fca658265D460423DCafBF89",
143
- v4Initializer: "0x992375478626E67F4e639d3298EbCAaE51C3dF0b",
144
- doppler: "0x8350cAd81149A9944c2fb4276955FaAA7D61e836",
145
- dopplerLens: "0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472",
146
- dopplerDeployer: "0x2f2bacd46d3f5c9ee052ab392b73711db89129db",
147
- poolManager: "0x00B036B58a818B1BC34d502D3fE730Db729e62AC",
148
- stateView: "0xc199F1072a74D4e905ABa1A84d9a45E2546B6222",
149
- v2Migrator: "0x44C448E38A2C3D206c9132E7f645510dFbBC946b",
150
- v3Migrator: "0x44C448E38A2C3D206c9132E7f645510dFbBC946b",
151
- v4Migrator: "0x44C448E38A2C3D206c9132E7f645510dFbBC946b",
152
- // Same as v2/v3 migrator
153
- governanceFactory: "0x1E4332EEfAE9e4967C2D186f7b2d439D778e81cC",
154
- noOpGovernanceFactory: ZERO_ADDRESS,
155
- // Not yet deployed
156
- streamableFeesLocker: ZERO_ADDRESS,
157
- // Not yet deployed
158
- universalRouter: "0xf70536B3bcC1bD1a972dc186A2cf84cC6da6Be5D",
159
- univ2Router02: "0x284f11109359a7e1306c3e447ef14d38400063ff",
160
- permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
161
- bundler: "0x63f8C8F9beFaab2FaCD7Ece0b0242f78B920Ee90",
162
- weth: ZERO_ADDRESS
163
- // TODO: Get Unichain Sepolia WETH address
164
- }
165
- };
166
- function getAddresses(chainId) {
167
- const addresses = ADDRESSES[chainId];
168
- if (!addresses) {
169
- throw new Error(`Unsupported chain ID: ${chainId}`);
170
- }
171
- return addresses;
172
- }
173
-
174
- export { ADDRESSES, CHAIN_IDS, getAddresses };
175
- //# sourceMappingURL=chunk-LZO67TYV.mjs.map
176
- //# sourceMappingURL=chunk-LZO67TYV.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/addresses.ts"],"names":[],"mappings":";AAGO,IAAM,SAAY,GAAA;AAAA,EACvB,OAAS,EAAA,CAAA;AAAA,EACT,IAAM,EAAA,IAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAAA,EACd,GAAK,EAAA,KAAA;AAAA,EACL,QAAU,EAAA,GAAA;AAAA,EACV,gBAAkB,EAAA;AACpB;AAoDA,IAAM,YAAe,GAAA,4CAAA;AAEd,IAAM,SAAsD,GAAA;AAAA,EACjE,CAAC,SAAU,CAAA,OAAO,GAAG;AAAA;AAAA,IAEnB,OAAS,EAAA,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Ae,EAAA,4CAAA;AAAA,IACf,OAAS,EAAA,4CAAA;AAAA,IACT,WAAa,EAAA,4CAAA;AAAA,IACb,eAAiB,EAAA,4CAAA;AAAA,IACjB,WAAa,EAAA,4CAAA;AAAA,IACb,SAAW,EAAA,4CAAA;AAAA,IACX,UAAY,EAAA,4CAAA;AAAA,IACZ,UAAY,EAAA,4CAAA;AAAA,IACZ,UAAY,EAAA,4CAAA;AAAA;AAAA,IACZ,iBAAmB,EAAA,4CAAA;AAAA,IACnB,qBAAuB,EAAA,YAAA;AAAA;AAAA,IACvB,oBAAsB,EAAA,YAAA;AAAA;AAAA,IACtB,eAAiB,EAAA,4CAAA;AAAA,IACjB,aAAe,EAAA,4CAAA;AAAA,IACf,OAAS,EAAA,4CAAA;AAAA,IACT,OAAS,EAAA,4CAAA;AAAA,IACT,IAAM,EAAA;AAAA;AAAA;AAEV;AAKO,SAAS,aAAa,OAAiC,EAAA;AAC5D,EAAM,MAAA,SAAA,GAAY,UAAU,OAA2B,CAAA;AACvD,EAAA,IAAI,CAAC,SAAW,EAAA;AACd,IAAA,MAAM,IAAI,KAAA,CAAM,CAAyB,sBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAAA;AAEpD,EAAO,OAAA,SAAA;AACT","file":"chunk-LZO67TYV.mjs","sourcesContent":["import { Address } from 'viem'\n\n// Chain IDs\nexport const CHAIN_IDS = {\n MAINNET: 1,\n BASE: 8453,\n BASE_SEPOLIA: 84532,\n INK: 57073,\n UNICHAIN: 130,\n UNICHAIN_SEPOLIA: 1301,\n} as const\n\nexport type SupportedChainId = typeof CHAIN_IDS[keyof typeof CHAIN_IDS]\n\n// Contract addresses per chain\nexport interface ChainAddresses {\n // Core contracts\n airlock: Address\n tokenFactory: Address\n\n // Static auction contracts (V3)\n v3Initializer: Address\n v3Quoter: Address\n lockableV3Initializer?: Address\n \n // Dynamic auction contracts (V4)\n v4Initializer: Address\n doppler: Address\n dopplerLens: Address\n dopplerDeployer: Address\n poolManager: Address\n stateView: Address\n\n // Doppler404 contracts\n doppler404Factory?: Address\n \n // Migration contracts\n v2Migrator: Address\n v3Migrator: Address\n v4Migrator: Address\n v4MigratorHook?: Address\n \n // Governance contracts\n governanceFactory: Address\n noOpGovernanceFactory?: Address\n streamableFeesLocker?: Address\n \n // Router contracts\n universalRouter: Address\n univ2Router02?: Address\n permit2: Address\n \n // Other contracts\n bundler?: Address\n \n // Uniswap contracts\n weth: Address\n uniswapV2Factory?: Address\n uniswapV3Factory?: Address\n}\n\n// Not yet deployed placeholder\nconst ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' as Address\n\nexport const ADDRESSES: Record<SupportedChainId, ChainAddresses> = {\n [CHAIN_IDS.MAINNET]: {\n // Mainnet addresses not yet deployed\n airlock: ZERO_ADDRESS,\n tokenFactory: ZERO_ADDRESS,\n v3Initializer: ZERO_ADDRESS,\n v3Quoter: ZERO_ADDRESS,\n v4Initializer: ZERO_ADDRESS,\n doppler: ZERO_ADDRESS,\n dopplerLens: ZERO_ADDRESS,\n dopplerDeployer: ZERO_ADDRESS,\n v2Migrator: ZERO_ADDRESS,\n v3Migrator: ZERO_ADDRESS,\n v4Migrator: ZERO_ADDRESS,\n poolManager: ZERO_ADDRESS,\n stateView: ZERO_ADDRESS,\n governanceFactory: ZERO_ADDRESS,\n universalRouter: ZERO_ADDRESS,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n weth: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2' as Address,\n uniswapV2Factory: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f' as Address,\n uniswapV3Factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984' as Address,\n },\n [CHAIN_IDS.BASE]: {\n airlock: '0x660eAaEdEBc968f8f3694354FA8EC0b4c5Ba8D12' as Address,\n tokenFactory: '0xFAafdE6a5b658684cC5eb0C5c2c755B00A246F45' as Address,\n v3Initializer: '0xaA47D2977d622DBdFD33eeF6a8276727c52EB4e5' as Address,\n v3Quoter: '0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a' as Address,\n lockableV3Initializer: '0xe0dc4012ac9c868f09c6e4b20d66ed46d6f258d0' as Address,\n v4Initializer: '0x82ac010c67f70bacf7655cd8948a4ad92a173cac' as Address,\n doppler: '0x2f2bacd46d3f5c9ee052ab392b73711db89129db' as Address,\n dopplerLens: '0x43d0d97ec9241a8f05a264f94b82a1d2e600f2b3' as Address,\n dopplerDeployer: '0x8350cAd81149A9944c2fb4276955FaAA7D61e836' as Address,\n poolManager: '0x498581ff718922c3f8e6a244956af099b2652b2b' as Address,\n stateView: '0xa3c0c9b65bad0b08107aa264b0f3db444b867a71' as Address,\n v2Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address,\n v3Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address,\n v4Migrator: '0xa24e35a5d71d02a59b41e7c93567626302da1958' as Address,\n governanceFactory: '0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9' as Address,\n noOpGovernanceFactory: '0xe7dfbd5b0a2c3b4464653a9becdc489229ef090e' as Address,\n streamableFeesLocker: '0x0a00775d71a42cd33d62780003035e7f5b47bd3a' as Address,\n universalRouter: '0x6ff5693b99212da76ad316178a184ab56d299b43' as Address,\n univ2Router02: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x136191B46478cAB023cbC01a36160C4Aad81677a' as Address,\n weth: '0x4200000000000000000000000000000000000006' as Address,\n },\n [CHAIN_IDS.BASE_SEPOLIA]: {\n airlock: '0x3411306ce66c9469bff1535ba955503c4bde1c6e' as Address,\n tokenFactory: '0xc69ba223c617f7d936b3cf2012aa644815dbe9ff' as Address,\n doppler404Factory: '0x80A27Feee1A22b9c68185ea64E7c2652286980B5' as Address,\n v3Initializer: '0x4c3062b9ccfdbcb10353f57c1b59a29d4c5cfa47' as Address,\n v3Quoter: '0xC5290058841028F1614F3A6F0F5816cAd0df5E27' as Address,\n lockableV3Initializer: '0x16ada5be50c3c2d94af5feae6b539c40a78ad53c' as Address,\n v4Initializer: '0x8e891d249f1ecbffa6143c03eb1b12843aef09d3' as Address,\n doppler: '0x60a039e4add40ca95e0475c11e8a4182d06c9aa0' as Address,\n dopplerLens: '0x4a8d81db741248a36d9eb3bc6ef648bf798b47a7' as Address,\n dopplerDeployer: '0x60a039e4add40ca95e0475c11e8a4182d06c9aa0' as Address,\n poolManager: '0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408' as Address,\n stateView: '0x571291b572ed32ce6751a2cb2486ebee8defb9b4' as Address,\n v2Migrator: '0x04a898f3722c38f9def707bd17dc78920efa977c' as Address,\n v3Migrator: '0xb2ec6559704467306d04322a5dc082b2af4562dd' as Address,\n v4Migrator: '0xb2ec6559704467306d04322a5dc082b2af4562dd' as Address,\n v4MigratorHook: '0x508812fcdd4972a59b66eb2cad3772279c052000' as Address,\n governanceFactory: '0x9dbfaadc8c0cb2c34ba698dd9426555336992e20' as Address,\n noOpGovernanceFactory: '0x916b8987e4ad325c10d58ed8dc2036a6ff5eb228' as Address,\n streamableFeesLocker: '0x4da7d7a8034510c0ffd38a9252237ae8dba3cb61' as Address,\n universalRouter: '0x492E6456D9528771018DeB9E87ef7750EF184104' as Address,\n univ2Router02: '0x1689E7B1F10000AE47eBfE339a4f69dECd19F602' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0xab7bacb0d5c2c10152f92d34e07f530eb3cb0fb1' as Address,\n weth: '0x4200000000000000000000000000000000000006' as Address,\n },\n [CHAIN_IDS.INK]: {\n airlock: '0x014E1c0bd34f3B10546E554CB33B3293fECDD056' as Address,\n tokenFactory: '0xFAafdE6a5b658684cC5eb0C5c2c755B00A246F45' as Address,\n v3Initializer: '0xaA47D2977d622DBdFD33eeF6a8276727c52EB4e5' as Address,\n v3Quoter: '0x96b572D2d880cf2Fa2563651BD23ADE6f5516652' as Address,\n v4Initializer: '0xC99b485499f78995C6F1640dbB1413c57f8BA684' as Address,\n doppler: '0xa82c66b6ddEb92089015C3565E05B5c9750b2d4B' as Address,\n dopplerLens: '0x3972c00f7ed4885e145823eb7c655375d275a1c5' as Address,\n dopplerDeployer: '0xa82c66b6ddEb92089015C3565E05B5c9750b2d4B' as Address,\n poolManager: '0x360e68faccca8ca495c1b759fd9eee466db9fb32' as Address,\n stateView: '0x76fd297e2d437cd7f76d50f01afe6160f86e9990' as Address,\n v2Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address,\n v3Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address,\n v4Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address, // Same as v2/v3 migrator\n governanceFactory: '0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9' as Address,\n noOpGovernanceFactory: ZERO_ADDRESS, // Not yet deployed\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0x112908dac86e20e7241b0927479ea3bf935d1fa0' as Address,\n univ2Router02: '0xB3FB126ACDd5AdCA2f50Ac644a7a2303745f18b4' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x136191B46478cAB023cbC01a36160C4Aad81677a' as Address,\n weth: ZERO_ADDRESS, // TODO: Get INK WETH address\n },\n [CHAIN_IDS.UNICHAIN]: {\n airlock: '0x77EbfBAE15AD200758E9E2E61597c0B07d731254' as Address,\n tokenFactory: '0x43d0D97EC9241A8F05A264f94B82A1d2E600f2B3' as Address,\n v3Initializer: '0x9F4e56be80f08ba1A2445645EFa6d231E27b43ec' as Address,\n v3Quoter: '0x385A5cf5F83e99f7BB2852b6A19C3538b9FA7658' as Address,\n v4Initializer: '0x2F2BAcd46d3F5c9EE052Ab392b73711dB89129DB' as Address,\n doppler: '0x06FEFD02F0b6d9f57F52cfacFc113665Dfa20F0f' as Address,\n dopplerLens: '0x333e3c607b141b18ff6de9f258db6e77fe7491e0' as Address,\n dopplerDeployer: '0x06FEFD02F0b6d9f57F52cfacFc113665Dfa20F0f' as Address,\n poolManager: '0x1f98400000000000000000000000000000000004' as Address,\n stateView: '0x86e8631a016f9068c3f085faf484ee3f5fdee8f2' as Address,\n v2Migrator: '0xf6023127f6E937091D5B605680056A6D27524bad' as Address,\n v3Migrator: '0xf6023127f6E937091D5B605680056A6D27524bad' as Address,\n v4Migrator: '0xf6023127f6E937091D5B605680056A6D27524bad' as Address, // Same as v2/v3 migrator\n governanceFactory: '0x99C94B9Df930E1E21a4E4a2c105dBff21bF5c5aE' as Address,\n noOpGovernanceFactory: ZERO_ADDRESS, // Not yet deployed\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0xef740bf23acae26f6492b10de645d6b98dc8eaf3' as Address,\n univ2Router02: '0x284f11109359a7e1306c3e447ef14d38400063ff' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x91231cDdD8d6C86Df602070a3081478e074b97b7' as Address,\n weth: ZERO_ADDRESS, // TODO: Get Unichain WETH address\n },\n [CHAIN_IDS.UNICHAIN_SEPOLIA]: {\n airlock: '0x651ab94B4777e2e4cdf96082d90C65bd947b73A4' as Address,\n tokenFactory: '0xC5E5a19a2ee32831Fcb8a81546979AF43936EbaA' as Address,\n v3Initializer: '0x7Fb9a622186B4660A5988C223ebb9d3690dD5007' as Address,\n v3Quoter: '0x6Dd37329A1A225a6Fca658265D460423DCafBF89' as Address,\n v4Initializer: '0x992375478626E67F4e639d3298EbCAaE51C3dF0b' as Address,\n doppler: '0x8350cAd81149A9944c2fb4276955FaAA7D61e836' as Address,\n dopplerLens: '0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472' as Address,\n dopplerDeployer: '0x2f2bacd46d3f5c9ee052ab392b73711db89129db' as Address,\n poolManager: '0x00B036B58a818B1BC34d502D3fE730Db729e62AC' as Address,\n stateView: '0xc199F1072a74D4e905ABa1A84d9a45E2546B6222' as Address,\n v2Migrator: '0x44C448E38A2C3D206c9132E7f645510dFbBC946b' as Address,\n v3Migrator: '0x44C448E38A2C3D206c9132E7f645510dFbBC946b' as Address,\n v4Migrator: '0x44C448E38A2C3D206c9132E7f645510dFbBC946b' as Address, // Same as v2/v3 migrator\n governanceFactory: '0x1E4332EEfAE9e4967C2D186f7b2d439D778e81cC' as Address,\n noOpGovernanceFactory: ZERO_ADDRESS, // Not yet deployed\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0xf70536B3bcC1bD1a972dc186A2cf84cC6da6Be5D' as Address,\n univ2Router02: '0x284f11109359a7e1306c3e447ef14d38400063ff' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x63f8C8F9beFaab2FaCD7Ece0b0242f78B920Ee90' as Address,\n weth: ZERO_ADDRESS, // TODO: Get Unichain Sepolia WETH address\n },\n}\n\n/**\n * Get addresses for a specific chain\n */\nexport function getAddresses(chainId: number): ChainAddresses {\n const addresses = ADDRESSES[chainId as SupportedChainId]\n if (!addresses) {\n throw new Error(`Unsupported chain ID: ${chainId}`)\n }\n return addresses\n}\n"]}
@@ -1,80 +0,0 @@
1
- import { Quoter } from './chunk-CIVGL27M.mjs';
2
- import { DopplerFactory } from './chunk-JIDZBQ7R.mjs';
3
- import { DynamicAuction } from './chunk-AXA7YT2G.mjs';
4
- import { StaticAuction } from './chunk-AQPINKEW.mjs';
5
-
6
- // src/DopplerSDK.ts
7
- var DopplerSDK = class {
8
- constructor(config) {
9
- this.publicClient = config.publicClient;
10
- this.walletClient = config.walletClient;
11
- this.chainId = config.chainId;
12
- }
13
- /**
14
- * Get the factory instance for creating auctions
15
- */
16
- get factory() {
17
- if (!this._factory) {
18
- this._factory = new DopplerFactory(this.publicClient, this.walletClient, this.chainId);
19
- }
20
- return this._factory;
21
- }
22
- /**
23
- * Get the quoter instance for price queries
24
- */
25
- get quoter() {
26
- if (!this._quoter) {
27
- this._quoter = new Quoter(this.publicClient, this.chainId);
28
- }
29
- return this._quoter;
30
- }
31
- /**
32
- * Get a StaticAuction instance for interacting with a static auction pool
33
- * @param poolAddress The address of the Uniswap V3 pool
34
- */
35
- async getStaticAuction(poolAddress) {
36
- return new StaticAuction(this.publicClient, poolAddress);
37
- }
38
- /**
39
- * Get a DynamicAuction instance for interacting with a dynamic auction hook
40
- * @param hookAddress The address of the Uniswap V4 hook
41
- */
42
- async getDynamicAuction(hookAddress) {
43
- return new DynamicAuction(this.publicClient, hookAddress);
44
- }
45
- /**
46
- * Get information about a static auction pool
47
- * @param poolAddress The address of the pool
48
- */
49
- async getPoolInfo(poolAddress) {
50
- const auction = new StaticAuction(this.publicClient, poolAddress);
51
- return auction.getPoolInfo();
52
- }
53
- /**
54
- * Get information about a dynamic auction hook
55
- * @param hookAddress The address of the hook
56
- */
57
- async getHookInfo(hookAddress) {
58
- const auction = new DynamicAuction(this.publicClient, hookAddress);
59
- return auction.getHookInfo();
60
- }
61
- /**
62
- * Get the current chain ID
63
- */
64
- getChainId() {
65
- return this.chainId;
66
- }
67
- /**
68
- * Get the underlying clients
69
- */
70
- getClients() {
71
- return {
72
- publicClient: this.publicClient,
73
- walletClient: this.walletClient
74
- };
75
- }
76
- };
77
-
78
- export { DopplerSDK };
79
- //# sourceMappingURL=chunk-MZ2UBC4M.mjs.map
80
- //# sourceMappingURL=chunk-MZ2UBC4M.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/DopplerSDK.ts"],"names":[],"mappings":";;;;;;AAMO,IAAM,aAAN,MAAiB;AAAA,EAOtB,YAAY,MAA0B,EAAA;AACpC,IAAA,IAAA,CAAK,eAAe,MAAO,CAAA,YAAA;AAC3B,IAAA,IAAA,CAAK,eAAe,MAAO,CAAA,YAAA;AAC3B,IAAA,IAAA,CAAK,UAAU,MAAO,CAAA,OAAA;AAAA;AACxB;AAAA;AAAA;AAAA,EAKA,IAAI,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xE,IAAO,OAAA;AAAA,MACL,cAAc,IAAK,CAAA,YAAA;AAAA,MACnB,cAAc,IAAK,CAAA;AAAA,KACrB;AAAA;AAEJ","file":"chunk-MZ2UBC4M.mjs","sourcesContent":["import type { Address, PublicClient, WalletClient } from 'viem'\nimport type { DopplerSDKConfig, HookInfo, PoolInfo } from './types'\nimport { DopplerFactory } from './entities/DopplerFactory'\nimport { StaticAuction, DynamicAuction } from './entities/auction'\nimport { Quoter } from './entities/quoter'\n\nexport class DopplerSDK {\n private publicClient: PublicClient\n private walletClient?: WalletClient\n private chainId: number\n private _factory?: DopplerFactory\n private _quoter?: Quoter\n\n constructor(config: DopplerSDKConfig) {\n this.publicClient = config.publicClient\n this.walletClient = config.walletClient\n this.chainId = config.chainId\n }\n\n /**\n * Get the factory instance for creating auctions\n */\n get factory(): DopplerFactory {\n if (!this._factory) {\n this._factory = new DopplerFactory(this.publicClient, this.walletClient, this.chainId)\n }\n return this._factory\n }\n\n /**\n * Get the quoter instance for price queries\n */\n get quoter(): Quoter {\n if (!this._quoter) {\n this._quoter = new Quoter(this.publicClient, this.chainId)\n }\n return this._quoter\n }\n\n /**\n * Get a StaticAuction instance for interacting with a static auction pool\n * @param poolAddress The address of the Uniswap V3 pool\n */\n async getStaticAuction(poolAddress: Address): Promise<StaticAuction> {\n return new StaticAuction(this.publicClient, poolAddress)\n }\n\n /**\n * Get a DynamicAuction instance for interacting with a dynamic auction hook\n * @param hookAddress The address of the Uniswap V4 hook\n */\n async getDynamicAuction(hookAddress: Address): Promise<DynamicAuction> {\n return new DynamicAuction(this.publicClient, hookAddress)\n }\n\n /**\n * Get information about a static auction pool\n * @param poolAddress The address of the pool\n */\n async getPoolInfo(poolAddress: Address): Promise<PoolInfo> {\n const auction = new StaticAuction(this.publicClient, poolAddress)\n return auction.getPoolInfo()\n }\n\n /**\n * Get information about a dynamic auction hook\n * @param hookAddress The address of the hook\n */\n async getHookInfo(hookAddress: Address): Promise<HookInfo> {\n const auction = new DynamicAuction(this.publicClient, hookAddress)\n return auction.getHookInfo()\n }\n\n /**\n * Get the current chain ID\n */\n getChainId(): number {\n return this.chainId\n }\n\n /**\n * Get the underlying clients\n */\n getClients(): { publicClient: PublicClient; walletClient?: WalletClient } {\n return {\n publicClient: this.publicClient,\n walletClient: this.walletClient\n }\n }\n}"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/entities/token/eth/Eth.ts"],"names":[],"mappings":";AAYO,IAAM,MAAN,MAAU;AAAA,EAMf,YAAY,YAA4B,EAAA;AACtC,IAAA,IAAA,CAAK,YAAe,GAAA,YAAA;AAAA;AACtB;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,OAA2B,GAAA;AAC/B,IAAO,OAAA,OAAA;AAAA;AACT;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,SAA6B,GAAA;AACjC,IAAO,OAAA,KAAA;AAAA;AACT;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,WAA+B,GAAA;AACnC,IAAO,OAAA,EAAA;AAAA;AACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,YAAgC,GAAA;AACpC,IAAA,OAAO,MAAM,IAAO,GAAA,EAAA;AAAA;AACtB;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,aAAa,OAAmC,EAAA;AACpD,IAAO,OAAA,MAAM,IAAK,CAAA,YAAA,CAAa,UAAW,CAAA;AAAA,MACxC,OAAS,EAAA;AAAA,KACV,CAAA;AAAA;AAEL;AAAA;AAxDa,GAAA,CAIK,OAAU,GAAA,4CAAA","file":"chunk-OPKQMN46.mjs","sourcesContent":["import { type Address, type PublicClient } from 'viem'\n\n/**\n * A class providing read-only access to Ethereum (ETH) token information and balances.\n *\n * @remarks\n * This class implements a consistent interface with other token implementations (like DERC20)\n * but handles ETH-specific behavior such as:\n * - Hardcoded token metadata (name, symbol, decimals)\n * - Simulating unlimited allowance for ETH transfers\n * - Querying native ETH balances through viem\n */\nexport class Eth {\n private publicClient: PublicClient\n \n /** Static ETH address identifier (zero address) */\n static readonly address = '0x0000000000000000000000000000000000000000' as Address\n \n constructor(publicClient: PublicClient) {\n this.publicClient = publicClient\n }\n \n /**\n * Get the human-readable name of the token\n * @returns Promise resolving to \"Ether\" (hardcoded ETH name)\n */\n async getName(): Promise<string> {\n return \"Ether\"\n }\n \n /**\n * Get the ticker symbol of the token\n * @returns Promise resolving to \"ETH\" (hardcoded ETH symbol)\n */\n async getSymbol(): Promise<string> {\n return \"ETH\"\n }\n \n /**\n * Get the number of decimal places used by the token\n * @returns Promise resolving to 18 (standard ETH decimals)\n */\n async getDecimals(): Promise<number> {\n return 18\n }\n \n /**\n * Get the allowance granted to a spender (always returns maximum value)\n * @returns Promise resolving to 2^256 - 1 (simulates unlimited ETH allowance)\n *\n * @remarks\n * ETH doesn't have an allowance mechanism, so this returns max uint256 value\n * to represent unlimited approval in systems expecting ERC20-like interfaces\n */\n async getAllowance(): Promise<bigint> {\n return 2n ** 256n - 1n\n }\n \n /**\n * Get the ETH balance of a specified account\n * @param account - Address of the account to query\n * @returns Promise resolving to the account's ETH balance in wei\n */\n async getBalanceOf(account: Address): Promise<bigint> {\n return await this.publicClient.getBalance({\n address: account,\n })\n }\n}"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/entities/auction/StaticAuction.ts"],"names":["uniswapV3PoolAbi","getAddresses","airlockAbi","getAddress"],"mappings":";;;;;;AAWO,IAAM,gBAAN,MAAoB;AAAA,EAIzB,WAAA,CAAY,QAAsB,WAAsB,EAAA;AACtD,IAAA,IAAA,CAAK,MAAS,GAAA,MAAA;AACd,IAAA,IAAA,CAAK,WAAc,GAAA,WAAA;AAAA;AACrB;AAAA;AAAA;AAAA,EAKA,UAAsB,GAAA;AACpB,IAAA,OAAO,IAAK,CAAA,WAAA;AAAA;AACd;AAAA;AAAA;AAAA,EAKA,MAAM,WAAiC,GAAA;AAErC,IAAM,MAAA,CAAC,OAAO,SAAW,EAAA,MAAA,EAA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,QACd,GAAK,EAAAH,iCAAA;AAAA,QACL,YAAc,EAAA;AAAA,OACf,CAAA;AAAA,MACD,IAAA,CAAK,OAAO,YAAa,CAAA;AAAA,QACvB,SAAS,IAAK,CAAA,WAAA;AAAA,QACd,GAAK,EAAAA,iCAAA;AAAA,QACL,YAAc,EAAA;AAAA,OACf;AAAA,KACF,CAAA;AAKD,IAAA,MAAM,eAAe,QAAS,CAAA,YAAA;AAC9B,IAAA,MAAM,GAAM,GAAA,MAAA,CAAO,CAAC,CAAA,IAAK,OAAO,EAAE,CAAA;AAGlC,IAAA,MAAM,sBAAsB,YAAe,GAAA,YAAA;AAC3C,IAAA,MAAM,aAAa,GAAM,GAAA,GAAA;AACzB,IAAA,MAAM,SAAS,mBAAsB,GAAA,UAAA;AAGrC,IAAI,IAAA,QAAA,CAAS,iBAAiB,MAAQ,EAAA;AAEpC,MAAO,OAAA,MAAA;AAAA,KACF,MAAA;AAGL,MAAA,OAAO,UAAa,GAAA,MAAA;AAAA;AACtB;AACF;AAAA;AAAA;AAAA,EAKA,MAAM,iBAAqC,GAAA;AACzC,IAAO,OAAA,MAAM,IAAK,CAAA,MAAA,CAAO,YAAa,CAAA;AAAA,MACpC,SAAS,IAAK,CAAA,WAAA;AAAA,MACd,GAAK,EAAAA,iCAAA;AAAA,MACL,YAAc,EAAA;AAAA,KACf,CAAA;AAAA;AAEL","file":"chunk-PMIJTXU6.js","sourcesContent":["import { type Address, type PublicClient, getAddress } from 'viem'\nimport type { PoolInfo } from '../../types'\nimport { uniswapV3PoolAbi, airlockAbi } from '../../abis'\nimport { getAddresses } from '../../addresses'\n\n/**\n * StaticAuction class for interacting with static auctions (Uniswap V3 based)\n * \n * Static auctions use a fixed price range on Uniswap V3 for initial liquidity bootstrapping.\n * This is ideal for simple, predictable price discovery events.\n */\nexport class StaticAuction {\n private client: PublicClient\n private poolAddress: Address\n \n constructor(client: PublicClient, poolAddress: Address) {\n this.client = client\n this.poolAddress = poolAddress\n }\n \n /**\n * Get the pool address\n */\n getAddress(): Address {\n return this.poolAddress\n }\n \n /**\n * Get current pool information\n */\n async getPoolInfo(): Promise<PoolInfo> {\n // Fetch all pool data in parallel\n const [slot0, liquidity, token0, token1, fee] = await Promise.all([\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'slot0',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'liquidity',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token0',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token1',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'fee',\n }),\n ])\n \n // Determine which token is the auction token and which is numeraire\n // This requires checking with the Airlock contract\n const chainId = await this.client.getChainId()\n const addresses = getAddresses(chainId)\n \n const assetData = await this.client.readContract({\n address: addresses.airlock,\n abi: airlockAbi,\n functionName: 'getAssetData',\n args: [token0],\n })\n \n // The getAssetData returns: [numeraire, timelock, governance, liquidityMigrator, poolInitializer, pool, migrationPool, numTokensToSell, totalSupply, integrator]\n // If token0 has asset data in Airlock (pool is not zero), it's the auction token\n const isToken0AuctionToken = assetData[5] !== getAddress('0x0000000000000000000000000000000000000000')\n \n return {\n address: this.poolAddress,\n tokenAddress: isToken0AuctionToken ? token0 : token1,\n numeraireAddress: isToken0AuctionToken ? token1 : token0,\n fee,\n liquidity,\n sqrtPriceX96: slot0[0], // First element is sqrtPriceX96\n }\n }\n \n /**\n * Get the token address for this auction\n */\n async getTokenAddress(): Promise<Address> {\n const poolInfo = await this.getPoolInfo()\n return poolInfo.tokenAddress\n }\n \n /**\n * Check if the auction has graduated (ready for migration)\n */\n async hasGraduated(): Promise<boolean> {\n const tokenAddress = await this.getTokenAddress()\n const chainId = await this.client.getChainId()\n const addresses = getAddresses(chainId)\n \n const assetData = await this.client.readContract({\n address: addresses.airlock,\n abi: airlockAbi,\n functionName: 'getAssetData',\n args: [tokenAddress],\n })\n \n // The getAssetData returns: [numeraire, timelock, governance, liquidityMigrator, poolInitializer, pool, migrationPool, numTokensToSell, totalSupply, integrator]\n // Check if the asset is graduated (liquidityMigrator is set to address(0))\n return assetData[3] === getAddress('0x0000000000000000000000000000000000000000')\n }\n \n /**\n * Get the current price in the pool\n * Returns the price of token in terms of numeraire (token/numeraire)\n */\n async getCurrentPrice(): Promise<bigint> {\n const poolInfo = await this.getPoolInfo()\n \n // Get token ordering\n const [token0, token1] = await Promise.all([\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token0',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token1',\n }),\n ])\n \n // Calculate price from sqrtPriceX96\n // sqrtPriceX96 = sqrt(price) * 2^96\n // price = (sqrtPriceX96 / 2^96)^2\n const sqrtPriceX96 = poolInfo.sqrtPriceX96\n const Q96 = BigInt(2) ** BigInt(96)\n \n // price0 = amount of token1 per token0\n const sqrtPriceX96Squared = sqrtPriceX96 * sqrtPriceX96\n const Q96Squared = Q96 * Q96\n const price0 = sqrtPriceX96Squared / Q96Squared\n \n // Return price based on which token is the auction token\n if (poolInfo.tokenAddress === token0) {\n // Auction token is token0, return price in terms of token1 (numeraire)\n return price0\n } else {\n // Auction token is token1, return reciprocal price\n // price1 = 1 / price0 (with precision handling)\n return Q96Squared / price0\n }\n }\n \n /**\n * Get total liquidity in the pool\n */\n async getTotalLiquidity(): Promise<bigint> {\n return await this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'liquidity',\n })\n }\n}"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":";;;AAGO,IAAM,MAAM,GAAO,IAAA;AACnB,IAAM,YAAe,GAAA;AACrB,IAAM,YAAe,GAAA;AAGrB,IAAM,SAAY,GAAA;AAAA,EACvB,MAAQ,EA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AAA,EACL,CAAK,IAAA,CAAA;AAAA,EACL,CAAK,IAAA,CAAA;AAAA,EACL,CAAK,IAAA;AAAA;AACR;AAGO,IAAM,gBAAmB,GAAA;AACzB,IAAM,eAAkB,GAAA","file":"chunk-T644D54P.mjs","sourcesContent":["import { Address, parseEther } from 'viem'\n\n// Common constants\nexport const WAD = 10n ** 18n\nexport const DEAD_ADDRESS = '0x000000000000000000000000000000000000dEaD' as Address\nexport const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' as Address\n\n// Fee tiers\nexport const FEE_TIERS = {\n LOWEST: 100, // 0.01%\n LOW: 500, // 0.05%\n MEDIUM: 3000, // 0.30%\n HIGH: 10000 // 1.00%\n} as const\n\n// Tick spacings for different fee tiers\nexport const TICK_SPACINGS = {\n 100: 1,\n 500: 10,\n 3000: 60,\n 10000: 200\n} as const\n\n// Time constants\nexport const SECONDS_PER_DAY = 86400\nexport const SECONDS_PER_YEAR = 365 * SECONDS_PER_DAY\n\n// Default values\nexport const DEFAULT_EPOCH_LENGTH = 43200 // 12 hours in seconds (matching V4 SDK)\nexport const DEFAULT_AUCTION_DURATION = 7 // 7 days\nexport const DEFAULT_LOCK_DURATION = SECONDS_PER_YEAR // 1 year\nexport const DEFAULT_PD_SLUGS = 5 // Default price discovery slugs\nexport const DAY_SECONDS = SECONDS_PER_DAY // Alias for consistency\n\n// V3 Default parameters\nexport const DEFAULT_V3_START_TICK = 175000\nexport const DEFAULT_V3_END_TICK = 225000\nexport const DEFAULT_V3_NUM_POSITIONS = 15\nexport const DEFAULT_V3_FEE = 10000 // 1% fee tier\nexport const DEFAULT_V3_INITIAL_VOTING_DELAY = 172800 // 2 days\nexport const DEFAULT_V3_INITIAL_VOTING_PERIOD = 1209600 // 14 days\nexport const DEFAULT_V3_INITIAL_PROPOSAL_THRESHOLD = 0n\nexport const DEFAULT_V3_VESTING_DURATION = BigInt(SECONDS_PER_YEAR)\nexport const DEFAULT_V3_INITIAL_SUPPLY = parseEther('1000000000') // 1 billion tokens\nexport const DEFAULT_V3_NUM_TOKENS_TO_SELL = parseEther('900000000') // 900 million tokens\nexport const DEFAULT_V3_YEARLY_MINT_RATE = parseEther('0.02') // 2% yearly mint rate\nexport const DEFAULT_V3_PRE_MINT = parseEther('9000000') // 9 million tokens (0.9%)\nexport const DEFAULT_V3_MAX_SHARE_TO_BE_SOLD = parseEther('0.35') // 35%\n\n// V4 Default parameters\nexport const DEFAULT_V4_INITIAL_VOTING_DELAY = 7200 // 2 hours\nexport const DEFAULT_V4_INITIAL_VOTING_PERIOD = 50400 // 14 hours\nexport const DEFAULT_V4_INITIAL_PROPOSAL_THRESHOLD = 0n\nexport const DEFAULT_V4_YEARLY_MINT_RATE = parseEther('0.02') // 2% yearly mint rate\n\n// Price bounds\nexport const MIN_SQRT_RATIO = 4295128739n\nexport const MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342n\n\n// Basis points\nexport const BASIS_POINTS = 10000\n\n// V4 Hook Flags for Doppler\nexport const FLAG_MASK = BigInt(0x3fff)\nexport const DOPPLER_FLAGS = BigInt(\n (1 << 13) | // BEFORE_INITIALIZE_FLAG\n (1 << 12) | // AFTER_INITIALIZE_FLAG \n (1 << 11) | // BEFORE_ADD_LIQUIDITY_FLAG\n (1 << 7) | // BEFORE_SWAP_FLAG\n (1 << 6) | // AFTER_SWAP_FLAG\n (1 << 5) // BEFORE_DONATE_FLAG\n)\n\n// V4 Dynamic Fee Flag\nexport const DYNAMIC_FEE_FLAG = 0x800000 // 8388608 in decimal\nexport const FEE_AMOUNT_MASK = 0xFFFFFF // Mask to extract actual fee from dynamic fee"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/entities/token/eth/Eth.ts"],"names":[],"mappings":";;;AAYO,IAAM,MAAN,MAAU;AAAA,EAMf,YAAY,YAA4B,EAAA;AACtC,IAAA,IAAA,CAAK,YAAe,GAAA,YAAA;AAAA;AACtB;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,OAA2B,GAAA;AAC/B,IAAO,OAAA,OAAA;AAAA;AACT;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,SAA6B,GAAA;AACjC,IAAO,OAAA,KAAA;AAAA;AACT;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,WAA+B,GAAA;AACnC,IAAO,OAAA,EAAA;AAAA;AACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,YAAgC,GAAA;AACpC,IAAA,OAAO,MAAM,IAAO,GAAA,EAAA;AAAA;AACtB;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,aAAa,OAAmC,EAAA;AACpD,IAAO,OAAA,MAAM,IAAK,CAAA,YAAA,CAAa,UAAW,CAAA;AAAA,MACxC,OAAS,EAAA;AAAA,KACV,CAAA;AAAA;AAEL;AAAA;AAxDa,GAAA,CAIK,OAAU,GAAA,4CAAA","file":"chunk-TOMVBPNZ.js","sourcesContent":["import { type Address, type PublicClient } from 'viem'\n\n/**\n * A class providing read-only access to Ethereum (ETH) token information and balances.\n *\n * @remarks\n * This class implements a consistent interface with other token implementations (like DERC20)\n * but handles ETH-specific behavior such as:\n * - Hardcoded token metadata (name, symbol, decimals)\n * - Simulating unlimited allowance for ETH transfers\n * - Querying native ETH balances through viem\n */\nexport class Eth {\n private publicClient: PublicClient\n \n /** Static ETH address identifier (zero address) */\n static readonly address = '0x0000000000000000000000000000000000000000' as Address\n \n constructor(publicClient: PublicClient) {\n this.publicClient = publicClient\n }\n \n /**\n * Get the human-readable name of the token\n * @returns Promise resolving to \"Ether\" (hardcoded ETH name)\n */\n async getName(): Promise<string> {\n return \"Ether\"\n }\n \n /**\n * Get the ticker symbol of the token\n * @returns Promise resolving to \"ETH\" (hardcoded ETH symbol)\n */\n async getSymbol(): Promise<string> {\n return \"ETH\"\n }\n \n /**\n * Get the number of decimal places used by the token\n * @returns Promise resolving to 18 (standard ETH decimals)\n */\n async getDecimals(): Promise<number> {\n return 18\n }\n \n /**\n * Get the allowance granted to a spender (always returns maximum value)\n * @returns Promise resolving to 2^256 - 1 (simulates unlimited ETH allowance)\n *\n * @remarks\n * ETH doesn't have an allowance mechanism, so this returns max uint256 value\n * to represent unlimited approval in systems expecting ERC20-like interfaces\n */\n async getAllowance(): Promise<bigint> {\n return 2n ** 256n - 1n\n }\n \n /**\n * Get the ETH balance of a specified account\n * @param account - Address of the account to query\n * @returns Promise resolving to the account's ETH balance in wei\n */\n async getBalanceOf(account: Address): Promise<bigint> {\n return await this.publicClient.getBalance({\n address: account,\n })\n }\n}"]}