@latticexyz/explorer 2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1 → 2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6

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 (35) hide show
  1. package/.next/standalone/packages/explorer/.next/BUILD_ID +1 -1
  2. package/.next/standalone/packages/explorer/.next/app-build-manifest.json +31 -31
  3. package/.next/standalone/packages/explorer/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/standalone/packages/explorer/.next/build-manifest.json +2 -2
  5. package/.next/standalone/packages/explorer/.next/prerender-manifest.json +1 -1
  6. package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/page_client-reference-manifest.js +1 -1
  7. package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/explore/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/page.js +1 -1
  10. package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/packages/explorer/.next/server/app/(explorer)/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/packages/explorer/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/packages/explorer/.next/server/app/_not-found.html +1 -1
  16. package/.next/standalone/packages/explorer/.next/server/app/_not-found.rsc +1 -1
  17. package/.next/standalone/packages/explorer/.next/server/app/internal/observer-relay/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/packages/explorer/.next/server/app/internal/observer-relay.html +1 -1
  19. package/.next/standalone/packages/explorer/.next/server/app/internal/observer-relay.rsc +1 -1
  20. package/.next/standalone/packages/explorer/.next/server/app-paths-manifest.json +4 -4
  21. package/.next/standalone/packages/explorer/.next/server/chunks/3883.js +1 -1
  22. package/.next/standalone/packages/explorer/.next/server/middleware-build-manifest.js +1 -1
  23. package/.next/standalone/packages/explorer/.next/server/pages/404.html +1 -1
  24. package/.next/standalone/packages/explorer/.next/server/pages/500.html +1 -1
  25. package/.next/standalone/packages/explorer/.next/server/server-reference-manifest.js +1 -1
  26. package/.next/standalone/packages/explorer/.next/server/server-reference-manifest.json +1 -1
  27. package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/[chainName]/worlds/[worldAddress]/layout-1b78d0d640461acf.js +1 -0
  28. package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/{page-52f117d371726746.js → page-e9b1ddafd1d927ee.js} +2 -2
  29. package/dist/exports/observer.d.ts +1 -0
  30. package/dist/exports/observer.js +3 -1
  31. package/dist/exports/observer.js.map +1 -1
  32. package/package.json +10 -10
  33. package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/[chainName]/worlds/[worldAddress]/layout-022e273597c2fa2e.js +0 -1
  34. /package/.next/standalone/packages/explorer/.next/static/{timcPlIPw2-liAAvE25KY → BQ_8YgIMmp3OV-kp6AuFr}/_buildManifest.js +0 -0
  35. /package/.next/standalone/packages/explorer/.next/static/{timcPlIPw2-liAAvE25KY → BQ_8YgIMmp3OV-kp6AuFr}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-f1cdee55022e98eb.js"/><script src="/_next/static/chunks/3a94010f-972d722a7f97aaac.js" async=""></script><script src="/_next/static/chunks/8474-ba633b584d9d2149.js" async=""></script><script src="/_next/static/chunks/main-app-3d14824c033e7085.js" async=""></script><script src="/_next/static/chunks/5674-57c906e3570df406.js" async=""></script><script src="/_next/static/chunks/app/internal/observer-relay/page-fc32b380dc3259aa.js" async=""></script><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body><script src="/_next/static/chunks/webpack-f1cdee55022e98eb.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[69222,[],\"\"]\n3:I[54768,[\"5674\",\"static/chunks/5674-57c906e3570df406.js\",\"5225\",\"static/chunks/app/internal/observer-relay/page-fc32b380dc3259aa.js\"],\"Relay\"]\n4:I[5371,[],\"\"]\n5:I[80363,[],\"\"]\n7:I[18541,[],\"\"]\n8:[]\n"])</script><script>self.__next_f.push([1,"0:[null,[\"$\",\"$L1\",null,{\"buildId\":\"timcPlIPw2-liAAvE25KY\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/internal/observer-relay\",\"initialTree\":[\"\",{\"children\":[\"internal\",{\"children\":[\"observer-relay\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true]}],\"initialSeedData\":[\"\",{\"children\":[\"internal\",{\"children\":[\"observer-relay\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[\"$\",\"$L3\",null,{}]],null],null]},[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"internal\",\"children\",\"observer-relay\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"internal\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}]}]}],null],null]},[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L6\"],\"globalErrorComponent\":\"$7\",\"missingSlots\":\"$W8\"}]]\n"])</script><script>self.__next_f.push([1,"6:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"next-size-adjust\"}]]\n2:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-f1cdee55022e98eb.js"/><script src="/_next/static/chunks/3a94010f-972d722a7f97aaac.js" async=""></script><script src="/_next/static/chunks/8474-ba633b584d9d2149.js" async=""></script><script src="/_next/static/chunks/main-app-3d14824c033e7085.js" async=""></script><script src="/_next/static/chunks/5674-57c906e3570df406.js" async=""></script><script src="/_next/static/chunks/app/internal/observer-relay/page-fc32b380dc3259aa.js" async=""></script><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body><script src="/_next/static/chunks/webpack-f1cdee55022e98eb.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[69222,[],\"\"]\n3:I[54768,[\"5674\",\"static/chunks/5674-57c906e3570df406.js\",\"5225\",\"static/chunks/app/internal/observer-relay/page-fc32b380dc3259aa.js\"],\"Relay\"]\n4:I[5371,[],\"\"]\n5:I[80363,[],\"\"]\n7:I[18541,[],\"\"]\n8:[]\n"])</script><script>self.__next_f.push([1,"0:[null,[\"$\",\"$L1\",null,{\"buildId\":\"BQ_8YgIMmp3OV-kp6AuFr\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/internal/observer-relay\",\"initialTree\":[\"\",{\"children\":[\"internal\",{\"children\":[\"observer-relay\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true]}],\"initialSeedData\":[\"\",{\"children\":[\"internal\",{\"children\":[\"observer-relay\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[\"$\",\"$L3\",null,{}]],null],null]},[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"internal\",\"children\",\"observer-relay\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"internal\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}]}]}],null],null]},[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L6\"],\"globalErrorComponent\":\"$7\",\"missingSlots\":\"$W8\"}]]\n"])</script><script>self.__next_f.push([1,"6:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"next-size-adjust\"}]]\n2:null\n"])</script></body></html>
@@ -1,6 +1,6 @@
1
1
  2:I[54768,["5674","static/chunks/5674-57c906e3570df406.js","5225","static/chunks/app/internal/observer-relay/page-fc32b380dc3259aa.js"],"Relay"]
2
2
  3:I[5371,[],""]
3
3
  4:I[80363,[],""]
