@powerhousedao/connect 1.0.0 → 1.0.3-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) hide show
  1. package/dist/.env +11 -6
  2. package/dist/assets/app-BYkaiTES.js +79314 -0
  3. package/dist/assets/app-D9QJBr8i.css +5652 -0
  4. package/dist/assets/app-loader-Bkg_WUos.js +31437 -0
  5. package/dist/assets/app-loader-Bnp0H-wa.css +5497 -0
  6. package/dist/assets/ccip-Dn5Ob09y.js +170 -0
  7. package/dist/assets/connect-loader-CvOC68Ih.mp4 +0 -0
  8. package/dist/assets/content-DcF7YyCb.js +3937 -0
  9. package/dist/assets/home-bg-BEhF9NuW.png +0 -0
  10. package/dist/assets/index-B62Phyap.js +12 -0
  11. package/dist/assets/index-CBIcU4C0.js +46414 -0
  12. package/dist/assets/index-zVQzC6z2.js +2560 -0
  13. package/dist/assets/main.CgKmK6gL.js +105 -0
  14. package/dist/assets/powerhouse-rounded-CeKGGUG4.png +0 -0
  15. package/dist/assets/renown-short-hover-BiSLBV7L.png +0 -0
  16. package/dist/assets/rwa-report-Bb0W5-ac.png +0 -0
  17. package/dist/assets/style-D4JhTt_m.css +1663 -0
  18. package/dist/external-packages.js +5 -0
  19. package/dist/hmr.js +4 -0
  20. package/dist/icon.ico +0 -0
  21. package/dist/index.html +48 -10
  22. package/dist/modules/@powerhousedao/reactor-browser/chunk-2ESYSVXG.js +48 -0
  23. package/dist/modules/@powerhousedao/reactor-browser/chunk-2X2M6BYG.js +2542 -0
  24. package/dist/modules/@powerhousedao/reactor-browser/chunk-45DCPCA7.js +67 -0
  25. package/dist/modules/@powerhousedao/reactor-browser/chunk-7OQWVUC5.js +43 -0
  26. package/dist/modules/@powerhousedao/reactor-browser/chunk-A4GIWVYS.js +14031 -0
  27. package/dist/modules/@powerhousedao/reactor-browser/chunk-DKDARAJS.js +0 -0
  28. package/dist/modules/@powerhousedao/reactor-browser/chunk-F3RCGUF6.js +53 -0
  29. package/dist/modules/@powerhousedao/reactor-browser/chunk-FQF4YAVC.js +11917 -0
  30. package/dist/modules/@powerhousedao/reactor-browser/chunk-FW7N6EJH.js +786 -0
  31. package/dist/modules/@powerhousedao/reactor-browser/chunk-G6LMXRY5.js +50 -0
  32. package/dist/modules/@powerhousedao/reactor-browser/chunk-GDP7BUIH.js +45 -0
  33. package/dist/modules/@powerhousedao/reactor-browser/chunk-IQTSFTNF.js +48 -0
  34. package/dist/modules/@powerhousedao/reactor-browser/chunk-J5TYPY7U.js +36 -0
  35. package/dist/modules/@powerhousedao/reactor-browser/chunk-LH2T6NLN.js +0 -0
  36. package/dist/modules/@powerhousedao/reactor-browser/chunk-LRNZZ3SR.js +14 -0
  37. package/dist/modules/@powerhousedao/reactor-browser/chunk-M2UUQ5LH.js +250 -0
  38. package/dist/modules/@powerhousedao/reactor-browser/chunk-OVGOA2P5.js +11 -0
  39. package/dist/modules/@powerhousedao/reactor-browser/chunk-P6NJ6IAQ.js +12 -0
  40. package/dist/modules/@powerhousedao/reactor-browser/chunk-PQ4UODLR.js +113 -0
  41. package/dist/modules/@powerhousedao/reactor-browser/chunk-QXHTR6KF.js +0 -0
  42. package/dist/modules/@powerhousedao/reactor-browser/chunk-RGIB4DD4.js +162 -0
  43. package/dist/modules/@powerhousedao/reactor-browser/chunk-U36SV333.js +0 -0
  44. package/dist/modules/@powerhousedao/reactor-browser/chunk-UP4DC4D2.js +178 -0
  45. package/dist/modules/@powerhousedao/reactor-browser/chunk-XBTEGV5M.js +17 -0
  46. package/dist/modules/@powerhousedao/reactor-browser/chunk-XXFOSD4A.js +2513 -0
  47. package/dist/modules/@powerhousedao/reactor-browser/chunk-Y7NTRTMT.js +25 -0
  48. package/dist/modules/@powerhousedao/reactor-browser/chunk-YDERCA5J.js +82 -0
  49. package/dist/modules/@powerhousedao/reactor-browser/chunk-YG67WAIS.js +0 -0
  50. package/dist/modules/@powerhousedao/reactor-browser/chunk-YWKVPJNL.js +52 -0
  51. package/dist/modules/@powerhousedao/reactor-browser/chunk-ZL5IPB6D.js +0 -0
  52. package/dist/modules/@powerhousedao/reactor-browser/context/index.js +16 -0
  53. package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +15 -0
  54. package/dist/modules/@powerhousedao/reactor-browser/crypto/browser.js +7 -0
  55. package/dist/modules/@powerhousedao/reactor-browser/crypto/index.js +7 -0
  56. package/dist/modules/@powerhousedao/reactor-browser/document-model.js +10 -0
  57. package/dist/modules/@powerhousedao/reactor-browser/hooks/document-state.js +96 -0
  58. package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +98 -0
  59. package/dist/modules/@powerhousedao/reactor-browser/hooks/useAddDebouncedOperations.js +11 -0
  60. package/dist/modules/@powerhousedao/reactor-browser/hooks/useConnectCrypto.js +12 -0
  61. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocument.js +7 -0
  62. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentDispatch.js +7 -0
  63. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentDrives.js +13 -0
  64. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentEditor.js +20 -0
  65. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +9 -0
  66. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +14 -0
  67. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveContext.js +9 -0
  68. package/dist/modules/@powerhousedao/reactor-browser/hooks/useUiNodesContext.js +46 -0
  69. package/dist/modules/@powerhousedao/reactor-browser/hooks/useUserPermissions.js +7 -0
  70. package/dist/modules/@powerhousedao/reactor-browser/index.js +125 -0
  71. package/dist/modules/@powerhousedao/reactor-browser/reactor.js +11 -0
  72. package/dist/modules/@powerhousedao/reactor-browser/renown/constants.js +53 -0
  73. package/dist/modules/@powerhousedao/reactor-browser/renown/types.js +1 -0
  74. package/dist/modules/@powerhousedao/reactor-browser/storage/index.js +1 -0
  75. package/dist/modules/@powerhousedao/reactor-browser/storage/types.js +1 -0
  76. package/dist/modules/@powerhousedao/reactor-browser/uiNodes/constants.js +37 -0
  77. package/dist/modules/@powerhousedao/reactor-browser/uiNodes/types.js +1 -0
  78. package/dist/modules/@powerhousedao/reactor-browser/utils/export-document.js +8 -0
  79. package/dist/modules/@powerhousedao/reactor-browser/utils/index.js +9 -0
  80. package/dist/modules/@powerhousedao/reactor-browser/utils/signature.js +10 -0
  81. package/dist/service-worker.js +46 -2
  82. package/dist/swEnv.js +9 -8
  83. package/dist/vite-envs.sh +56 -35
  84. package/nginx.conf +93 -0
  85. package/nginx.sh +10 -0
  86. package/package.json +35 -52
  87. package/dist/assets/ArrowFilledRight-BXP1j8Cl.js +0 -2
  88. package/dist/assets/ArrowFilledRight-BXP1j8Cl.js.map +0 -1
  89. package/dist/assets/ArrowFilledRight-blx8xu7X-D3d8PUWh.js +0 -2
  90. package/dist/assets/ArrowFilledRight-blx8xu7X-D3d8PUWh.js.map +0 -1
  91. package/dist/assets/ArrowLeft-7pYNK4eX-8ZR_YHAJ.js +0 -2
  92. package/dist/assets/ArrowLeft-7pYNK4eX-8ZR_YHAJ.js.map +0 -1
  93. package/dist/assets/ArrowLeft-8ZR_YHAJ.js +0 -2
  94. package/dist/assets/ArrowLeft-8ZR_YHAJ.js.map +0 -1
  95. package/dist/assets/ArrowUp-Bbr_dwo_-C5ppCQo4.js +0 -2
  96. package/dist/assets/ArrowUp-Bbr_dwo_-C5ppCQo4.js.map +0 -1
  97. package/dist/assets/ArrowUp-E2jS6Wzt.js +0 -2
  98. package/dist/assets/ArrowUp-E2jS6Wzt.js.map +0 -1
  99. package/dist/assets/BarChart-B0G05Nfd-CHDJ7OaJ.js +0 -2
  100. package/dist/assets/BarChart-B0G05Nfd-CHDJ7OaJ.js.map +0 -1
  101. package/dist/assets/BarChart-C-E6t7dt.js +0 -2
  102. package/dist/assets/BarChart-C-E6t7dt.js.map +0 -1
  103. package/dist/assets/BaseArrowLeft-DBzhFHMt-Dkbf2sWs.js +0 -2
  104. package/dist/assets/BaseArrowLeft-DBzhFHMt-Dkbf2sWs.js.map +0 -1
  105. package/dist/assets/BaseArrowLeft-DtHrkTW4.js +0 -2
  106. package/dist/assets/BaseArrowLeft-DtHrkTW4.js.map +0 -1
  107. package/dist/assets/BaseArrowRight-BIwzFHnh.js +0 -2
  108. package/dist/assets/BaseArrowRight-BIwzFHnh.js.map +0 -1
  109. package/dist/assets/BaseArrowRight-DYQTBWAs-CkkPllYm.js +0 -2
  110. package/dist/assets/BaseArrowRight-DYQTBWAs-CkkPllYm.js.map +0 -1
  111. package/dist/assets/Braces-3LcexUsR.js +0 -2
  112. package/dist/assets/Braces-3LcexUsR.js.map +0 -1
  113. package/dist/assets/Braces-N-sH2Zyc-3LcexUsR.js +0 -2
  114. package/dist/assets/Braces-N-sH2Zyc-3LcexUsR.js.map +0 -1
  115. package/dist/assets/Branch-CWdBw1_P-CmGdOXsI.js +0 -2
  116. package/dist/assets/Branch-CWdBw1_P-CmGdOXsI.js.map +0 -1
  117. package/dist/assets/Branch-D0CssEh3.js +0 -2
  118. package/dist/assets/Branch-D0CssEh3.js.map +0 -1
  119. package/dist/assets/BrickGlobe-67zaG6_H-DP0By6z_.js +0 -2
  120. package/dist/assets/BrickGlobe-67zaG6_H-DP0By6z_.js.map +0 -1
  121. package/dist/assets/BrickGlobe-CdHw7ZVP.js +0 -2
  122. package/dist/assets/BrickGlobe-CdHw7ZVP.js.map +0 -1
  123. package/dist/assets/Briefcase-CV2bgnSj.js +0 -2
  124. package/dist/assets/Briefcase-CV2bgnSj.js.map +0 -1
  125. package/dist/assets/Briefcase-CedW3KRR-DO5_k15F.js +0 -2
  126. package/dist/assets/Briefcase-CedW3KRR-DO5_k15F.js.map +0 -1
  127. package/dist/assets/Calendar-C-6HV96D-YetudWvP.js +0 -2
  128. package/dist/assets/Calendar-C-6HV96D-YetudWvP.js.map +0 -1
  129. package/dist/assets/Calendar-DuXN-sPt.js +0 -2
  130. package/dist/assets/Calendar-DuXN-sPt.js.map +0 -1
  131. package/dist/assets/CalendarTime-Bhjzlgn_-BVlYgNLL.js +0 -2
  132. package/dist/assets/CalendarTime-Bhjzlgn_-BVlYgNLL.js.map +0 -1
  133. package/dist/assets/CalendarTime-BowYBiVM.js +0 -2
  134. package/dist/assets/CalendarTime-BowYBiVM.js.map +0 -1
  135. package/dist/assets/Caret-Ep0j0fz2-By3ojfim.js +0 -2
  136. package/dist/assets/Caret-Ep0j0fz2-By3ojfim.js.map +0 -1
  137. package/dist/assets/Caret-r16V7Hcs.js +0 -2
  138. package/dist/assets/Caret-r16V7Hcs.js.map +0 -1
  139. package/dist/assets/CaretDown-3X7LFYBf-C43xdKg8.js +0 -2
  140. package/dist/assets/CaretDown-3X7LFYBf-C43xdKg8.js.map +0 -1
  141. package/dist/assets/CaretDown-DljrBfIz.js +0 -2
  142. package/dist/assets/CaretDown-DljrBfIz.js.map +0 -1
  143. package/dist/assets/CaretLeft-B_Lzd_Rn.js +0 -2
  144. package/dist/assets/CaretLeft-B_Lzd_Rn.js.map +0 -1
  145. package/dist/assets/CaretLeft-Df3E-68c-wke5zKLt.js +0 -2
  146. package/dist/assets/CaretLeft-Df3E-68c-wke5zKLt.js.map +0 -1
  147. package/dist/assets/CaretRight-Bbz5nCpg.js +0 -2
  148. package/dist/assets/CaretRight-Bbz5nCpg.js.map +0 -1
  149. package/dist/assets/CaretRight-DSVWUSka-Cx0Mkcqa.js +0 -2
  150. package/dist/assets/CaretRight-DSVWUSka-Cx0Mkcqa.js.map +0 -1
  151. package/dist/assets/CaretSort-BkGdLETT-DVOzEEqR.js +0 -2
  152. package/dist/assets/CaretSort-BkGdLETT-DVOzEEqR.js.map +0 -1
  153. package/dist/assets/CaretSort-DSgBum1h.js +0 -2
  154. package/dist/assets/CaretSort-DSgBum1h.js.map +0 -1
  155. package/dist/assets/Check-CbV9BYHY.js +0 -2
  156. package/dist/assets/Check-CbV9BYHY.js.map +0 -1
  157. package/dist/assets/Check-DV-U4AEq-B582NMZp.js +0 -2
  158. package/dist/assets/Check-DV-U4AEq-B582NMZp.js.map +0 -1
  159. package/dist/assets/CheckCircle-CX2jIKoF.js +0 -2
  160. package/dist/assets/CheckCircle-CX2jIKoF.js.map +0 -1
  161. package/dist/assets/CheckCircle-DI5fEgGd-CVF4LDhR.js +0 -2
  162. package/dist/assets/CheckCircle-DI5fEgGd-CVF4LDhR.js.map +0 -1
  163. package/dist/assets/CheckCircleFill-C-F0v5mB-BSW1YMqM.js +0 -2
  164. package/dist/assets/CheckCircleFill-C-F0v5mB-BSW1YMqM.js.map +0 -1
  165. package/dist/assets/CheckCircleFill-DLK12sW5.js +0 -2
  166. package/dist/assets/CheckCircleFill-DLK12sW5.js.map +0 -1
  167. package/dist/assets/Checkmark-BXnfChpo-CyQitGI2.js +0 -2
  168. package/dist/assets/Checkmark-BXnfChpo-CyQitGI2.js.map +0 -1
  169. package/dist/assets/Checkmark-DBvUEZAd.js +0 -2
  170. package/dist/assets/Checkmark-DBvUEZAd.js.map +0 -1
  171. package/dist/assets/ChevronDown-eUsCPXcB.js +0 -2
  172. package/dist/assets/ChevronDown-eUsCPXcB.js.map +0 -1
  173. package/dist/assets/ChevronDown-ouBxrU-k-eUsCPXcB.js +0 -2
  174. package/dist/assets/ChevronDown-ouBxrU-k-eUsCPXcB.js.map +0 -1
  175. package/dist/assets/Circle-8dOehHQf.js +0 -2
  176. package/dist/assets/Circle-8dOehHQf.js.map +0 -1
  177. package/dist/assets/Circle-n3-Wh4HS-8dOehHQf.js +0 -2
  178. package/dist/assets/Circle-n3-Wh4HS-8dOehHQf.js.map +0 -1
  179. package/dist/assets/CircleInfo-BhZY3C2Q-CZgYK1h2.js +0 -2
  180. package/dist/assets/CircleInfo-BhZY3C2Q-CZgYK1h2.js.map +0 -1
  181. package/dist/assets/CircleInfo-D0ktZDko.js +0 -2
  182. package/dist/assets/CircleInfo-D0ktZDko.js.map +0 -1
  183. package/dist/assets/Clock-CudavWaE.js +0 -2
  184. package/dist/assets/Clock-CudavWaE.js.map +0 -1
  185. package/dist/assets/Clock-DF-XMxha-CudavWaE.js +0 -2
  186. package/dist/assets/Clock-DF-XMxha-CudavWaE.js.map +0 -1
  187. package/dist/assets/ClockFill-Bd0t48q7-CcfHiJtH.js +0 -2
  188. package/dist/assets/ClockFill-Bd0t48q7-CcfHiJtH.js.map +0 -1
  189. package/dist/assets/ClockFill-yWs52y_e.js +0 -2
  190. package/dist/assets/ClockFill-yWs52y_e.js.map +0 -1
  191. package/dist/assets/CloudSlash-B-zJBjaD-CxVyp-Ac.js +0 -2
  192. package/dist/assets/CloudSlash-B-zJBjaD-CxVyp-Ac.js.map +0 -1
  193. package/dist/assets/CloudSlash-D18Hl3VW.js +0 -2
  194. package/dist/assets/CloudSlash-D18Hl3VW.js.map +0 -1
  195. package/dist/assets/Collapse-BOxZH5-e.js +0 -2
  196. package/dist/assets/Collapse-BOxZH5-e.js.map +0 -1
  197. package/dist/assets/Collapse-DRDB8Czs-CGcuZQgy.js +0 -2
  198. package/dist/assets/Collapse-DRDB8Czs-CGcuZQgy.js.map +0 -1
  199. package/dist/assets/Connect-Dme-qfKq-CgniLji8.js +0 -2
  200. package/dist/assets/Connect-Dme-qfKq-CgniLji8.js.map +0 -1
  201. package/dist/assets/Connect-laqJZT3s.js +0 -2
  202. package/dist/assets/Connect-laqJZT3s.js.map +0 -1
  203. package/dist/assets/Copy-CkOtWZ6m.js +0 -2
  204. package/dist/assets/Copy-CkOtWZ6m.js.map +0 -1
  205. package/dist/assets/Copy-ms9-7m7Y-CkOtWZ6m.js +0 -2
  206. package/dist/assets/Copy-ms9-7m7Y-CkOtWZ6m.js.map +0 -1
  207. package/dist/assets/CrossCircle-B6ZawoOx-z5-kkOo3.js +0 -2
  208. package/dist/assets/CrossCircle-B6ZawoOx-z5-kkOo3.js.map +0 -1
  209. package/dist/assets/CrossCircle-Bp9diEe9.js +0 -2
  210. package/dist/assets/CrossCircle-Bp9diEe9.js.map +0 -1
  211. package/dist/assets/Danger-CLu7nxgz.js +0 -2
  212. package/dist/assets/Danger-CLu7nxgz.js.map +0 -1
  213. package/dist/assets/Danger-KM8BZjue-CLu7nxgz.js +0 -2
  214. package/dist/assets/Danger-KM8BZjue-CLu7nxgz.js.map +0 -1
  215. package/dist/assets/Discord-CAS0Cj7s-CcsBWpnf.js +0 -2
  216. package/dist/assets/Discord-CAS0Cj7s-CcsBWpnf.js.map +0 -1
  217. package/dist/assets/Discord-CcPWRT8g.js +0 -2
  218. package/dist/assets/Discord-CcPWRT8g.js.map +0 -1
  219. package/dist/assets/Drive-CzahDx9j.js +0 -2
  220. package/dist/assets/Drive-CzahDx9j.js.map +0 -1
  221. package/dist/assets/Drive-GMcgBcIY-CzahDx9j.js +0 -2
  222. package/dist/assets/Drive-GMcgBcIY-CzahDx9j.js.map +0 -1
  223. package/dist/assets/Edit-D9GlgGu8.js +0 -2
  224. package/dist/assets/Edit-D9GlgGu8.js.map +0 -1
  225. package/dist/assets/Edit-Dr-ZiMSE-D9GlgGu8.js +0 -2
  226. package/dist/assets/Edit-Dr-ZiMSE-D9GlgGu8.js.map +0 -1
  227. package/dist/assets/Ellipsis-DWNUJYUI.js +0 -2
  228. package/dist/assets/Ellipsis-DWNUJYUI.js.map +0 -1
  229. package/dist/assets/Ellipsis-XK8AwMEC-BuVBeYhB.js +0 -2
  230. package/dist/assets/Ellipsis-XK8AwMEC-BuVBeYhB.js.map +0 -1
  231. package/dist/assets/Error-BmIZ2ZUy-CphzuMLn.js +0 -2
  232. package/dist/assets/Error-BmIZ2ZUy-CphzuMLn.js.map +0 -1
  233. package/dist/assets/Error-FBAhqFT5.js +0 -2
  234. package/dist/assets/Error-FBAhqFT5.js.map +0 -1
  235. package/dist/assets/Exclamation-BGFGsVRw.js +0 -2
  236. package/dist/assets/Exclamation-BGFGsVRw.js.map +0 -1
  237. package/dist/assets/Exclamation-CVsNS_QS-DLccamql.js +0 -2
  238. package/dist/assets/Exclamation-CVsNS_QS-DLccamql.js.map +0 -1
  239. package/dist/assets/File-Ba7ClyaL-BU1g1wjO.js +0 -2
  240. package/dist/assets/File-Ba7ClyaL-BU1g1wjO.js.map +0 -1
  241. package/dist/assets/File-DWKl25DR.js +0 -2
  242. package/dist/assets/File-DWKl25DR.js.map +0 -1
  243. package/dist/assets/FilesEarmark-BTL53WSf.js +0 -2
  244. package/dist/assets/FilesEarmark-BTL53WSf.js.map +0 -1
  245. package/dist/assets/FilesEarmark-CyrCQy8E-Bhut4E02.js +0 -2
  246. package/dist/assets/FilesEarmark-CyrCQy8E-Bhut4E02.js.map +0 -1
  247. package/dist/assets/FolderClose-BVMKeKvW.js +0 -2
  248. package/dist/assets/FolderClose-BVMKeKvW.js.map +0 -1
  249. package/dist/assets/FolderClose-DG_qHisc-CH6NoBuu.js +0 -2
  250. package/dist/assets/FolderClose-DG_qHisc-CH6NoBuu.js.map +0 -1
  251. package/dist/assets/FolderOpen-DT55_X9N.js +0 -2
  252. package/dist/assets/FolderOpen-DT55_X9N.js.map +0 -1
  253. package/dist/assets/FolderOpen-kDoWFkJO-Cciutkdg.js +0 -2
  254. package/dist/assets/FolderOpen-kDoWFkJO-Cciutkdg.js.map +0 -1
  255. package/dist/assets/FolderPlus-C2G5PVs-.js +0 -2
  256. package/dist/assets/FolderPlus-C2G5PVs-.js.map +0 -1
  257. package/dist/assets/FolderPlus-CSBSl9lZ-CifD0ek9.js +0 -2
  258. package/dist/assets/FolderPlus-CSBSl9lZ-CifD0ek9.js.map +0 -1
  259. package/dist/assets/Forum-Cfgyizyn.js +0 -2
  260. package/dist/assets/Forum-Cfgyizyn.js.map +0 -1
  261. package/dist/assets/Forum-DZ-CkLFh-BwabccAX.js +0 -2
  262. package/dist/assets/Forum-DZ-CkLFh-BwabccAX.js.map +0 -1
  263. package/dist/assets/Gear-CoQ9O06k.js +0 -2
  264. package/dist/assets/Gear-CoQ9O06k.js.map +0 -1
  265. package/dist/assets/Gear-cUlHJ4q6-B9R2l_9_.js +0 -2
  266. package/dist/assets/Gear-cUlHJ4q6-B9R2l_9_.js.map +0 -1
  267. package/dist/assets/Github-0PLiINY0-CjkZIHCO.js +0 -2
  268. package/dist/assets/Github-0PLiINY0-CjkZIHCO.js.map +0 -1
  269. package/dist/assets/Github-CjkZIHCO.js +0 -2
  270. package/dist/assets/Github-CjkZIHCO.js.map +0 -1
  271. package/dist/assets/Globe-CIYqVkpa-CL530H46.js +0 -2
  272. package/dist/assets/Globe-CIYqVkpa-CL530H46.js.map +0 -1
  273. package/dist/assets/Globe-Dy2otZRk.js +0 -2
  274. package/dist/assets/Globe-Dy2otZRk.js.map +0 -1
  275. package/dist/assets/GlobeWww-Ci7aa5CE.js +0 -2
  276. package/dist/assets/GlobeWww-Ci7aa5CE.js.map +0 -1
  277. package/dist/assets/GlobeWww-DN4yKujh-Ci7aa5CE.js +0 -2
  278. package/dist/assets/GlobeWww-DN4yKujh-Ci7aa5CE.js.map +0 -1
  279. package/dist/assets/Hdd-CP-hFB7d.js +0 -2
  280. package/dist/assets/Hdd-CP-hFB7d.js.map +0 -1
  281. package/dist/assets/Hdd-Dn_LdJIh-CJ6x9Bve.js +0 -2
  282. package/dist/assets/Hdd-Dn_LdJIh-CJ6x9Bve.js.map +0 -1
  283. package/dist/assets/History-BP4SmaS_-P4WBKyqX.js +0 -2
  284. package/dist/assets/History-BP4SmaS_-P4WBKyqX.js.map +0 -1
  285. package/dist/assets/History-CmOiP5qa.js +0 -2
  286. package/dist/assets/History-CmOiP5qa.js.map +0 -1
  287. package/dist/assets/InfoSquare-C98JaLiz-yPcGR71f.js +0 -2
  288. package/dist/assets/InfoSquare-C98JaLiz-yPcGR71f.js.map +0 -1
  289. package/dist/assets/InfoSquare-DbYZrwmg.js +0 -2
  290. package/dist/assets/InfoSquare-DbYZrwmg.js.map +0 -1
  291. package/dist/assets/Link-BF7aZjVu-CXIVQOz6.js +0 -2
  292. package/dist/assets/Link-BF7aZjVu-CXIVQOz6.js.map +0 -1
  293. package/dist/assets/Link-CXIVQOz6.js +0 -2
  294. package/dist/assets/Link-CXIVQOz6.js.map +0 -1
  295. package/dist/assets/Linkedin-DJwIkS6q-Dkb5Tp_Z.js +0 -2
  296. package/dist/assets/Linkedin-DJwIkS6q-Dkb5Tp_Z.js.map +0 -1
  297. package/dist/assets/Linkedin-exhl1yGN.js +0 -2
  298. package/dist/assets/Linkedin-exhl1yGN.js.map +0 -1
  299. package/dist/assets/Lock-DWdDRi_O.js +0 -2
  300. package/dist/assets/Lock-DWdDRi_O.js.map +0 -1
  301. package/dist/assets/Lock-PyaFHdNS-D_qxRTye.js +0 -2
  302. package/dist/assets/Lock-PyaFHdNS-D_qxRTye.js.map +0 -1
  303. package/dist/assets/M-ByQIo8bX.js +0 -2
  304. package/dist/assets/M-ByQIo8bX.js.map +0 -1
  305. package/dist/assets/M-DozhhPMY-DBQw97P_.js +0 -2
  306. package/dist/assets/M-DozhhPMY-DBQw97P_.js.map +0 -1
  307. package/dist/assets/PackageManager-B-MUWliB-bW01ZQSP.js +0 -2
  308. package/dist/assets/PackageManager-B-MUWliB-bW01ZQSP.js.map +0 -1
  309. package/dist/assets/PackageManager-D6Ia8zHs.js +0 -2
  310. package/dist/assets/PackageManager-D6Ia8zHs.js.map +0 -1
  311. package/dist/assets/Pencil-D7lvxXIP-D830iveq.js +0 -2
  312. package/dist/assets/Pencil-D7lvxXIP-D830iveq.js.map +0 -1
  313. package/dist/assets/Pencil-D830iveq.js +0 -2
  314. package/dist/assets/Pencil-D830iveq.js.map +0 -1
  315. package/dist/assets/People-B1tewG8c.js +0 -2
  316. package/dist/assets/People-B1tewG8c.js.map +0 -1
  317. package/dist/assets/People-CUB8LYKf-CyJmMqcw.js +0 -2
  318. package/dist/assets/People-CUB8LYKf-CyJmMqcw.js.map +0 -1
  319. package/dist/assets/Person-BPRmm67U.js +0 -2
  320. package/dist/assets/Person-BPRmm67U.js.map +0 -1
  321. package/dist/assets/Person-DuL4PQzm-ttQR0nPy.js +0 -2
  322. package/dist/assets/Person-DuL4PQzm-ttQR0nPy.js.map +0 -1
  323. package/dist/assets/Pin-D53eCMAz.js +0 -2
  324. package/dist/assets/Pin-D53eCMAz.js.map +0 -1
  325. package/dist/assets/Pin-DF70btCU-D53eCMAz.js +0 -2
  326. package/dist/assets/Pin-DF70btCU-D53eCMAz.js.map +0 -1
  327. package/dist/assets/PinFilled-CMXfFW67.js +0 -2
  328. package/dist/assets/PinFilled-CMXfFW67.js.map +0 -1
  329. package/dist/assets/PinFilled-vImzS0do-CMXfFW67.js +0 -2
  330. package/dist/assets/PinFilled-vImzS0do-CMXfFW67.js.map +0 -1
  331. package/dist/assets/Plus-DPFWGJM4-BztpK8li.js +0 -2
  332. package/dist/assets/Plus-DPFWGJM4-BztpK8li.js.map +0 -1
  333. package/dist/assets/Plus-XUIm1wNw.js +0 -2
  334. package/dist/assets/Plus-XUIm1wNw.js.map +0 -1
  335. package/dist/assets/PlusCircle-BEnWRjHa-w5zztKGx.js +0 -2
  336. package/dist/assets/PlusCircle-BEnWRjHa-w5zztKGx.js.map +0 -1
  337. package/dist/assets/PlusCircle-D1IRYULb.js +0 -2
  338. package/dist/assets/PlusCircle-D1IRYULb.js.map +0 -1
  339. package/dist/assets/PowerhouseLogoSmall-CmO95IAS-CDGLkst3.js +0 -2
  340. package/dist/assets/PowerhouseLogoSmall-CmO95IAS-CDGLkst3.js.map +0 -1
  341. package/dist/assets/PowerhouseLogoSmall-DF1uUwIC.js +0 -2
  342. package/dist/assets/PowerhouseLogoSmall-DF1uUwIC.js.map +0 -1
  343. package/dist/assets/Project-BlXuclr0-EsBam9d0.js +0 -2
  344. package/dist/assets/Project-BlXuclr0-EsBam9d0.js.map +0 -1
  345. package/dist/assets/Project-EsBam9d0.js +0 -2
  346. package/dist/assets/Project-EsBam9d0.js.map +0 -1
  347. package/dist/assets/QuestionSquare-B6O9Le7r-CDaw1i6L.js +0 -2
  348. package/dist/assets/QuestionSquare-B6O9Le7r-CDaw1i6L.js.map +0 -1
  349. package/dist/assets/QuestionSquare-CDaw1i6L.js +0 -2
  350. package/dist/assets/QuestionSquare-CDaw1i6L.js.map +0 -1
  351. package/dist/assets/RedoArrow-BJeEsiph-BbidqIFP.js +0 -2
  352. package/dist/assets/RedoArrow-BJeEsiph-BbidqIFP.js.map +0 -1
  353. package/dist/assets/RedoArrow-DM-fqhEP.js +0 -2
  354. package/dist/assets/RedoArrow-DM-fqhEP.js.map +0 -1
  355. package/dist/assets/Reload-6C2CYgrl-DPZbA7yl.js +0 -2
  356. package/dist/assets/Reload-6C2CYgrl-DPZbA7yl.js.map +0 -1
  357. package/dist/assets/Reload-DPZbA7yl.js +0 -2
  358. package/dist/assets/Reload-DPZbA7yl.js.map +0 -1
  359. package/dist/assets/Renown-6m7hx37h-CItksi2j.js +0 -2
  360. package/dist/assets/Renown-6m7hx37h-CItksi2j.js.map +0 -1
  361. package/dist/assets/Renown-CItksi2j.js +0 -2
  362. package/dist/assets/Renown-CItksi2j.js.map +0 -1
  363. package/dist/assets/RenownHover-CQ0TZHZv-cYQgnwQW.js +0 -2
  364. package/dist/assets/RenownHover-CQ0TZHZv-cYQgnwQW.js.map +0 -1
  365. package/dist/assets/RenownHover-cYQgnwQW.js +0 -2
  366. package/dist/assets/RenownHover-cYQgnwQW.js.map +0 -1
  367. package/dist/assets/Ring-BivnmVc5.js +0 -2
  368. package/dist/assets/Ring-BivnmVc5.js.map +0 -1
  369. package/dist/assets/Ring-DKv0gnwT-CDHLz87h.js +0 -2
  370. package/dist/assets/Ring-DKv0gnwT-CDHLz87h.js.map +0 -1
  371. package/dist/assets/Save-BBxj68pn-BkUvn89C.js +0 -2
  372. package/dist/assets/Save-BBxj68pn-BkUvn89C.js.map +0 -1
  373. package/dist/assets/Save-BWCZPY82.js +0 -2
  374. package/dist/assets/Save-BWCZPY82.js.map +0 -1
  375. package/dist/assets/Search-BiEcSbcf.js +0 -2
  376. package/dist/assets/Search-BiEcSbcf.js.map +0 -1
  377. package/dist/assets/Search-YUJuRBLe-CecGUkZA.js +0 -2
  378. package/dist/assets/Search-YUJuRBLe-CecGUkZA.js.map +0 -1
  379. package/dist/assets/Server-Bfkkjui1-lBan_3Dm.js +0 -2
  380. package/dist/assets/Server-Bfkkjui1-lBan_3Dm.js.map +0 -1
  381. package/dist/assets/Server-cAzmNxsS.js +0 -2
  382. package/dist/assets/Server-cAzmNxsS.js.map +0 -1
  383. package/dist/assets/Settings-Cca-sV-_.js +0 -2
  384. package/dist/assets/Settings-Cca-sV-_.js.map +0 -1
  385. package/dist/assets/Settings-mbbylBS5-Cca-sV-_.js +0 -2
  386. package/dist/assets/Settings-mbbylBS5-Cca-sV-_.js.map +0 -1
  387. package/dist/assets/Synced-CjieGKOk.js +0 -2
  388. package/dist/assets/Synced-CjieGKOk.js.map +0 -1
  389. package/dist/assets/Synced-DKJXzPiw-Cui8pDsS.js +0 -2
  390. package/dist/assets/Synced-DKJXzPiw-Cui8pDsS.js.map +0 -1
  391. package/dist/assets/Syncing-KnDBLSYe.js +0 -2
  392. package/dist/assets/Syncing-KnDBLSYe.js.map +0 -1
  393. package/dist/assets/Syncing-aT9WSMFf-2VhhyCcX.js +0 -2
  394. package/dist/assets/Syncing-aT9WSMFf-2VhhyCcX.js.map +0 -1
  395. package/dist/assets/Trash-CgSbHk-P-DIYkVMER.js +0 -2
  396. package/dist/assets/Trash-CgSbHk-P-DIYkVMER.js.map +0 -1
  397. package/dist/assets/Trash-DIHOD5wQ.js +0 -2
  398. package/dist/assets/Trash-DIHOD5wQ.js.map +0 -1
  399. package/dist/assets/TrashFill-CG3humXp.js +0 -2
  400. package/dist/assets/TrashFill-CG3humXp.js.map +0 -1
  401. package/dist/assets/TrashFill-DN50ercb-Oqx67xXN.js +0 -2
  402. package/dist/assets/TrashFill-DN50ercb-Oqx67xXN.js.map +0 -1
  403. package/dist/assets/TreeViewSlash-BywCsx5o-CUTTXZi-.js +0 -2
  404. package/dist/assets/TreeViewSlash-BywCsx5o-CUTTXZi-.js.map +0 -1
  405. package/dist/assets/TreeViewSlash-CKJADIpa.js +0 -2
  406. package/dist/assets/TreeViewSlash-CKJADIpa.js.map +0 -1
  407. package/dist/assets/TriangleDown-Boh-WZzH.js +0 -2
  408. package/dist/assets/TriangleDown-Boh-WZzH.js.map +0 -1
  409. package/dist/assets/TriangleDown-eCXwUfu8-F-V79AL3.js +0 -2
  410. package/dist/assets/TriangleDown-eCXwUfu8-F-V79AL3.js.map +0 -1
  411. package/dist/assets/VariantArrowLeft-CnuX59_e-6Zt_Q3tm.js +0 -2
  412. package/dist/assets/VariantArrowLeft-CnuX59_e-6Zt_Q3tm.js.map +0 -1
  413. package/dist/assets/VariantArrowLeft-Dl1-3L5q.js +0 -2
  414. package/dist/assets/VariantArrowLeft-Dl1-3L5q.js.map +0 -1
  415. package/dist/assets/VerticalDots-C8QYf7et-CCxZfvjq.js +0 -2
  416. package/dist/assets/VerticalDots-C8QYf7et-CCxZfvjq.js.map +0 -1
  417. package/dist/assets/VerticalDots-CCZxgZM8.js +0 -2
  418. package/dist/assets/VerticalDots-CCZxgZM8.js.map +0 -1
  419. package/dist/assets/WarningFill-CRRaW3Oz.js +0 -2
  420. package/dist/assets/WarningFill-CRRaW3Oz.js.map +0 -1
  421. package/dist/assets/WarningFill-WowAvi5P-D5XCckM6.js +0 -2
  422. package/dist/assets/WarningFill-WowAvi5P-D5XCckM6.js.map +0 -1
  423. package/dist/assets/XTwitter-CW6IaHUb.js +0 -2
  424. package/dist/assets/XTwitter-CW6IaHUb.js.map +0 -1
  425. package/dist/assets/XTwitter-k3Pt8itk-mvLk8TKx.js +0 -2
  426. package/dist/assets/XTwitter-k3Pt8itk-mvLk8TKx.js.map +0 -1
  427. package/dist/assets/Xmark-8qnJCs2Y-CZ3t0Fap.js +0 -2
  428. package/dist/assets/Xmark-8qnJCs2Y-CZ3t0Fap.js.map +0 -1
  429. package/dist/assets/Xmark-CZ3t0Fap.js +0 -2
  430. package/dist/assets/Xmark-CZ3t0Fap.js.map +0 -1
  431. package/dist/assets/XmarkLight-BkhBFy51.js +0 -2
  432. package/dist/assets/XmarkLight-BkhBFy51.js.map +0 -1
  433. package/dist/assets/XmarkLight-GHzDR5_F-CloMvuzt.js +0 -2
  434. package/dist/assets/XmarkLight-GHzDR5_F-CloMvuzt.js.map +0 -1
  435. package/dist/assets/Youtube-h-Dc9pri.js +0 -2
  436. package/dist/assets/Youtube-h-Dc9pri.js.map +0 -1
  437. package/dist/assets/Youtube-i8V0IXUU-Bkiwoayp.js +0 -2
  438. package/dist/assets/Youtube-i8V0IXUU-Bkiwoayp.js.map +0 -1
  439. package/dist/assets/app-DKrzRA2f.js +0 -449
  440. package/dist/assets/app-DKrzRA2f.js.map +0 -1
  441. package/dist/assets/app-loader-DH_VGIVv.css +0 -1
  442. package/dist/assets/app-loader-mj_poB3V.js +0 -3
  443. package/dist/assets/app-loader-mj_poB3V.js.map +0 -1
  444. package/dist/assets/browser-BbIPlSaA.js +0 -2
  445. package/dist/assets/browser-BbIPlSaA.js.map +0 -1
  446. package/dist/assets/browser-DtMtdCgJ.js +0 -7
  447. package/dist/assets/browser-DtMtdCgJ.js.map +0 -1
  448. package/dist/assets/ccip-DUUHdwDo.js +0 -2
  449. package/dist/assets/ccip-DUUHdwDo.js.map +0 -1
  450. package/dist/assets/content-DFQJzB7I.js +0 -7
  451. package/dist/assets/content-DFQJzB7I.js.map +0 -1
  452. package/dist/assets/editor-Dms2goxJ.js +0 -346
  453. package/dist/assets/editor-Dms2goxJ.js.map +0 -1
  454. package/dist/assets/getEnsName-DoyRgFOP.js +0 -35
  455. package/dist/assets/getEnsName-DoyRgFOP.js.map +0 -1
  456. package/dist/assets/index-Bg4jiu9P.js +0 -3
  457. package/dist/assets/index-Bg4jiu9P.js.map +0 -1
  458. package/dist/assets/index-CLu1C_is-jUM7ckQa.js +0 -12
  459. package/dist/assets/index-CLu1C_is-jUM7ckQa.js.map +0 -1
  460. package/dist/assets/index-q_KV5Ymp.js +0 -16
  461. package/dist/assets/index-q_KV5Ymp.js.map +0 -1
  462. package/dist/assets/isAddressEqual-H3jvLfD0.js +0 -2
  463. package/dist/assets/isAddressEqual-H3jvLfD0.js.map +0 -1
  464. package/dist/assets/json-m8fnOd5g.js +0 -3
  465. package/dist/assets/json-m8fnOd5g.js.map +0 -1
  466. package/dist/assets/main.Bp4zjrbL.js +0 -2
  467. package/dist/assets/main.Bp4zjrbL.js.map +0 -1
  468. package/dist/assets/root-R8rJ5_ai.js +0 -17
  469. package/dist/assets/root-R8rJ5_ai.js.map +0 -1
  470. package/dist/assets/router-DX6s3TD2.js +0 -12
  471. package/dist/assets/router-DX6s3TD2.js.map +0 -1
  472. package/dist/assets/useUiNodes-BqBkjrKn.js +0 -107
  473. package/dist/assets/useUiNodes-BqBkjrKn.js.map +0 -1
  474. package/dist/service-worker.js.map +0 -1
  475. package/dist/studio/cli.js +0 -6
  476. package/dist/studio/helpers.d.ts +0 -2
  477. package/dist/studio/hmr.js +0 -10
  478. package/dist/studio/index.d.ts +0 -19
  479. package/dist/studio/index.js +0 -624
  480. package/dist/studio/server.d.ts +0 -7
  481. package/dist/studio/vite-plugins/base.d.ts +0 -14
  482. package/dist/studio/vite-plugins/external-packages.d.ts +0 -5
  483. package/dist/studio/vite-plugins/hmr.d.ts +0 -2
  484. package/dist/studio/vite-plugins/studio.d.ts +0 -3
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";0TACO,SAASA,EAAcC,EAAS,CAAE,YAAAC,EAAc,EAAK,EAAK,GAAI,CACjE,GAAID,EAAQ,OAAS,YACjBA,EAAQ,OAAS,SACjBA,EAAQ,OAAS,QACjB,MAAM,IAAIE,GAA2BF,EAAQ,IAAI,EACrD,MAAO,GAAGA,EAAQ,IAAI,IAAIG,GAAgBH,EAAQ,OAAQ,CAAE,YAAAC,CAAa,EAAC,GAC9E,CACO,SAASE,GAAgBC,EAAQ,CAAE,YAAAH,EAAc,EAAK,EAAK,GAAI,CAClE,OAAKG,EAEEA,EACF,IAAKC,GAAUC,GAAeD,EAAO,CAAE,YAAAJ,CAAW,CAAE,CAAC,EACrD,KAA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,MAAM,oEAAoE,EACxFuW,EAA2BnJ,GAAwB,CAC/C,YAAAlS,EACA,MAAO8E,EAAO,MACd,SAAU,sBACtB,CAAS,CACT,CACI,MAAM8W,EAAc,GAAGhW,EAAQ,YAAa,EAAC,UAAU,CAAC,CAAC,gBACzD,GAAI,CACA,MAAM0V,EAAyB,CAC3B,QAASD,EACT,IAAKlU,GACL,aAAc,UACd,KAAM,CAACoU,GAAM1G,GAAc+G,CAAW,CAAC,CAAC,EACxC,YAAA5b,EACA,SAAAmD,CACH,EACKqY,EAAqB3W,GAAUC,EAAQ6S,EAAc,cAAc,EACnE,CAAC3S,EAAM6W,CAAe,EAAI9C,EAC1B,MAAMyC,EAAmB,CACvB,GAAGF,EACH,KAAM,CAAC,GAAGA,EAAuB,KAAMvC,CAAW,CACrD,GACC,MAAMyC,EAAmBF,CAAsB,EACrD,OAAI1V,EAAQ,gBAAkBiW,EAAgB,YAAa,EAChD,KACJ7W,CACf,OACWvB,EAAK,CACR,GAAIjI,EACA,MAAMiI,EACV,GAAIqQ,GAA6BrQ,EAAK,SAAS,EAC3C,OAAO,KACX,MAAMA,CACd,CACA","names":["formatAbiItem","abiItem","includeName","InvalidDefinitionTypeError","formatAbiParams","params","param","formatAbiParam","AbiConstructorNotFoundError","BaseError","docsPath","AbiConstructorParamsNotFoundError","AbiDecodingDataSizeTooSmallError","data","size","AbiDecodingZeroDataError","AbiEncodingArrayLengthMismatchError","expectedLength","givenLength","type","AbiEncodingBytesSizeMismatchError","expectedSize","value","AbiEncodingLengthMismatchError","AbiErrorSignatureNotFoundError","signature","AbiEventSignatureEmptyTopicsError","AbiEventSignatureNotFoundError","AbiEventNotFoundError","eventName","AbiFunctionNotFoundError","functionName","AbiFunctionOutputsNotFoundError","AbiItemAmbiguityError","x","y","BytesSizeMismatchError","givenSize","DecodeLogDataMismatch","DecodeLogTopicsMismatch","InvalidAbiEncodingTypeError","InvalidAbiDecodingTypeError","InvalidArrayError","concat","values","concatHex","concatBytes","length","arr","result","offset","acc","slice","start","end","strict","isHex","sliceHex","sliceBytes","assertStartOffset","SliceOffsetOutOfBoundsError","assertEndOffset","value_","bytesRegex","integerRegex","encodeAbiParameters","preparedParams","prepareParams","encodeParams","i","prepareParam","arrayComponents","getArrayComponents","encodeArray","encodeTuple","encodeAddress","encodeBool","signed","encodeNumber","encodeBytes","encodeString","staticSize","dynamic","encoded","staticParams","dynamicParams","dynamicSize","numberToHex","isAddress","InvalidAddressError","padHex","dynamicChild","preparedParam","paramSize","bytesSize","boolToHex","max","min","IntegerOutOfRangeError","hexValue","stringToHex","partsLength","parts","param_","index","matches","encodeDeployData","parameters","abi","args","bytecode","description","NegativeOffsetError","PositionOutOfBoundsError","position","RecursiveReadLimitExceededError","count","limit","staticCursor","position_","byte","bytes","oldPosition","createCursor","recursiveReadLimit","cursor","ChainDoesNotSupportContract","blockNumber","chain","contract","ClientChainNotConfiguredError","InvalidChainIdError","chainId","etherUnits","gweiUnits","formatUnits","decimals","display","negative","integer","fraction","formatGwei","wei","unit","ExecutionRevertedError","cause","message","reason","_a","FeeCapTooHighError","maxFeePerGas","FeeCapTooLowError","NonceTooHighError","nonce","NonceTooLowError","NonceMaxValueError","InsufficientFundsError","IntrinsicGasTooHighError","gas","IntrinsicGasTooLowError","TransactionTypeNotSupportedError","TipAboveFeeCapError","maxPriorityFeePerGas","UnknownNodeError","formatEther","prettyPrint","entries","key","maxLength","FeeConflictError","InvalidLegacyVError","v","InvalidSerializableTransactionError","transaction","InvalidStorageKeySizeError","storageKey","TransactionNotFoundError","blockHash","blockTag","hash","identifier","TransactionReceiptNotFoundError","WaitForTransactionReceiptTimeoutError","getNodeError","err","executionRevertedError","e","extract","format","extract_","formatted","keys","defineFormatter","exclude","overrides","rpcTransactionType","formatTransactionRequest","request","rpcRequest","formatAuthorizationList","bytesToHex","defineTransactionRequest","authorizationList","authorization","getAction","client","actionFn","name","action_implicit","action_explicit","maxUint16","maxUint256","assertRequest","account_","gasPrice","to","account","parseAccount","AccountStateConflictError","address","StateAssignmentConflictError","prettyStateMapping","stateMapping","pretty","slot","prettyStateOverride","stateOverride","state","val","serializeStateMapping","InvalidBytesLengthError","serializeAccountStateOverride","balance","stateDiff","code","rpcAccountStateOverride","serializeStateOverride","rpcStateOverride","accountState","multicall3Abi","universalResolverErrors","universalResolverResolveAbi","universalResolverReverseAbi","textResolverAbi","addressResolverAbi","universalSignatureValidatorAbi","bytesToBigInt","opts","assertSize","hex","hexToBigInt","bytesToBool","bytes_","trim","InvalidBytesBooleanError","bytesToNumber","hexToNumber","bytesToString","decodeAbiParameters","hexToBytes","consumed","consumed_","decodeParameter","staticPosition","decodeArray","decodeTuple","decodeAddress","decodeBool","decodeBytes","decodeNumber","decodeString","sizeOfLength","sizeOfOffset","checksumAddress","startOfData","hasDynamicChild","_","hasUnnamedChild","component","keccak256","toBytes","hashSignature","sig","version","shortMessage","details","execTyped","regex","string","match","isTupleRegex","tupleRegex","formatAbiParameter","abiParameter","formatAbiParameters","abiParameters","errorSignatureRegex","isErrorSignature","execErrorSignature","eventSignatureRegex","isEventSignature","execEventSignature","functionSignatureRegex","isFunctionSignature","execFunctionSignature","structSignatureRegex","isStructSignature","execStructSignature","constructorSignatureRegex","isConstructorSignature","execConstructorSignature","fallbackSignatureRegex","isFallbackSignature","execFallbackSignature","receiveSignatureRegex","isReceiveSignature","eventModifiers","functionModifiers","UnknownTypeError","UnknownSolidityTypeError","InvalidParameterError","SolidityProtectedKeywordError","InvalidModifierError","modifier","InvalidFunctionModifierError","InvalidAbiTypeParameterError","InvalidSignatureError","UnknownSignatureError","InvalidStructSignatureError","CircularReferenceError","InvalidParenthesisError","current","depth","getParameterCacheKey","structs","structKey","struct","propertyKey","property","parameterCache","parseSignature","parseFunctionSignature","parseEventSignature","parseErrorSignature","parseConstructorSignature","parseFallbackSignature","inputParams","splitParameters","inputs","inputLength","parseAbiParameter","outputs","outputParams","outputLength","abiParameterWithoutTupleRegex","abiParameterWithTupleRegex","dynamicIntegerRegex","options","parameterCacheKey","isTuple","isSolidityKeyword","indexed","components","components_","isSolidityType","_b","isValidDataLocation","char","tail","protectedKeywordsRegex","isArray","parseStructs","signatures","shallowStructs","signaturesLength","properties","propertiesLength","k","trimmed","resolvedStructs","entriesLength","resolveStructs","typeWithoutTupleRegex","ancestors","array","parseAbi","normalizeSignature","active","level","valid","toSignature","def","def_","toSignatureHash","fn","toEventSelector","toFunctionSelector","getAbiItem","isSelector","abiItems","matchedAbiItem","arg","isArgOfType","ambiguousTypes","getAmbiguousTypes","argType","abiParameterType","sourceParameters","targetParameters","parameterIndex","sourceParameter","targetParameter","types","decodeFunctionResult","item","prepareEncodeFunctionData","encodeFunctionData","getChainContractAddress","panicReasons","solidityError","solidityPanic","decodeErrorResult","formatAbiItemWithArgs","includeFunctionName","input","stringify","CallExecutionError","prettyArgs","ContractFunctionExecutionError","contractAddress","sender","formattedArgs","functionWithParams","getContractAddress","ContractFunctionRevertedError","decodedData","metaMessages","errorName","errorArgs","firstArg","errorWithParams","ContractFunctionZeroDataError","CounterfactualDeploymentFailedError","factory","RawContractError","isNullUniversalResolverError","callType","_c","_d","_e","_f","encodedLabelToLabelhash","label","namehash","labels","hashFromEncodedLabel","hashed","stringToBytes","encodeLabelhash","labelhash","packetToBytes","packet","list","EXECUTION_REVERTED_ERROR_CODE","getContractError","error","InternalRpcError","RpcRequestError","aggregate3Signature","deploylessCallViaBytecodeBytecode","deploylessCallViaFactoryBytecode","universalSignatureValidatorByteCode","getCallError","call","batch","accessList","blobs","data_","factoryData","maxFeePerBlobGas","rest","deploylessCallViaBytecode","deploylessCallViaFactory","deploylessCall","toDeploylessCallViaBytecodeData","toDeploylessCallViaFactoryData","block","chainFormat","shouldPerformMulticall","scheduleMulticall","response","getRevertErrorData","offchainLookup","offchainLookupSignature","request_","batchSize","wait","multicallAddress_","multicallAddress","schedule","createBatchScheduler","requests","calls","calldata","returnData","success","readContract","EnsAvatarInvalidMetadataError","EnsAvatarInvalidNftUriError","EnsAvatarUriResolutionError","uri","EnsAvatarUnsupportedNamespaceError","namespace","networkRegex","ipfsHashRegex","base64Regex","dataURIRegex","isImageUri","res","contentType","resolve","img","getGateway","custom","defaultGateway","resolveAvatarUri","gatewayUrls","isEncoded","ipfsGateway","arweaveGateway","networkRegexMatch","protocol","subpath","target","subtarget","isIPNS","isIPFS","replacedUri","parsedUri","getJsonImage","getMetadataAvatarUri","parseAvatarUri","resolvedURI","isOnChain","parseNftUri","uri_","reference","asset_namespace","tokenID","eip_namespace","chainID","erc_namespace","getNftTokenUri","nft","parseAvatarRecord","record","parseNftAvatarUri","nftUri","resolvedNftUri","encodedJson","decoded","uriTokenId","getEnsText","universalResolverAddress_","universalResolverAddress","readContractParameters","toHex","readContractAction","getEnsAvatar","assetGatewayUrls","getEnsName","reverseNode","resolvedAddress"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76],"sources":["../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/formatAbiItem.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/abi.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/concat.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/slice.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/regex.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeDeployData.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/cursor.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/cursor.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/chain.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/unit.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/formatUnits.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/formatGwei.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/node.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/formatEther.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/transaction.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/errors/getNodeError.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/formatters/extract.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/formatters/formatter.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/formatters/transactionRequest.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/getAction.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/number.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/transaction/assertRequest.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/stateOverride.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/stateOverride.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/abis.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/fromBytes.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/hashSignature.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/version.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/errors.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/regex.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/signature.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/struct.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/runtime/cache.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/runtime/utils.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/runtime/structs.js","../../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/parseAbi.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/normalizeSignature.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignature.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignatureHash.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toEventSelector.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toFunctionSelector.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/getAbiItem.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeFunctionData.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/chain/getChainContractAddress.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/solidity.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/decodeErrorResult.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/contract.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/ens/errors.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/ens/namehash.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/ens/encodeLabelhash.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/ens/labelhash.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/ens/packetToBytes.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/errors/getContractError.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/contract.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/contracts.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/errors/getCallError.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/actions/public/call.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/actions/public/readContract.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/ens.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/ens/avatar/utils.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/actions/ens/getEnsText.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/actions/ens/getEnsAvatar.js","../../../../node_modules/.pnpm/viem@2.22.17_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/actions/ens/getEnsName.js"],"sourcesContent":["import { InvalidDefinitionTypeError, } from '../../errors/abi.js';\nexport function formatAbiItem(abiItem, { includeName = false } = {}) {\n if (abiItem.type !== 'function' &&\n abiItem.type !== 'event' &&\n abiItem.type !== 'error')\n throw new InvalidDefinitionTypeError(abiItem.type);\n return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;\n}\nexport function formatAbiParams(params, { includeName = false } = {}) {\n if (!params)\n return '';\n return params\n .map((param) => formatAbiParam(param, { includeName }))\n .join(includeName ? ', ' : ',');\n}\nfunction formatAbiParam(param, { includeName }) {\n if (param.type.startsWith('tuple')) {\n return `(${formatAbiParams(param.components, { includeName })})${param.type.slice('tuple'.length)}`;\n }\n return param.type + (includeName && param.name ? ` ${param.name}` : '');\n}\n//# sourceMappingURL=formatAbiItem.js.map","import { formatAbiItem, formatAbiParams } from '../utils/abi/formatAbiItem.js';\nimport { size } from '../utils/data/size.js';\nimport { BaseError } from './base.js';\nexport class AbiConstructorNotFoundError extends BaseError {\n constructor({ docsPath }) {\n super([\n 'A constructor was not found on the ABI.',\n 'Make sure you are using the correct ABI and that the constructor exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiConstructorNotFoundError',\n });\n }\n}\nexport class AbiConstructorParamsNotFoundError extends BaseError {\n constructor({ docsPath }) {\n super([\n 'Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.',\n 'Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiConstructorParamsNotFoundError',\n });\n }\n}\nexport class AbiDecodingDataSizeInvalidError extends BaseError {\n constructor({ data, size }) {\n super([\n `Data size of ${size} bytes is invalid.`,\n 'Size must be in increments of 32 bytes (size % 32 === 0).',\n ].join('\\n'), {\n metaMessages: [`Data: ${data} (${size} bytes)`],\n name: 'AbiDecodingDataSizeInvalidError',\n });\n }\n}\nexport class AbiDecodingDataSizeTooSmallError extends BaseError {\n constructor({ data, params, size, }) {\n super([`Data size of ${size} bytes is too small for given parameters.`].join('\\n'), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size} bytes)`,\n ],\n name: 'AbiDecodingDataSizeTooSmallError',\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n this.params = params;\n this.size = size;\n }\n}\nexport class AbiDecodingZeroDataError extends BaseError {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.', {\n name: 'AbiDecodingZeroDataError',\n });\n }\n}\nexport class AbiEncodingArrayLengthMismatchError extends BaseError {\n constructor({ expectedLength, givenLength, type, }) {\n super([\n `ABI encoding array length mismatch for type ${type}.`,\n `Expected length: ${expectedLength}`,\n `Given length: ${givenLength}`,\n ].join('\\n'), { name: 'AbiEncodingArrayLengthMismatchError' });\n }\n}\nexport class AbiEncodingBytesSizeMismatchError extends BaseError {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: 'AbiEncodingBytesSizeMismatchError' });\n }\n}\nexport class AbiEncodingLengthMismatchError extends BaseError {\n constructor({ expectedLength, givenLength, }) {\n super([\n 'ABI encoding params/values length mismatch.',\n `Expected length (params): ${expectedLength}`,\n `Given length (values): ${givenLength}`,\n ].join('\\n'), { name: 'AbiEncodingLengthMismatchError' });\n }\n}\nexport class AbiErrorInputsNotFoundError extends BaseError {\n constructor(errorName, { docsPath }) {\n super([\n `Arguments (\\`args\\`) were provided to \"${errorName}\", but \"${errorName}\" on the ABI does not contain any parameters (\\`inputs\\`).`,\n 'Cannot encode error result without knowing what the parameter types are.',\n 'Make sure you are using the correct ABI and that the inputs exist on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiErrorInputsNotFoundError',\n });\n }\n}\nexport class AbiErrorNotFoundError extends BaseError {\n constructor(errorName, { docsPath } = {}) {\n super([\n `Error ${errorName ? `\"${errorName}\" ` : ''}not found on ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiErrorNotFoundError',\n });\n }\n}\nexport class AbiErrorSignatureNotFoundError extends BaseError {\n constructor(signature, { docsPath }) {\n super([\n `Encoded error signature \"${signature}\" not found on ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ].join('\\n'), {\n docsPath,\n name: 'AbiErrorSignatureNotFoundError',\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.signature = signature;\n }\n}\nexport class AbiEventSignatureEmptyTopicsError extends BaseError {\n constructor({ docsPath }) {\n super('Cannot extract event signature from empty topics.', {\n docsPath,\n name: 'AbiEventSignatureEmptyTopicsError',\n });\n }\n}\nexport class AbiEventSignatureNotFoundError extends BaseError {\n constructor(signature, { docsPath }) {\n super([\n `Encoded event signature \"${signature}\" not found on ABI.`,\n 'Make sure you are using the correct ABI and that the event exists on it.',\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ].join('\\n'), {\n docsPath,\n name: 'AbiEventSignatureNotFoundError',\n });\n }\n}\nexport class AbiEventNotFoundError extends BaseError {\n constructor(eventName, { docsPath } = {}) {\n super([\n `Event ${eventName ? `\"${eventName}\" ` : ''}not found on ABI.`,\n 'Make sure you are using the correct ABI and that the event exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiEventNotFoundError',\n });\n }\n}\nexport class AbiFunctionNotFoundError extends BaseError {\n constructor(functionName, { docsPath } = {}) {\n super([\n `Function ${functionName ? `\"${functionName}\" ` : ''}not found on ABI.`,\n 'Make sure you are using the correct ABI and that the function exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiFunctionNotFoundError',\n });\n }\n}\nexport class AbiFunctionOutputsNotFoundError extends BaseError {\n constructor(functionName, { docsPath }) {\n super([\n `Function \"${functionName}\" does not contain any \\`outputs\\` on ABI.`,\n 'Cannot decode function result without knowing what the parameter types are.',\n 'Make sure you are using the correct ABI and that the function exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiFunctionOutputsNotFoundError',\n });\n }\n}\nexport class AbiFunctionSignatureNotFoundError extends BaseError {\n constructor(signature, { docsPath }) {\n super([\n `Encoded function signature \"${signature}\" not found on ABI.`,\n 'Make sure you are using the correct ABI and that the function exists on it.',\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ].join('\\n'), {\n docsPath,\n name: 'AbiFunctionSignatureNotFoundError',\n });\n }\n}\nexport class AbiItemAmbiguityError extends BaseError {\n constructor(x, y) {\n super('Found ambiguous types in overloaded ABI items.', {\n metaMessages: [\n `\\`${x.type}\\` in \\`${formatAbiItem(x.abiItem)}\\`, and`,\n `\\`${y.type}\\` in \\`${formatAbiItem(y.abiItem)}\\``,\n '',\n 'These types encode differently and cannot be distinguished at runtime.',\n 'Remove one of the ambiguous items in the ABI.',\n ],\n name: 'AbiItemAmbiguityError',\n });\n }\n}\nexport class BytesSizeMismatchError extends BaseError {\n constructor({ expectedSize, givenSize, }) {\n super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {\n name: 'BytesSizeMismatchError',\n });\n }\n}\nexport class DecodeLogDataMismatch extends BaseError {\n constructor({ abiItem, data, params, size, }) {\n super([\n `Data size of ${size} bytes is too small for non-indexed event parameters.`,\n ].join('\\n'), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size} bytes)`,\n ],\n name: 'DecodeLogDataMismatch',\n });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n this.data = data;\n this.params = params;\n this.size = size;\n }\n}\nexport class DecodeLogTopicsMismatch extends BaseError {\n constructor({ abiItem, param, }) {\n super([\n `Expected a topic for indexed event parameter${param.name ? ` \"${param.name}\"` : ''} on event \"${formatAbiItem(abiItem, { includeName: true })}\".`,\n ].join('\\n'), { name: 'DecodeLogTopicsMismatch' });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n }\n}\nexport class InvalidAbiEncodingTypeError extends BaseError {\n constructor(type, { docsPath }) {\n super([\n `Type \"${type}\" is not a valid encoding type.`,\n 'Please provide a valid ABI type.',\n ].join('\\n'), { docsPath, name: 'InvalidAbiEncodingType' });\n }\n}\nexport class InvalidAbiDecodingTypeError extends BaseError {\n constructor(type, { docsPath }) {\n super([\n `Type \"${type}\" is not a valid decoding type.`,\n 'Please provide a valid ABI type.',\n ].join('\\n'), { docsPath, name: 'InvalidAbiDecodingType' });\n }\n}\nexport class InvalidArrayError extends BaseError {\n constructor(value) {\n super([`Value \"${value}\" is not a valid array.`].join('\\n'), {\n name: 'InvalidArrayError',\n });\n }\n}\nexport class InvalidDefinitionTypeError extends BaseError {\n constructor(type) {\n super([\n `\"${type}\" is not a valid definition type.`,\n 'Valid types: \"function\", \"event\", \"error\"',\n ].join('\\n'), { name: 'InvalidDefinitionTypeError' });\n }\n}\nexport class UnsupportedPackedAbiType extends BaseError {\n constructor(type) {\n super(`Type \"${type}\" is not supported for packed encoding.`, {\n name: 'UnsupportedPackedAbiType',\n });\n }\n}\n//# sourceMappingURL=abi.js.map","export function concat(values) {\n if (typeof values[0] === 'string')\n return concatHex(values);\n return concatBytes(values);\n}\nexport function concatBytes(values) {\n let length = 0;\n for (const arr of values) {\n length += arr.length;\n }\n const result = new Uint8Array(length);\n let offset = 0;\n for (const arr of values) {\n result.set(arr, offset);\n offset += arr.length;\n }\n return result;\n}\nexport function concatHex(values) {\n return `0x${values.reduce((acc, x) => acc + x.replace('0x', ''), '')}`;\n}\n//# sourceMappingURL=concat.js.map","import { SliceOffsetOutOfBoundsError, } from '../../errors/data.js';\nimport { isHex } from './isHex.js';\nimport { size } from './size.js';\n/**\n * @description Returns a section of the hex or byte array given a start/end bytes offset.\n *\n * @param value The hex or byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function slice(value, start, end, { strict } = {}) {\n if (isHex(value, { strict: false }))\n return sliceHex(value, start, end, {\n strict,\n });\n return sliceBytes(value, start, end, {\n strict,\n });\n}\nfunction assertStartOffset(value, start) {\n if (typeof start === 'number' && start > 0 && start > size(value) - 1)\n throw new SliceOffsetOutOfBoundsError({\n offset: start,\n position: 'start',\n size: size(value),\n });\n}\nfunction assertEndOffset(value, start, end) {\n if (typeof start === 'number' &&\n typeof end === 'number' &&\n size(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: 'end',\n size: size(value),\n });\n }\n}\n/**\n * @description Returns a section of the byte array given a start/end bytes offset.\n *\n * @param value The byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceBytes(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = value_.slice(start, end);\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n/**\n * @description Returns a section of the hex value given a start/end bytes offset.\n *\n * @param value The hex value to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceHex(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = `0x${value_\n .replace('0x', '')\n .slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n//# sourceMappingURL=slice.js.map","export const arrayRegex = /^(.*)\\[([0-9]*)\\]$/;\n// `bytes<M>`: binary type of `M` bytes, `0 < M <= 32`\n// https://regexr.com/6va55\nexport const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n// `(u)int<M>`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n// https://regexr.com/6v8hp\nexport const integerRegex = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n//# sourceMappingURL=regex.js.map","import { AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, InvalidAbiEncodingTypeError, InvalidArrayError, } from '../../errors/abi.js';\nimport { InvalidAddressError, } from '../../errors/address.js';\nimport { BaseError } from '../../errors/base.js';\nimport { IntegerOutOfRangeError } from '../../errors/encoding.js';\nimport { isAddress } from '../address/isAddress.js';\nimport { concat } from '../data/concat.js';\nimport { padHex } from '../data/pad.js';\nimport { size } from '../data/size.js';\nimport { slice } from '../data/slice.js';\nimport { boolToHex, numberToHex, stringToHex, } from '../encoding/toHex.js';\nimport { integerRegex } from '../regex.js';\n/**\n * @description Encodes a list of primitive values into an ABI-encoded hex value.\n *\n * - Docs: https://viem.sh/docs/abi/encodeAbiParameters#encodeabiparameters\n *\n * Generates ABI encoded data using the [ABI specification](https://docs.soliditylang.org/en/latest/abi-spec), given a set of ABI parameters (inputs/outputs) and their corresponding values.\n *\n * @param params - a set of ABI Parameters (params), that can be in the shape of the inputs or outputs attribute of an ABI Item.\n * @param values - a set of values (values) that correspond to the given params.\n * @example\n * ```typescript\n * import { encodeAbiParameters } from 'viem'\n *\n * const encodedData = encodeAbiParameters(\n * [\n * { name: 'x', type: 'string' },\n * { name: 'y', type: 'uint' },\n * { name: 'z', type: 'bool' }\n * ],\n * ['wagmi', 420n, true]\n * )\n * ```\n *\n * You can also pass in Human Readable parameters with the parseAbiParameters utility.\n *\n * @example\n * ```typescript\n * import { encodeAbiParameters, parseAbiParameters } from 'viem'\n *\n * const encodedData = encodeAbiParameters(\n * parseAbiParameters('string x, uint y, bool z'),\n * ['wagmi', 420n, true]\n * )\n * ```\n */\nexport function encodeAbiParameters(params, values) {\n if (params.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: params.length,\n givenLength: values.length,\n });\n // Prepare the parameters to determine dynamic types to encode.\n const preparedParams = prepareParams({\n params: params,\n values: values,\n });\n const data = encodeParams(preparedParams);\n if (data.length === 0)\n return '0x';\n return data;\n}\nfunction prepareParams({ params, values, }) {\n const preparedParams = [];\n for (let i = 0; i < params.length; i++) {\n preparedParams.push(prepareParam({ param: params[i], value: values[i] }));\n }\n return preparedParams;\n}\nfunction prepareParam({ param, value, }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return encodeArray(value, { length, param: { ...param, type } });\n }\n if (param.type === 'tuple') {\n return encodeTuple(value, {\n param: param,\n });\n }\n if (param.type === 'address') {\n return encodeAddress(value);\n }\n if (param.type === 'bool') {\n return encodeBool(value);\n }\n if (param.type.startsWith('uint') || param.type.startsWith('int')) {\n const signed = param.type.startsWith('int');\n const [, , size = '256'] = integerRegex.exec(param.type) ?? [];\n return encodeNumber(value, {\n signed,\n size: Number(size),\n });\n }\n if (param.type.startsWith('bytes')) {\n return encodeBytes(value, { param });\n }\n if (param.type === 'string') {\n return encodeString(value);\n }\n throw new InvalidAbiEncodingTypeError(param.type, {\n docsPath: '/docs/contract/encodeAbiParameters',\n });\n}\nfunction encodeParams(preparedParams) {\n // 1. Compute the size of the static part of the parameters.\n let staticSize = 0;\n for (let i = 0; i < preparedParams.length; i++) {\n const { dynamic, encoded } = preparedParams[i];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size(encoded);\n }\n // 2. Split the parameters into static and dynamic parts.\n const staticParams = [];\n const dynamicParams = [];\n let dynamicSize = 0;\n for (let i = 0; i < preparedParams.length; i++) {\n const { dynamic, encoded } = preparedParams[i];\n if (dynamic) {\n staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));\n dynamicParams.push(encoded);\n dynamicSize += size(encoded);\n }\n else {\n staticParams.push(encoded);\n }\n }\n // 3. Concatenate static and dynamic parts.\n return concat([...staticParams, ...dynamicParams]);\n}\nfunction encodeAddress(value) {\n if (!isAddress(value))\n throw new InvalidAddressError({ address: value });\n return { dynamic: false, encoded: padHex(value.toLowerCase()) };\n}\nfunction encodeArray(value, { length, param, }) {\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError(value);\n if (!dynamic && value.length !== length)\n throw new AbiEncodingArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${param.type}[${length}]`,\n });\n let dynamicChild = false;\n const preparedParams = [];\n for (let i = 0; i < value.length; i++) {\n const preparedParam = prepareParam({ param, value: value[i] });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParams.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encodeParams(preparedParams);\n if (dynamic) {\n const length = numberToHex(preparedParams.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParams.length > 0 ? concat([length, data]) : length,\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat(preparedParams.map(({ encoded }) => encoded)),\n };\n}\nfunction encodeBytes(value, { param }) {\n const [, paramSize] = param.type.split('bytes');\n const bytesSize = size(value);\n if (!paramSize) {\n let value_ = value;\n // If the size is not divisible by 32 bytes, pad the end\n // with empty bytes to the ceiling 32 bytes.\n if (bytesSize % 32 !== 0)\n value_ = padHex(value_, {\n dir: 'right',\n size: Math.ceil((value.length - 2) / 2 / 32) * 32,\n });\n return {\n dynamic: true,\n encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_]),\n };\n }\n if (bytesSize !== Number.parseInt(paramSize))\n throw new AbiEncodingBytesSizeMismatchError({\n expectedSize: Number.parseInt(paramSize),\n value,\n });\n return { dynamic: false, encoded: padHex(value, { dir: 'right' }) };\n}\nfunction encodeBool(value) {\n if (typeof value !== 'boolean')\n throw new BaseError(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padHex(boolToHex(value)) };\n}\nfunction encodeNumber(value, { signed, size = 256 }) {\n if (typeof size === 'number') {\n const max = 2n ** (BigInt(size) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size / 8,\n value: value.toString(),\n });\n }\n return {\n dynamic: false,\n encoded: numberToHex(value, {\n size: 32,\n signed,\n }),\n };\n}\nfunction encodeString(value) {\n const hexValue = stringToHex(value);\n const partsLength = Math.ceil(size(hexValue) / 32);\n const parts = [];\n for (let i = 0; i < partsLength; i++) {\n parts.push(padHex(slice(hexValue, i * 32, (i + 1) * 32), {\n dir: 'right',\n }));\n }\n return {\n dynamic: true,\n encoded: concat([\n padHex(numberToHex(size(hexValue), { size: 32 })),\n ...parts,\n ]),\n };\n}\nfunction encodeTuple(value, { param }) {\n let dynamic = false;\n const preparedParams = [];\n for (let i = 0; i < param.components.length; i++) {\n const param_ = param.components[i];\n const index = Array.isArray(value) ? i : param_.name;\n const preparedParam = prepareParam({\n param: param_,\n value: value[index],\n });\n preparedParams.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic\n ? encodeParams(preparedParams)\n : concat(preparedParams.map(({ encoded }) => encoded)),\n };\n}\nexport function getArrayComponents(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches\n ? // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n : undefined;\n}\n//# sourceMappingURL=encodeAbiParameters.js.map","import { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, } from '../../errors/abi.js';\nimport { concatHex } from '../data/concat.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nconst docsPath = '/docs/contract/encodeDeployData';\nexport function encodeDeployData(parameters) {\n const { abi, args, bytecode } = parameters;\n if (!args || args.length === 0)\n return bytecode;\n const description = abi.find((x) => 'type' in x && x.type === 'constructor');\n if (!description)\n throw new AbiConstructorNotFoundError({ docsPath });\n if (!('inputs' in description))\n throw new AbiConstructorParamsNotFoundError({ docsPath });\n if (!description.inputs || description.inputs.length === 0)\n throw new AbiConstructorParamsNotFoundError({ docsPath });\n const data = encodeAbiParameters(description.inputs, args);\n return concatHex([bytecode, data]);\n}\n//# sourceMappingURL=encodeDeployData.js.map","import { BaseError } from './base.js';\nexport class NegativeOffsetError extends BaseError {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`, {\n name: 'NegativeOffsetError',\n });\n }\n}\nexport class PositionOutOfBoundsError extends BaseError {\n constructor({ length, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`, { name: 'PositionOutOfBoundsError' });\n }\n}\nexport class RecursiveReadLimitExceededError extends BaseError {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`, { name: 'RecursiveReadLimitExceededError' });\n }\n}\n//# sourceMappingURL=cursor.js.map","import { NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError, } from '../errors/cursor.js';\nconst staticCursor = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit,\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError({\n length: this.bytes.length,\n position,\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length - 1);\n return this.bytes.subarray(position, position + length);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return ((this.dataView.getUint16(position) << 8) +\n this.dataView.getUint8(position + 2));\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length, size) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length);\n this.position += size ?? length;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => (this.position = oldPosition);\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n },\n};\nexport function createCursor(bytes, { recursiveReadLimit = 8_192 } = {}) {\n const cursor = Object.create(staticCursor);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n}\n//# sourceMappingURL=cursor.js.map","import { BaseError } from './base.js';\nexport class ChainDoesNotSupportContract extends BaseError {\n constructor({ blockNumber, chain, contract, }) {\n super(`Chain \"${chain.name}\" does not support contract \"${contract.name}\".`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ...(blockNumber &&\n contract.blockCreated &&\n contract.blockCreated > blockNumber\n ? [\n `- The contract \"${contract.name}\" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`,\n ]\n : [\n `- The chain does not have the contract \"${contract.name}\" configured.`,\n ]),\n ],\n name: 'ChainDoesNotSupportContract',\n });\n }\n}\nexport class ChainMismatchError extends BaseError {\n constructor({ chain, currentChainId, }) {\n super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain.id} – ${chain.name}).`, {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain.id} – ${chain.name}`,\n ],\n name: 'ChainMismatchError',\n });\n }\n}\nexport class ChainNotFoundError extends BaseError {\n constructor() {\n super([\n 'No chain was provided to the request.',\n 'Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.',\n ].join('\\n'), {\n name: 'ChainNotFoundError',\n });\n }\n}\nexport class ClientChainNotConfiguredError extends BaseError {\n constructor() {\n super('No chain was provided to the Client.', {\n name: 'ClientChainNotConfiguredError',\n });\n }\n}\nexport class InvalidChainIdError extends BaseError {\n constructor({ chainId }) {\n super(typeof chainId === 'number'\n ? `Chain ID \"${chainId}\" is invalid.`\n : 'Chain ID is invalid.', { name: 'InvalidChainIdError' });\n }\n}\n//# sourceMappingURL=chain.js.map","export const etherUnits = {\n gwei: 9,\n wei: 18,\n};\nexport const gweiUnits = {\n ether: -9,\n wei: 9,\n};\nexport const weiUnits = {\n ether: -18,\n gwei: -9,\n};\n//# sourceMappingURL=unit.js.map","/**\n * Divides a number by a given exponent of base 10 (10exponent), and formats it into a string representation of the number..\n *\n * - Docs: https://viem.sh/docs/utilities/formatUnits\n *\n * @example\n * import { formatUnits } from 'viem'\n *\n * formatUnits(420000000000n, 9)\n * // '420'\n */\nexport function formatUnits(value, decimals) {\n let display = value.toString();\n const negative = display.startsWith('-');\n if (negative)\n display = display.slice(1);\n display = display.padStart(decimals, '0');\n let [integer, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals),\n ];\n fraction = fraction.replace(/(0+)$/, '');\n return `${negative ? '-' : ''}${integer || '0'}${fraction ? `.${fraction}` : ''}`;\n}\n//# sourceMappingURL=formatUnits.js.map","import { gweiUnits } from '../../constants/unit.js';\nimport { formatUnits } from './formatUnits.js';\n/**\n * Converts numerical wei to a string representation of gwei.\n *\n * - Docs: https://viem.sh/docs/utilities/formatGwei\n *\n * @example\n * import { formatGwei } from 'viem'\n *\n * formatGwei(1000000000n)\n * // '1'\n */\nexport function formatGwei(wei, unit = 'wei') {\n return formatUnits(wei, gweiUnits[unit]);\n}\n//# sourceMappingURL=formatGwei.js.map","import { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport class ExecutionRevertedError extends BaseError {\n constructor({ cause, message, } = {}) {\n const reason = message\n ?.replace('execution reverted: ', '')\n ?.replace('execution reverted', '');\n super(`Execution reverted ${reason ? `with reason: ${reason}` : 'for an unknown reason'}.`, {\n cause,\n name: 'ExecutionRevertedError',\n });\n }\n}\nObject.defineProperty(ExecutionRevertedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n});\nObject.defineProperty(ExecutionRevertedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /execution reverted/\n});\nexport class FeeCapTooHighError extends BaseError {\n constructor({ cause, maxFeePerGas, } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`, {\n cause,\n name: 'FeeCapTooHighError',\n });\n }\n}\nObject.defineProperty(FeeCapTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n});\nexport class FeeCapTooLowError extends BaseError {\n constructor({ cause, maxFeePerGas, } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ''} gwei) cannot be lower than the block base fee.`, {\n cause,\n name: 'FeeCapTooLowError',\n });\n }\n}\nObject.defineProperty(FeeCapTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n});\nexport class NonceTooHighError extends BaseError {\n constructor({ cause, nonce, } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is higher than the next one expected.`, { cause, name: 'NonceTooHighError' });\n }\n}\nObject.defineProperty(NonceTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too high/\n});\nexport class NonceTooLowError extends BaseError {\n constructor({ cause, nonce, } = {}) {\n super([\n `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is lower than the current nonce of the account.`,\n 'Try increasing the nonce or find the latest nonce with `getTransactionCount`.',\n ].join('\\n'), { cause, name: 'NonceTooLowError' });\n }\n}\nObject.defineProperty(NonceTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too low|transaction already imported|already known/\n});\nexport class NonceMaxValueError extends BaseError {\n constructor({ cause, nonce, } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}exceeds the maximum allowed nonce.`, { cause, name: 'NonceMaxValueError' });\n }\n}\nObject.defineProperty(NonceMaxValueError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce has max value/\n});\nexport class InsufficientFundsError extends BaseError {\n constructor({ cause } = {}) {\n super([\n 'The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.',\n ].join('\\n'), {\n cause,\n metaMessages: [\n 'This error could arise when the account does not have enough funds to:',\n ' - pay for the total gas fee,',\n ' - pay for the value to send.',\n ' ',\n 'The cost of the transaction is calculated as `gas * gas fee + value`, where:',\n ' - `gas` is the amount of gas needed for transaction to execute,',\n ' - `gas fee` is the gas fee,',\n ' - `value` is the amount of ether to send to the recipient.',\n ],\n name: 'InsufficientFundsError',\n });\n }\n}\nObject.defineProperty(InsufficientFundsError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /insufficient funds|exceeds transaction sender account balance/\n});\nexport class IntrinsicGasTooHighError extends BaseError {\n constructor({ cause, gas, } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction exceeds the limit allowed for the block.`, {\n cause,\n name: 'IntrinsicGasTooHighError',\n });\n }\n}\nObject.defineProperty(IntrinsicGasTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too high|gas limit reached/\n});\nexport class IntrinsicGasTooLowError extends BaseError {\n constructor({ cause, gas, } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction is too low.`, {\n cause,\n name: 'IntrinsicGasTooLowError',\n });\n }\n}\nObject.defineProperty(IntrinsicGasTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too low/\n});\nexport class TransactionTypeNotSupportedError extends BaseError {\n constructor({ cause }) {\n super('The transaction type is not supported for this chain.', {\n cause,\n name: 'TransactionTypeNotSupportedError',\n });\n }\n}\nObject.defineProperty(TransactionTypeNotSupportedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /transaction type not valid/\n});\nexport class TipAboveFeeCapError extends BaseError {\n constructor({ cause, maxPriorityFeePerGas, maxFeePerGas, } = {}) {\n super([\n `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas\n ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei`\n : ''}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}).`,\n ].join('\\n'), {\n cause,\n name: 'TipAboveFeeCapError',\n });\n }\n}\nObject.defineProperty(TipAboveFeeCapError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n});\nexport class UnknownNodeError extends BaseError {\n constructor({ cause }) {\n super(`An error occurred while executing: ${cause?.shortMessage}`, {\n cause,\n name: 'UnknownNodeError',\n });\n }\n}\n//# sourceMappingURL=node.js.map","import { etherUnits } from '../../constants/unit.js';\nimport { formatUnits } from './formatUnits.js';\n/**\n * Converts numerical wei to a string representation of ether.\n *\n * - Docs: https://viem.sh/docs/utilities/formatEther\n *\n * @example\n * import { formatEther } from 'viem'\n *\n * formatEther(1000000000000000000n)\n * // '1'\n */\nexport function formatEther(wei, unit = 'wei') {\n return formatUnits(wei, etherUnits[unit]);\n}\n//# sourceMappingURL=formatEther.js.map","import { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport function prettyPrint(args) {\n const entries = Object.entries(args)\n .map(([key, value]) => {\n if (value === undefined || value === false)\n return null;\n return [key, value];\n })\n .filter(Boolean);\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n return entries\n .map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`)\n .join('\\n');\n}\nexport class FeeConflictError extends BaseError {\n constructor() {\n super([\n 'Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.',\n 'Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.',\n ].join('\\n'), { name: 'FeeConflictError' });\n }\n}\nexport class InvalidLegacyVError extends BaseError {\n constructor({ v }) {\n super(`Invalid \\`v\\` value \"${v}\". Expected 27 or 28.`, {\n name: 'InvalidLegacyVError',\n });\n }\n}\nexport class InvalidSerializableTransactionError extends BaseError {\n constructor({ transaction }) {\n super('Cannot infer a transaction type from provided transaction.', {\n metaMessages: [\n 'Provided Transaction:',\n '{',\n prettyPrint(transaction),\n '}',\n '',\n 'To infer the type, either provide:',\n '- a `type` to the Transaction, or',\n '- an EIP-1559 Transaction with `maxFeePerGas`, or',\n '- an EIP-2930 Transaction with `gasPrice` & `accessList`, or',\n '- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or',\n '- an EIP-7702 Transaction with `authorizationList`, or',\n '- a Legacy Transaction with `gasPrice`',\n ],\n name: 'InvalidSerializableTransactionError',\n });\n }\n}\nexport class InvalidSerializedTransactionTypeError extends BaseError {\n constructor({ serializedType }) {\n super(`Serialized transaction type \"${serializedType}\" is invalid.`, {\n name: 'InvalidSerializedTransactionType',\n });\n Object.defineProperty(this, \"serializedType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.serializedType = serializedType;\n }\n}\nexport class InvalidSerializedTransactionError extends BaseError {\n constructor({ attributes, serializedTransaction, type, }) {\n const missing = Object.entries(attributes)\n .map(([key, value]) => (typeof value === 'undefined' ? key : undefined))\n .filter(Boolean);\n super(`Invalid serialized transaction of type \"${type}\" was provided.`, {\n metaMessages: [\n `Serialized Transaction: \"${serializedTransaction}\"`,\n missing.length > 0 ? `Missing Attributes: ${missing.join(', ')}` : '',\n ].filter(Boolean),\n name: 'InvalidSerializedTransactionError',\n });\n Object.defineProperty(this, \"serializedTransaction\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"type\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.serializedTransaction = serializedTransaction;\n this.type = type;\n }\n}\nexport class InvalidStorageKeySizeError extends BaseError {\n constructor({ storageKey }) {\n super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: 'InvalidStorageKeySizeError' });\n }\n}\nexport class TransactionExecutionError extends BaseError {\n constructor(cause, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }) {\n const prettyArgs = prettyPrint({\n chain: chain && `${chain?.name} (id: ${chain?.id})`,\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Request Arguments:',\n prettyArgs,\n ].filter(Boolean),\n name: 'TransactionExecutionError',\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n}\nexport class TransactionNotFoundError extends BaseError {\n constructor({ blockHash, blockNumber, blockTag, hash, index, }) {\n let identifier = 'Transaction';\n if (blockTag && index !== undefined)\n identifier = `Transaction at block time \"${blockTag}\" at index \"${index}\"`;\n if (blockHash && index !== undefined)\n identifier = `Transaction at block hash \"${blockHash}\" at index \"${index}\"`;\n if (blockNumber && index !== undefined)\n identifier = `Transaction at block number \"${blockNumber}\" at index \"${index}\"`;\n if (hash)\n identifier = `Transaction with hash \"${hash}\"`;\n super(`${identifier} could not be found.`, {\n name: 'TransactionNotFoundError',\n });\n }\n}\nexport class TransactionReceiptNotFoundError extends BaseError {\n constructor({ hash }) {\n super(`Transaction receipt with hash \"${hash}\" could not be found. The Transaction may not be processed on a block yet.`, {\n name: 'TransactionReceiptNotFoundError',\n });\n }\n}\nexport class WaitForTransactionReceiptTimeoutError extends BaseError {\n constructor({ hash }) {\n super(`Timed out while waiting for transaction with hash \"${hash}\" to be confirmed.`, { name: 'WaitForTransactionReceiptTimeoutError' });\n }\n}\n//# sourceMappingURL=transaction.js.map","import { BaseError } from '../../errors/base.js';\nimport { ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, NonceMaxValueError, NonceTooHighError, NonceTooLowError, TipAboveFeeCapError, TransactionTypeNotSupportedError, UnknownNodeError, } from '../../errors/node.js';\nimport { RpcRequestError } from '../../errors/request.js';\nimport { InvalidInputRpcError, TransactionRejectedRpcError, } from '../../errors/rpc.js';\nexport function containsNodeError(err) {\n return (err instanceof TransactionRejectedRpcError ||\n err instanceof InvalidInputRpcError ||\n (err instanceof RpcRequestError && err.code === ExecutionRevertedError.code));\n}\nexport function getNodeError(err, args) {\n const message = (err.details || '').toLowerCase();\n const executionRevertedError = err instanceof BaseError\n ? err.walk((e) => e?.code ===\n ExecutionRevertedError.code)\n : err;\n if (executionRevertedError instanceof BaseError)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details,\n });\n if (ExecutionRevertedError.nodeMessage.test(message))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details,\n });\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce });\n if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce });\n if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce });\n if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err });\n if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas });\n if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas });\n if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err });\n if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas,\n });\n return new UnknownNodeError({\n cause: err,\n });\n}\n//# sourceMappingURL=getNodeError.js.map","/**\n * @description Picks out the keys from `value` that exist in the formatter..\n */\nexport function extract(value_, { format }) {\n if (!format)\n return {};\n const value = {};\n function extract_(formatted) {\n const keys = Object.keys(formatted);\n for (const key of keys) {\n if (key in value_)\n value[key] = value_[key];\n if (formatted[key] &&\n typeof formatted[key] === 'object' &&\n !Array.isArray(formatted[key]))\n extract_(formatted[key]);\n }\n }\n const formatted = format(value_ || {});\n extract_(formatted);\n return value;\n}\n//# sourceMappingURL=extract.js.map","export function defineFormatter(type, format) {\n return ({ exclude, format: overrides, }) => {\n return {\n exclude,\n format: (args) => {\n const formatted = format(args);\n if (exclude) {\n for (const key of exclude) {\n delete formatted[key];\n }\n }\n return {\n ...formatted,\n ...overrides(args),\n };\n },\n type,\n };\n };\n}\n//# sourceMappingURL=formatter.js.map","import { bytesToHex, numberToHex } from '../encoding/toHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const rpcTransactionType = {\n legacy: '0x0',\n eip2930: '0x1',\n eip1559: '0x2',\n eip4844: '0x3',\n eip7702: '0x4',\n};\nexport function formatTransactionRequest(request) {\n const rpcRequest = {};\n if (typeof request.authorizationList !== 'undefined')\n rpcRequest.authorizationList = formatAuthorizationList(request.authorizationList);\n if (typeof request.accessList !== 'undefined')\n rpcRequest.accessList = request.accessList;\n if (typeof request.blobVersionedHashes !== 'undefined')\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes;\n if (typeof request.blobs !== 'undefined') {\n if (typeof request.blobs[0] !== 'string')\n rpcRequest.blobs = request.blobs.map((x) => bytesToHex(x));\n else\n rpcRequest.blobs = request.blobs;\n }\n if (typeof request.data !== 'undefined')\n rpcRequest.data = request.data;\n if (typeof request.from !== 'undefined')\n rpcRequest.from = request.from;\n if (typeof request.gas !== 'undefined')\n rpcRequest.gas = numberToHex(request.gas);\n if (typeof request.gasPrice !== 'undefined')\n rpcRequest.gasPrice = numberToHex(request.gasPrice);\n if (typeof request.maxFeePerBlobGas !== 'undefined')\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas);\n if (typeof request.maxFeePerGas !== 'undefined')\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas);\n if (typeof request.maxPriorityFeePerGas !== 'undefined')\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas);\n if (typeof request.nonce !== 'undefined')\n rpcRequest.nonce = numberToHex(request.nonce);\n if (typeof request.to !== 'undefined')\n rpcRequest.to = request.to;\n if (typeof request.type !== 'undefined')\n rpcRequest.type = rpcTransactionType[request.type];\n if (typeof request.value !== 'undefined')\n rpcRequest.value = numberToHex(request.value);\n return rpcRequest;\n}\nexport const defineTransactionRequest = /*#__PURE__*/ defineFormatter('transactionRequest', formatTransactionRequest);\n//////////////////////////////////////////////////////////////////////////////\nfunction formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.contractAddress,\n r: authorization.r,\n s: authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...(typeof authorization.yParity !== 'undefined'\n ? { yParity: numberToHex(authorization.yParity) }\n : {}),\n ...(typeof authorization.v !== 'undefined' &&\n typeof authorization.yParity === 'undefined'\n ? { v: numberToHex(authorization.v) }\n : {}),\n }));\n}\n//# sourceMappingURL=transactionRequest.js.map","/**\n * Retrieves and returns an action from the client (if exists), and falls\n * back to the tree-shakable action.\n *\n * Useful for extracting overridden actions from a client (ie. if a consumer\n * wants to override the `sendTransaction` implementation).\n */\nexport function getAction(client, actionFn, \n// Some minifiers drop `Function.prototype.name`, or replace it with short letters,\n// meaning that `actionFn.name` will not always work. For that case, the consumer\n// needs to pass the name explicitly.\nname) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === 'function')\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === 'function')\n return action_explicit;\n return (params) => actionFn(client, params);\n}\n//# sourceMappingURL=getAction.js.map","export const maxInt8 = 2n ** (8n - 1n) - 1n;\nexport const maxInt16 = 2n ** (16n - 1n) - 1n;\nexport const maxInt24 = 2n ** (24n - 1n) - 1n;\nexport const maxInt32 = 2n ** (32n - 1n) - 1n;\nexport const maxInt40 = 2n ** (40n - 1n) - 1n;\nexport const maxInt48 = 2n ** (48n - 1n) - 1n;\nexport const maxInt56 = 2n ** (56n - 1n) - 1n;\nexport const maxInt64 = 2n ** (64n - 1n) - 1n;\nexport const maxInt72 = 2n ** (72n - 1n) - 1n;\nexport const maxInt80 = 2n ** (80n - 1n) - 1n;\nexport const maxInt88 = 2n ** (88n - 1n) - 1n;\nexport const maxInt96 = 2n ** (96n - 1n) - 1n;\nexport const maxInt104 = 2n ** (104n - 1n) - 1n;\nexport const maxInt112 = 2n ** (112n - 1n) - 1n;\nexport const maxInt120 = 2n ** (120n - 1n) - 1n;\nexport const maxInt128 = 2n ** (128n - 1n) - 1n;\nexport const maxInt136 = 2n ** (136n - 1n) - 1n;\nexport const maxInt144 = 2n ** (144n - 1n) - 1n;\nexport const maxInt152 = 2n ** (152n - 1n) - 1n;\nexport const maxInt160 = 2n ** (160n - 1n) - 1n;\nexport const maxInt168 = 2n ** (168n - 1n) - 1n;\nexport const maxInt176 = 2n ** (176n - 1n) - 1n;\nexport const maxInt184 = 2n ** (184n - 1n) - 1n;\nexport const maxInt192 = 2n ** (192n - 1n) - 1n;\nexport const maxInt200 = 2n ** (200n - 1n) - 1n;\nexport const maxInt208 = 2n ** (208n - 1n) - 1n;\nexport const maxInt216 = 2n ** (216n - 1n) - 1n;\nexport const maxInt224 = 2n ** (224n - 1n) - 1n;\nexport const maxInt232 = 2n ** (232n - 1n) - 1n;\nexport const maxInt240 = 2n ** (240n - 1n) - 1n;\nexport const maxInt248 = 2n ** (248n - 1n) - 1n;\nexport const maxInt256 = 2n ** (256n - 1n) - 1n;\nexport const minInt8 = -(2n ** (8n - 1n));\nexport const minInt16 = -(2n ** (16n - 1n));\nexport const minInt24 = -(2n ** (24n - 1n));\nexport const minInt32 = -(2n ** (32n - 1n));\nexport const minInt40 = -(2n ** (40n - 1n));\nexport const minInt48 = -(2n ** (48n - 1n));\nexport const minInt56 = -(2n ** (56n - 1n));\nexport const minInt64 = -(2n ** (64n - 1n));\nexport const minInt72 = -(2n ** (72n - 1n));\nexport const minInt80 = -(2n ** (80n - 1n));\nexport const minInt88 = -(2n ** (88n - 1n));\nexport const minInt96 = -(2n ** (96n - 1n));\nexport const minInt104 = -(2n ** (104n - 1n));\nexport const minInt112 = -(2n ** (112n - 1n));\nexport const minInt120 = -(2n ** (120n - 1n));\nexport const minInt128 = -(2n ** (128n - 1n));\nexport const minInt136 = -(2n ** (136n - 1n));\nexport const minInt144 = -(2n ** (144n - 1n));\nexport const minInt152 = -(2n ** (152n - 1n));\nexport const minInt160 = -(2n ** (160n - 1n));\nexport const minInt168 = -(2n ** (168n - 1n));\nexport const minInt176 = -(2n ** (176n - 1n));\nexport const minInt184 = -(2n ** (184n - 1n));\nexport const minInt192 = -(2n ** (192n - 1n));\nexport const minInt200 = -(2n ** (200n - 1n));\nexport const minInt208 = -(2n ** (208n - 1n));\nexport const minInt216 = -(2n ** (216n - 1n));\nexport const minInt224 = -(2n ** (224n - 1n));\nexport const minInt232 = -(2n ** (232n - 1n));\nexport const minInt240 = -(2n ** (240n - 1n));\nexport const minInt248 = -(2n ** (248n - 1n));\nexport const minInt256 = -(2n ** (256n - 1n));\nexport const maxUint8 = 2n ** 8n - 1n;\nexport const maxUint16 = 2n ** 16n - 1n;\nexport const maxUint24 = 2n ** 24n - 1n;\nexport const maxUint32 = 2n ** 32n - 1n;\nexport const maxUint40 = 2n ** 40n - 1n;\nexport const maxUint48 = 2n ** 48n - 1n;\nexport const maxUint56 = 2n ** 56n - 1n;\nexport const maxUint64 = 2n ** 64n - 1n;\nexport const maxUint72 = 2n ** 72n - 1n;\nexport const maxUint80 = 2n ** 80n - 1n;\nexport const maxUint88 = 2n ** 88n - 1n;\nexport const maxUint96 = 2n ** 96n - 1n;\nexport const maxUint104 = 2n ** 104n - 1n;\nexport const maxUint112 = 2n ** 112n - 1n;\nexport const maxUint120 = 2n ** 120n - 1n;\nexport const maxUint128 = 2n ** 128n - 1n;\nexport const maxUint136 = 2n ** 136n - 1n;\nexport const maxUint144 = 2n ** 144n - 1n;\nexport const maxUint152 = 2n ** 152n - 1n;\nexport const maxUint160 = 2n ** 160n - 1n;\nexport const maxUint168 = 2n ** 168n - 1n;\nexport const maxUint176 = 2n ** 176n - 1n;\nexport const maxUint184 = 2n ** 184n - 1n;\nexport const maxUint192 = 2n ** 192n - 1n;\nexport const maxUint200 = 2n ** 200n - 1n;\nexport const maxUint208 = 2n ** 208n - 1n;\nexport const maxUint216 = 2n ** 216n - 1n;\nexport const maxUint224 = 2n ** 224n - 1n;\nexport const maxUint232 = 2n ** 232n - 1n;\nexport const maxUint240 = 2n ** 240n - 1n;\nexport const maxUint248 = 2n ** 248n - 1n;\nexport const maxUint256 = 2n ** 256n - 1n;\n//# sourceMappingURL=number.js.map","import { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { maxUint256 } from '../../constants/number.js';\nimport { InvalidAddressError, } from '../../errors/address.js';\nimport { FeeCapTooHighError, TipAboveFeeCapError, } from '../../errors/node.js';\nimport { FeeConflictError, } from '../../errors/transaction.js';\nimport { isAddress } from '../address/isAddress.js';\nexport function assertRequest(args) {\n const { account: account_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to, } = args;\n const account = account_ ? parseAccount(account_) : undefined;\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof gasPrice !== 'undefined' &&\n (typeof maxFeePerGas !== 'undefined' ||\n typeof maxPriorityFeePerGas !== 'undefined'))\n throw new FeeConflictError();\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n}\n//# sourceMappingURL=assertRequest.js.map","import { BaseError } from './base.js';\nexport class AccountStateConflictError extends BaseError {\n constructor({ address }) {\n super(`State for account \"${address}\" is set multiple times.`, {\n name: 'AccountStateConflictError',\n });\n }\n}\nexport class StateAssignmentConflictError extends BaseError {\n constructor() {\n super('state and stateDiff are set on the same account.', {\n name: 'StateAssignmentConflictError',\n });\n }\n}\n/** @internal */\nexport function prettyStateMapping(stateMapping) {\n return stateMapping.reduce((pretty, { slot, value }) => {\n return `${pretty} ${slot}: ${value}\\n`;\n }, '');\n}\nexport function prettyStateOverride(stateOverride) {\n return stateOverride\n .reduce((pretty, { address, ...state }) => {\n let val = `${pretty} ${address}:\\n`;\n if (state.nonce)\n val += ` nonce: ${state.nonce}\\n`;\n if (state.balance)\n val += ` balance: ${state.balance}\\n`;\n if (state.code)\n val += ` code: ${state.code}\\n`;\n if (state.state) {\n val += ' state:\\n';\n val += prettyStateMapping(state.state);\n }\n if (state.stateDiff) {\n val += ' stateDiff:\\n';\n val += prettyStateMapping(state.stateDiff);\n }\n return val;\n }, ' State Override:\\n')\n .slice(0, -1);\n}\n//# sourceMappingURL=stateOverride.js.map","import { InvalidAddressError, } from '../errors/address.js';\nimport { InvalidBytesLengthError, } from '../errors/data.js';\nimport { AccountStateConflictError, StateAssignmentConflictError, } from '../errors/stateOverride.js';\nimport { isAddress } from './address/isAddress.js';\nimport { numberToHex } from './encoding/toHex.js';\n/** @internal */\nexport function serializeStateMapping(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return undefined;\n return stateMapping.reduce((acc, { slot, value }) => {\n if (slot.length !== 66)\n throw new InvalidBytesLengthError({\n size: slot.length,\n targetSize: 66,\n type: 'hex',\n });\n if (value.length !== 66)\n throw new InvalidBytesLengthError({\n size: value.length,\n targetSize: 66,\n type: 'hex',\n });\n acc[slot] = value;\n return acc;\n }, {});\n}\n/** @internal */\nexport function serializeAccountStateOverride(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== undefined)\n rpcAccountStateOverride.code = code;\n if (balance !== undefined)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== undefined)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== undefined)\n rpcAccountStateOverride.state = serializeStateMapping(state);\n if (stateDiff !== undefined) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n }\n return rpcAccountStateOverride;\n}\n/** @internal */\nexport function serializeStateOverride(parameters) {\n if (!parameters)\n return undefined;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address: address });\n rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n }\n return rpcStateOverride;\n}\n//# sourceMappingURL=stateOverride.js.map","/* [Multicall3](https://github.com/mds1/multicall) */\nexport const multicall3Abi = [\n {\n inputs: [\n {\n components: [\n {\n name: 'target',\n type: 'address',\n },\n {\n name: 'allowFailure',\n type: 'bool',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n ],\n name: 'calls',\n type: 'tuple[]',\n },\n ],\n name: 'aggregate3',\n outputs: [\n {\n components: [\n {\n name: 'success',\n type: 'bool',\n },\n {\n name: 'returnData',\n type: 'bytes',\n },\n ],\n name: 'returnData',\n type: 'tuple[]',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n];\nconst universalResolverErrors = [\n {\n inputs: [],\n name: 'ResolverNotFound',\n type: 'error',\n },\n {\n inputs: [],\n name: 'ResolverWildcardNotSupported',\n type: 'error',\n },\n {\n inputs: [],\n name: 'ResolverNotContract',\n type: 'error',\n },\n {\n inputs: [\n {\n name: 'returnData',\n type: 'bytes',\n },\n ],\n name: 'ResolverError',\n type: 'error',\n },\n {\n inputs: [\n {\n components: [\n {\n name: 'status',\n type: 'uint16',\n },\n {\n name: 'message',\n type: 'string',\n },\n ],\n name: 'errors',\n type: 'tuple[]',\n },\n ],\n name: 'HttpError',\n type: 'error',\n },\n];\nexport const universalResolverResolveAbi = [\n ...universalResolverErrors,\n {\n name: 'resolve',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes' },\n { name: 'data', type: 'bytes' },\n ],\n outputs: [\n { name: '', type: 'bytes' },\n { name: 'address', type: 'address' },\n ],\n },\n {\n name: 'resolve',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes' },\n { name: 'data', type: 'bytes' },\n { name: 'gateways', type: 'string[]' },\n ],\n outputs: [\n { name: '', type: 'bytes' },\n { name: 'address', type: 'address' },\n ],\n },\n];\nexport const universalResolverReverseAbi = [\n ...universalResolverErrors,\n {\n name: 'reverse',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes', name: 'reverseName' }],\n outputs: [\n { type: 'string', name: 'resolvedName' },\n { type: 'address', name: 'resolvedAddress' },\n { type: 'address', name: 'reverseResolver' },\n { type: 'address', name: 'resolver' },\n ],\n },\n {\n name: 'reverse',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'bytes', name: 'reverseName' },\n { type: 'string[]', name: 'gateways' },\n ],\n outputs: [\n { type: 'string', name: 'resolvedName' },\n { type: 'address', name: 'resolvedAddress' },\n { type: 'address', name: 'reverseResolver' },\n { type: 'address', name: 'resolver' },\n ],\n },\n];\nexport const textResolverAbi = [\n {\n name: 'text',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes32' },\n { name: 'key', type: 'string' },\n ],\n outputs: [{ name: '', type: 'string' }],\n },\n];\nexport const addressResolverAbi = [\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: 'name', type: 'bytes32' }],\n outputs: [{ name: '', type: 'address' }],\n },\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes32' },\n { name: 'coinType', type: 'uint256' },\n ],\n outputs: [{ name: '', type: 'bytes' }],\n },\n];\n// ERC-1271\n// isValidSignature(bytes32 hash, bytes signature) → bytes4 magicValue\n/** @internal */\nexport const smartAccountAbi = [\n {\n name: 'isValidSignature',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'hash', type: 'bytes32' },\n { name: 'signature', type: 'bytes' },\n ],\n outputs: [{ name: '', type: 'bytes4' }],\n },\n];\n// ERC-6492 - universal deployless signature validator contract\n// constructor(address _signer, bytes32 _hash, bytes _signature) → bytes4 returnValue\n// returnValue is either 0x1 (valid) or 0x0 (invalid)\nexport const universalSignatureValidatorAbi = [\n {\n inputs: [\n {\n name: '_signer',\n type: 'address',\n },\n {\n name: '_hash',\n type: 'bytes32',\n },\n {\n name: '_signature',\n type: 'bytes',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'constructor',\n },\n {\n inputs: [\n {\n name: '_signer',\n type: 'address',\n },\n {\n name: '_hash',\n type: 'bytes32',\n },\n {\n name: '_signature',\n type: 'bytes',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n name: 'isValidSig',\n },\n];\n/** [ERC-20 Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-20) */\nexport const erc20Abi = [\n {\n type: 'event',\n name: 'Approval',\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'event',\n name: 'Transfer',\n inputs: [\n {\n indexed: true,\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'allowance',\n stateMutability: 'view',\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'spender',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'approve',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'spender',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'balanceOf',\n stateMutability: 'view',\n inputs: [\n {\n name: 'account',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'decimals',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint8',\n },\n ],\n },\n {\n type: 'function',\n name: 'name',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'symbol',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'totalSupply',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'transfer',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'transferFrom',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n];\n/**\n * [bytes32-flavored ERC-20](https://docs.makerdao.com/smart-contract-modules/mkr-module#4.-gotchas-potential-source-of-user-error)\n * for tokens (ie. Maker) that use bytes32 instead of string.\n */\nexport const erc20Abi_bytes32 = [\n {\n type: 'event',\n name: 'Approval',\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'event',\n name: 'Transfer',\n inputs: [\n {\n indexed: true,\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'allowance',\n stateMutability: 'view',\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'spender',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'approve',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'spender',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'balanceOf',\n stateMutability: 'view',\n inputs: [\n {\n name: 'account',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'decimals',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint8',\n },\n ],\n },\n {\n type: 'function',\n name: 'name',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'bytes32',\n },\n ],\n },\n {\n type: 'function',\n name: 'symbol',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'bytes32',\n },\n ],\n },\n {\n type: 'function',\n name: 'totalSupply',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'transfer',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'transferFrom',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n];\n/** [ERC-721 Non-Fungible Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-721) */\nexport const erc721Abi = [\n {\n type: 'event',\n name: 'Approval',\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'spender',\n type: 'address',\n },\n {\n indexed: true,\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'event',\n name: 'ApprovalForAll',\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'operator',\n type: 'address',\n },\n {\n indexed: false,\n name: 'approved',\n type: 'bool',\n },\n ],\n },\n {\n type: 'event',\n name: 'Transfer',\n inputs: [\n {\n indexed: true,\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n name: 'to',\n type: 'address',\n },\n {\n indexed: true,\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'approve',\n stateMutability: 'payable',\n inputs: [\n {\n name: 'spender',\n type: 'address',\n },\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'balanceOf',\n stateMutability: 'view',\n inputs: [\n {\n name: 'account',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'getApproved',\n stateMutability: 'view',\n inputs: [\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'address',\n },\n ],\n },\n {\n type: 'function',\n name: 'isApprovedForAll',\n stateMutability: 'view',\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'operator',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'name',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'ownerOf',\n stateMutability: 'view',\n inputs: [\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n name: 'owner',\n type: 'address',\n },\n ],\n },\n {\n type: 'function',\n name: 'safeTransferFrom',\n stateMutability: 'payable',\n inputs: [\n {\n name: 'from',\n type: 'address',\n },\n {\n name: 'to',\n type: 'address',\n },\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'safeTransferFrom',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'from',\n type: 'address',\n },\n {\n name: 'to',\n type: 'address',\n },\n {\n name: 'id',\n type: 'uint256',\n },\n {\n name: 'data',\n type: 'bytes',\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'setApprovalForAll',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'operator',\n type: 'address',\n },\n {\n name: 'approved',\n type: 'bool',\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'symbol',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'tokenByIndex',\n stateMutability: 'view',\n inputs: [\n {\n name: 'index',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'tokenByIndex',\n stateMutability: 'view',\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'index',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'tokenURI',\n stateMutability: 'view',\n inputs: [\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'totalSupply',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'transferFrom',\n stateMutability: 'payable',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'tokeId',\n type: 'uint256',\n },\n ],\n outputs: [],\n },\n];\n/** [ERC-4626 Tokenized Vaults Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626) */\nexport const erc4626Abi = [\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Approval',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n name: 'receiver',\n type: 'address',\n },\n {\n indexed: false,\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Deposit',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Transfer',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n name: 'receiver',\n type: 'address',\n },\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Withdraw',\n type: 'event',\n },\n {\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'spender',\n type: 'address',\n },\n ],\n name: 'allowance',\n outputs: [\n {\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'spender',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n name: 'approve',\n outputs: [\n {\n type: 'bool',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'asset',\n outputs: [\n {\n name: 'assetTokenAddress',\n type: 'address',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'account',\n type: 'address',\n },\n ],\n name: 'balanceOf',\n outputs: [\n {\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'convertToAssets',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n name: 'convertToShares',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n {\n name: 'receiver',\n type: 'address',\n },\n ],\n name: 'deposit',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'caller',\n type: 'address',\n },\n ],\n name: 'maxDeposit',\n outputs: [\n {\n name: 'maxAssets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'caller',\n type: 'address',\n },\n ],\n name: 'maxMint',\n outputs: [\n {\n name: 'maxShares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n ],\n name: 'maxRedeem',\n outputs: [\n {\n name: 'maxShares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n ],\n name: 'maxWithdraw',\n outputs: [\n {\n name: 'maxAssets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n {\n name: 'receiver',\n type: 'address',\n },\n ],\n name: 'mint',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n name: 'previewDeposit',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'previewMint',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'previewRedeem',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n name: 'previewWithdraw',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n {\n name: 'receiver',\n type: 'address',\n },\n {\n name: 'owner',\n type: 'address',\n },\n ],\n name: 'redeem',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'totalAssets',\n outputs: [\n {\n name: 'totalManagedAssets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'totalSupply',\n outputs: [\n {\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'to',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n name: 'transfer',\n outputs: [\n {\n type: 'bool',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'from',\n type: 'address',\n },\n {\n name: 'to',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n name: 'transferFrom',\n outputs: [\n {\n type: 'bool',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n {\n name: 'receiver',\n type: 'address',\n },\n {\n name: 'owner',\n type: 'address',\n },\n ],\n name: 'withdraw',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n];\n//# sourceMappingURL=abis.js.map","import { InvalidBytesBooleanError } from '../../errors/encoding.js';\nimport { trim } from '../data/trim.js';\nimport { assertSize, hexToBigInt, hexToNumber, } from './fromHex.js';\nimport { bytesToHex } from './toHex.js';\n/**\n * Decodes a byte array into a UTF-8 string, hex value, number, bigint or boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes\n * - Example: https://viem.sh/docs/utilities/fromBytes#usage\n *\n * @param bytes Byte array to decode.\n * @param toOrOpts Type to convert to or options.\n * @returns Decoded value.\n *\n * @example\n * import { fromBytes } from 'viem'\n * const data = fromBytes(new Uint8Array([1, 164]), 'number')\n * // 420\n *\n * @example\n * import { fromBytes } from 'viem'\n * const data = fromBytes(\n * new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]),\n * 'string'\n * )\n * // 'Hello world'\n */\nexport function fromBytes(bytes, toOrOpts) {\n const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === 'number')\n return bytesToNumber(bytes, opts);\n if (to === 'bigint')\n return bytesToBigInt(bytes, opts);\n if (to === 'boolean')\n return bytesToBool(bytes, opts);\n if (to === 'string')\n return bytesToString(bytes, opts);\n return bytesToHex(bytes, opts);\n}\n/**\n * Decodes a byte array into a bigint.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestobigint\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns BigInt value.\n *\n * @example\n * import { bytesToBigInt } from 'viem'\n * const data = bytesToBigInt(new Uint8Array([1, 164]))\n * // 420n\n */\nexport function bytesToBigInt(bytes, opts = {}) {\n if (typeof opts.size !== 'undefined')\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToBigInt(hex, opts);\n}\n/**\n * Decodes a byte array into a boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestobool\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns Boolean value.\n *\n * @example\n * import { bytesToBool } from 'viem'\n * const data = bytesToBool(new Uint8Array([1]))\n * // true\n */\nexport function bytesToBool(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== 'undefined') {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes);\n }\n if (bytes.length > 1 || bytes[0] > 1)\n throw new InvalidBytesBooleanError(bytes);\n return Boolean(bytes[0]);\n}\n/**\n * Decodes a byte array into a number.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestonumber\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns Number value.\n *\n * @example\n * import { bytesToNumber } from 'viem'\n * const data = bytesToNumber(new Uint8Array([1, 164]))\n * // 420\n */\nexport function bytesToNumber(bytes, opts = {}) {\n if (typeof opts.size !== 'undefined')\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToNumber(hex, opts);\n}\n/**\n * Decodes a byte array into a UTF-8 string.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestostring\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns String value.\n *\n * @example\n * import { bytesToString } from 'viem'\n * const data = bytesToString(new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))\n * // 'Hello world'\n */\nexport function bytesToString(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== 'undefined') {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: 'right' });\n }\n return new TextDecoder().decode(bytes);\n}\n//# sourceMappingURL=fromBytes.js.map","import { AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, InvalidAbiDecodingTypeError, } from '../../errors/abi.js';\nimport { checksumAddress, } from '../address/getAddress.js';\nimport { createCursor, } from '../cursor.js';\nimport { size } from '../data/size.js';\nimport { sliceBytes } from '../data/slice.js';\nimport { trim } from '../data/trim.js';\nimport { bytesToBigInt, bytesToBool, bytesToNumber, bytesToString, } from '../encoding/fromBytes.js';\nimport { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\nimport { getArrayComponents } from './encodeAbiParameters.js';\nexport function decodeAbiParameters(params, data) {\n const bytes = typeof data === 'string' ? hexToBytes(data) : data;\n const cursor = createCursor(bytes);\n if (size(bytes) === 0 && params.length > 0)\n throw new AbiDecodingZeroDataError();\n if (size(data) && size(data) < 32)\n throw new AbiDecodingDataSizeTooSmallError({\n data: typeof data === 'string' ? data : bytesToHex(data),\n params: params,\n size: size(data),\n });\n let consumed = 0;\n const values = [];\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n cursor.setPosition(consumed);\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: 0,\n });\n consumed += consumed_;\n values.push(data);\n }\n return values;\n}\nfunction decodeParameter(cursor, param, { staticPosition }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return decodeArray(cursor, { ...param, type }, { length, staticPosition });\n }\n if (param.type === 'tuple')\n return decodeTuple(cursor, param, { staticPosition });\n if (param.type === 'address')\n return decodeAddress(cursor);\n if (param.type === 'bool')\n return decodeBool(cursor);\n if (param.type.startsWith('bytes'))\n return decodeBytes(cursor, param, { staticPosition });\n if (param.type.startsWith('uint') || param.type.startsWith('int'))\n return decodeNumber(cursor, param);\n if (param.type === 'string')\n return decodeString(cursor, { staticPosition });\n throw new InvalidAbiDecodingTypeError(param.type, {\n docsPath: '/docs/contract/decodeAbiParameters',\n });\n}\n////////////////////////////////////////////////////////////////////\n// Type Decoders\nconst sizeOfLength = 32;\nconst sizeOfOffset = 32;\nfunction decodeAddress(cursor) {\n const value = cursor.readBytes(32);\n return [checksumAddress(bytesToHex(sliceBytes(value, -20))), 32];\n}\nfunction decodeArray(cursor, param, { length, staticPosition }) {\n // If the length of the array is not known in advance (dynamic array),\n // this means we will need to wonder off to the pointer and decode.\n if (!length) {\n // Dealing with a dynamic type, so get the offset of the array data.\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n // Start is the static position of current slot + offset.\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength;\n // Get the length of the array from the offset.\n cursor.setPosition(start);\n const length = bytesToNumber(cursor.readBytes(sizeOfLength));\n // Check if the array has any dynamic children.\n const dynamicChild = hasDynamicChild(param);\n let consumed = 0;\n const value = [];\n for (let i = 0; i < length; ++i) {\n // If any of the children is dynamic, then all elements will be offset pointer, thus size of one slot (32 bytes).\n // Otherwise, elements will be the size of their encoding (consumed bytes).\n cursor.setPosition(startOfData + (dynamicChild ? i * 32 : consumed));\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: startOfData,\n });\n consumed += consumed_;\n value.push(data);\n }\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n // If the length of the array is known in advance,\n // and the length of an element deeply nested in the array is not known,\n // we need to decode the offset of the array data.\n if (hasDynamicChild(param)) {\n // Dealing with dynamic types, so get the offset of the array data.\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n // Start is the static position of current slot + offset.\n const start = staticPosition + offset;\n const value = [];\n for (let i = 0; i < length; ++i) {\n // Move cursor along to the next slot (next offset pointer).\n cursor.setPosition(start + i * 32);\n const [data] = decodeParameter(cursor, param, {\n staticPosition: start,\n });\n value.push(data);\n }\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n // If the length of the array is known in advance and the array is deeply static,\n // then we can just decode each element in sequence.\n let consumed = 0;\n const value = [];\n for (let i = 0; i < length; ++i) {\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: staticPosition + consumed,\n });\n consumed += consumed_;\n value.push(data);\n }\n return [value, consumed];\n}\nfunction decodeBool(cursor) {\n return [bytesToBool(cursor.readBytes(32), { size: 32 }), 32];\n}\nfunction decodeBytes(cursor, param, { staticPosition }) {\n const [_, size] = param.type.split('bytes');\n if (!size) {\n // Dealing with dynamic types, so get the offset of the bytes data.\n const offset = bytesToNumber(cursor.readBytes(32));\n // Set position of the cursor to start of bytes data.\n cursor.setPosition(staticPosition + offset);\n const length = bytesToNumber(cursor.readBytes(32));\n // If there is no length, we have zero data.\n if (length === 0) {\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return ['0x', 32];\n }\n const data = cursor.readBytes(length);\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [bytesToHex(data), 32];\n }\n const value = bytesToHex(cursor.readBytes(Number.parseInt(size), 32));\n return [value, 32];\n}\nfunction decodeNumber(cursor, param) {\n const signed = param.type.startsWith('int');\n const size = Number.parseInt(param.type.split('int')[1] || '256');\n const value = cursor.readBytes(32);\n return [\n size > 48\n ? bytesToBigInt(value, { signed })\n : bytesToNumber(value, { signed }),\n 32,\n ];\n}\nfunction decodeTuple(cursor, param, { staticPosition }) {\n // Tuples can have unnamed components (i.e. they are arrays), so we must\n // determine whether the tuple is named or unnamed. In the case of a named\n // tuple, the value will be an object where each property is the name of the\n // component. In the case of an unnamed tuple, the value will be an array.\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n // Initialize the value to an object or an array, depending on whether the\n // tuple is named or unnamed.\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n // If the tuple has a dynamic child, we must first decode the offset to the\n // tuple data.\n if (hasDynamicChild(param)) {\n // Dealing with dynamic types, so get the offset of the tuple data.\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n // Start is the static position of referencing slot + offset.\n const start = staticPosition + offset;\n for (let i = 0; i < param.components.length; ++i) {\n const component = param.components[i];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition: start,\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i : component?.name] = data;\n }\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n // If the tuple has static children, we can just decode each component\n // in sequence.\n for (let i = 0; i < param.components.length; ++i) {\n const component = param.components[i];\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition,\n });\n value[hasUnnamedChild ? i : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n}\nfunction decodeString(cursor, { staticPosition }) {\n // Get offset to start of string data.\n const offset = bytesToNumber(cursor.readBytes(32));\n // Start is the static position of current slot + offset.\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length = bytesToNumber(cursor.readBytes(32));\n // If there is no length, we have zero data (empty string).\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return ['', 32];\n }\n const data = cursor.readBytes(length, 32);\n const value = bytesToString(trim(data));\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n}\nfunction hasDynamicChild(param) {\n const { type } = param;\n if (type === 'string')\n return true;\n if (type === 'bytes')\n return true;\n if (type.endsWith('[]'))\n return true;\n if (type === 'tuple')\n return param.components?.some(hasDynamicChild);\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents &&\n hasDynamicChild({ ...param, type: arrayComponents[1] }))\n return true;\n return false;\n}\n//# sourceMappingURL=decodeAbiParameters.js.map","import { toBytes } from '../encoding/toBytes.js';\nimport { keccak256 } from './keccak256.js';\nconst hash = (value) => keccak256(toBytes(value));\nexport function hashSignature(sig) {\n return hash(sig);\n}\n//# sourceMappingURL=hashSignature.js.map","export const version = '1.0.8';\n//# sourceMappingURL=version.js.map","import { version } from './version.js';\nexport class BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = args.cause instanceof BaseError\n ? args.cause.details\n : args.cause?.message\n ? args.cause.message\n : args.details;\n const docsPath = args.cause instanceof BaseError\n ? args.cause.docsPath || args.docsPath\n : args.docsPath;\n const message = [\n shortMessage || 'An error occurred.',\n '',\n ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n ...(docsPath ? [`Docs: https://abitype.dev${docsPath}`] : []),\n ...(details ? [`Details: ${details}`] : []),\n `Version: abitype@${version}`,\n ].join('\\n');\n super(message);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiTypeError'\n });\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n}\n//# sourceMappingURL=errors.js.map","// TODO: This looks cool. Need to check the performance of `new RegExp` versus defined inline though.\n// https://twitter.com/GabrielVergnaud/status/1622906834343366657\nexport function execTyped(regex, string) {\n const match = regex.exec(string);\n return match?.groups;\n}\n// `bytes<M>`: binary type of `M` bytes, `0 < M <= 32`\n// https://regexr.com/6va55\nexport const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n// `(u)int<M>`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n// https://regexr.com/6v8hp\nexport const integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\nexport const isTupleRegex = /^\\(.+?\\).*?$/;\n//# sourceMappingURL=regex.js.map","import { execTyped } from '../regex.js';\n// https://regexr.com/7f7rv\nconst tupleRegex = /^tuple(?<array>(\\[(\\d*)\\])*)$/;\n/**\n * Formats {@link AbiParameter} to human-readable ABI parameter.\n *\n * @param abiParameter - ABI parameter\n * @returns Human-readable ABI parameter\n *\n * @example\n * const result = formatAbiParameter({ type: 'address', name: 'from' })\n * // ^? const result: 'address from'\n */\nexport function formatAbiParameter(abiParameter) {\n let type = abiParameter.type;\n if (tupleRegex.test(abiParameter.type) && 'components' in abiParameter) {\n type = '(';\n const length = abiParameter.components.length;\n for (let i = 0; i < length; i++) {\n const component = abiParameter.components[i];\n type += formatAbiParameter(component);\n if (i < length - 1)\n type += ', ';\n }\n const result = execTyped(tupleRegex, abiParameter.type);\n type += `)${result?.array ?? ''}`;\n return formatAbiParameter({\n ...abiParameter,\n type,\n });\n }\n // Add `indexed` to type if in `abiParameter`\n if ('indexed' in abiParameter && abiParameter.indexed)\n type = `${type} indexed`;\n // Return human-readable ABI parameter\n if (abiParameter.name)\n return `${type} ${abiParameter.name}`;\n return type;\n}\n//# sourceMappingURL=formatAbiParameter.js.map","import { formatAbiParameter, } from './formatAbiParameter.js';\n/**\n * Formats {@link AbiParameter}s to human-readable ABI parameters.\n *\n * @param abiParameters - ABI parameters\n * @returns Human-readable ABI parameters\n *\n * @example\n * const result = formatAbiParameters([\n * // ^? const result: 'address from, uint256 tokenId'\n * { type: 'address', name: 'from' },\n * { type: 'uint256', name: 'tokenId' },\n * ])\n */\nexport function formatAbiParameters(abiParameters) {\n let params = '';\n const length = abiParameters.length;\n for (let i = 0; i < length; i++) {\n const abiParameter = abiParameters[i];\n params += formatAbiParameter(abiParameter);\n if (i !== length - 1)\n params += ', ';\n }\n return params;\n}\n//# sourceMappingURL=formatAbiParameters.js.map","import { formatAbiParameters, } from './formatAbiParameters.js';\n/**\n * Formats ABI item (e.g. error, event, function) into human-readable ABI item\n *\n * @param abiItem - ABI item\n * @returns Human-readable ABI item\n */\nexport function formatAbiItem(abiItem) {\n if (abiItem.type === 'function')\n return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== 'nonpayable'\n ? ` ${abiItem.stateMutability}`\n : ''}${abiItem.outputs?.length\n ? ` returns (${formatAbiParameters(abiItem.outputs)})`\n : ''}`;\n if (abiItem.type === 'event')\n return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === 'error')\n return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === 'constructor')\n return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === 'payable' ? ' payable' : ''}`;\n if (abiItem.type === 'fallback')\n return `fallback() external${abiItem.stateMutability === 'payable' ? ' payable' : ''}`;\n return 'receive() external payable';\n}\n//# sourceMappingURL=formatAbiItem.js.map","import { execTyped } from '../../regex.js';\n// https://regexr.com/7gmok\nconst errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isErrorSignature(signature) {\n return errorSignatureRegex.test(signature);\n}\nexport function execErrorSignature(signature) {\n return execTyped(errorSignatureRegex, signature);\n}\n// https://regexr.com/7gmoq\nconst eventSignatureRegex = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isEventSignature(signature) {\n return eventSignatureRegex.test(signature);\n}\nexport function execEventSignature(signature) {\n return execTyped(eventSignatureRegex, signature);\n}\n// https://regexr.com/7gmot\nconst functionSignatureRegex = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?<returns>.*?)\\))?$/;\nexport function isFunctionSignature(signature) {\n return functionSignatureRegex.test(signature);\n}\nexport function execFunctionSignature(signature) {\n return execTyped(functionSignatureRegex, signature);\n}\n// https://regexr.com/7gmp3\nconst structSignatureRegex = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?<properties>.*?)\\}$/;\nexport function isStructSignature(signature) {\n return structSignatureRegex.test(signature);\n}\nexport function execStructSignature(signature) {\n return execTyped(structSignatureRegex, signature);\n}\n// https://regexr.com/78u01\nconst constructorSignatureRegex = /^constructor\\((?<parameters>.*?)\\)(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isConstructorSignature(signature) {\n return constructorSignatureRegex.test(signature);\n}\nexport function execConstructorSignature(signature) {\n return execTyped(constructorSignatureRegex, signature);\n}\n// https://regexr.com/7srtn\nconst fallbackSignatureRegex = /^fallback\\(\\) external(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isFallbackSignature(signature) {\n return fallbackSignatureRegex.test(signature);\n}\nexport function execFallbackSignature(signature) {\n return execTyped(fallbackSignatureRegex, signature);\n}\n// https://regexr.com/78u1k\nconst receiveSignatureRegex = /^receive\\(\\) external payable$/;\nexport function isReceiveSignature(signature) {\n return receiveSignatureRegex.test(signature);\n}\nexport const modifiers = new Set([\n 'memory',\n 'indexed',\n 'storage',\n 'calldata',\n]);\nexport const eventModifiers = new Set(['indexed']);\nexport const functionModifiers = new Set([\n 'calldata',\n 'memory',\n 'storage',\n]);\n//# sourceMappingURL=signatures.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiItemError extends BaseError {\n constructor({ signature }) {\n super('Failed to parse ABI item.', {\n details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n docsPath: '/api/human#parseabiitem-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiItemError'\n });\n }\n}\nexport class UnknownTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [\n `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownTypeError'\n });\n }\n}\nexport class UnknownSolidityTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [`Type \"${type}\" is not a valid ABI type.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSolidityTypeError'\n });\n }\n}\n//# sourceMappingURL=abiItem.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiParameterError extends BaseError {\n constructor({ param }) {\n super('Failed to parse ABI parameter.', {\n details: `parseAbiParameter(${JSON.stringify(param, null, 2)})`,\n docsPath: '/api/human#parseabiparameter-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParameterError'\n });\n }\n}\nexport class InvalidAbiParametersError extends BaseError {\n constructor({ params }) {\n super('Failed to parse ABI parameters.', {\n details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n docsPath: '/api/human#parseabiparameters-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParametersError'\n });\n }\n}\nexport class InvalidParameterError extends BaseError {\n constructor({ param }) {\n super('Invalid ABI parameter.', {\n details: param,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParameterError'\n });\n }\n}\nexport class SolidityProtectedKeywordError extends BaseError {\n constructor({ param, name }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SolidityProtectedKeywordError'\n });\n }\n}\nexport class InvalidModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidModifierError'\n });\n }\n}\nexport class InvalidFunctionModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidFunctionModifierError'\n });\n }\n}\nexport class InvalidAbiTypeParameterError extends BaseError {\n constructor({ abiParameter, }) {\n super('Invalid ABI parameter.', {\n details: JSON.stringify(abiParameter, null, 2),\n metaMessages: ['ABI parameter type is invalid.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiTypeParameterError'\n });\n }\n}\n//# sourceMappingURL=abiParameter.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidSignatureError extends BaseError {\n constructor({ signature, type, }) {\n super(`Invalid ${type} signature.`, {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidSignatureError'\n });\n }\n}\nexport class UnknownSignatureError extends BaseError {\n constructor({ signature }) {\n super('Unknown signature.', {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSignatureError'\n });\n }\n}\nexport class InvalidStructSignatureError extends BaseError {\n constructor({ signature }) {\n super('Invalid struct signature.', {\n details: signature,\n metaMessages: ['No properties exist.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidStructSignatureError'\n });\n }\n}\n//# sourceMappingURL=signature.js.map","import { BaseError } from '../../errors.js';\nexport class CircularReferenceError extends BaseError {\n constructor({ type }) {\n super('Circular reference detected.', {\n metaMessages: [`Struct \"${type}\" is a circular reference.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'CircularReferenceError'\n });\n }\n}\n//# sourceMappingURL=struct.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidParenthesisError extends BaseError {\n constructor({ current, depth }) {\n super('Unbalanced parentheses.', {\n metaMessages: [\n `\"${current.trim()}\" has too many ${depth > 0 ? 'opening' : 'closing'} parentheses.`,\n ],\n details: `Depth \"${depth}\"`,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParenthesisError'\n });\n }\n}\n//# sourceMappingURL=splitParameters.js.map","/**\n * Gets {@link parameterCache} cache key namespaced by {@link type}. This prevents parameters from being accessible to types that don't allow them (e.g. `string indexed foo` not allowed outside of `type: 'event'`).\n * @param param ABI parameter string\n * @param type ABI parameter type\n * @returns Cache key for {@link parameterCache}\n */\nexport function getParameterCacheKey(param, type, structs) {\n let structKey = '';\n if (structs)\n for (const struct of Object.entries(structs)) {\n if (!struct)\n continue;\n let propertyKey = '';\n for (const property of struct[1]) {\n propertyKey += `[${property.type}${property.name ? `:${property.name}` : ''}]`;\n }\n structKey += `(${struct[0]}{${propertyKey}})`;\n }\n if (type)\n return `${type}:${param}${structKey}`;\n return param;\n}\n/**\n * Basic cache seeded with common ABI parameter strings.\n *\n * **Note: When seeding more parameters, make sure you benchmark performance. The current number is the ideal balance between performance and having an already existing cache.**\n */\nexport const parameterCache = new Map([\n // Unnamed\n ['address', { type: 'address' }],\n ['bool', { type: 'bool' }],\n ['bytes', { type: 'bytes' }],\n ['bytes32', { type: 'bytes32' }],\n ['int', { type: 'int256' }],\n ['int256', { type: 'int256' }],\n ['string', { type: 'string' }],\n ['uint', { type: 'uint256' }],\n ['uint8', { type: 'uint8' }],\n ['uint16', { type: 'uint16' }],\n ['uint24', { type: 'uint24' }],\n ['uint32', { type: 'uint32' }],\n ['uint64', { type: 'uint64' }],\n ['uint96', { type: 'uint96' }],\n ['uint112', { type: 'uint112' }],\n ['uint160', { type: 'uint160' }],\n ['uint192', { type: 'uint192' }],\n ['uint256', { type: 'uint256' }],\n // Named\n ['address owner', { type: 'address', name: 'owner' }],\n ['address to', { type: 'address', name: 'to' }],\n ['bool approved', { type: 'bool', name: 'approved' }],\n ['bytes _data', { type: 'bytes', name: '_data' }],\n ['bytes data', { type: 'bytes', name: 'data' }],\n ['bytes signature', { type: 'bytes', name: 'signature' }],\n ['bytes32 hash', { type: 'bytes32', name: 'hash' }],\n ['bytes32 r', { type: 'bytes32', name: 'r' }],\n ['bytes32 root', { type: 'bytes32', name: 'root' }],\n ['bytes32 s', { type: 'bytes32', name: 's' }],\n ['string name', { type: 'string', name: 'name' }],\n ['string symbol', { type: 'string', name: 'symbol' }],\n ['string tokenURI', { type: 'string', name: 'tokenURI' }],\n ['uint tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint8 v', { type: 'uint8', name: 'v' }],\n ['uint256 balance', { type: 'uint256', name: 'balance' }],\n ['uint256 tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint256 value', { type: 'uint256', name: 'value' }],\n // Indexed\n [\n 'event:address indexed from',\n { type: 'address', name: 'from', indexed: true },\n ],\n ['event:address indexed to', { type: 'address', name: 'to', indexed: true }],\n [\n 'event:uint indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n [\n 'event:uint256 indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n]);\n//# sourceMappingURL=cache.js.map","import { bytesRegex, execTyped, integerRegex, isTupleRegex, } from '../../regex.js';\nimport { UnknownSolidityTypeError } from '../errors/abiItem.js';\nimport { InvalidFunctionModifierError, InvalidModifierError, InvalidParameterError, SolidityProtectedKeywordError, } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, UnknownSignatureError, } from '../errors/signature.js';\nimport { InvalidParenthesisError } from '../errors/splitParameters.js';\nimport { getParameterCacheKey, parameterCache } from './cache.js';\nimport { eventModifiers, execConstructorSignature, execErrorSignature, execEventSignature, execFallbackSignature, execFunctionSignature, functionModifiers, isConstructorSignature, isErrorSignature, isEventSignature, isFallbackSignature, isFunctionSignature, isReceiveSignature, } from './signatures.js';\nexport function parseSignature(signature, structs = {}) {\n if (isFunctionSignature(signature))\n return parseFunctionSignature(signature, structs);\n if (isEventSignature(signature))\n return parseEventSignature(signature, structs);\n if (isErrorSignature(signature))\n return parseErrorSignature(signature, structs);\n if (isConstructorSignature(signature))\n return parseConstructorSignature(signature, structs);\n if (isFallbackSignature(signature))\n return parseFallbackSignature(signature);\n if (isReceiveSignature(signature))\n return {\n type: 'receive',\n stateMutability: 'payable',\n };\n throw new UnknownSignatureError({ signature });\n}\nexport function parseFunctionSignature(signature, structs = {}) {\n const match = execFunctionSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'function' });\n const inputParams = splitParameters(match.parameters);\n const inputs = [];\n const inputLength = inputParams.length;\n for (let i = 0; i < inputLength; i++) {\n inputs.push(parseAbiParameter(inputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n const outputs = [];\n if (match.returns) {\n const outputParams = splitParameters(match.returns);\n const outputLength = outputParams.length;\n for (let i = 0; i < outputLength; i++) {\n outputs.push(parseAbiParameter(outputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n }\n return {\n name: match.name,\n type: 'function',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs,\n outputs,\n };\n}\nexport function parseEventSignature(signature, structs = {}) {\n const match = execEventSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'event' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], {\n modifiers: eventModifiers,\n structs,\n type: 'event',\n }));\n return { name: match.name, type: 'event', inputs: abiParameters };\n}\nexport function parseErrorSignature(signature, structs = {}) {\n const match = execErrorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'error' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'error' }));\n return { name: match.name, type: 'error', inputs: abiParameters };\n}\nexport function parseConstructorSignature(signature, structs = {}) {\n const match = execConstructorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'constructor' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'constructor' }));\n return {\n type: 'constructor',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs: abiParameters,\n };\n}\nexport function parseFallbackSignature(signature) {\n const match = execFallbackSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'fallback' });\n return {\n type: 'fallback',\n stateMutability: match.stateMutability ?? 'nonpayable',\n };\n}\nconst abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst abiParameterWithTupleRegex = /^\\((?<type>.+?)\\)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst dynamicIntegerRegex = /^u?int$/;\nexport function parseAbiParameter(param, options) {\n // optional namespace cache by `type`\n const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);\n if (parameterCache.has(parameterCacheKey))\n return parameterCache.get(parameterCacheKey);\n const isTuple = isTupleRegex.test(param);\n const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n if (!match)\n throw new InvalidParameterError({ param });\n if (match.name && isSolidityKeyword(match.name))\n throw new SolidityProtectedKeywordError({ param, name: match.name });\n const name = match.name ? { name: match.name } : {};\n const indexed = match.modifier === 'indexed' ? { indexed: true } : {};\n const structs = options?.structs ?? {};\n let type;\n let components = {};\n if (isTuple) {\n type = 'tuple';\n const params = splitParameters(match.type);\n const components_ = [];\n const length = params.length;\n for (let i = 0; i < length; i++) {\n // remove `modifiers` from `options` to prevent from being added to tuple components\n components_.push(parseAbiParameter(params[i], { structs }));\n }\n components = { components: components_ };\n }\n else if (match.type in structs) {\n type = 'tuple';\n components = { components: structs[match.type] };\n }\n else if (dynamicIntegerRegex.test(match.type)) {\n type = `${match.type}256`;\n }\n else {\n type = match.type;\n if (!(options?.type === 'struct') && !isSolidityType(type))\n throw new UnknownSolidityTypeError({ type });\n }\n if (match.modifier) {\n // Check if modifier exists, but is not allowed (e.g. `indexed` in `functionModifiers`)\n if (!options?.modifiers?.has?.(match.modifier))\n throw new InvalidModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n // Check if resolved `type` is valid if there is a function modifier\n if (functionModifiers.has(match.modifier) &&\n !isValidDataLocation(type, !!match.array))\n throw new InvalidFunctionModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n }\n const abiParameter = {\n type: `${type}${match.array ?? ''}`,\n ...name,\n ...indexed,\n ...components,\n };\n parameterCache.set(parameterCacheKey, abiParameter);\n return abiParameter;\n}\n// s/o latika for this\nexport function splitParameters(params, result = [], current = '', depth = 0) {\n const length = params.trim().length;\n // biome-ignore lint/correctness/noUnreachable: recursive\n for (let i = 0; i < length; i++) {\n const char = params[i];\n const tail = params.slice(i + 1);\n switch (char) {\n case ',':\n return depth === 0\n ? splitParameters(tail, [...result, current.trim()])\n : splitParameters(tail, result, `${current}${char}`, depth);\n case '(':\n return splitParameters(tail, result, `${current}${char}`, depth + 1);\n case ')':\n return splitParameters(tail, result, `${current}${char}`, depth - 1);\n default:\n return splitParameters(tail, result, `${current}${char}`, depth);\n }\n }\n if (current === '')\n return result;\n if (depth !== 0)\n throw new InvalidParenthesisError({ current, depth });\n result.push(current.trim());\n return result;\n}\nexport function isSolidityType(type) {\n return (type === 'address' ||\n type === 'bool' ||\n type === 'function' ||\n type === 'string' ||\n bytesRegex.test(type) ||\n integerRegex.test(type));\n}\nconst protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\n/** @internal */\nexport function isSolidityKeyword(name) {\n return (name === 'address' ||\n name === 'bool' ||\n name === 'function' ||\n name === 'string' ||\n name === 'tuple' ||\n bytesRegex.test(name) ||\n integerRegex.test(name) ||\n protectedKeywordsRegex.test(name));\n}\n/** @internal */\nexport function isValidDataLocation(type, isArray) {\n return isArray || type === 'bytes' || type === 'string' || type === 'tuple';\n}\n//# sourceMappingURL=utils.js.map","import { execTyped, isTupleRegex } from '../../regex.js';\nimport { UnknownTypeError } from '../errors/abiItem.js';\nimport { InvalidAbiTypeParameterError } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, InvalidStructSignatureError, } from '../errors/signature.js';\nimport { CircularReferenceError } from '../errors/struct.js';\nimport { execStructSignature, isStructSignature } from './signatures.js';\nimport { isSolidityType, parseAbiParameter } from './utils.js';\nexport function parseStructs(signatures) {\n // Create \"shallow\" version of each struct (and filter out non-structs or invalid structs)\n const shallowStructs = {};\n const signaturesLength = signatures.length;\n for (let i = 0; i < signaturesLength; i++) {\n const signature = signatures[i];\n if (!isStructSignature(signature))\n continue;\n const match = execStructSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'struct' });\n const properties = match.properties.split(';');\n const components = [];\n const propertiesLength = properties.length;\n for (let k = 0; k < propertiesLength; k++) {\n const property = properties[k];\n const trimmed = property.trim();\n if (!trimmed)\n continue;\n const abiParameter = parseAbiParameter(trimmed, {\n type: 'struct',\n });\n components.push(abiParameter);\n }\n if (!components.length)\n throw new InvalidStructSignatureError({ signature });\n shallowStructs[match.name] = components;\n }\n // Resolve nested structs inside each parameter\n const resolvedStructs = {};\n const entries = Object.entries(shallowStructs);\n const entriesLength = entries.length;\n for (let i = 0; i < entriesLength; i++) {\n const [name, parameters] = entries[i];\n resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n }\n return resolvedStructs;\n}\nconst typeWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\\[\\d*?\\])+?)?$/;\nfunction resolveStructs(abiParameters, structs, ancestors = new Set()) {\n const components = [];\n const length = abiParameters.length;\n for (let i = 0; i < length; i++) {\n const abiParameter = abiParameters[i];\n const isTuple = isTupleRegex.test(abiParameter.type);\n if (isTuple)\n components.push(abiParameter);\n else {\n const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n if (!match?.type)\n throw new InvalidAbiTypeParameterError({ abiParameter });\n const { array, type } = match;\n if (type in structs) {\n if (ancestors.has(type))\n throw new CircularReferenceError({ type });\n components.push({\n ...abiParameter,\n type: `tuple${array ?? ''}`,\n components: resolveStructs(structs[type] ?? [], structs, new Set([...ancestors, type])),\n });\n }\n else {\n if (isSolidityType(type))\n components.push(abiParameter);\n else\n throw new UnknownTypeError({ type });\n }\n }\n }\n return components;\n}\n//# sourceMappingURL=structs.js.map","import { isStructSignature } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { parseSignature } from './runtime/utils.js';\n/**\n * Parses human-readable ABI into JSON {@link Abi}\n *\n * @param signatures - Human-Readable ABI\n * @returns Parsed {@link Abi}\n *\n * @example\n * const abi = parseAbi([\n * // ^? const abi: readonly [{ name: \"balanceOf\"; type: \"function\"; stateMutability:...\n * 'function balanceOf(address owner) view returns (uint256)',\n * 'event Transfer(address indexed from, address indexed to, uint256 amount)',\n * ])\n */\nexport function parseAbi(signatures) {\n const structs = parseStructs(signatures);\n const abi = [];\n const length = signatures.length;\n for (let i = 0; i < length; i++) {\n const signature = signatures[i];\n if (isStructSignature(signature))\n continue;\n abi.push(parseSignature(signature, structs));\n }\n return abi;\n}\n//# sourceMappingURL=parseAbi.js.map","import { BaseError } from '../../errors/base.js';\nexport function normalizeSignature(signature) {\n let active = true;\n let current = '';\n let level = 0;\n let result = '';\n let valid = false;\n for (let i = 0; i < signature.length; i++) {\n const char = signature[i];\n // If the character is a separator, we want to reactivate.\n if (['(', ')', ','].includes(char))\n active = true;\n // If the character is a \"level\" token, we want to increment/decrement.\n if (char === '(')\n level++;\n if (char === ')')\n level--;\n // If we aren't active, we don't want to mutate the result.\n if (!active)\n continue;\n // If level === 0, we are at the definition level.\n if (level === 0) {\n if (char === ' ' && ['event', 'function', ''].includes(result))\n result = '';\n else {\n result += char;\n // If we are at the end of the definition, we must be finished.\n if (char === ')') {\n valid = true;\n break;\n }\n }\n continue;\n }\n // Ignore spaces\n if (char === ' ') {\n // If the previous character is a separator, and the current section isn't empty, we want to deactivate.\n if (signature[i - 1] !== ',' && current !== ',' && current !== ',(') {\n current = '';\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError('Unable to normalize signature.');\n return result;\n}\n//# sourceMappingURL=normalizeSignature.js.map","import { formatAbiItem } from 'abitype';\nimport { normalizeSignature, } from './normalizeSignature.js';\n/**\n * Returns the signature for a given function or event definition.\n *\n * @example\n * const signature = toSignature('function ownerOf(uint256 tokenId)')\n * // 'ownerOf(uint256)'\n *\n * @example\n * const signature_3 = toSignature({\n * name: 'ownerOf',\n * type: 'function',\n * inputs: [{ name: 'tokenId', type: 'uint256' }],\n * outputs: [],\n * stateMutability: 'view',\n * })\n * // 'ownerOf(uint256)'\n */\nexport const toSignature = (def) => {\n const def_ = (() => {\n if (typeof def === 'string')\n return def;\n return formatAbiItem(def);\n })();\n return normalizeSignature(def_);\n};\n//# sourceMappingURL=toSignature.js.map","import { hashSignature } from './hashSignature.js';\nimport { toSignature } from './toSignature.js';\n/**\n * Returns the hash (of the function/event signature) for a given event or function definition.\n */\nexport function toSignatureHash(fn) {\n return hashSignature(toSignature(fn));\n}\n//# sourceMappingURL=toSignatureHash.js.map","import { toSignatureHash, } from './toSignatureHash.js';\n/**\n * Returns the event selector for a given event definition.\n *\n * @example\n * const selector = toEventSelector('Transfer(address indexed from, address indexed to, uint256 amount)')\n * // 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\n */\nexport const toEventSelector = toSignatureHash;\n//# sourceMappingURL=toEventSelector.js.map","import { slice } from '../data/slice.js';\nimport { toSignatureHash, } from './toSignatureHash.js';\n/**\n * Returns the function selector for a given function definition.\n *\n * @example\n * const selector = toFunctionSelector('function ownerOf(uint256 tokenId)')\n * // 0x6352211e\n */\nexport const toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);\n//# sourceMappingURL=toFunctionSelector.js.map","import { AbiItemAmbiguityError, } from '../../errors/abi.js';\nimport { isHex } from '../../utils/data/isHex.js';\nimport { isAddress } from '../address/isAddress.js';\nimport { toEventSelector } from '../hash/toEventSelector.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nexport function getAbiItem(parameters) {\n const { abi, args = [], name } = parameters;\n const isSelector = isHex(name, { strict: false });\n const abiItems = abi.filter((abiItem) => {\n if (isSelector) {\n if (abiItem.type === 'function')\n return toFunctionSelector(abiItem) === name;\n if (abiItem.type === 'event')\n return toEventSelector(abiItem) === name;\n return false;\n }\n return 'name' in abiItem && abiItem.name === name;\n });\n if (abiItems.length === 0)\n return undefined;\n if (abiItems.length === 1)\n return abiItems[0];\n let matchedAbiItem = undefined;\n for (const abiItem of abiItems) {\n if (!('inputs' in abiItem))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem.inputs || abiItem.inputs.length === 0)\n return abiItem;\n continue;\n }\n if (!abiItem.inputs)\n continue;\n if (abiItem.inputs.length === 0)\n continue;\n if (abiItem.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index) => {\n const abiParameter = 'inputs' in abiItem && abiItem.inputs[index];\n if (!abiParameter)\n return false;\n return isArgOfType(arg, abiParameter);\n });\n if (matched) {\n // Check for ambiguity against already matched parameters (e.g. `address` vs `bytes20`).\n if (matchedAbiItem &&\n 'inputs' in matchedAbiItem &&\n matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes(abiItem.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AbiItemAmbiguityError({\n abiItem,\n type: ambiguousTypes[0],\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1],\n });\n }\n matchedAbiItem = abiItem;\n }\n }\n if (matchedAbiItem)\n return matchedAbiItem;\n return abiItems[0];\n}\n/** @internal */\nexport function isArgOfType(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case 'address':\n return isAddress(arg, { strict: false });\n case 'bool':\n return argType === 'boolean';\n case 'function':\n return argType === 'string';\n case 'string':\n return argType === 'string';\n default: {\n if (abiParameterType === 'tuple' && 'components' in abiParameter)\n return Object.values(abiParameter.components).every((component, index) => {\n return isArgOfType(Object.values(arg)[index], component);\n });\n // `(u)int<M>`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n // https://regexr.com/6v8hp\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === 'number' || argType === 'bigint';\n // `bytes<M>`: binary type of `M` bytes, `0 < M <= 32`\n // https://regexr.com/6va55\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === 'string' || arg instanceof Uint8Array;\n // fixed-length (`<type>[M]`) and dynamic (`<type>[]`) arrays\n // https://regexr.com/6va6i\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return (Array.isArray(arg) &&\n arg.every((x) => isArgOfType(x, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, ''),\n })));\n }\n return false;\n }\n }\n}\n/** @internal */\nexport function getAmbiguousTypes(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === 'tuple' &&\n targetParameter.type === 'tuple' &&\n 'components' in sourceParameter &&\n 'components' in targetParameter)\n return getAmbiguousTypes(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types.includes('address') && types.includes('bytes20'))\n return true;\n if (types.includes('address') && types.includes('string'))\n return isAddress(args[parameterIndex], { strict: false });\n if (types.includes('address') && types.includes('bytes'))\n return isAddress(args[parameterIndex], { strict: false });\n return false;\n })();\n if (ambiguous)\n return types;\n }\n return;\n}\n//# sourceMappingURL=getAbiItem.js.map","import { AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, } from '../../errors/abi.js';\nimport { decodeAbiParameters, } from './decodeAbiParameters.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/decodeFunctionResult';\nexport function decodeFunctionResult(parameters) {\n const { abi, args, functionName, data } = parameters;\n let abiItem = abi[0];\n if (functionName) {\n const item = getAbiItem({ abi, args, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== 'function')\n throw new AbiFunctionNotFoundError(undefined, { docsPath });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath });\n const values = decodeAbiParameters(abiItem.outputs, data);\n if (values && values.length > 1)\n return values;\n if (values && values.length === 1)\n return values[0];\n return undefined;\n}\n//# sourceMappingURL=decodeFunctionResult.js.map","import { AbiFunctionNotFoundError, } from '../../errors/abi.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/encodeFunctionData';\nexport function prepareEncodeFunctionData(parameters) {\n const { abi, args, functionName } = parameters;\n let abiItem = abi[0];\n if (functionName) {\n const item = getAbiItem({\n abi,\n args,\n name: functionName,\n });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== 'function')\n throw new AbiFunctionNotFoundError(undefined, { docsPath });\n return {\n abi: [abiItem],\n functionName: toFunctionSelector(formatAbiItem(abiItem)),\n };\n}\n//# sourceMappingURL=prepareEncodeFunctionData.js.map","import { concatHex } from '../data/concat.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nimport { prepareEncodeFunctionData } from './prepareEncodeFunctionData.js';\nexport function encodeFunctionData(parameters) {\n const { args } = parameters;\n const { abi, functionName } = (() => {\n if (parameters.abi.length === 1 &&\n parameters.functionName?.startsWith('0x'))\n return parameters;\n return prepareEncodeFunctionData(parameters);\n })();\n const abiItem = abi[0];\n const signature = functionName;\n const data = 'inputs' in abiItem && abiItem.inputs\n ? encodeAbiParameters(abiItem.inputs, args ?? [])\n : undefined;\n return concatHex([signature, data ?? '0x']);\n}\n//# sourceMappingURL=encodeFunctionData.js.map","import { ChainDoesNotSupportContract, } from '../../errors/chain.js';\nexport function getChainContractAddress({ blockNumber, chain, contract: name, }) {\n const contract = chain?.contracts?.[name];\n if (!contract)\n throw new ChainDoesNotSupportContract({\n chain,\n contract: { name },\n });\n if (blockNumber &&\n contract.blockCreated &&\n contract.blockCreated > blockNumber)\n throw new ChainDoesNotSupportContract({\n blockNumber,\n chain,\n contract: {\n name,\n blockCreated: contract.blockCreated,\n },\n });\n return contract.address;\n}\n//# sourceMappingURL=getChainContractAddress.js.map","// https://docs.soliditylang.org/en/v0.8.16/control-structures.html#panic-via-assert-and-error-via-require\nexport const panicReasons = {\n 1: 'An `assert` condition failed.',\n 17: 'Arithmetic operation resulted in underflow or overflow.',\n 18: 'Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).',\n 33: 'Attempted to convert to an invalid type.',\n 34: 'Attempted to access a storage byte array that is incorrectly encoded.',\n 49: 'Performed `.pop()` on an empty array',\n 50: 'Array index is out of bounds.',\n 65: 'Allocated too much memory or created an array which is too large.',\n 81: 'Attempted to call a zero-initialized variable of internal function type.',\n};\nexport const solidityError = {\n inputs: [\n {\n name: 'message',\n type: 'string',\n },\n ],\n name: 'Error',\n type: 'error',\n};\nexport const solidityPanic = {\n inputs: [\n {\n name: 'reason',\n type: 'uint256',\n },\n ],\n name: 'Panic',\n type: 'error',\n};\n//# sourceMappingURL=solidity.js.map","import { solidityError, solidityPanic } from '../../constants/solidity.js';\nimport { AbiDecodingZeroDataError, AbiErrorSignatureNotFoundError, } from '../../errors/abi.js';\nimport { slice } from '../data/slice.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nimport { decodeAbiParameters, } from './decodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nexport function decodeErrorResult(parameters) {\n const { abi, data } = parameters;\n const signature = slice(data, 0, 4);\n if (signature === '0x')\n throw new AbiDecodingZeroDataError();\n const abi_ = [...(abi || []), solidityError, solidityPanic];\n const abiItem = abi_.find((x) => x.type === 'error' && signature === toFunctionSelector(formatAbiItem(x)));\n if (!abiItem)\n throw new AbiErrorSignatureNotFoundError(signature, {\n docsPath: '/docs/contract/decodeErrorResult',\n });\n return {\n abiItem,\n args: 'inputs' in abiItem && abiItem.inputs && abiItem.inputs.length > 0\n ? decodeAbiParameters(abiItem.inputs, slice(data, 4))\n : undefined,\n errorName: abiItem.name,\n };\n}\n//# sourceMappingURL=decodeErrorResult.js.map","import { stringify } from '../stringify.js';\nexport function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false, }) {\n if (!('name' in abiItem))\n return;\n if (!('inputs' in abiItem))\n return;\n if (!abiItem.inputs)\n return;\n return `${includeFunctionName ? abiItem.name : ''}(${abiItem.inputs\n .map((input, i) => `${includeName && input.name ? `${input.name}: ` : ''}${typeof args[i] === 'object' ? stringify(args[i]) : args[i]}`)\n .join(', ')})`;\n}\n//# sourceMappingURL=formatAbiItemWithArgs.js.map","import { parseAccount } from '../accounts/utils/parseAccount.js';\nimport { panicReasons } from '../constants/solidity.js';\nimport { decodeErrorResult, } from '../utils/abi/decodeErrorResult.js';\nimport { formatAbiItem } from '../utils/abi/formatAbiItem.js';\nimport { formatAbiItemWithArgs } from '../utils/abi/formatAbiItemWithArgs.js';\nimport { getAbiItem } from '../utils/abi/getAbiItem.js';\nimport { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { AbiErrorSignatureNotFoundError } from './abi.js';\nimport { BaseError } from './base.js';\nimport { prettyStateOverride } from './stateOverride.js';\nimport { prettyPrint } from './transaction.js';\nimport { getContractAddress } from './utils.js';\nexport class CallExecutionError extends BaseError {\n constructor(cause, { account: account_, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, }) {\n const account = account_ ? parseAccount(account_) : undefined;\n let prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n if (stateOverride) {\n prettyArgs += `\\n${prettyStateOverride(stateOverride)}`;\n }\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Raw Call Arguments:',\n prettyArgs,\n ].filter(Boolean),\n name: 'CallExecutionError',\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n}\nexport class ContractFunctionExecutionError extends BaseError {\n constructor(cause, { abi, args, contractAddress, docsPath, functionName, sender, }) {\n const abiItem = getAbiItem({ abi, args, name: functionName });\n const formattedArgs = abiItem\n ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined;\n const functionWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined;\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args: formattedArgs &&\n formattedArgs !== '()' &&\n `${[...Array(functionName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`,\n sender,\n });\n super(cause.shortMessage ||\n `An unknown error occurred while executing the contract function \"${functionName}\".`, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n prettyArgs && 'Contract Call:',\n prettyArgs,\n ].filter(Boolean),\n name: 'ContractFunctionExecutionError',\n });\n Object.defineProperty(this, \"abi\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"args\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contractAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"formattedArgs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"functionName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"sender\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abi = abi;\n this.args = args;\n this.cause = cause;\n this.contractAddress = contractAddress;\n this.functionName = functionName;\n this.sender = sender;\n }\n}\nexport class ContractFunctionRevertedError extends BaseError {\n constructor({ abi, data, functionName, message, }) {\n let cause;\n let decodedData = undefined;\n let metaMessages;\n let reason;\n if (data && data !== '0x') {\n try {\n decodedData = decodeErrorResult({ abi, data });\n const { abiItem, errorName, args: errorArgs } = decodedData;\n if (errorName === 'Error') {\n reason = errorArgs[0];\n }\n else if (errorName === 'Panic') {\n const [firstArg] = errorArgs;\n reason = panicReasons[firstArg];\n }\n else {\n const errorWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined;\n const formattedArgs = abiItem && errorArgs\n ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined;\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : '',\n formattedArgs && formattedArgs !== '()'\n ? ` ${[...Array(errorName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`\n : '',\n ];\n }\n }\n catch (err) {\n cause = err;\n }\n }\n else if (message)\n reason = message;\n let signature;\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature;\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ];\n }\n super((reason && reason !== 'execution reverted') || signature\n ? [\n `The contract function \"${functionName}\" reverted with the following ${signature ? 'signature' : 'reason'}:`,\n reason || signature,\n ].join('\\n')\n : `The contract function \"${functionName}\" reverted.`, {\n cause,\n metaMessages,\n name: 'ContractFunctionRevertedError',\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"raw\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = decodedData;\n this.raw = data;\n this.reason = reason;\n this.signature = signature;\n }\n}\nexport class ContractFunctionZeroDataError extends BaseError {\n constructor({ functionName }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ` - The contract does not have the function \"${functionName}\",`,\n ' - The parameters passed to the contract function may be invalid, or',\n ' - The address is not a contract.',\n ],\n name: 'ContractFunctionZeroDataError',\n });\n }\n}\nexport class CounterfactualDeploymentFailedError extends BaseError {\n constructor({ factory }) {\n super(`Deployment for counterfactual contract call failed${factory ? ` for factory \"${factory}\".` : ''}`, {\n metaMessages: [\n 'Please ensure:',\n '- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).',\n '- The `factoryData` is a valid encoded function call for contract deployment function on the factory.',\n ],\n name: 'CounterfactualDeploymentFailedError',\n });\n }\n}\nexport class RawContractError extends BaseError {\n constructor({ data, message, }) {\n super(message || '', { name: 'RawContractError' });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n }\n}\n//# sourceMappingURL=contract.js.map","import { panicReasons } from '../../constants/solidity.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ContractFunctionRevertedError } from '../../errors/contract.js';\n/*\n * @description Checks if error is a valid null result UniversalResolver error\n */\nexport function isNullUniversalResolverError(err, callType) {\n if (!(err instanceof BaseError))\n return false;\n const cause = err.walk((e) => e instanceof ContractFunctionRevertedError);\n if (!(cause instanceof ContractFunctionRevertedError))\n return false;\n if (cause.data?.errorName === 'ResolverNotFound')\n return true;\n if (cause.data?.errorName === 'ResolverWildcardNotSupported')\n return true;\n if (cause.data?.errorName === 'ResolverNotContract')\n return true;\n if (cause.data?.errorName === 'ResolverError')\n return true;\n if (cause.data?.errorName === 'HttpError')\n return true;\n // Backwards compatibility for older UniversalResolver contracts\n if (cause.reason?.includes('Wildcard on non-extended resolvers is not supported'))\n return true;\n // No primary name set for address.\n if (callType === 'reverse' && cause.reason === panicReasons[50])\n return true;\n return false;\n}\n//# sourceMappingURL=errors.js.map","import { isHex } from '../data/isHex.js';\nexport function encodedLabelToLabelhash(label) {\n if (label.length !== 66)\n return null;\n if (label.indexOf('[') !== 0)\n return null;\n if (label.indexOf(']') !== 65)\n return null;\n const hash = `0x${label.slice(1, 65)}`;\n if (!isHex(hash))\n return null;\n return hash;\n}\n//# sourceMappingURL=encodedLabelToLabelhash.js.map","import { concat } from '../data/concat.js';\nimport { stringToBytes, toBytes, } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { encodedLabelToLabelhash, } from './encodedLabelToLabelhash.js';\n/**\n * @description Hashes ENS name\n *\n * - Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `namehash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this.\n *\n * @example\n * namehash('wevm.eth')\n * '0xf246651c1b9a6b141d19c2604e9a58f567973833990f830d882534a747801359'\n *\n * @link https://eips.ethereum.org/EIPS/eip-137\n */\nexport function namehash(name) {\n let result = new Uint8Array(32).fill(0);\n if (!name)\n return bytesToHex(result);\n const labels = name.split('.');\n // Iterate in reverse order building up hash\n for (let i = labels.length - 1; i >= 0; i -= 1) {\n const hashFromEncodedLabel = encodedLabelToLabelhash(labels[i]);\n const hashed = hashFromEncodedLabel\n ? toBytes(hashFromEncodedLabel)\n : keccak256(stringToBytes(labels[i]), 'bytes');\n result = keccak256(concat([result, hashed]), 'bytes');\n }\n return bytesToHex(result);\n}\n//# sourceMappingURL=namehash.js.map","export function encodeLabelhash(hash) {\n return `[${hash.slice(2)}]`;\n}\n//# sourceMappingURL=encodeLabelhash.js.map","import { stringToBytes, } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { encodedLabelToLabelhash, } from './encodedLabelToLabelhash.js';\n/**\n * @description Hashes ENS label\n *\n * - Since ENS labels prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS labels](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `labelhash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this.\n *\n * @example\n * labelhash('eth')\n * '0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0'\n */\nexport function labelhash(label) {\n const result = new Uint8Array(32).fill(0);\n if (!label)\n return bytesToHex(result);\n return encodedLabelToLabelhash(label) || keccak256(stringToBytes(label));\n}\n//# sourceMappingURL=labelhash.js.map","import { stringToBytes, } from '../encoding/toBytes.js';\nimport { encodeLabelhash, } from './encodeLabelhash.js';\nimport { labelhash } from './labelhash.js';\n/*\n * @description Encodes a DNS packet into a ByteArray containing a UDP payload.\n *\n * @example\n * packetToBytes('awkweb.eth')\n * '0x0661776b7765620365746800'\n *\n * @see https://docs.ens.domains/resolution/names#dns\n *\n */\nexport function packetToBytes(packet) {\n // strip leading and trailing `.`\n const value = packet.replace(/^\\.|\\.$/gm, '');\n if (value.length === 0)\n return new Uint8Array(1);\n const bytes = new Uint8Array(stringToBytes(value).byteLength + 2);\n let offset = 0;\n const list = value.split('.');\n for (let i = 0; i < list.length; i++) {\n let encoded = stringToBytes(list[i]);\n // if the length is > 255, make the encoded label value a labelhash\n // this is compatible with the universal resolver\n if (encoded.byteLength > 255)\n encoded = stringToBytes(encodeLabelhash(labelhash(list[i])));\n bytes[offset] = encoded.length;\n bytes.set(encoded, offset + 1);\n offset += encoded.length + 1;\n }\n if (bytes.byteLength !== offset + 1)\n return bytes.slice(0, offset + 1);\n return bytes;\n}\n//# sourceMappingURL=packetToBytes.js.map","import { AbiDecodingZeroDataError } from '../../errors/abi.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, RawContractError, } from '../../errors/contract.js';\nimport { RpcRequestError } from '../../errors/request.js';\nimport { InternalRpcError } from '../../errors/rpc.js';\nconst EXECUTION_REVERTED_ERROR_CODE = 3;\nexport function getContractError(err, { abi, address, args, docsPath, functionName, sender, }) {\n const error = (err instanceof RawContractError\n ? err\n : err instanceof BaseError\n ? err.walk((err) => 'data' in err) || err.walk()\n : {});\n const { code, data, details, message, shortMessage } = error;\n const cause = (() => {\n if (err instanceof AbiDecodingZeroDataError)\n return new ContractFunctionZeroDataError({ functionName });\n if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) &&\n (data || details || message || shortMessage)) {\n return new ContractFunctionRevertedError({\n abi,\n data: typeof data === 'object' ? data.data : data,\n functionName,\n message: error instanceof RpcRequestError\n ? details\n : (shortMessage ?? message),\n });\n }\n return err;\n })();\n return new ContractFunctionExecutionError(cause, {\n abi,\n args,\n contractAddress: address,\n docsPath,\n functionName,\n sender,\n });\n}\n//# sourceMappingURL=getContractError.js.map","export const aggregate3Signature = '0x82ad56cb';\n//# sourceMappingURL=contract.js.map","export const deploylessCallViaBytecodeBytecode = '0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe';\nexport const deploylessCallViaFactoryBytecode = '0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe';\nexport const universalSignatureValidatorByteCode = '0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572';\n//# sourceMappingURL=contracts.js.map","import { CallExecutionError, } from '../../errors/contract.js';\nimport { UnknownNodeError } from '../../errors/node.js';\nimport { getNodeError, } from './getNodeError.js';\nexport function getCallError(err, { docsPath, ...args }) {\n const cause = (() => {\n const cause = getNodeError(err, args);\n if (cause instanceof UnknownNodeError)\n return err;\n return cause;\n })();\n return new CallExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getCallError.js.map","import { parseAbi } from 'abitype';\nimport { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { multicall3Abi } from '../../constants/abis.js';\nimport { aggregate3Signature } from '../../constants/contract.js';\nimport { deploylessCallViaBytecodeBytecode, deploylessCallViaFactoryBytecode, } from '../../constants/contracts.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ChainDoesNotSupportContract, ClientChainNotConfiguredError, } from '../../errors/chain.js';\nimport { CounterfactualDeploymentFailedError, RawContractError, } from '../../errors/contract.js';\nimport { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeDeployData, } from '../../utils/abi/encodeDeployData.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getChainContractAddress, } from '../../utils/chain/getChainContractAddress.js';\nimport { numberToHex, } from '../../utils/encoding/toHex.js';\nimport { getCallError, } from '../../utils/errors/getCallError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js';\nimport { createBatchScheduler, } from '../../utils/promise/createBatchScheduler.js';\nimport { serializeStateOverride, } from '../../utils/stateOverride.js';\nimport { assertRequest } from '../../utils/transaction/assertRequest.js';\n/**\n * Executes a new message call immediately without submitting a transaction to the network.\n *\n * - Docs: https://viem.sh/docs/actions/public/call\n * - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call)\n *\n * @param client - Client to use\n * @param parameters - {@link CallParameters}\n * @returns The call data. {@link CallReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { call } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const data = await call(client, {\n * account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n * data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * })\n */\nexport async function call(client, args) {\n const { account: account_ = client.account, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = 'latest', accessList, blobs, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;\n const account = account_ ? parseAccount(account_) : undefined;\n if (code && (factory || factoryData))\n throw new BaseError('Cannot provide both `code` & `factory`/`factoryData` as parameters.');\n if (code && to)\n throw new BaseError('Cannot provide both `code` & `to` as parameters.');\n // Check if the call is deployless via bytecode.\n const deploylessCallViaBytecode = code && data_;\n // Check if the call is deployless via a factory.\n const deploylessCallViaFactory = factory && factoryData && to && data_;\n const deploylessCall = deploylessCallViaBytecode || deploylessCallViaFactory;\n const data = (() => {\n if (deploylessCallViaBytecode)\n return toDeploylessCallViaBytecodeData({\n code,\n data: data_,\n });\n if (deploylessCallViaFactory)\n return toDeploylessCallViaFactoryData({\n data: data_,\n factory,\n factoryData,\n to,\n });\n return data_;\n })();\n try {\n assertRequest(args);\n const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined;\n const block = blockNumberHex || blockTag;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n from: account?.address,\n accessList,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to: deploylessCall ? undefined : to,\n value,\n });\n if (batch && shouldPerformMulticall({ request }) && !rpcStateOverride) {\n try {\n return await scheduleMulticall(client, {\n ...request,\n blockNumber,\n blockTag,\n });\n }\n catch (err) {\n if (!(err instanceof ClientChainNotConfiguredError) &&\n !(err instanceof ChainDoesNotSupportContract))\n throw err;\n }\n }\n const response = await client.request({\n method: 'eth_call',\n params: rpcStateOverride\n ? [\n request,\n block,\n rpcStateOverride,\n ]\n : [request, block],\n });\n if (response === '0x')\n return { data: undefined };\n return { data: response };\n }\n catch (err) {\n const data = getRevertErrorData(err);\n // Check for CCIP-Read offchain lookup signature.\n const { offchainLookup, offchainLookupSignature } = await import('../../utils/ccip.js');\n if (client.ccipRead !== false &&\n data?.slice(0, 10) === offchainLookupSignature &&\n to)\n return { data: await offchainLookup(client, { data, to }) };\n // Check for counterfactual deployment error.\n if (deploylessCall && data?.slice(0, 10) === '0x101bb98d')\n throw new CounterfactualDeploymentFailedError({ factory });\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain,\n });\n }\n}\n// We only want to perform a scheduled multicall if:\n// - The request has calldata,\n// - The request has a target address,\n// - The target address is not already the aggregate3 signature,\n// - The request has no other properties (`nonce`, `gas`, etc cannot be sent with a multicall).\nfunction shouldPerformMulticall({ request }) {\n const { data, to, ...request_ } = request;\n if (!data)\n return false;\n if (data.startsWith(aggregate3Signature))\n return false;\n if (!to)\n return false;\n if (Object.values(request_).filter((x) => typeof x !== 'undefined').length > 0)\n return false;\n return true;\n}\nasync function scheduleMulticall(client, args) {\n const { batchSize = 1024, wait = 0 } = typeof client.batch?.multicall === 'object' ? client.batch.multicall : {};\n const { blockNumber, blockTag = 'latest', data, multicallAddress: multicallAddress_, to, } = args;\n let multicallAddress = multicallAddress_;\n if (!multicallAddress) {\n if (!client.chain)\n throw new ClientChainNotConfiguredError();\n multicallAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'multicall3',\n });\n }\n const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined;\n const block = blockNumberHex || blockTag;\n const { schedule } = createBatchScheduler({\n id: `${client.uid}.${block}`,\n wait,\n shouldSplitBatch(args) {\n const size = args.reduce((size, { data }) => size + (data.length - 2), 0);\n return size > batchSize * 2;\n },\n fn: async (requests) => {\n const calls = requests.map((request) => ({\n allowFailure: true,\n callData: request.data,\n target: request.to,\n }));\n const calldata = encodeFunctionData({\n abi: multicall3Abi,\n args: [calls],\n functionName: 'aggregate3',\n });\n const data = await client.request({\n method: 'eth_call',\n params: [\n {\n data: calldata,\n to: multicallAddress,\n },\n block,\n ],\n });\n return decodeFunctionResult({\n abi: multicall3Abi,\n args: [calls],\n functionName: 'aggregate3',\n data: data || '0x',\n });\n },\n });\n const [{ returnData, success }] = await schedule({ data, to });\n if (!success)\n throw new RawContractError({ data: returnData });\n if (returnData === '0x')\n return { data: undefined };\n return { data: returnData };\n}\nfunction toDeploylessCallViaBytecodeData(parameters) {\n const { code, data } = parameters;\n return encodeDeployData({\n abi: parseAbi(['constructor(bytes, bytes)']),\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [code, data],\n });\n}\nfunction toDeploylessCallViaFactoryData(parameters) {\n const { data, factory, factoryData, to } = parameters;\n return encodeDeployData({\n abi: parseAbi(['constructor(address, bytes, address, bytes)']),\n bytecode: deploylessCallViaFactoryBytecode,\n args: [to, data, factory, factoryData],\n });\n}\n/** @internal */\nexport function getRevertErrorData(err) {\n if (!(err instanceof BaseError))\n return undefined;\n const error = err.walk();\n return typeof error?.data === 'object' ? error.data?.data : error.data;\n}\n//# sourceMappingURL=call.js.map","import { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getContractError, } from '../../utils/errors/getContractError.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { call } from './call.js';\n/**\n * Calls a read-only function on a contract, and returns the response.\n *\n * - Docs: https://viem.sh/docs/contract/readContract\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts\n *\n * A \"read-only\" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.\n *\n * Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).\n *\n * @param client - Client to use\n * @param parameters - {@link ReadContractParameters}\n * @returns The response from the contract. Type is inferred. {@link ReadContractReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { readContract } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const result = await readContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function balanceOf(address) view returns (uint256)']),\n * functionName: 'balanceOf',\n * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],\n * })\n * // 424122n\n */\nexport async function readContract(client, parameters) {\n const { abi, address, args, functionName, ...rest } = parameters;\n const calldata = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n try {\n const { data } = await getAction(client, call, 'call')({\n ...rest,\n data: calldata,\n to: address,\n });\n return decodeFunctionResult({\n abi,\n args,\n functionName,\n data: data || '0x',\n });\n }\n catch (error) {\n throw getContractError(error, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/readContract',\n functionName,\n });\n }\n}\n//# sourceMappingURL=readContract.js.map","import { BaseError } from './base.js';\nexport class EnsAvatarInvalidMetadataError extends BaseError {\n constructor({ data }) {\n super('Unable to extract image from metadata. The metadata may be malformed or invalid.', {\n metaMessages: [\n '- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.',\n '',\n `Provided data: ${JSON.stringify(data)}`,\n ],\n name: 'EnsAvatarInvalidMetadataError',\n });\n }\n}\nexport class EnsAvatarInvalidNftUriError extends BaseError {\n constructor({ reason }) {\n super(`ENS NFT avatar URI is invalid. ${reason}`, {\n name: 'EnsAvatarInvalidNftUriError',\n });\n }\n}\nexport class EnsAvatarUriResolutionError extends BaseError {\n constructor({ uri }) {\n super(`Unable to resolve ENS avatar URI \"${uri}\". The URI may be malformed, invalid, or does not respond with a valid image.`, { name: 'EnsAvatarUriResolutionError' });\n }\n}\nexport class EnsAvatarUnsupportedNamespaceError extends BaseError {\n constructor({ namespace }) {\n super(`ENS NFT avatar namespace \"${namespace}\" is not supported. Must be \"erc721\" or \"erc1155\".`, { name: 'EnsAvatarUnsupportedNamespaceError' });\n }\n}\n//# sourceMappingURL=ens.js.map","import { readContract, } from '../../../actions/public/readContract.js';\nimport { EnsAvatarInvalidMetadataError, EnsAvatarInvalidNftUriError, EnsAvatarUnsupportedNamespaceError, EnsAvatarUriResolutionError, } from '../../../errors/ens.js';\nconst networkRegex = /(?<protocol>https?:\\/\\/[^\\/]*|ipfs:\\/|ipns:\\/|ar:\\/)?(?<root>\\/)?(?<subpath>ipfs\\/|ipns\\/)?(?<target>[\\w\\-.]+)(?<subtarget>\\/.*)?/;\nconst ipfsHashRegex = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\\/(?<target>[\\w\\-.]+))?(?<subtarget>\\/.*)?$/;\nconst base64Regex = /^data:([a-zA-Z\\-/+]*);base64,([^\"].*)/;\nconst dataURIRegex = /^data:([a-zA-Z\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;\n/** @internal */\nexport async function isImageUri(uri) {\n try {\n const res = await fetch(uri, { method: 'HEAD' });\n // retrieve content type header to check if content is image\n if (res.status === 200) {\n const contentType = res.headers.get('content-type');\n return contentType?.startsWith('image/');\n }\n return false;\n }\n catch (error) {\n // if error is not cors related then fail\n if (typeof error === 'object' && typeof error.response !== 'undefined') {\n return false;\n }\n // fail in NodeJS, since the error is not cors but any other network issue\n // biome-ignore lint/suspicious/noPrototypeBuiltins:\n if (!globalThis.hasOwnProperty('Image'))\n return false;\n // in case of cors, use image api to validate if given url is an actual image\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n resolve(true);\n };\n img.onerror = () => {\n resolve(false);\n };\n img.src = uri;\n });\n }\n}\n/** @internal */\nexport function getGateway(custom, defaultGateway) {\n if (!custom)\n return defaultGateway;\n if (custom.endsWith('/'))\n return custom.slice(0, -1);\n return custom;\n}\nexport function resolveAvatarUri({ uri, gatewayUrls, }) {\n const isEncoded = base64Regex.test(uri);\n if (isEncoded)\n return { uri, isOnChain: true, isEncoded };\n const ipfsGateway = getGateway(gatewayUrls?.ipfs, 'https://ipfs.io');\n const arweaveGateway = getGateway(gatewayUrls?.arweave, 'https://arweave.net');\n const networkRegexMatch = uri.match(networkRegex);\n const { protocol, subpath, target, subtarget = '', } = networkRegexMatch?.groups || {};\n const isIPNS = protocol === 'ipns:/' || subpath === 'ipns/';\n const isIPFS = protocol === 'ipfs:/' || subpath === 'ipfs/' || ipfsHashRegex.test(uri);\n if (uri.startsWith('http') && !isIPNS && !isIPFS) {\n let replacedUri = uri;\n if (gatewayUrls?.arweave)\n replacedUri = uri.replace(/https:\\/\\/arweave.net/g, gatewayUrls?.arweave);\n return { uri: replacedUri, isOnChain: false, isEncoded: false };\n }\n if ((isIPNS || isIPFS) && target) {\n return {\n uri: `${ipfsGateway}/${isIPNS ? 'ipns' : 'ipfs'}/${target}${subtarget}`,\n isOnChain: false,\n isEncoded: false,\n };\n }\n if (protocol === 'ar:/' && target) {\n return {\n uri: `${arweaveGateway}/${target}${subtarget || ''}`,\n isOnChain: false,\n isEncoded: false,\n };\n }\n let parsedUri = uri.replace(dataURIRegex, '');\n if (parsedUri.startsWith('<svg')) {\n // if svg, base64 encode\n parsedUri = `data:image/svg+xml;base64,${btoa(parsedUri)}`;\n }\n if (parsedUri.startsWith('data:') || parsedUri.startsWith('{')) {\n return {\n uri: parsedUri,\n isOnChain: true,\n isEncoded: false,\n };\n }\n throw new EnsAvatarUriResolutionError({ uri });\n}\nexport function getJsonImage(data) {\n // validation check for json data, must include one of theses properties\n if (typeof data !== 'object' ||\n (!('image' in data) && !('image_url' in data) && !('image_data' in data))) {\n throw new EnsAvatarInvalidMetadataError({ data });\n }\n return data.image || data.image_url || data.image_data;\n}\nexport async function getMetadataAvatarUri({ gatewayUrls, uri, }) {\n try {\n const res = await fetch(uri).then((res) => res.json());\n const image = await parseAvatarUri({\n gatewayUrls,\n uri: getJsonImage(res),\n });\n return image;\n }\n catch {\n throw new EnsAvatarUriResolutionError({ uri });\n }\n}\nexport async function parseAvatarUri({ gatewayUrls, uri, }) {\n const { uri: resolvedURI, isOnChain } = resolveAvatarUri({ uri, gatewayUrls });\n if (isOnChain)\n return resolvedURI;\n // check if resolvedURI is an image, if it is return the url\n const isImage = await isImageUri(resolvedURI);\n if (isImage)\n return resolvedURI;\n throw new EnsAvatarUriResolutionError({ uri });\n}\nexport function parseNftUri(uri_) {\n let uri = uri_;\n // parse valid nft spec (CAIP-22/CAIP-29)\n // @see: https://github.com/ChainAgnostic/CAIPs/tree/master/CAIPs\n if (uri.startsWith('did:nft:')) {\n // convert DID to CAIP\n uri = uri.replace('did:nft:', '').replace(/_/g, '/');\n }\n const [reference, asset_namespace, tokenID] = uri.split('/');\n const [eip_namespace, chainID] = reference.split(':');\n const [erc_namespace, contractAddress] = asset_namespace.split(':');\n if (!eip_namespace || eip_namespace.toLowerCase() !== 'eip155')\n throw new EnsAvatarInvalidNftUriError({ reason: 'Only EIP-155 supported' });\n if (!chainID)\n throw new EnsAvatarInvalidNftUriError({ reason: 'Chain ID not found' });\n if (!contractAddress)\n throw new EnsAvatarInvalidNftUriError({\n reason: 'Contract address not found',\n });\n if (!tokenID)\n throw new EnsAvatarInvalidNftUriError({ reason: 'Token ID not found' });\n if (!erc_namespace)\n throw new EnsAvatarInvalidNftUriError({ reason: 'ERC namespace not found' });\n return {\n chainID: Number.parseInt(chainID),\n namespace: erc_namespace.toLowerCase(),\n contractAddress: contractAddress,\n tokenID,\n };\n}\nexport async function getNftTokenUri(client, { nft }) {\n if (nft.namespace === 'erc721') {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: 'tokenURI',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: 'tokenId', type: 'uint256' }],\n outputs: [{ name: '', type: 'string' }],\n },\n ],\n functionName: 'tokenURI',\n args: [BigInt(nft.tokenID)],\n });\n }\n if (nft.namespace === 'erc1155') {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: 'uri',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: '_id', type: 'uint256' }],\n outputs: [{ name: '', type: 'string' }],\n },\n ],\n functionName: 'uri',\n args: [BigInt(nft.tokenID)],\n });\n }\n throw new EnsAvatarUnsupportedNamespaceError({ namespace: nft.namespace });\n}\n//# sourceMappingURL=utils.js.map","import { getJsonImage, getMetadataAvatarUri, getNftTokenUri, parseAvatarUri, parseNftUri, resolveAvatarUri, } from './utils.js';\n/*\n * @description Parses an ENS avatar record.\n *\n * @example\n * parseAvatarRecord('eip155:1/erc1155:0xb32979486938aa9694bfc898f35dbed459f44424/10063')\n * 'https://ipfs.io/ipfs/QmSP4nq9fnN9dAiCj42ug9Wa79rqmQerZXZch82VqpiH7U/image.gif'\n *\n * @see https://docs.ens.domains/web/avatars\n *\n */\nexport async function parseAvatarRecord(client, { gatewayUrls, record, }) {\n if (/eip155:/i.test(record))\n return parseNftAvatarUri(client, { gatewayUrls, record });\n return parseAvatarUri({ uri: record, gatewayUrls });\n}\nasync function parseNftAvatarUri(client, { gatewayUrls, record, }) {\n // parse NFT URI into properties\n const nft = parseNftUri(record);\n // fetch tokenURI from the NFT contract\n const nftUri = await getNftTokenUri(client, { nft });\n // resolve the URI from the fetched tokenURI\n const { uri: resolvedNftUri, isOnChain, isEncoded, } = resolveAvatarUri({ uri: nftUri, gatewayUrls });\n // if the resolved URI is on chain, return the data\n if (isOnChain &&\n (resolvedNftUri.includes('data:application/json;base64,') ||\n resolvedNftUri.startsWith('{'))) {\n const encodedJson = isEncoded\n ? // if it is encoded, decode it\n atob(resolvedNftUri.replace('data:application/json;base64,', ''))\n : // if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)\n resolvedNftUri;\n const decoded = JSON.parse(encodedJson);\n return parseAvatarUri({ uri: getJsonImage(decoded), gatewayUrls });\n }\n let uriTokenId = nft.tokenID;\n if (nft.namespace === 'erc1155')\n uriTokenId = uriTokenId.replace('0x', '').padStart(64, '0');\n return getMetadataAvatarUri({\n gatewayUrls,\n uri: resolvedNftUri.replace(/(?:0x)?{id}/, uriTokenId),\n });\n}\n//# sourceMappingURL=parseAvatarRecord.js.map","import { textResolverAbi, universalResolverResolveAbi, } from '../../constants/abis.js';\nimport { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getChainContractAddress, } from '../../utils/chain/getChainContractAddress.js';\nimport { toHex } from '../../utils/encoding/toHex.js';\nimport { isNullUniversalResolverError } from '../../utils/ens/errors.js';\nimport { namehash } from '../../utils/ens/namehash.js';\nimport { packetToBytes, } from '../../utils/ens/packetToBytes.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { readContract, } from '../public/readContract.js';\n/**\n * Gets a text record for specified ENS name.\n *\n * - Docs: https://viem.sh/docs/ens/actions/getEnsResolver\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens\n *\n * Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.\n *\n * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this.\n *\n * @param client - Client to use\n * @param parameters - {@link GetEnsTextParameters}\n * @returns Address for ENS resolver. {@link GetEnsTextReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getEnsText, normalize } from 'viem/ens'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const twitterRecord = await getEnsText(client, {\n * name: normalize('wevm.eth'),\n * key: 'com.twitter',\n * })\n * // 'wevm_dev'\n */\nexport async function getEnsText(client, { blockNumber, blockTag, name, key, gatewayUrls, strict, universalResolverAddress: universalResolverAddress_, }) {\n let universalResolverAddress = universalResolverAddress_;\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error('client chain not configured. universalResolverAddress is required.');\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n });\n }\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: 'resolve',\n args: [\n toHex(packetToBytes(name)),\n encodeFunctionData({\n abi: textResolverAbi,\n functionName: 'text',\n args: [namehash(name), key],\n }),\n ],\n blockNumber,\n blockTag,\n };\n const readContractAction = getAction(client, readContract, 'readContract');\n const res = gatewayUrls\n ? await readContractAction({\n ...readContractParameters,\n args: [...readContractParameters.args, gatewayUrls],\n })\n : await readContractAction(readContractParameters);\n if (res[0] === '0x')\n return null;\n const record = decodeFunctionResult({\n abi: textResolverAbi,\n functionName: 'text',\n data: res[0],\n });\n return record === '' ? null : record;\n }\n catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err, 'resolve'))\n return null;\n throw err;\n }\n}\n//# sourceMappingURL=getEnsText.js.map","import { parseAvatarRecord, } from '../../utils/ens/avatar/parseAvatarRecord.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { getEnsText, } from './getEnsText.js';\n/**\n * Gets the avatar of an ENS name.\n *\n * - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens\n *\n * Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`.\n *\n * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this.\n *\n * @param client - Client to use\n * @param parameters - {@link GetEnsAvatarParameters}\n * @returns Avatar URI or `null` if not found. {@link GetEnsAvatarReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getEnsAvatar, normalize } from 'viem/ens'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const ensAvatar = await getEnsAvatar(client, {\n * name: normalize('wevm.eth'),\n * })\n * // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'\n */\nexport async function getEnsAvatar(client, { blockNumber, blockTag, assetGatewayUrls, name, gatewayUrls, strict, universalResolverAddress, }) {\n const record = await getAction(client, getEnsText, 'getEnsText')({\n blockNumber,\n blockTag,\n key: 'avatar',\n name,\n universalResolverAddress,\n gatewayUrls,\n strict,\n });\n if (!record)\n return null;\n try {\n return await parseAvatarRecord(client, {\n record,\n gatewayUrls: assetGatewayUrls,\n });\n }\n catch {\n return null;\n }\n}\n//# sourceMappingURL=getEnsAvatar.js.map","import { universalResolverReverseAbi } from '../../constants/abis.js';\nimport { getChainContractAddress, } from '../../utils/chain/getChainContractAddress.js';\nimport { toHex } from '../../utils/encoding/toHex.js';\nimport { isNullUniversalResolverError } from '../../utils/ens/errors.js';\nimport { packetToBytes, } from '../../utils/ens/packetToBytes.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { readContract, } from '../public/readContract.js';\n/**\n * Gets primary name for specified address.\n *\n * - Docs: https://viem.sh/docs/ens/actions/getEnsName\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens\n *\n * Calls `reverse(bytes)` on ENS Universal Resolver Contract to \"reverse resolve\" the address to the primary ENS name.\n *\n * @param client - Client to use\n * @param parameters - {@link GetEnsNameParameters}\n * @returns Name or `null` if not found. {@link GetEnsNameReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getEnsName } from 'viem/ens'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const ensName = await getEnsName(client, {\n * address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',\n * })\n * // 'wevm.eth'\n */\nexport async function getEnsName(client, { address, blockNumber, blockTag, gatewayUrls, strict, universalResolverAddress: universalResolverAddress_, }) {\n let universalResolverAddress = universalResolverAddress_;\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error('client chain not configured. universalResolverAddress is required.');\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n });\n }\n const reverseNode = `${address.toLowerCase().substring(2)}.addr.reverse`;\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverReverseAbi,\n functionName: 'reverse',\n args: [toHex(packetToBytes(reverseNode))],\n blockNumber,\n blockTag,\n };\n const readContractAction = getAction(client, readContract, 'readContract');\n const [name, resolvedAddress] = gatewayUrls\n ? await readContractAction({\n ...readContractParameters,\n args: [...readContractParameters.args, gatewayUrls],\n })\n : await readContractAction(readContractParameters);\n if (address.toLowerCase() !== resolvedAddress.toLowerCase())\n return null;\n return name;\n }\n catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err, 'reverse'))\n return null;\n throw err;\n }\n}\n//# sourceMappingURL=getEnsName.js.map"],"file":"assets/getEnsName-DoyRgFOP.js"}