4
- 0:["timcPlIPw2-liAAvE25KY",[[["",{"children":["internal",{"children":["observer-relay",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true]}],["",{"children":["internal",{"children":["observer-relay",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","internal","children","observer-relay","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","internal","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]}]}],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],[null,[null,"$L5"]]]]]
4
+ 0:["BQ_8YgIMmp3OV-kp6AuFr",[[["",{"children":["internal",{"children":["observer-relay",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true]}],["",{"children":["internal",{"children":["observer-relay",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","internal","children","observer-relay","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","internal","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]}]}],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],[null,[null,"$L5"]]]]]
5
5
  5:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","meta","2",{"name":"next-size-adjust"}]]
6
6
  1:null
@@ -3,13 +3,13 @@
3
3
  "/internal/observer-relay/page": "app/internal/observer-relay/page.js",
4
4
  "/(explorer)/icon-uo65sm.svg/route": "app/(explorer)/icon-uo65sm.svg/route.js",
5
5
  "/(explorer)/api/sqlite-indexer/worlds/route": "app/(explorer)/api/sqlite-indexer/worlds/route.js",
6
- "/(explorer)/page": "app/(explorer)/page.js",
7
- "/(explorer)/api/world-abi/route": "app/(explorer)/api/world-abi/route.js",
8
6
  "/(explorer)/api/sqlite-indexer/route": "app/(explorer)/api/sqlite-indexer/route.js",
7
+ "/(explorer)/api/world-abi/route": "app/(explorer)/api/world-abi/route.js",
8
+ "/(explorer)/page": "app/(explorer)/page.js",
9
9
  "/(explorer)/[chainName]/page": "app/(explorer)/[chainName]/page.js",
10
10
  "/(explorer)/[chainName]/worlds/page": "app/(explorer)/[chainName]/worlds/page.js",
11
11
  "/(explorer)/[chainName]/worlds/[worldAddress]/page": "app/(explorer)/[chainName]/worlds/[worldAddress]/page.js",
12
+ "/(explorer)/[chainName]/worlds/[worldAddress]/explore/page": "app/(explorer)/[chainName]/worlds/[worldAddress]/explore/page.js",
12
13
  "/(explorer)/[chainName]/worlds/[worldAddress]/interact/page": "app/(explorer)/[chainName]/worlds/[worldAddress]/interact/page.js",
13
- "/(explorer)/[chainName]/worlds/[worldAddress]/observe/page": "app/(explorer)/[chainName]/worlds/[worldAddress]/observe/page.js",
14
- "/(explorer)/[chainName]/worlds/[worldAddress]/explore/page": "app/(explorer)/[chainName]/worlds/[worldAddress]/explore/page.js"
14
+ "/(explorer)/[chainName]/worlds/[worldAddress]/observe/page": "app/(explorer)/[chainName]/worlds/[worldAddress]/observe/page.js"
15
15
  }
@@ -1 +1 @@
1
- exports.id=3883,exports.ids=[3883],exports.modules={95441:(e,a,t)=>{Promise.resolve().then(t.bind(t,69343))},27575:(e,a,t)=>{Promise.resolve().then(t.bind(t,9091))},69343:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>r});var s=t(58287),n=t(72069);function r({params:{chainName:e},children:a}){return(0,n.oK)(e)?a:(0,s.notFound)()}},9091:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>eN});var s=t(25166),n=t(58287),r=t(72069),i=t(38913),c=t(2561),l=t(41440),d=t(15503),o=t(97246),u=t(74085),f=t(65520);function p(){let{id:e}=(0,u.A)(),{data:a}=(0,o.O)({watch:!0,chainId:e,query:{refetchInterval:1e3}});return s.jsx("div",{className:"inline-block w-[50px]",children:a?(0,s.jsxs)("div",{className:"flex items-center justify-end gap-x-2 text-xs font-extrabold text-green-600",children:[s.jsx("span",{className:"inline-block h-[8px] w-[8px] animate-pulse rounded-full bg-success"}),s.jsx("span",{className:"opacity-70",children:a.toString()})]}):s.jsx(f.O,{className:"h-[10px]"})})}var m=t(49069),h=t(30966),x=t(48233),b=t(49936),y=t(36851),j=t(40911),g=t(32880),w=t(22998),v=t(79846),N=t(98046),k=t(73148),C=t(56356),z=t(73383),O=t(51745),A=t(19471);let Z=["0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80","0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d","0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a","0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6","0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a","0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba","0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e","0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356","0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97","0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"].map(e=>(0,O.L)(e)),$=e=>{let a=e!==y.O.id;return Z.map((e,t)=>(function({id:e,name:a,accounts:t,disabled:s}){if(!t.length)throw Error("missing accounts");let n=!1;return(0,A.K)(()=>({id:e,name:a,type:"anvil",accounts:t,connect:async()=>(n=!0,{accounts:t.map(e=>e.address),chainId:y.O.id}),async disconnect(){n=!1},getAccounts:async()=>t.map(e=>e.address),getChainId:async()=>y.O.id,getProvider:async()=>(0,z.d)()({chain:y.O}),async isAuthorized(){return!s&&!!n&&!!(await this.getAccounts()).length},async onAccountsChanged(){},async onDisconnect(){},onChainChanged(){}}))})({id:`anvil-${t}`,name:`Anvil #${t+1}`,accounts:[e],disabled:a}))};function I(e){return"anvil"===e.type}var _=t(70454),K=t(49811),P=t(40105),R=t(92484),S=t(69822);let U=S.fC;S.ZA;let E=S.B4,T=C.forwardRef(({className:e,children:a,...t},n)=>(0,s.jsxs)(S.xz,{ref:n,className:(0,h.cn)("flex h-10 w-full items-center justify-between px-3 py-2 text-sm","rounded-md border border-input bg-background ring-offset-background","placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...t,children:[a,s.jsx(S.JO,{asChild:!0,children:s.jsx(K.Z,{className:"h-4 w-4 opacity-50"})})]}));T.displayName=S.xz.displayName;let D=C.forwardRef(({className:e,...a},t)=>s.jsx(S.u_,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",e),...a,children:s.jsx(P.Z,{className:"h-4 w-4"})}));D.displayName=S.u_.displayName;let W=C.forwardRef(({className:e,...a},t)=>s.jsx(S.$G,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",e),...a,children:s.jsx(K.Z,{className:"h-4 w-4"})}));W.displayName=S.$G.displayName;let B=C.forwardRef(({className:e,children:a,position:t="popper",...n},r)=>s.jsx(S.h_,{children:(0,s.jsxs)(S.VY,{ref:r,className:(0,h.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","popper"===t&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...n,children:[s.jsx(D,{}),s.jsx(S.l_,{className:(0,h.cn)("p-1","popper"===t&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),s.jsx(W,{})]})}));B.displayName=S.VY.displayName,C.forwardRef(({className:e,...a},t)=>s.jsx(S.__,{ref:t,className:(0,h.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...a})).displayName=S.__.displayName;let M=C.forwardRef(({className:e,children:a,...t},n)=>(0,s.jsxs)(S.ck,{ref:n,className:(0,h.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(S.wU,{children:s.jsx(R.Z,{className:"h-4 w-4"})})}),s.jsx(S.eT,{children:a})]}));M.displayName=S.ck.displayName,C.forwardRef(({className:e,...a},t)=>s.jsx(S.Z0,{ref:t,className:(0,h.cn)("-mx-1 my-1 h-px bg-muted",e),...a})).displayName=S.Z0.displayName;var Y=t(93920);function F({connector:e}){let a=e.accounts[0]?.address,{data:t}=(0,w.K)({address:a,query:{refetchInterval:15e3,select:e=>e?.value,enabled:!!a}});return(0,s.jsxs)(M,{value:e.id,className:"font-mono",children:[e.name,void 0!==t&&` (${(0,h.az)(t)} ETH)`," ",a&&(0,s.jsxs)("span",{className:"opacity-70",children:["(",s.jsx(Y.a,{hex:a}),")"]})]},a)}function G(){let[e,a]=(0,C.useState)(!1),{connector:t}=(0,v.m)(),{connect:n}=(0,N.$)(),{openConnectModal:r}=(0,j.We)(),i=[...(0,k.Y)().filter(I)];return(0,s.jsxs)(U,{open:e,onOpenChange:a,value:t?.id,onValueChange:e=>{let a=i.find(a=>a.id===e);a&&n({connector:a})},children:[s.jsx(_.z,{size:"sm",asChild:!0,children:(0,s.jsxs)(T,{children:[s.jsx(x.Z,{className:"mr-2 inline-block h-4 w-4"}),s.jsx(E,{placeholder:"Connect"})]})}),(0,s.jsxs)(B,{children:[i.map(e=>s.jsx(F,{connector:e},e.id)),(0,s.jsxs)(_.z,{size:"sm",className:"mt-2 w-full font-mono",onClick:()=>{a(!1),r?.()},children:[s.jsx(g.Z,{className:"mr-2 inline-block h-4 w-4"}),"Add wallet"]})]})]})}function V(){let{id:e}=(0,u.A)();return s.jsx(j.NL.Custom,{children:({account:a,chain:t,openAccountModal:n,openChainModal:r,openConnectModal:i,mounted:c})=>s.jsx("div",{className:(0,h.cn)({"pointer-events-none select-none opacity-0":!c}),children:c&&a&&t?t.unsupported?(0,s.jsxs)(_.z,{type:"button",size:"sm",onClick:r,children:[s.jsx(b.Z,{className:"mr-2 inline-block h-4 w-4"}),"Wrong network"]}):s.jsx("div",{className:"flex-wrap gap-2",children:(0,s.jsxs)(_.z,{type:"button",size:"sm",onClick:n,variant:"secondary",children:[s.jsx(x.Z,{className:"mr-2 inline-block h-4 w-4"}),a.displayName,s.jsx("span",{className:"ml-2 font-normal opacity-70",children:a.displayBalance?` (${a.displayBalance})`:""})]})}):e===y.O.id?s.jsx(G,{}):(0,s.jsxs)(_.z,{type:"button",size:"sm",onClick:i,children:[s.jsx(x.Z,{className:"mr-2 inline-block h-4 w-4"})," Connect"]})})})}function q({href:e,children:a}){let t=(0,n.usePathname)(),r=(0,l.g)();return s.jsx(c.default,{href:r(e),className:"group px-3 text-sm font-semibold uppercase",children:s.jsx("span",{className:(0,h.cn)("flex border-b-4 border-transparent pb-3 pt-4 transition group-hover:border-orange-500/30",t===r(e)?"border-orange-500 group-hover:border-orange-400":null),children:a})})}function H(){let{data:e,isFetched:a}=(0,d.b)();return(0,s.jsxs)("div",{className:"pb-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"-mx-3 flex",children:[s.jsx(q,{href:"explore",children:"Explore"}),s.jsx(q,{href:"interact",children:"Interact"}),s.jsx(q,{href:"observe",children:"Observe"})]}),a&&!e?.isWorldDeployed&&(0,s.jsxs)("h4",{className:"font-mono text-sm font-bold uppercase opacity-70",children:["Waiting for world deploy ",s.jsx(i.Z,{className:"inline-block h-4 w-4 animate-spin"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-x-4",children:[s.jsx(p,{}),s.jsx(V,{})]})]}),s.jsx(m.Z,{})]})}var L=t(73895),J=t(72785),Q=t(34143),X=t(17167),ee=t(38563),ea=t(30950);t(89029);var et=t(8138),es=t(92273);let en=new et.S;function er({children:e}){let a=(0,u.A)(),t=(0,C.useMemo)(()=>(0,L._)({chains:[a],connectors:[(0,Q.L)(),(0,X.O)({dappMetadata:{name:"World Explorer"}}),(0,ee.T)(),...$(a.id)],transports:{[a.id]:(0,z.d)()},ssr:!0}),[a]);return s.jsx(J.F,{config:t,children:s.jsx(es.aH,{client:en,children:s.jsx(j.pj,{theme:(0,ea.$)(),children:e})})})}var ei=t(34182),ec=t(11772),el=t(26821),ed=t(47754),eo=t(30614),eu=t(87975),ef=t(87894),ep=t(18447),em=t(3975),eh=t(26058),ex=t(18971),eb=t(52302),ey=t(59005),ej=t(26634);let eg={type:"event",name:"UserOperationEvent",inputs:[{type:"bytes32",name:"userOpHash",indexed:!0},{type:"address",name:"sender",indexed:!0},{type:"address",name:"paymaster",indexed:!0},{type:"uint256",name:"nonce",indexed:!1},{type:"bool",name:"success",indexed:!1},{type:"uint256",name:"actualGasCost",indexed:!1},{type:"uint256",name:"actualGasUsed",indexed:!1}]};function ew({abi:e,target:a,data:t,value:s}){let n,r;try{let a=(0,ei.p)({abi:e,data:t});n=a.functionName,r=a.args}catch(e){n=t.length>10?t.slice(0,10):"unknown"}return{to:a,functionName:n,args:r,value:s}}function ev(){let{id:e}=(0,u.A)(),{worldAddress:a}=(0,n.useParams)(),t=(0,ef.Z)(),{data:s}=(0,d.b)(),r=s?.abi,{transactions:i,setTransaction:c,updateTransaction:l}=(0,eb.oR)(ej.h);(0,eb.oR)(ey.store,e=>e.writes);let o=(0,C.useCallback)(({hash:e,writeId:t,timestamp:s,receipt:n,transaction:i,userOperation:l})=>{if(!r)return;let{functionName:d,args:o}=(0,ei.p)({abi:(0,ec.V)(["function execute(address target, uint256 value, bytes calldata data)","function executeBatch((address target,uint256 value,bytes data)[])"]),data:l.callData}),u=(function({abi:e,functionName:a,decodedArgs:t}){if("execute"===a){let a=t[0],s=t[1];return[ew({abi:e,target:a,data:t[2],value:s})]}return"executeBatch"===a?t[0].map(({target:a,data:t,value:s})=>ew({abi:e,target:a,data:t,value:s})):[]})({abi:r,functionName:d,decodedArgs:o}).filter(({to:e})=>e&&(0,el.K)(e)===(0,el.K)(a));if(0===u.length)return;let f=(0,ed.h)({abi:[...r,eg],logs:n.logs}),p=f.find(({eventName:e})=>"UserOperationEvent"===e);c({hash:e,writeId:t??e,from:i.from,timestamp:s,transaction:i,calls:u,receipt:n,logs:f,value:i.value,status:p?.args.success?"success":"reverted"})},[r,c,a]),f=(0,C.useCallback)(async({writeId:e,timestamp:a,transaction:s})=>{if(!r)return;let n=s.hash,i=await (0,em.e)(t,{hash:s.hash});for(let t of(0,ei.p)({abi:eo.i,data:s.input}).args[0])o({hash:n,writeId:e,timestamp:a,receipt:i,transaction:s,userOperation:t})},[r,o,t]),p=(0,C.useCallback)(async({writeId:e,hash:s,timestamp:n,transaction:i})=>{let d,o,u,f;if(!r||!i.to)return;try{let e=(0,ei.p)({abi:r,data:i.input});d=e.functionName,o=e.args}catch(e){u=e,d=i.input.length>10?i.input.slice(0,10):"unknown"}c({hash:s,writeId:e??s,from:i.from,timestamp:n,transaction:i,status:"pending",calls:[{to:i.to,functionName:d,args:o}],value:i.value});try{f=await (0,em.e)(t,{hash:s})}catch{console.error(`Failed to fetch transaction receipt. Transaction hash: ${s}`)}if(f&&"reverted"===f.status&&d)try{await (0,eh.a)(t,{account:i.from,address:a,abi:r,value:i.value,blockNumber:f.blockNumber,functionName:d,args:o})}catch(e){u=e}let p=f?f.status:"unknown",m=(0,ed.h)({abi:r,logs:f?.logs||[]});l(s,{receipt:f,logs:m,status:p,error:u})},[r,t,a,c,l]),m=(0,C.useCallback)(async({hash:e,writeId:s,timestamp:n})=>{if(!r)return;let i=await (0,ex.f)(t,{hash:e});i.to&&(0,el.K)(i.to)===(0,el.K)(eu.V)?f({writeId:s,timestamp:n,transaction:i}):i.to&&(0,el.K)(i.to)===(0,el.K)(a)&&p({hash:e,writeId:s,timestamp:n,transaction:i})},[r,t,a,f,p]);return(0,ep.C)({onBlock(e){for(let a of e.transactions)i.find(e=>e.hash===a)||m({hash:a,timestamp:e.timestamp})},chainId:e,pollingInterval:500}),null}function eN({params:{chainName:e},children:a}){return(0,r.oK)(e)?(0,s.jsxs)(er,{children:[(0,s.jsxs)("div",{className:"flex h-screen flex-col",children:[s.jsx(H,{}),a]}),s.jsx(ev,{})]}):(0,n.notFound)()}},26634:(e,a,t)=>{"use strict";t.d(a,{h:()=>s});let s=(0,t(35517).M)()(e=>({transactions:[],setTransaction:a=>e(e=>({transactions:[...e.transactions,a]})),updateTransaction:(a,t)=>e(e=>({transactions:e.transactions.map(e=>e.hash===a?{...e,...t}:e)}))}))},74085:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var s=t(58287),n=t(72069);function r(){let{chainName:e}=(0,s.useParams)();return(0,n.Yx)(e),n.df[e]}},15503:(e,a,t)=>{"use strict";t.d(a,{b:()=>i});var s=t(58287),n=t(81390),r=t(72069);function i(){let{chainName:e,worldAddress:a}=(0,s.useParams)();(0,r.Yx)(e);let{id:t}=r.df[e];return(0,n.a)({queryKey:["worldAbi",e,a],queryFn:async()=>{let e=await fetch(`/api/world-abi?${new URLSearchParams({chainId:t.toString(),worldAddress:a})}`);return await e.json()},select:e=>({abi:e.abi||[],isWorldDeployed:e.isWorldDeployed}),refetchInterval:15e3})}},72069:(e,a,t)=>{"use strict";t.d(a,{is:()=>p,M0:()=>u,oK:()=>m,df:()=>f,wG:()=>h,Yx:()=>x});var s=t(36851),n=t(9209),r=t(14501),i=t(19887),c=t(42191);n.t;var l={...r.g,iconUrls:["https://redstone.xyz/chain-icons/redstone.png"],indexerUrl:"https://indexer.mud.redstonechain.com"},d={...i.T,iconUrls:["https://redstone.xyz/chain-icons/garnet.png"],indexerUrl:"https://indexer.mud.garnetchain.com"},o={...c.i,name:"Rhodolite Devnet",testnet:!0,id:17420,sourceId:17001,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.rhodolitechain.com"],webSocket:["wss://rpc.rhodolitechain.com"]}},iconUrls:["https://redstone.xyz/chain-icons/rhodolite.png"],indexerUrl:"https://indexer.mud.rhodolitechain.com"};let u=["world","store","metadata","puppet","erc20-puppet","erc721-puppet"],f={anvil:s.O,rhodolite:o,garnet:d,redstone:l},p=Object.fromEntries(Object.entries(f).map(([e,a])=>[a.id,e]));function m(e){return"string"==typeof e&&e in f}function h(e){if(!("number"==typeof e&&e in p))throw Error(`Invalid chain ID. Supported chains are: ${Object.keys(p).join(", ")}.`)}function x(e){if(!m(e))throw Error(`Invalid chain name. Supported chains are: ${Object.keys(f).join(", ")}.`)}},49069:(e,a,t)=>{"use strict";t.d(a,{Z:()=>c});var s=t(25166),n=t(56356),r=t(4381),i=t(30966);let c=n.forwardRef(({className:e,orientation:a="horizontal",decorative:t=!0,...n},c)=>s.jsx(r.f,{ref:c,decorative:t,orientation:a,className:(0,i.cn)("shrink-0 bg-border","horizontal"===a?"h-[1px] w-full":"h-full w-[1px]",e),...n}));c.displayName=r.f.displayName},65520:(e,a,t)=>{"use strict";t.d(a,{O:()=>r});var s=t(25166),n=t(30966);function r({className:e,...a}){return s.jsx("div",{className:(0,n.cn)("animate-pulse rounded-md bg-muted",e),...a})}},93920:(e,a,t)=>{"use strict";t.d(a,{a:()=>n});var s=t(25166);function n({hex:e}){return e.length<=10?s.jsx("span",{children:e}):(0,s.jsxs)("span",{children:[s.jsx("span",{className:"after:select-none after:content-['…']",children:e.slice(0,6)}),s.jsx("span",{className:"tracking-[-1ch] text-transparent",children:e.slice(6,-4)}),e.slice(-4)]})}},12218:(e,a,t)=>{"use strict";t.r(a),t.d(a,{$$typeof:()=>i,__esModule:()=>r,default:()=>c});var s=t(12849);let n=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/[chainName]/layout.tsx`),{__esModule:r,$$typeof:i}=n;n.default;let c=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/[chainName]/layout.tsx#default`)},37455:(e,a,t)=>{"use strict";t.r(a),t.d(a,{$$typeof:()=>i,__esModule:()=>r,default:()=>c});var s=t(12849);let n=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/layout.tsx`),{__esModule:r,$$typeof:i}=n;n.default;let c=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/layout.tsx#default`)}};
1
+ exports.id=3883,exports.ids=[3883],exports.modules={95441:(e,a,t)=>{Promise.resolve().then(t.bind(t,69343))},27575:(e,a,t)=>{Promise.resolve().then(t.bind(t,9091))},69343:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>r});var s=t(58287),n=t(72069);function r({params:{chainName:e},children:a}){return(0,n.oK)(e)?a:(0,s.notFound)()}},9091:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>eN});var s=t(25166),n=t(58287),r=t(72069),i=t(38913),c=t(2561),l=t(41440),d=t(15503),o=t(97246),u=t(74085),f=t(65520);function p(){let{id:e}=(0,u.A)(),{data:a}=(0,o.O)({watch:!0,chainId:e,query:{refetchInterval:1e3}});return s.jsx("div",{className:"inline-block w-[50px]",children:a?(0,s.jsxs)("div",{className:"flex items-center justify-end gap-x-2 text-xs font-extrabold text-green-600",children:[s.jsx("span",{className:"inline-block h-[8px] w-[8px] animate-pulse rounded-full bg-success"}),s.jsx("span",{className:"opacity-70",children:a.toString()})]}):s.jsx(f.O,{className:"h-[10px]"})})}var m=t(49069),h=t(30966),x=t(48233),b=t(49936),y=t(36851),j=t(40911),g=t(32880),w=t(22998),v=t(79846),N=t(98046),k=t(73148),C=t(56356),z=t(73383),O=t(51745),A=t(19471);let Z=["0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80","0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d","0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a","0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6","0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a","0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba","0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e","0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356","0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97","0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"].map(e=>(0,O.L)(e)),$=e=>{let a=e!==y.O.id;return Z.map((e,t)=>(function({id:e,name:a,accounts:t,disabled:s}){if(!t.length)throw Error("missing accounts");let n=!1;return(0,A.K)(()=>({id:e,name:a,type:"anvil",accounts:t,connect:async()=>(n=!0,{accounts:t.map(e=>e.address),chainId:y.O.id}),async disconnect(){n=!1},getAccounts:async()=>t.map(e=>e.address),getChainId:async()=>y.O.id,getProvider:async()=>(0,z.d)()({chain:y.O}),async isAuthorized(){return!s&&!!n&&!!(await this.getAccounts()).length},async onAccountsChanged(){},async onDisconnect(){},onChainChanged(){}}))})({id:`anvil-${t}`,name:`Anvil #${t+1}`,accounts:[e],disabled:a}))};function I(e){return"anvil"===e.type}var _=t(70454),K=t(49811),P=t(40105),R=t(92484),S=t(69822);let U=S.fC;S.ZA;let E=S.B4,T=C.forwardRef(({className:e,children:a,...t},n)=>(0,s.jsxs)(S.xz,{ref:n,className:(0,h.cn)("flex h-10 w-full items-center justify-between px-3 py-2 text-sm","rounded-md border border-input bg-background ring-offset-background","placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...t,children:[a,s.jsx(S.JO,{asChild:!0,children:s.jsx(K.Z,{className:"h-4 w-4 opacity-50"})})]}));T.displayName=S.xz.displayName;let D=C.forwardRef(({className:e,...a},t)=>s.jsx(S.u_,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",e),...a,children:s.jsx(P.Z,{className:"h-4 w-4"})}));D.displayName=S.u_.displayName;let W=C.forwardRef(({className:e,...a},t)=>s.jsx(S.$G,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",e),...a,children:s.jsx(K.Z,{className:"h-4 w-4"})}));W.displayName=S.$G.displayName;let B=C.forwardRef(({className:e,children:a,position:t="popper",...n},r)=>s.jsx(S.h_,{children:(0,s.jsxs)(S.VY,{ref:r,className:(0,h.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","popper"===t&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...n,children:[s.jsx(D,{}),s.jsx(S.l_,{className:(0,h.cn)("p-1","popper"===t&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),s.jsx(W,{})]})}));B.displayName=S.VY.displayName,C.forwardRef(({className:e,...a},t)=>s.jsx(S.__,{ref:t,className:(0,h.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...a})).displayName=S.__.displayName;let F=C.forwardRef(({className:e,children:a,...t},n)=>(0,s.jsxs)(S.ck,{ref:n,className:(0,h.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(S.wU,{children:s.jsx(R.Z,{className:"h-4 w-4"})})}),s.jsx(S.eT,{children:a})]}));F.displayName=S.ck.displayName,C.forwardRef(({className:e,...a},t)=>s.jsx(S.Z0,{ref:t,className:(0,h.cn)("-mx-1 my-1 h-px bg-muted",e),...a})).displayName=S.Z0.displayName;var M=t(93920);function Y({connector:e}){let a=e.accounts[0]?.address,{data:t}=(0,w.K)({address:a,query:{refetchInterval:15e3,select:e=>e?.value,enabled:!!a}});return(0,s.jsxs)(F,{value:e.id,className:"font-mono",children:[e.name,void 0!==t&&` (${(0,h.az)(t)} ETH)`," ",a&&(0,s.jsxs)("span",{className:"opacity-70",children:["(",s.jsx(M.a,{hex:a}),")"]})]},a)}function G(){let[e,a]=(0,C.useState)(!1),{connector:t}=(0,v.m)(),{connect:n}=(0,N.$)(),{openConnectModal:r}=(0,j.We)(),i=[...(0,k.Y)().filter(I)];return(0,s.jsxs)(U,{open:e,onOpenChange:a,value:t?.id,onValueChange:e=>{let a=i.find(a=>a.id===e);a&&n({connector:a})},children:[s.jsx(_.z,{size:"sm",asChild:!0,children:(0,s.jsxs)(T,{children:[s.jsx(x.Z,{className:"mr-2 inline-block h-4 w-4"}),s.jsx(E,{placeholder:"Connect"})]})}),(0,s.jsxs)(B,{children:[i.map(e=>s.jsx(Y,{connector:e},e.id)),(0,s.jsxs)(_.z,{size:"sm",className:"mt-2 w-full font-mono",onClick:()=>{a(!1),r?.()},children:[s.jsx(g.Z,{className:"mr-2 inline-block h-4 w-4"}),"Add wallet"]})]})]})}function V(){let{id:e}=(0,u.A)();return s.jsx(j.NL.Custom,{children:({account:a,chain:t,openAccountModal:n,openChainModal:r,openConnectModal:i,mounted:c})=>s.jsx("div",{className:(0,h.cn)({"pointer-events-none select-none opacity-0":!c}),children:c&&a&&t?t.unsupported?(0,s.jsxs)(_.z,{type:"button",size:"sm",onClick:r,children:[s.jsx(b.Z,{className:"mr-2 inline-block h-4 w-4"}),"Wrong network"]}):s.jsx("div",{className:"flex-wrap gap-2",children:(0,s.jsxs)(_.z,{type:"button",size:"sm",onClick:n,variant:"secondary",children:[s.jsx(x.Z,{className:"mr-2 inline-block h-4 w-4"}),a.displayName,s.jsx("span",{className:"ml-2 font-normal opacity-70",children:a.displayBalance?` (${a.displayBalance})`:""})]})}):e===y.O.id?s.jsx(G,{}):(0,s.jsxs)(_.z,{type:"button",size:"sm",onClick:i,children:[s.jsx(x.Z,{className:"mr-2 inline-block h-4 w-4"})," Connect"]})})})}function q({href:e,children:a}){let t=(0,n.usePathname)(),r=(0,l.g)();return s.jsx(c.default,{href:r(e),className:"group px-3 text-sm font-semibold uppercase",children:s.jsx("span",{className:(0,h.cn)("flex border-b-4 border-transparent pb-3 pt-4 transition group-hover:border-orange-500/30",t===r(e)?"border-orange-500 group-hover:border-orange-400":null),children:a})})}function H(){let{data:e,isFetched:a}=(0,d.b)();return(0,s.jsxs)("div",{className:"pb-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"-mx-3 flex",children:[s.jsx(q,{href:"explore",children:"Explore"}),s.jsx(q,{href:"interact",children:"Interact"}),s.jsx(q,{href:"observe",children:"Observe"})]}),a&&!e?.isWorldDeployed&&(0,s.jsxs)("h4",{className:"font-mono text-sm font-bold uppercase opacity-70",children:["Waiting for world deploy ",s.jsx(i.Z,{className:"inline-block h-4 w-4 animate-spin"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-x-4",children:[s.jsx(p,{}),s.jsx(V,{})]})]}),s.jsx(m.Z,{})]})}var L=t(73895),J=t(72785),Q=t(34143),X=t(17167),ee=t(38563),ea=t(30950);t(89029);var et=t(8138),es=t(92273);let en=new et.S;function er({children:e}){let a=(0,u.A)(),t=(0,C.useMemo)(()=>(0,L._)({chains:[a],connectors:[(0,Q.L)(),(0,X.O)({dappMetadata:{name:"World Explorer"}}),(0,ee.T)(),...$(a.id)],transports:{[a.id]:(0,z.d)()},ssr:!0}),[a]);return s.jsx(J.F,{config:t,children:s.jsx(es.aH,{client:en,children:s.jsx(j.pj,{theme:(0,ea.$)(),children:e})})})}var ei=t(34182),ec=t(11772),el=t(26821),ed=t(47754),eo=t(30614),eu=t(87975),ef=t(87894),ep=t(18447),em=t(3975),eh=t(26058),ex=t(18971),eb=t(52302),ey=t(59005),ej=t(26634);let eg={type:"event",name:"UserOperationEvent",inputs:[{type:"bytes32",name:"userOpHash",indexed:!0},{type:"address",name:"sender",indexed:!0},{type:"address",name:"paymaster",indexed:!0},{type:"uint256",name:"nonce",indexed:!1},{type:"bool",name:"success",indexed:!1},{type:"uint256",name:"actualGasCost",indexed:!1},{type:"uint256",name:"actualGasUsed",indexed:!1}]};function ew({abi:e,target:a,data:t,value:s}){let n,r,i;try{let a=(0,ei.p)({abi:e,data:t});if(n=a.functionName,r=a.args,"callFrom"===n){let[a,,t]=r,s=(0,ei.p)({abi:e,data:t});n=s.functionName,r=s.args,i=a}}catch(e){n=t.length>10?t.slice(0,10):"unknown"}return{to:a,from:i,functionName:n,args:r,value:s}}function ev(){let{id:e}=(0,u.A)(),{worldAddress:a}=(0,n.useParams)(),t=(0,ef.Z)(),{data:s}=(0,d.b)(),r=s?.abi,{transactions:i,setTransaction:c,updateTransaction:l}=(0,eb.oR)(ej.h);(0,eb.oR)(ey.store,e=>e.writes);let o=(0,C.useCallback)(({hash:e,writeId:t,timestamp:s,receipt:n,transaction:i,userOperation:l})=>{if(!r)return;let{functionName:d,args:o}=(0,ei.p)({abi:(0,ec.V)(["function execute(address target, uint256 value, bytes calldata data)","function executeBatch((address target,uint256 value,bytes data)[])"]),data:l.callData}),u=(function({abi:e,functionName:a,decodedArgs:t}){if("execute"===a){let a=t[0],s=t[1];return[ew({abi:e,target:a,data:t[2],value:s})]}return"executeBatch"===a?t[0].map(({target:a,data:t,value:s})=>ew({abi:e,target:a,data:t,value:s})):[]})({abi:r,functionName:d,decodedArgs:o}).filter(({to:e})=>e&&(0,el.K)(e)===(0,el.K)(a));if(0===u.length)return;let f=(0,ed.h)({abi:[...r,eg],logs:n.logs}),p=f.find(({eventName:e})=>"UserOperationEvent"===e);c({hash:e,writeId:t??e,from:u[0]?.from??i.from,timestamp:s,transaction:i,calls:u,receipt:n,logs:f,value:i.value,status:p?.args.success?"success":"reverted"})},[r,c,a]),f=(0,C.useCallback)(async({writeId:e,timestamp:a,transaction:s})=>{if(!r)return;let n=s.hash,i=await (0,em.e)(t,{hash:s.hash});for(let t of(0,ei.p)({abi:eo.i,data:s.input}).args[0])o({hash:n,writeId:e,timestamp:a,receipt:i,transaction:s,userOperation:t})},[r,o,t]),p=(0,C.useCallback)(async({writeId:e,hash:s,timestamp:n,transaction:i})=>{let d,o,u,f;if(!r||!i.to)return;try{let e=(0,ei.p)({abi:r,data:i.input});d=e.functionName,o=e.args}catch(e){u=e,d=i.input.length>10?i.input.slice(0,10):"unknown"}c({hash:s,writeId:e??s,from:i.from,timestamp:n,transaction:i,status:"pending",calls:[{to:i.to,functionName:d,args:o}],value:i.value});try{f=await (0,em.e)(t,{hash:s})}catch{console.error(`Failed to fetch transaction receipt. Transaction hash: ${s}`)}if(f&&"reverted"===f.status&&d)try{await (0,eh.a)(t,{account:i.from,address:a,abi:r,value:i.value,blockNumber:f.blockNumber,functionName:d,args:o})}catch(e){u=e}let p=f?f.status:"unknown",m=(0,ed.h)({abi:r,logs:f?.logs||[]});l(s,{receipt:f,logs:m,status:p,error:u})},[r,t,a,c,l]),m=(0,C.useCallback)(async({hash:e,writeId:s,timestamp:n})=>{if(!r)return;let i=await (0,ex.f)(t,{hash:e});i.to&&(0,el.K)(i.to)===(0,el.K)(eu.V)?f({writeId:s,timestamp:n,transaction:i}):i.to&&(0,el.K)(i.to)===(0,el.K)(a)&&p({hash:e,writeId:s,timestamp:n,transaction:i})},[r,t,a,f,p]);return(0,ep.C)({onBlock(e){for(let a of e.transactions)i.find(e=>e.hash===a)||m({hash:a,timestamp:e.timestamp})},chainId:e,pollingInterval:500}),null}function eN({params:{chainName:e},children:a}){return(0,r.oK)(e)?(0,s.jsxs)(er,{children:[(0,s.jsxs)("div",{className:"flex h-screen flex-col",children:[s.jsx(H,{}),a]}),s.jsx(ev,{})]}):(0,n.notFound)()}},26634:(e,a,t)=>{"use strict";t.d(a,{h:()=>s});let s=(0,t(35517).M)()(e=>({transactions:[],setTransaction:a=>e(e=>({transactions:[...e.transactions,a]})),updateTransaction:(a,t)=>e(e=>({transactions:e.transactions.map(e=>e.hash===a?{...e,...t}:e)}))}))},74085:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var s=t(58287),n=t(72069);function r(){let{chainName:e}=(0,s.useParams)();return(0,n.Yx)(e),n.df[e]}},15503:(e,a,t)=>{"use strict";t.d(a,{b:()=>i});var s=t(58287),n=t(81390),r=t(72069);function i(){let{chainName:e,worldAddress:a}=(0,s.useParams)();(0,r.Yx)(e);let{id:t}=r.df[e];return(0,n.a)({queryKey:["worldAbi",e,a],queryFn:async()=>{let e=await fetch(`/api/world-abi?${new URLSearchParams({chainId:t.toString(),worldAddress:a})}`);return await e.json()},select:e=>({abi:e.abi||[],isWorldDeployed:e.isWorldDeployed}),refetchInterval:15e3})}},72069:(e,a,t)=>{"use strict";t.d(a,{is:()=>p,M0:()=>u,oK:()=>m,df:()=>f,wG:()=>h,Yx:()=>x});var s=t(36851),n=t(9209),r=t(14501),i=t(19887),c=t(42191);n.t;var l={...r.g,iconUrls:["https://redstone.xyz/chain-icons/redstone.png"],indexerUrl:"https://indexer.mud.redstonechain.com"},d={...i.T,iconUrls:["https://redstone.xyz/chain-icons/garnet.png"],indexerUrl:"https://indexer.mud.garnetchain.com"},o={...c.i,name:"Rhodolite Devnet",testnet:!0,id:17420,sourceId:17001,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.rhodolitechain.com"],webSocket:["wss://rpc.rhodolitechain.com"]}},iconUrls:["https://redstone.xyz/chain-icons/rhodolite.png"],indexerUrl:"https://indexer.mud.rhodolitechain.com"};let u=["world","store","metadata","puppet","erc20-puppet","erc721-puppet"],f={anvil:s.O,rhodolite:o,garnet:d,redstone:l},p=Object.fromEntries(Object.entries(f).map(([e,a])=>[a.id,e]));function m(e){return"string"==typeof e&&e in f}function h(e){if(!("number"==typeof e&&e in p))throw Error(`Invalid chain ID. Supported chains are: ${Object.keys(p).join(", ")}.`)}function x(e){if(!m(e))throw Error(`Invalid chain name. Supported chains are: ${Object.keys(f).join(", ")}.`)}},49069:(e,a,t)=>{"use strict";t.d(a,{Z:()=>c});var s=t(25166),n=t(56356),r=t(4381),i=t(30966);let c=n.forwardRef(({className:e,orientation:a="horizontal",decorative:t=!0,...n},c)=>s.jsx(r.f,{ref:c,decorative:t,orientation:a,className:(0,i.cn)("shrink-0 bg-border","horizontal"===a?"h-[1px] w-full":"h-full w-[1px]",e),...n}));c.displayName=r.f.displayName},65520:(e,a,t)=>{"use strict";t.d(a,{O:()=>r});var s=t(25166),n=t(30966);function r({className:e,...a}){return s.jsx("div",{className:(0,n.cn)("animate-pulse rounded-md bg-muted",e),...a})}},93920:(e,a,t)=>{"use strict";t.d(a,{a:()=>n});var s=t(25166);function n({hex:e}){return e.length<=10?s.jsx("span",{children:e}):(0,s.jsxs)("span",{children:[s.jsx("span",{className:"after:select-none after:content-['…']",children:e.slice(0,6)}),s.jsx("span",{className:"tracking-[-1ch] text-transparent",children:e.slice(6,-4)}),e.slice(-4)]})}},12218:(e,a,t)=>{"use strict";t.r(a),t.d(a,{$$typeof:()=>i,__esModule:()=>r,default:()=>c});var s=t(12849);let n=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/[chainName]/layout.tsx`),{__esModule:r,$$typeof:i}=n;n.default;let c=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/[chainName]/layout.tsx#default`)},37455:(e,a,t)=>{"use strict";t.r(a),t.d(a,{$$typeof:()=>i,__esModule:()=>r,default:()=>c});var s=t(12849);let n=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/layout.tsx`),{__esModule:r,$$typeof:i}=n;n.default;let c=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/layout.tsx#default`)}};
@@ -1 +1 @@
1
- self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-78c92fac7aa8fdd8.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:["static/timcPlIPw2-liAAvE25KY/_buildManifest.js","static/timcPlIPw2-liAAvE25KY/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-f1cdee55022e98eb.js","static/chunks/3a94010f-972d722a7f97aaac.js","static/chunks/8474-ba633b584d9d2149.js","static/chunks/main-app-3d14824c033e7085.js"],pages:{"/_app":["static/chunks/webpack-f1cdee55022e98eb.js","static/chunks/framework-af9b1d45774ad36d.js","static/chunks/main-a84bf2e552a87302.js","static/chunks/pages/_app-d8f112fe7e3faf97.js"],"/_error":["static/chunks/webpack-f1cdee55022e98eb.js","static/chunks/framework-af9b1d45774ad36d.js","static/chunks/main-a84bf2e552a87302.js","static/chunks/pages/_error-4add521bff0031ae.js"]},ampFirstPages:[]};
1
+ self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-78c92fac7aa8fdd8.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:["static/BQ_8YgIMmp3OV-kp6AuFr/_buildManifest.js","static/BQ_8YgIMmp3OV-kp6AuFr/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-f1cdee55022e98eb.js","static/chunks/3a94010f-972d722a7f97aaac.js","static/chunks/8474-ba633b584d9d2149.js","static/chunks/main-app-3d14824c033e7085.js"],pages:{"/_app":["static/chunks/webpack-f1cdee55022e98eb.js","static/chunks/framework-af9b1d45774ad36d.js","static/chunks/main-a84bf2e552a87302.js","static/chunks/pages/_app-d8f112fe7e3faf97.js"],"/_error":["static/chunks/webpack-f1cdee55022e98eb.js","static/chunks/framework-af9b1d45774ad36d.js","static/chunks/main-a84bf2e552a87302.js","static/chunks/pages/_error-4add521bff0031ae.js"]},ampFirstPages:[]};
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-f1cdee55022e98eb.js"/><script src="/_next/static/chunks/3a94010f-972d722a7f97aaac.js" async=""></script><script src="/_next/static/chunks/8474-ba633b584d9d2149.js" async=""></script><script src="/_next/static/chunks/main-app-3d14824c033e7085.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-f1cdee55022e98eb.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[69222,[],\"\"]\n3:I[5371,[],\"\"]\n4:I[80363,[],\"\"]\na:I[18541,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[null,[\"$\",\"$L1\",null,{\"buildId\":\"timcPlIPw2-liAAvE25KY\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/_not-found\",\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],null],null]},[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"next-size-adjust\"}]]\n2:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-f1cdee55022e98eb.js"/><script src="/_next/static/chunks/3a94010f-972d722a7f97aaac.js" async=""></script><script src="/_next/static/chunks/8474-ba633b584d9d2149.js" async=""></script><script src="/_next/static/chunks/main-app-3d14824c033e7085.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-f1cdee55022e98eb.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[69222,[],\"\"]\n3:I[5371,[],\"\"]\n4:I[80363,[],\"\"]\na:I[18541,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[null,[\"$\",\"$L1\",null,{\"buildId\":\"BQ_8YgIMmp3OV-kp6AuFr\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/_not-found\",\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],null],null]},[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"next-size-adjust\"}]]\n2:null\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-f1cdee55022e98eb.js" defer=""></script><script src="/_next/static/chunks/framework-af9b1d45774ad36d.js" defer=""></script><script src="/_next/static/chunks/main-a84bf2e552a87302.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d8f112fe7e3faf97.js" defer=""></script><script src="/_next/static/chunks/pages/_error-4add521bff0031ae.js" defer=""></script><script src="/_next/static/timcPlIPw2-liAAvE25KY/_buildManifest.js" defer=""></script><script src="/_next/static/timcPlIPw2-liAAvE25KY/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"timcPlIPw2-liAAvE25KY","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-f1cdee55022e98eb.js" defer=""></script><script src="/_next/static/chunks/framework-af9b1d45774ad36d.js" defer=""></script><script src="/_next/static/chunks/main-a84bf2e552a87302.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d8f112fe7e3faf97.js" defer=""></script><script src="/_next/static/chunks/pages/_error-4add521bff0031ae.js" defer=""></script><script src="/_next/static/BQ_8YgIMmp3OV-kp6AuFr/_buildManifest.js" defer=""></script><script src="/_next/static/BQ_8YgIMmp3OV-kp6AuFr/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"BQ_8YgIMmp3OV-kp6AuFr","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\"node\":{},\"edge\":{},\"encryptionKey\":\"DpSBGDYol3pMMoWi7SMDk72RlZDxkhUSPrC8rKU3Nj4=\"}"
1
+ self.__RSC_SERVER_MANIFEST="{\"node\":{},\"edge\":{},\"encryptionKey\":\"l6DmauBC7jxXGvsEOweNcqMkaPzyaObt3gbG3wIO54c=\"}"
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"DpSBGDYol3pMMoWi7SMDk72RlZDxkhUSPrC8rKU3Nj4="}
1
+ {"node":{},"edge":{},"encryptionKey":"l6DmauBC7jxXGvsEOweNcqMkaPzyaObt3gbG3wIO54c="}
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1667],{10958:function(e,t,n){Promise.resolve().then(n.bind(n,60809))},60809:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eN}});var a=n(75536),r=n(6270),s=n(84367),i=n(97554),c=n(45215),o=n(23638),l=n(63643),d=n(11362),u=n(35605),f=n(68347);function p(){let{id:e}=(0,u.A)(),{data:t}=(0,d.O)({watch:!0,chainId:e,query:{refetchInterval:1e3}});return(0,a.jsx)("div",{className:"inline-block w-[50px]",children:t?(0,a.jsxs)("div",{className:"flex items-center justify-end gap-x-2 text-xs font-extrabold text-green-600",children:[(0,a.jsx)("span",{className:"inline-block h-[8px] w-[8px] animate-pulse rounded-full bg-success"}),(0,a.jsx)("span",{className:"opacity-70",children:t.toString()})]}):(0,a.jsx)(f.O,{className:"h-[10px]"})})}var m=n(35431),h=n(66585),x=n(52616),b=n(1372),v=n(79617),g=n(1839),y=n(92463),j=n(91062),w=n(31848),N=n(3343),k=n(36792),O=n(89702),C=n(5739),z=n(63322),I=n(19389);let Z=["0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80","0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d","0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a","0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6","0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a","0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba","0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e","0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356","0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97","0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"].map(e=>(0,z.L)(e)),_=e=>{let t=e!==v.O.id;return Z.map((e,n)=>(function(e){let{id:t,name:n,accounts:a,disabled:r}=e;if(!a.length)throw Error("missing accounts");let s=!1;return(0,I.K)(()=>({id:t,name:n,type:"anvil",accounts:a,connect:async()=>(s=!0,{accounts:a.map(e=>e.address),chainId:v.O.id}),async disconnect(){s=!1},getAccounts:async()=>a.map(e=>e.address),getChainId:async()=>v.O.id,getProvider:async()=>(0,C.d)()({chain:v.O}),async isAuthorized(){return!r&&!!s&&!!(await this.getAccounts()).length},async onAccountsChanged(){},async onDisconnect(){},onChainChanged(){}}))})({id:"anvil-".concat(n),name:"Anvil #".concat(n+1),accounts:[e],disabled:t}))};function A(e){return"anvil"===e.type}var E=n(85723),R=n(55823),U=n(19362),S=n(51550),F=n(93715);let K=F.fC;F.ZA;let M=F.B4,B=O.forwardRef((e,t)=>{let{className:n,children:r,...s}=e;return(0,a.jsxs)(F.xz,{ref:t,className:(0,h.cn)("flex h-10 w-full items-center justify-between px-3 py-2 text-sm","rounded-md border border-input bg-background ring-offset-background","placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...s,children:[r,(0,a.jsx)(F.JO,{asChild:!0,children:(0,a.jsx)(R.Z,{className:"h-4 w-4 opacity-50"})})]})});B.displayName=F.xz.displayName;let T=O.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(F.u_,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",n),...r,children:(0,a.jsx)(U.Z,{className:"h-4 w-4"})})});T.displayName=F.u_.displayName;let D=O.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(F.$G,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",n),...r,children:(0,a.jsx)(R.Z,{className:"h-4 w-4"})})});D.displayName=F.$G.displayName;let H=O.forwardRef((e,t)=>{let{className:n,children:r,position:s="popper",...i}=e;return(0,a.jsx)(F.h_,{children:(0,a.jsxs)(F.VY,{ref:t,className:(0,h.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:s,...i,children:[(0,a.jsx)(T,{}),(0,a.jsx)(F.l_,{className:(0,h.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,a.jsx)(D,{})]})})});H.displayName=F.VY.displayName,O.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(F.__,{ref:t,className:(0,h.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...r})}).displayName=F.__.displayName;let P=O.forwardRef((e,t)=>{let{className:n,children:r,...s}=e;return(0,a.jsxs)(F.ck,{ref:t,className:(0,h.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(F.wU,{children:(0,a.jsx)(S.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(F.eT,{children:r})]})});P.displayName=F.ck.displayName,O.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(F.Z0,{ref:t,className:(0,h.cn)("-mx-1 my-1 h-px bg-muted",n),...r})}).displayName=F.Z0.displayName;var W=n(71118);function L(e){var t;let{connector:n}=e,r=null===(t=n.accounts[0])||void 0===t?void 0:t.address,{data:s}=(0,j.K)({address:r,query:{refetchInterval:15e3,select:e=>null==e?void 0:e.value,enabled:!!r}});return(0,a.jsxs)(P,{value:n.id,className:"font-mono",children:[n.name,void 0!==s&&" (".concat((0,h.az)(s)," ETH)")," ",r&&(0,a.jsxs)("span",{className:"opacity-70",children:["(",(0,a.jsx)(W.a,{hex:r}),")"]})]},r)}function V(){let[e,t]=(0,O.useState)(!1),{connector:n}=(0,w.m)(),{connect:r}=(0,N.$)(),{openConnectModal:s}=(0,g.We)(),i=[...(0,k.Y)().filter(A)];return(0,a.jsxs)(K,{open:e,onOpenChange:t,value:null==n?void 0:n.id,onValueChange:e=>{let t=i.find(t=>t.id===e);t&&r({connector:t})},children:[(0,a.jsx)(E.z,{size:"sm",asChild:!0,children:(0,a.jsxs)(B,{children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"}),(0,a.jsx)(M,{placeholder:"Connect"})]})}),(0,a.jsxs)(H,{children:[i.map(e=>(0,a.jsx)(L,{connector:e},e.id)),(0,a.jsxs)(E.z,{size:"sm",className:"mt-2 w-full font-mono",onClick:()=>{t(!1),null==s||s()},children:[(0,a.jsx)(y.Z,{className:"mr-2 inline-block h-4 w-4"}),"Add wallet"]})]})]})}function Y(){let{id:e}=(0,u.A)();return(0,a.jsx)(g.NL.Custom,{children:t=>{let{account:n,chain:r,openAccountModal:s,openChainModal:i,openConnectModal:c,mounted:o}=t;return(0,a.jsx)("div",{className:(0,h.cn)({"pointer-events-none select-none opacity-0":!o}),children:o&&n&&r?r.unsupported?(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:i,children:[(0,a.jsx)(b.Z,{className:"mr-2 inline-block h-4 w-4"}),"Wrong network"]}):(0,a.jsx)("div",{className:"flex-wrap gap-2",children:(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:s,variant:"secondary",children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"}),n.displayName,(0,a.jsx)("span",{className:"ml-2 font-normal opacity-70",children:n.displayBalance?" (".concat(n.displayBalance,")"):""})]})}):e===v.O.id?(0,a.jsx)(V,{}):(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:c,children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"})," Connect"]})})}})}function G(e){let{href:t,children:n}=e,s=(0,r.usePathname)(),i=(0,o.g)();return(0,a.jsx)(c.default,{href:i(t),className:"group px-3 text-sm font-semibold uppercase",children:(0,a.jsx)("span",{className:(0,h.cn)("flex border-b-4 border-transparent pb-3 pt-4 transition group-hover:border-orange-500/30",s===i(t)?"border-orange-500 group-hover:border-orange-400":null),children:n})})}function q(){let{data:e,isFetched:t}=(0,l.b)();return(0,a.jsxs)("div",{className:"pb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"-mx-3 flex",children:[(0,a.jsx)(G,{href:"explore",children:"Explore"}),(0,a.jsx)(G,{href:"interact",children:"Interact"}),(0,a.jsx)(G,{href:"observe",children:"Observe"})]}),t&&!(null==e?void 0:e.isWorldDeployed)&&(0,a.jsxs)("h4",{className:"font-mono text-sm font-bold uppercase opacity-70",children:["Waiting for world deploy ",(0,a.jsx)(i.Z,{className:"inline-block h-4 w-4 animate-spin"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,a.jsx)(p,{}),(0,a.jsx)(Y,{})]})]}),(0,a.jsx)(m.Z,{})]})}var $=n(84511),J=n(1405),Q=n(90067),X=n(43240),ee=n(82226),et=n(2451);n(64612);var en=n(91004),ea=n(50693);let er=new en.S;function es(e){let{children:t}=e,n=(0,u.A)(),r=(0,O.useMemo)(()=>(0,$._)({chains:[n],connectors:[(0,Q.L)(),(0,X.O)({dappMetadata:{name:"World Explorer"}}),(0,ee.T)(),..._(n.id)],transports:{[n.id]:(0,C.d)()},ssr:!0}),[n]);return(0,a.jsx)(J.F,{config:r,children:(0,a.jsx)(ea.aH,{client:er,children:(0,a.jsx)(g.pj,{theme:(0,et.$)(),children:t})})})}var ei=n(12565),ec=n(95483),eo=n(55024),el=n(88873),ed=n(4876),eu=n(62886),ef=n(97869),ep=n(64236),em=n(8218),eh=n(2913),ex=n(25779),eb=n(60188),ev=n(57253),eg=n(50011);let ey={type:"event",name:"UserOperationEvent",inputs:[{type:"bytes32",name:"userOpHash",indexed:!0},{type:"address",name:"sender",indexed:!0},{type:"address",name:"paymaster",indexed:!0},{type:"uint256",name:"nonce",indexed:!1},{type:"bool",name:"success",indexed:!1},{type:"uint256",name:"actualGasCost",indexed:!1},{type:"uint256",name:"actualGasUsed",indexed:!1}]};function ej(e){let t,n,a,{abi:r,target:s,data:i,value:c}=e;try{let e=(0,ei.p)({abi:r,data:i});if(t=e.functionName,n=e.args,"callFrom"===t){let[e,,s]=n,i=(0,ei.p)({abi:r,data:s});t=i.functionName,n=i.args,a=e}}catch(e){t=i.length>10?i.slice(0,10):"unknown"}return{to:s,from:a,functionName:t,args:n,value:c}}function ew(){let{id:e}=(0,u.A)(),{worldAddress:t}=(0,r.useParams)(),n=(0,ef.Z)(),{data:a}=(0,l.b)(),s=null==a?void 0:a.abi,{transactions:i,setTransaction:c,updateTransaction:o}=(0,eb.oR)(eg.h),d=(0,eb.oR)(ev.store,e=>e.writes),f=(0,O.useCallback)(e=>{var n,a;let{hash:r,writeId:i,timestamp:o,receipt:l,transaction:d,userOperation:u}=e;if(!s)return;let{functionName:f,args:p}=(0,ei.p)({abi:(0,ec.V)(["function execute(address target, uint256 value, bytes calldata data)","function executeBatch((address target,uint256 value,bytes data)[])"]),data:u.callData}),m=(function(e){let{abi:t,functionName:n,decodedArgs:a}=e;if("execute"===n){let e=a[0],n=a[1];return[ej({abi:t,target:e,data:a[2],value:n})]}return"executeBatch"===n?a[0].map(e=>{let{target:n,data:a,value:r}=e;return ej({abi:t,target:n,data:a,value:r})}):[]})({abi:s,functionName:f,decodedArgs:p}).filter(e=>{let{to:n}=e;return n&&(0,eo.K)(n)===(0,eo.K)(t)});if(0===m.length)return;let h=(0,el.h)({abi:[...s,ey],logs:l.logs}),x=h.find(e=>{let{eventName:t}=e;return"UserOperationEvent"===t});c({hash:r,writeId:null!=i?i:r,from:null!==(a=null===(n=m[0])||void 0===n?void 0:n.from)&&void 0!==a?a:d.from,timestamp:o,transaction:d,calls:m,receipt:l,logs:h,value:d.value,status:(null==x?void 0:x.args.success)?"success":"reverted"})},[s,c,t]),p=(0,O.useCallback)(async e=>{let{writeId:t,timestamp:a,transaction:r}=e;if(!s)return;let i=r.hash,c=await (0,em.e)(n,{hash:r.hash});for(let e of(0,ei.p)({abi:ed.i,data:r.input}).args[0])f({hash:i,writeId:t,timestamp:a,receipt:c,transaction:r,userOperation:e})},[s,f,n]),m=(0,O.useCallback)(async e=>{let a,r,i,l,{writeId:d,hash:u,timestamp:f,transaction:p}=e;if(!s||!p.to)return;try{let e=(0,ei.p)({abi:s,data:p.input});a=e.functionName,r=e.args}catch(e){i=e,a=p.input.length>10?p.input.slice(0,10):"unknown"}c({hash:u,writeId:null!=d?d:u,from:p.from,timestamp:f,transaction:p,status:"pending",calls:[{to:p.to,functionName:a,args:r}],value:p.value});try{l=await (0,em.e)(n,{hash:u})}catch(e){console.error("Failed to fetch transaction receipt. Transaction hash: ".concat(u))}if(l&&"reverted"===l.status&&a)try{await (0,eh.a)(n,{account:p.from,address:t,abi:s,value:p.value,blockNumber:l.blockNumber,functionName:a,args:r})}catch(e){i=e}let m=l?l.status:"unknown",h=(0,el.h)({abi:s,logs:(null==l?void 0:l.logs)||[]});o(u,{receipt:l,logs:h,status:m,error:i})},[s,n,t,c,o]),h=(0,O.useCallback)(async e=>{let{hash:a,writeId:r,timestamp:i}=e;if(!s)return;let c=await (0,ex.f)(n,{hash:a});c.to&&(0,eo.K)(c.to)===(0,eo.K)(eu.V)?p({writeId:r,timestamp:i,transaction:c}):c.to&&(0,eo.K)(c.to)===(0,eo.K)(t)&&m({hash:a,writeId:r,timestamp:i,transaction:c})},[s,n,t,p,m]);return(0,O.useEffect)(()=>{for(let{hash:e,writeId:t,time:n}of Object.values(d))e&&!i.find(t=>t.hash===e)&&h({hash:e,writeId:t,timestamp:BigInt(n)/1000n})},[h,d,i,t]),(0,ep.C)({onBlock(e){for(let t of e.transactions)i.find(e=>e.hash===t)||h({hash:t,timestamp:e.timestamp})},chainId:e,pollingInterval:500}),null}function eN(e){let{params:{chainName:t},children:n}=e;return(0,s.oK)(t)?(0,a.jsxs)(es,{children:[(0,a.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,a.jsx)(q,{}),n]}),(0,a.jsx)(ew,{})]}):(0,r.notFound)()}},50011:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});let a=(0,n(30521).M)()(e=>({transactions:[],setTransaction:t=>e(e=>({transactions:[...e.transactions,t]})),updateTransaction:(t,n)=>e(e=>({transactions:e.transactions.map(e=>e.hash===t?{...e,...n}:e)}))}))},35605:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var a=n(6270),r=n(84367);function s(){let{chainName:e}=(0,a.useParams)();return(0,r.Yx)(e),r.df[e]}},23638:function(e,t,n){"use strict";n.d(t,{g:function(){return s}});var a=n(6270),r=n(39723);function s(){let{chainName:e,worldAddress:t}=(0,a.useParams)();return n=>"".concat((0,r.m)(e,t),"/").concat(n)}},63643:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var a=n(6270),r=n(95951),s=n(84367);function i(){let{chainName:e,worldAddress:t}=(0,a.useParams)();(0,s.Yx)(e);let{id:n}=s.df[e];return(0,r.a)({queryKey:["worldAbi",e,t],queryFn:async()=>{let e=await fetch("/api/world-abi?".concat(new URLSearchParams({chainId:n.toString(),worldAddress:t})));return await e.json()},select:e=>({abi:e.abi||[],isWorldDeployed:e.isWorldDeployed}),refetchInterval:15e3})}},39723:function(e,t,n){"use strict";function a(e,t){return"/".concat(e,"/worlds/").concat(t)}n.d(t,{m:function(){return a}})},84367:function(e,t,n){"use strict";n.d(t,{is:function(){return p},M0:function(){return u},oK:function(){return m},df:function(){return f},wG:function(){return h},Yx:function(){return x}});var a=n(79617),r=n(53103),s=n(20536),i=n(49249),c=n(76271);({...r.t});var o={...s.g,iconUrls:["https://redstone.xyz/chain-icons/redstone.png"],indexerUrl:"https://indexer.mud.redstonechain.com"},l={...i.T,iconUrls:["https://redstone.xyz/chain-icons/garnet.png"],indexerUrl:"https://indexer.mud.garnetchain.com"},d={...c.i,name:"Rhodolite Devnet",testnet:!0,id:17420,sourceId:17001,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.rhodolitechain.com"],webSocket:["wss://rpc.rhodolitechain.com"]}},iconUrls:["https://redstone.xyz/chain-icons/rhodolite.png"],indexerUrl:"https://indexer.mud.rhodolitechain.com"};let u=["world","store","metadata","puppet","erc20-puppet","erc721-puppet"],f={anvil:a.O,rhodolite:d,garnet:l,redstone:o},p=Object.fromEntries(Object.entries(f).map(e=>{let[t,n]=e;return[n.id,t]}));function m(e){return"string"==typeof e&&e in f}function h(e){if(!("number"==typeof e&&e in p))throw Error("Invalid chain ID. Supported chains are: ".concat(Object.keys(p).join(", "),"."))}function x(e){if(!m(e))throw Error("Invalid chain name. Supported chains are: ".concat(Object.keys(f).join(", "),"."))}},85723:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var a=n(75536),r=n(67157),s=n(89702),i=n(14292),c=n(66585);let o=(0,r.j)((0,c.cn)("inline-flex items-center justify-center rounded-md","whitespace-nowrap text-sm font-medium","ring-offset-background transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),l=s.forwardRef((e,t)=>{let{className:n,variant:r,size:s,type:l="button",asChild:d=!1,...u}=e,f=d?i.g7:"button";return(0,a.jsx)(f,{className:(0,c.cn)(o({variant:r,size:s,className:n})),ref:t,type:l,...u})});l.displayName="Button"},35431:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(75536),r=n(89702),s=n(80967),i=n(66585);let c=r.forwardRef((e,t)=>{let{className:n,orientation:r="horizontal",decorative:c=!0,...o}=e;return(0,a.jsx)(s.f,{ref:t,decorative:c,orientation:r,className:(0,i.cn)("shrink-0 bg-border","horizontal"===r?"h-[1px] w-full":"h-full w-[1px]",n),...o})});c.displayName=s.f.displayName},68347:function(e,t,n){"use strict";n.d(t,{O:function(){return s}});var a=n(75536),r=n(66585);function s(e){let{className:t,...n}=e;return(0,a.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-md bg-muted",t),...n})}},71118:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});var a=n(75536);function r(e){let{hex:t}=e;return t.length<=10?(0,a.jsx)("span",{children:t}):(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"after:select-none after:content-['…']",children:t.slice(0,6)}),(0,a.jsx)("span",{className:"tracking-[-1ch] text-transparent",children:t.slice(6,-4)}),t.slice(-4)]})}},83966:function(e,t,n){"use strict";n.d(t,{M:function(){return a}});let a="explorer/observer"},41374:function(e,t,n){"use strict";n.d(t,{f:function(){return r}});var a=n(95674);let r=n.n(a)()("mud:explorer").extend("observer")},57253:function(e,t,n){"use strict";n.d(t,{store:function(){return c}});var a=n(30521),r=n(66585),s=n(83966),i=n(41374);let c=(0,a.M)(()=>({writes:{}}));(0,i.f)("listening for relayed messages",s.M),new BroadcastChannel(s.M).addEventListener("message",e=>{let{data:t}=e;"ping"!==t.type&&c.setState(e=>{let n="write"===t.type?{...t,events:[]}:e.writes[t.writeId];if(!n)return e;let a=n.hash;return"waitForTransactionReceipt"===t.type?a=t.hash:"waitForUserOperationReceipt:result"===t.type&&(0,r.r8)(t)&&(a=t.value.receipt.transactionHash),{...e,writes:{...e.writes,[t.writeId]:{...n,type:t.type,hash:a,userOpHash:"waitForUserOperationReceipt"===t.type?t.userOpHash:n.userOpHash,events:[...n.events,t]}}}})})},66585:function(e,t,n){"use strict";n.d(t,{az:function(){return o},cn:function(){return i},fu:function(){return c},r8:function(){return l}});var a=n(84141),r=n(88014),s=n(47228);function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.m)((0,r.W)(t))}function c(e){return e.replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).replace(/^_/,"")}function o(e){let t=(0,a.d)(e),n=Math.floor(parseFloat(t)).toString().length;return parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-n)})}function l(e){return"fulfilled"===e.status}}},function(e){e.O(0,[2387,7027,6095,3388,855,9726,5674,6658,8685,5401,426,5215,9001,4636,9213,8474,1744],function(){return e(e.s=10958)}),_N_E=e.O()}]);
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8672],{42981:function(e,t,r){Promise.resolve().then(r.bind(r,79134))},55823:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});/**
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8672],{42981:function(e,t,r){Promise.resolve().then(r.bind(r,62641))},55823:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});/**
2
2
  * @license lucide-react v0.408.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */let n=(0,r(12118).Z)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},79134:function(e,t,r){"use strict";r.d(t,{TransactionsTable:function(){return Y},z:function(){return $}});var n=r(75536),s=r(12118);/**
11
+ */let n=(0,r(12118).Z)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},62641:function(e,t,r){"use strict";r.d(t,{TransactionsTable:function(){return Y},z:function(){return $}});var n=r(75536),s=r(12118);/**
12
12
  * @license lucide-react v0.408.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
@@ -3,6 +3,7 @@ import { UserOperationReceipt, BundlerActions } from 'viem/account-abstraction';
3
3
 
4
4
  type DecodedUserOperationCall = {
5
5
  to?: Address;
6
+ from?: Address;
6
7
  functionName: string;
7
8
  args?: readonly unknown[];
8
9
  value?: bigint;
@@ -100,7 +100,9 @@ function observer({ explorerUrl = "http://localhost:13690", waitForTransaction }
100
100
  return write;
101
101
  emit("write", {
102
102
  writeId,
103
- from: client.account.address,
103
+ // TODO: type as SessionClient once available from entrykit
104
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
105
+ from: client.userAddress ?? client.account.address,
104
106
  calls
105
107
  });
106
108
  Promise.allSettled([write]).then(([result]) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/observer/bridge.ts","../../src/debug.ts","../../src/observer/debug.ts","../../src/observer/decorator.ts"],"sourcesContent":["\"use client\";\n\nimport { wait } from \"@latticexyz/common/utils\";\nimport { debug } from \"./debug\";\nimport { EmitMessage } from \"./messages\";\n\nexport type BridgeEnvelope = { mud: \"explorer/observer\"; data: unknown };\n\nexport function isBridgeEnvelope(input: unknown): input is BridgeEnvelope {\n return (\n typeof input === \"object\" &&\n input !== null &&\n \"mud\" in input &&\n input.mud === \"explorer/observer\" &&\n \"data\" in input\n );\n}\n\nexport function wrapMessage(data: unknown): BridgeEnvelope {\n return { mud: \"explorer/observer\", data };\n}\n\nexport type CreateBridgeOpts = {\n url: string;\n timeout?: number;\n};\n\nexport function createBridge({ url, timeout = 10_000 }: CreateBridgeOpts): EmitMessage {\n const bridge = new Promise<HTMLIFrameElement>((resolve, reject) => {\n const iframe =\n Array.from(document.querySelectorAll(\"iframe[data-bridge][src]\"))\n .filter((el): el is HTMLIFrameElement => true)\n .find((el) => el.src === url) ?? document.createElement(\"iframe\");\n\n if (iframe.dataset.bridge === \"ready\") {\n debug(\"reusing observer iframe\", iframe.src);\n return resolve(iframe);\n }\n\n Promise.race([\n new Promise<void>((resolve, reject) => {\n iframe.addEventListener(\"load\", () => resolve(), { once: true });\n iframe.addEventListener(\"error\", (error) => reject(error), { once: true });\n }),\n wait(timeout).then(() => {\n throw new Error(\"Timed out waiting for observer iframe to load.\");\n }),\n ]).then(\n () => {\n debug(\"observer iframe ready\", iframe.src);\n iframe.dataset.bridge = \"ready\";\n resolve(iframe);\n },\n (error) => {\n debug(\"observer iframe error\", error);\n iframe.remove();\n reject(error);\n },\n );\n\n if (iframe.dataset.bridge !== \"loading\") {\n iframe.tabIndex = -1;\n iframe.ariaHidden = \"true\";\n iframe.style.position = \"absolute\";\n iframe.style.border = \"0\";\n iframe.style.width = \"0\";\n iframe.style.height = \"0\";\n iframe.dataset.bridge = \"loading\";\n iframe.src = url;\n debug(\"mounting observer iframe\", url);\n parent.document.body.appendChild(iframe);\n }\n });\n\n return (type, data) => {\n debug(\"got message for bridge\", type, data);\n bridge.then(\n (iframe) => {\n debug(\"posting message to bridge\", type, data);\n const message = wrapMessage({ type, time: Date.now(), ...data });\n iframe.contentWindow!.postMessage(message, \"*\");\n },\n (error) => debug(\"could not deliver message\", type, data, error),\n );\n };\n}\n","import createDebug from \"debug\";\n\nexport const debug = createDebug(\"mud:explorer\");\n","import { debug as parentDebug } from \"../debug\";\n\nexport const debug = parentDebug.extend(\"observer\");\n","import { Account, Address, Chain, Client, Hex, Transport, WalletActions } from \"viem\";\nimport { BundlerActions, sendUserOperation, waitForUserOperationReceipt } from \"viem/account-abstraction\";\nimport { waitForTransactionReceipt, writeContract } from \"viem/actions\";\nimport { getAction } from \"viem/utils\";\nimport { isDefined } from \"@latticexyz/common/utils\";\nimport { createBridge } from \"./bridge\";\nimport { ReceiptSummary } from \"./common\";\n\nexport type WaitForTransaction = (hash: Hex) => Promise<ReceiptSummary>;\n\nexport type ObserverOptions = {\n explorerUrl?: string;\n waitForTransaction?: WaitForTransaction;\n};\n\nlet writeCounter = 0;\n\nexport function observer({ explorerUrl = \"http://localhost:13690\", waitForTransaction }: ObserverOptions = {}): <\n transport extends Transport,\n chain extends Chain | undefined = Chain | undefined,\n account extends Account | undefined = Account | undefined,\n>(\n client: Client<transport, chain, account>,\n) => Pick<WalletActions<chain, account>, \"writeContract\"> & Pick<BundlerActions, \"sendUserOperation\"> {\n const emit = createBridge({ url: `${explorerUrl}/internal/observer-relay` });\n\n return (client) => ({\n async sendUserOperation(args) {\n const writeId = `${client.uid}-${++writeCounter}`;\n const write = getAction(client, sendUserOperation, \"sendUserOperation\")(args);\n if (!(\"calls\" in args) || !args.calls) return write;\n\n const calls = args.calls\n .map((call) => {\n if (!call || typeof call !== \"object\") return undefined;\n if (!(\"to\" in call) || typeof call.to !== \"string\") return undefined;\n if (!(\"functionName\" in call) || typeof call.functionName !== \"string\") return undefined;\n if (!(\"args\" in call) || !Array.isArray(call.args)) return undefined;\n\n return {\n to: call.to as Address,\n functionName: call.functionName,\n args: call.args,\n ...(\"value\" in call && typeof call.value === \"bigint\" && { value: call.value }),\n };\n })\n .filter(isDefined);\n if (calls.length === 0) return write;\n\n emit(\"write\", {\n writeId,\n from: client.account!.address,\n calls,\n });\n Promise.allSettled([write]).then(([result]) => {\n emit(\"write:result\", { ...result, writeId });\n });\n\n write.then((userOpHash) => {\n const receipt = getAction(\n client,\n waitForUserOperationReceipt,\n \"waitForUserOperationReceipt\",\n )({ hash: userOpHash });\n\n emit(\"waitForUserOperationReceipt\", { writeId, userOpHash });\n Promise.allSettled([receipt]).then(([result]) => {\n emit(\"waitForUserOperationReceipt:result\", { ...result, writeId });\n });\n });\n\n return write;\n },\n\n async writeContract(args) {\n const writeId = `${client.uid}-${++writeCounter}`;\n const write = getAction(client, writeContract, \"writeContract\")(args);\n\n emit(\"write\", {\n writeId,\n from: client.account!.address,\n calls: [\n {\n to: args.address,\n functionName: args.functionName,\n args: (args.args ?? []) as never,\n ...(args.value && { value: args.value }),\n },\n ],\n });\n Promise.allSettled([write]).then(([result]) => {\n emit(\"write:result\", { ...result, writeId });\n });\n\n write.then((hash) => {\n const receipt = getAction(client, waitForTransactionReceipt, \"waitForTransactionReceipt\")({ hash });\n\n emit(\"waitForTransactionReceipt\", { writeId, hash });\n Promise.allSettled([receipt]).then(([result]) => {\n emit(\"waitForTransactionReceipt:result\", { ...result, writeId });\n });\n });\n\n if (waitForTransaction) {\n write.then((hash) => {\n const receipt = waitForTransaction(hash);\n\n emit(\"waitForTransaction\", { writeId });\n Promise.allSettled([receipt]).then(([result]) => {\n emit(\"waitForTransaction:result\", { ...result, writeId });\n });\n });\n }\n\n return write;\n },\n });\n}\n"],"mappings":"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","names":["debug","debug","resolve","reject"]}
1
+ {"version":3,"sources":["../../src/observer/bridge.ts","../../src/debug.ts","../../src/observer/debug.ts","../../src/observer/decorator.ts"],"sourcesContent":["\"use client\";\n\nimport { wait } from \"@latticexyz/common/utils\";\nimport { debug } from \"./debug\";\nimport { EmitMessage } from \"./messages\";\n\nexport type BridgeEnvelope = { mud: \"explorer/observer\"; data: unknown };\n\nexport function isBridgeEnvelope(input: unknown): input is BridgeEnvelope {\n return (\n typeof input === \"object\" &&\n input !== null &&\n \"mud\" in input &&\n input.mud === \"explorer/observer\" &&\n \"data\" in input\n );\n}\n\nexport function wrapMessage(data: unknown): BridgeEnvelope {\n return { mud: \"explorer/observer\", data };\n}\n\nexport type CreateBridgeOpts = {\n url: string;\n timeout?: number;\n};\n\nexport function createBridge({ url, timeout = 10_000 }: CreateBridgeOpts): EmitMessage {\n const bridge = new Promise<HTMLIFrameElement>((resolve, reject) => {\n const iframe =\n Array.from(document.querySelectorAll(\"iframe[data-bridge][src]\"))\n .filter((el): el is HTMLIFrameElement => true)\n .find((el) => el.src === url) ?? document.createElement(\"iframe\");\n\n if (iframe.dataset.bridge === \"ready\") {\n debug(\"reusing observer iframe\", iframe.src);\n return resolve(iframe);\n }\n\n Promise.race([\n new Promise<void>((resolve, reject) => {\n iframe.addEventListener(\"load\", () => resolve(), { once: true });\n iframe.addEventListener(\"error\", (error) => reject(error), { once: true });\n }),\n wait(timeout).then(() => {\n throw new Error(\"Timed out waiting for observer iframe to load.\");\n }),\n ]).then(\n () => {\n debug(\"observer iframe ready\", iframe.src);\n iframe.dataset.bridge = \"ready\";\n resolve(iframe);\n },\n (error) => {\n debug(\"observer iframe error\", error);\n iframe.remove();\n reject(error);\n },\n );\n\n if (iframe.dataset.bridge !== \"loading\") {\n iframe.tabIndex = -1;\n iframe.ariaHidden = \"true\";\n iframe.style.position = \"absolute\";\n iframe.style.border = \"0\";\n iframe.style.width = \"0\";\n iframe.style.height = \"0\";\n iframe.dataset.bridge = \"loading\";\n iframe.src = url;\n debug(\"mounting observer iframe\", url);\n parent.document.body.appendChild(iframe);\n }\n });\n\n return (type, data) => {\n debug(\"got message for bridge\", type, data);\n bridge.then(\n (iframe) => {\n debug(\"posting message to bridge\", type, data);\n const message = wrapMessage({ type, time: Date.now(), ...data });\n iframe.contentWindow!.postMessage(message, \"*\");\n },\n (error) => debug(\"could not deliver message\", type, data, error),\n );\n };\n}\n","import createDebug from \"debug\";\n\nexport const debug = createDebug(\"mud:explorer\");\n","import { debug as parentDebug } from \"../debug\";\n\nexport const debug = parentDebug.extend(\"observer\");\n","import { Account, Address, Chain, Client, Hex, Transport, WalletActions } from \"viem\";\nimport { BundlerActions, sendUserOperation, waitForUserOperationReceipt } from \"viem/account-abstraction\";\nimport { waitForTransactionReceipt, writeContract } from \"viem/actions\";\nimport { getAction } from \"viem/utils\";\nimport { isDefined } from \"@latticexyz/common/utils\";\nimport { createBridge } from \"./bridge\";\nimport { ReceiptSummary } from \"./common\";\n\nexport type WaitForTransaction = (hash: Hex) => Promise<ReceiptSummary>;\n\nexport type ObserverOptions = {\n explorerUrl?: string;\n waitForTransaction?: WaitForTransaction;\n};\n\nlet writeCounter = 0;\n\nexport function observer({ explorerUrl = \"http://localhost:13690\", waitForTransaction }: ObserverOptions = {}): <\n transport extends Transport,\n chain extends Chain | undefined = Chain | undefined,\n account extends Account | undefined = Account | undefined,\n>(\n client: Client<transport, chain, account>,\n) => Pick<WalletActions<chain, account>, \"writeContract\"> & Pick<BundlerActions, \"sendUserOperation\"> {\n const emit = createBridge({ url: `${explorerUrl}/internal/observer-relay` });\n\n return (client) => ({\n async sendUserOperation(args) {\n const writeId = `${client.uid}-${++writeCounter}`;\n const write = getAction(client, sendUserOperation, \"sendUserOperation\")(args);\n if (!(\"calls\" in args) || !args.calls) return write;\n\n const calls = args.calls\n .map((call) => {\n if (!call || typeof call !== \"object\") return undefined;\n if (!(\"to\" in call) || typeof call.to !== \"string\") return undefined;\n if (!(\"functionName\" in call) || typeof call.functionName !== \"string\") return undefined;\n if (!(\"args\" in call) || !Array.isArray(call.args)) return undefined;\n\n return {\n to: call.to as Address,\n functionName: call.functionName,\n args: call.args,\n ...(\"value\" in call && typeof call.value === \"bigint\" && { value: call.value }),\n };\n })\n .filter(isDefined);\n if (calls.length === 0) return write;\n\n emit(\"write\", {\n writeId,\n // TODO: type as SessionClient once available from entrykit\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n from: (client as any).userAddress ?? client.account!.address,\n calls,\n });\n Promise.allSettled([write]).then(([result]) => {\n emit(\"write:result\", { ...result, writeId });\n });\n\n write.then((userOpHash) => {\n const receipt = getAction(\n client,\n waitForUserOperationReceipt,\n \"waitForUserOperationReceipt\",\n )({ hash: userOpHash });\n\n emit(\"waitForUserOperationReceipt\", { writeId, userOpHash });\n Promise.allSettled([receipt]).then(([result]) => {\n emit(\"waitForUserOperationReceipt:result\", { ...result, writeId });\n });\n });\n\n return write;\n },\n\n async writeContract(args) {\n const writeId = `${client.uid}-${++writeCounter}`;\n const write = getAction(client, writeContract, \"writeContract\")(args);\n\n emit(\"write\", {\n writeId,\n from: client.account!.address,\n calls: [\n {\n to: args.address,\n functionName: args.functionName,\n args: (args.args ?? []) as never,\n ...(args.value && { value: args.value }),\n },\n ],\n });\n Promise.allSettled([write]).then(([result]) => {\n emit(\"write:result\", { ...result, writeId });\n });\n\n write.then((hash) => {\n const receipt = getAction(client, waitForTransactionReceipt, \"waitForTransactionReceipt\")({ hash });\n\n emit(\"waitForTransactionReceipt\", { writeId, hash });\n Promise.allSettled([receipt]).then(([result]) => {\n emit(\"waitForTransactionReceipt:result\", { ...result, writeId });\n });\n });\n\n if (waitForTransaction) {\n write.then((hash) => {\n const receipt = waitForTransaction(hash);\n\n emit(\"waitForTransaction\", { writeId });\n Promise.allSettled([receipt]).then(([result]) => {\n emit(\"waitForTransaction:result\", { ...result, writeId });\n });\n });\n }\n\n return write;\n },\n });\n}\n"],"mappings":"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","names":["debug","debug","resolve","reject"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latticexyz/explorer",
3
- "version": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1",
3
+ "version": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6",
4
4
  "description": "World Explorer is a tool for visually exploring and manipulating the state of worlds",
5
5
  "type": "module",
6
6
  "exports": {
@@ -58,15 +58,15 @@
58
58
  "yargs": "^17.7.1",
59
59
  "zod": "3.23.8",
60
60
  "zustand": "^4.3.7",
61
- "@latticexyz/block-logs-stream": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1",
62
- "@latticexyz/common": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1",
63
- "@latticexyz/config": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1",
64
- "@latticexyz/protocol-parser": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1",
65
- "@latticexyz/schema-type": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1",
66
- "@latticexyz/store": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1",
67
- "@latticexyz/store-indexer": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1",
68
- "@latticexyz/store-sync": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1",
69
- "@latticexyz/world": "2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1"
61
+ "@latticexyz/block-logs-stream": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6",
62
+ "@latticexyz/common": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6",
63
+ "@latticexyz/config": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6",
64
+ "@latticexyz/protocol-parser": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6",
65
+ "@latticexyz/schema-type": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6",
66
+ "@latticexyz/store": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6",
67
+ "@latticexyz/store-indexer": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6",
68
+ "@latticexyz/store-sync": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6",
69
+ "@latticexyz/world": "2.2.15-main-d542357350b85654bc65f3befad22a3509c4ddb6"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@trivago/prettier-plugin-sort-imports": "^4.3.0",
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1667],{10958:function(e,t,n){Promise.resolve().then(n.bind(n,60809))},60809:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eN}});var a=n(75536),r=n(6270),s=n(84367),i=n(97554),c=n(45215),o=n(23638),l=n(63643),d=n(11362),u=n(35605),f=n(68347);function p(){let{id:e}=(0,u.A)(),{data:t}=(0,d.O)({watch:!0,chainId:e,query:{refetchInterval:1e3}});return(0,a.jsx)("div",{className:"inline-block w-[50px]",children:t?(0,a.jsxs)("div",{className:"flex items-center justify-end gap-x-2 text-xs font-extrabold text-green-600",children:[(0,a.jsx)("span",{className:"inline-block h-[8px] w-[8px] animate-pulse rounded-full bg-success"}),(0,a.jsx)("span",{className:"opacity-70",children:t.toString()})]}):(0,a.jsx)(f.O,{className:"h-[10px]"})})}var m=n(35431),h=n(66585),x=n(52616),b=n(1372),y=n(79617),g=n(1839),v=n(92463),j=n(91062),w=n(31848),N=n(3343),k=n(36792),O=n(89702),C=n(5739),z=n(63322),I=n(19389);let Z=["0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80","0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d","0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a","0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6","0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a","0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba","0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e","0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356","0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97","0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"].map(e=>(0,z.L)(e)),_=e=>{let t=e!==y.O.id;return Z.map((e,n)=>(function(e){let{id:t,name:n,accounts:a,disabled:r}=e;if(!a.length)throw Error("missing accounts");let s=!1;return(0,I.K)(()=>({id:t,name:n,type:"anvil",accounts:a,connect:async()=>(s=!0,{accounts:a.map(e=>e.address),chainId:y.O.id}),async disconnect(){s=!1},getAccounts:async()=>a.map(e=>e.address),getChainId:async()=>y.O.id,getProvider:async()=>(0,C.d)()({chain:y.O}),async isAuthorized(){return!r&&!!s&&!!(await this.getAccounts()).length},async onAccountsChanged(){},async onDisconnect(){},onChainChanged(){}}))})({id:"anvil-".concat(n),name:"Anvil #".concat(n+1),accounts:[e],disabled:t}))};function A(e){return"anvil"===e.type}var E=n(85723),R=n(55823),U=n(19362),S=n(51550),K=n(93715);let F=K.fC;K.ZA;let M=K.B4,B=O.forwardRef((e,t)=>{let{className:n,children:r,...s}=e;return(0,a.jsxs)(K.xz,{ref:t,className:(0,h.cn)("flex h-10 w-full items-center justify-between px-3 py-2 text-sm","rounded-md border border-input bg-background ring-offset-background","placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...s,children:[r,(0,a.jsx)(K.JO,{asChild:!0,children:(0,a.jsx)(R.Z,{className:"h-4 w-4 opacity-50"})})]})});B.displayName=K.xz.displayName;let T=O.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(K.u_,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",n),...r,children:(0,a.jsx)(U.Z,{className:"h-4 w-4"})})});T.displayName=K.u_.displayName;let D=O.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(K.$G,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",n),...r,children:(0,a.jsx)(R.Z,{className:"h-4 w-4"})})});D.displayName=K.$G.displayName;let H=O.forwardRef((e,t)=>{let{className:n,children:r,position:s="popper",...i}=e;return(0,a.jsx)(K.h_,{children:(0,a.jsxs)(K.VY,{ref:t,className:(0,h.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:s,...i,children:[(0,a.jsx)(T,{}),(0,a.jsx)(K.l_,{className:(0,h.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,a.jsx)(D,{})]})})});H.displayName=K.VY.displayName,O.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(K.__,{ref:t,className:(0,h.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...r})}).displayName=K.__.displayName;let P=O.forwardRef((e,t)=>{let{className:n,children:r,...s}=e;return(0,a.jsxs)(K.ck,{ref:t,className:(0,h.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(K.wU,{children:(0,a.jsx)(S.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(K.eT,{children:r})]})});P.displayName=K.ck.displayName,O.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(K.Z0,{ref:t,className:(0,h.cn)("-mx-1 my-1 h-px bg-muted",n),...r})}).displayName=K.Z0.displayName;var W=n(71118);function L(e){var t;let{connector:n}=e,r=null===(t=n.accounts[0])||void 0===t?void 0:t.address,{data:s}=(0,j.K)({address:r,query:{refetchInterval:15e3,select:e=>null==e?void 0:e.value,enabled:!!r}});return(0,a.jsxs)(P,{value:n.id,className:"font-mono",children:[n.name,void 0!==s&&" (".concat((0,h.az)(s)," ETH)")," ",r&&(0,a.jsxs)("span",{className:"opacity-70",children:["(",(0,a.jsx)(W.a,{hex:r}),")"]})]},r)}function V(){let[e,t]=(0,O.useState)(!1),{connector:n}=(0,w.m)(),{connect:r}=(0,N.$)(),{openConnectModal:s}=(0,g.We)(),i=[...(0,k.Y)().filter(A)];return(0,a.jsxs)(F,{open:e,onOpenChange:t,value:null==n?void 0:n.id,onValueChange:e=>{let t=i.find(t=>t.id===e);t&&r({connector:t})},children:[(0,a.jsx)(E.z,{size:"sm",asChild:!0,children:(0,a.jsxs)(B,{children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"}),(0,a.jsx)(M,{placeholder:"Connect"})]})}),(0,a.jsxs)(H,{children:[i.map(e=>(0,a.jsx)(L,{connector:e},e.id)),(0,a.jsxs)(E.z,{size:"sm",className:"mt-2 w-full font-mono",onClick:()=>{t(!1),null==s||s()},children:[(0,a.jsx)(v.Z,{className:"mr-2 inline-block h-4 w-4"}),"Add wallet"]})]})]})}function Y(){let{id:e}=(0,u.A)();return(0,a.jsx)(g.NL.Custom,{children:t=>{let{account:n,chain:r,openAccountModal:s,openChainModal:i,openConnectModal:c,mounted:o}=t;return(0,a.jsx)("div",{className:(0,h.cn)({"pointer-events-none select-none opacity-0":!o}),children:o&&n&&r?r.unsupported?(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:i,children:[(0,a.jsx)(b.Z,{className:"mr-2 inline-block h-4 w-4"}),"Wrong network"]}):(0,a.jsx)("div",{className:"flex-wrap gap-2",children:(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:s,variant:"secondary",children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"}),n.displayName,(0,a.jsx)("span",{className:"ml-2 font-normal opacity-70",children:n.displayBalance?" (".concat(n.displayBalance,")"):""})]})}):e===y.O.id?(0,a.jsx)(V,{}):(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:c,children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"})," Connect"]})})}})}function G(e){let{href:t,children:n}=e,s=(0,r.usePathname)(),i=(0,o.g)();return(0,a.jsx)(c.default,{href:i(t),className:"group px-3 text-sm font-semibold uppercase",children:(0,a.jsx)("span",{className:(0,h.cn)("flex border-b-4 border-transparent pb-3 pt-4 transition group-hover:border-orange-500/30",s===i(t)?"border-orange-500 group-hover:border-orange-400":null),children:n})})}function q(){let{data:e,isFetched:t}=(0,l.b)();return(0,a.jsxs)("div",{className:"pb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"-mx-3 flex",children:[(0,a.jsx)(G,{href:"explore",children:"Explore"}),(0,a.jsx)(G,{href:"interact",children:"Interact"}),(0,a.jsx)(G,{href:"observe",children:"Observe"})]}),t&&!(null==e?void 0:e.isWorldDeployed)&&(0,a.jsxs)("h4",{className:"font-mono text-sm font-bold uppercase opacity-70",children:["Waiting for world deploy ",(0,a.jsx)(i.Z,{className:"inline-block h-4 w-4 animate-spin"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,a.jsx)(p,{}),(0,a.jsx)(Y,{})]})]}),(0,a.jsx)(m.Z,{})]})}var $=n(84511),J=n(1405),Q=n(90067),X=n(43240),ee=n(82226),et=n(2451);n(64612);var en=n(91004),ea=n(50693);let er=new en.S;function es(e){let{children:t}=e,n=(0,u.A)(),r=(0,O.useMemo)(()=>(0,$._)({chains:[n],connectors:[(0,Q.L)(),(0,X.O)({dappMetadata:{name:"World Explorer"}}),(0,ee.T)(),..._(n.id)],transports:{[n.id]:(0,C.d)()},ssr:!0}),[n]);return(0,a.jsx)(J.F,{config:r,children:(0,a.jsx)(ea.aH,{client:er,children:(0,a.jsx)(g.pj,{theme:(0,et.$)(),children:t})})})}var ei=n(12565),ec=n(95483),eo=n(55024),el=n(88873),ed=n(4876),eu=n(62886),ef=n(97869),ep=n(64236),em=n(8218),eh=n(2913),ex=n(25779),eb=n(60188),ey=n(57253),eg=n(50011);let ev={type:"event",name:"UserOperationEvent",inputs:[{type:"bytes32",name:"userOpHash",indexed:!0},{type:"address",name:"sender",indexed:!0},{type:"address",name:"paymaster",indexed:!0},{type:"uint256",name:"nonce",indexed:!1},{type:"bool",name:"success",indexed:!1},{type:"uint256",name:"actualGasCost",indexed:!1},{type:"uint256",name:"actualGasUsed",indexed:!1}]};function ej(e){let t,n,{abi:a,target:r,data:s,value:i}=e;try{let e=(0,ei.p)({abi:a,data:s});t=e.functionName,n=e.args}catch(e){t=s.length>10?s.slice(0,10):"unknown"}return{to:r,functionName:t,args:n,value:i}}function ew(){let{id:e}=(0,u.A)(),{worldAddress:t}=(0,r.useParams)(),n=(0,ef.Z)(),{data:a}=(0,l.b)(),s=null==a?void 0:a.abi,{transactions:i,setTransaction:c,updateTransaction:o}=(0,eb.oR)(eg.h),d=(0,eb.oR)(ey.store,e=>e.writes),f=(0,O.useCallback)(e=>{let{hash:n,writeId:a,timestamp:r,receipt:i,transaction:o,userOperation:l}=e;if(!s)return;let{functionName:d,args:u}=(0,ei.p)({abi:(0,ec.V)(["function execute(address target, uint256 value, bytes calldata data)","function executeBatch((address target,uint256 value,bytes data)[])"]),data:l.callData}),f=(function(e){let{abi:t,functionName:n,decodedArgs:a}=e;if("execute"===n){let e=a[0],n=a[1];return[ej({abi:t,target:e,data:a[2],value:n})]}return"executeBatch"===n?a[0].map(e=>{let{target:n,data:a,value:r}=e;return ej({abi:t,target:n,data:a,value:r})}):[]})({abi:s,functionName:d,decodedArgs:u}).filter(e=>{let{to:n}=e;return n&&(0,eo.K)(n)===(0,eo.K)(t)});if(0===f.length)return;let p=(0,el.h)({abi:[...s,ev],logs:i.logs}),m=p.find(e=>{let{eventName:t}=e;return"UserOperationEvent"===t});c({hash:n,writeId:null!=a?a:n,from:o.from,timestamp:r,transaction:o,calls:f,receipt:i,logs:p,value:o.value,status:(null==m?void 0:m.args.success)?"success":"reverted"})},[s,c,t]),p=(0,O.useCallback)(async e=>{let{writeId:t,timestamp:a,transaction:r}=e;if(!s)return;let i=r.hash,c=await (0,em.e)(n,{hash:r.hash});for(let e of(0,ei.p)({abi:ed.i,data:r.input}).args[0])f({hash:i,writeId:t,timestamp:a,receipt:c,transaction:r,userOperation:e})},[s,f,n]),m=(0,O.useCallback)(async e=>{let a,r,i,l,{writeId:d,hash:u,timestamp:f,transaction:p}=e;if(!s||!p.to)return;try{let e=(0,ei.p)({abi:s,data:p.input});a=e.functionName,r=e.args}catch(e){i=e,a=p.input.length>10?p.input.slice(0,10):"unknown"}c({hash:u,writeId:null!=d?d:u,from:p.from,timestamp:f,transaction:p,status:"pending",calls:[{to:p.to,functionName:a,args:r}],value:p.value});try{l=await (0,em.e)(n,{hash:u})}catch(e){console.error("Failed to fetch transaction receipt. Transaction hash: ".concat(u))}if(l&&"reverted"===l.status&&a)try{await (0,eh.a)(n,{account:p.from,address:t,abi:s,value:p.value,blockNumber:l.blockNumber,functionName:a,args:r})}catch(e){i=e}let m=l?l.status:"unknown",h=(0,el.h)({abi:s,logs:(null==l?void 0:l.logs)||[]});o(u,{receipt:l,logs:h,status:m,error:i})},[s,n,t,c,o]),h=(0,O.useCallback)(async e=>{let{hash:a,writeId:r,timestamp:i}=e;if(!s)return;let c=await (0,ex.f)(n,{hash:a});c.to&&(0,eo.K)(c.to)===(0,eo.K)(eu.V)?p({writeId:r,timestamp:i,transaction:c}):c.to&&(0,eo.K)(c.to)===(0,eo.K)(t)&&m({hash:a,writeId:r,timestamp:i,transaction:c})},[s,n,t,p,m]);return(0,O.useEffect)(()=>{for(let{hash:e,writeId:t,time:n}of Object.values(d))e&&!i.find(t=>t.hash===e)&&h({hash:e,writeId:t,timestamp:BigInt(n)/1000n})},[h,d,i,t]),(0,ep.C)({onBlock(e){for(let t of e.transactions)i.find(e=>e.hash===t)||h({hash:t,timestamp:e.timestamp})},chainId:e,pollingInterval:500}),null}function eN(e){let{params:{chainName:t},children:n}=e;return(0,s.oK)(t)?(0,a.jsxs)(es,{children:[(0,a.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,a.jsx)(q,{}),n]}),(0,a.jsx)(ew,{})]}):(0,r.notFound)()}},50011:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});let a=(0,n(30521).M)()(e=>({transactions:[],setTransaction:t=>e(e=>({transactions:[...e.transactions,t]})),updateTransaction:(t,n)=>e(e=>({transactions:e.transactions.map(e=>e.hash===t?{...e,...n}:e)}))}))},35605:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var a=n(6270),r=n(84367);function s(){let{chainName:e}=(0,a.useParams)();return(0,r.Yx)(e),r.df[e]}},23638:function(e,t,n){"use strict";n.d(t,{g:function(){return s}});var a=n(6270),r=n(39723);function s(){let{chainName:e,worldAddress:t}=(0,a.useParams)();return n=>"".concat((0,r.m)(e,t),"/").concat(n)}},63643:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var a=n(6270),r=n(95951),s=n(84367);function i(){let{chainName:e,worldAddress:t}=(0,a.useParams)();(0,s.Yx)(e);let{id:n}=s.df[e];return(0,r.a)({queryKey:["worldAbi",e,t],queryFn:async()=>{let e=await fetch("/api/world-abi?".concat(new URLSearchParams({chainId:n.toString(),worldAddress:t})));return await e.json()},select:e=>({abi:e.abi||[],isWorldDeployed:e.isWorldDeployed}),refetchInterval:15e3})}},39723:function(e,t,n){"use strict";function a(e,t){return"/".concat(e,"/worlds/").concat(t)}n.d(t,{m:function(){return a}})},84367:function(e,t,n){"use strict";n.d(t,{is:function(){return p},M0:function(){return u},oK:function(){return m},df:function(){return f},wG:function(){return h},Yx:function(){return x}});var a=n(79617),r=n(53103),s=n(20536),i=n(49249),c=n(76271);({...r.t});var o={...s.g,iconUrls:["https://redstone.xyz/chain-icons/redstone.png"],indexerUrl:"https://indexer.mud.redstonechain.com"},l={...i.T,iconUrls:["https://redstone.xyz/chain-icons/garnet.png"],indexerUrl:"https://indexer.mud.garnetchain.com"},d={...c.i,name:"Rhodolite Devnet",testnet:!0,id:17420,sourceId:17001,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.rhodolitechain.com"],webSocket:["wss://rpc.rhodolitechain.com"]}},iconUrls:["https://redstone.xyz/chain-icons/rhodolite.png"],indexerUrl:"https://indexer.mud.rhodolitechain.com"};let u=["world","store","metadata","puppet","erc20-puppet","erc721-puppet"],f={anvil:a.O,rhodolite:d,garnet:l,redstone:o},p=Object.fromEntries(Object.entries(f).map(e=>{let[t,n]=e;return[n.id,t]}));function m(e){return"string"==typeof e&&e in f}function h(e){if(!("number"==typeof e&&e in p))throw Error("Invalid chain ID. Supported chains are: ".concat(Object.keys(p).join(", "),"."))}function x(e){if(!m(e))throw Error("Invalid chain name. Supported chains are: ".concat(Object.keys(f).join(", "),"."))}},85723:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var a=n(75536),r=n(67157),s=n(89702),i=n(14292),c=n(66585);let o=(0,r.j)((0,c.cn)("inline-flex items-center justify-center rounded-md","whitespace-nowrap text-sm font-medium","ring-offset-background transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),l=s.forwardRef((e,t)=>{let{className:n,variant:r,size:s,type:l="button",asChild:d=!1,...u}=e,f=d?i.g7:"button";return(0,a.jsx)(f,{className:(0,c.cn)(o({variant:r,size:s,className:n})),ref:t,type:l,...u})});l.displayName="Button"},35431:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(75536),r=n(89702),s=n(80967),i=n(66585);let c=r.forwardRef((e,t)=>{let{className:n,orientation:r="horizontal",decorative:c=!0,...o}=e;return(0,a.jsx)(s.f,{ref:t,decorative:c,orientation:r,className:(0,i.cn)("shrink-0 bg-border","horizontal"===r?"h-[1px] w-full":"h-full w-[1px]",n),...o})});c.displayName=s.f.displayName},68347:function(e,t,n){"use strict";n.d(t,{O:function(){return s}});var a=n(75536),r=n(66585);function s(e){let{className:t,...n}=e;return(0,a.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-md bg-muted",t),...n})}},71118:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});var a=n(75536);function r(e){let{hex:t}=e;return t.length<=10?(0,a.jsx)("span",{children:t}):(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"after:select-none after:content-['…']",children:t.slice(0,6)}),(0,a.jsx)("span",{className:"tracking-[-1ch] text-transparent",children:t.slice(6,-4)}),t.slice(-4)]})}},83966:function(e,t,n){"use strict";n.d(t,{M:function(){return a}});let a="explorer/observer"},41374:function(e,t,n){"use strict";n.d(t,{f:function(){return r}});var a=n(95674);let r=n.n(a)()("mud:explorer").extend("observer")},57253:function(e,t,n){"use strict";n.d(t,{store:function(){return c}});var a=n(30521),r=n(66585),s=n(83966),i=n(41374);let c=(0,a.M)(()=>({writes:{}}));(0,i.f)("listening for relayed messages",s.M),new BroadcastChannel(s.M).addEventListener("message",e=>{let{data:t}=e;"ping"!==t.type&&c.setState(e=>{let n="write"===t.type?{...t,events:[]}:e.writes[t.writeId];if(!n)return e;let a=n.hash;return"waitForTransactionReceipt"===t.type?a=t.hash:"waitForUserOperationReceipt:result"===t.type&&(0,r.r8)(t)&&(a=t.value.receipt.transactionHash),{...e,writes:{...e.writes,[t.writeId]:{...n,type:t.type,hash:a,userOpHash:"waitForUserOperationReceipt"===t.type?t.userOpHash:n.userOpHash,events:[...n.events,t]}}}})})},66585:function(e,t,n){"use strict";n.d(t,{az:function(){return o},cn:function(){return i},fu:function(){return c},r8:function(){return l}});var a=n(84141),r=n(88014),s=n(47228);function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.m)((0,r.W)(t))}function c(e){return e.replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).replace(/^_/,"")}function o(e){let t=(0,a.d)(e),n=Math.floor(parseFloat(t)).toString().length;return parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-n)})}function l(e){return"fulfilled"===e.status}}},function(e){e.O(0,[2387,7027,6095,3388,855,9726,5674,6658,8685,5401,426,5215,9001,4636,9213,8474,1744],function(){return e(e.s=10958)}),_N_E=e.O()}]);