@latticexyz/explorer 2.2.15-main-0facee02cd70b7f8cd09a7faec59972ba95453d1 → 2.2.15-main-07b6be82ace9654ce043e616e28b347f3121f415
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.
- package/.next/standalone/packages/explorer/.next/BUILD_ID +1 -1
- package/.next/standalone/packages/explorer/.next/app-build-manifest.json +26 -26
- package/.next/standalone/packages/explorer/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/packages/explorer/.next/build-manifest.json +2 -2
- package/.next/standalone/packages/explorer/.next/prerender-manifest.json +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/explore/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/page.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/internal/observer-relay/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/internal/observer-relay.html +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/internal/observer-relay.rsc +1 -1
- package/.next/standalone/packages/explorer/.next/server/app-paths-manifest.json +3 -3
- package/.next/standalone/packages/explorer/.next/server/chunks/3883.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/chunks/9490.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/pages/404.html +1 -1
- package/.next/standalone/packages/explorer/.next/server/pages/500.html +1 -1
- package/.next/standalone/packages/explorer/.next/server/pages-manifest.json +1 -1
- package/.next/standalone/packages/explorer/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/[chainName]/worlds/[worldAddress]/layout-e0ff079cef353658.js +1 -0
- package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/{page-52f117d371726746.js → page-b8d17ad42f482cad.js} +3 -3
- package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/layout-6a1f0687506a185c.js +1 -0
- package/dist/exports/observer.d.ts +1 -0
- package/dist/exports/observer.js +3 -1
- package/dist/exports/observer.js.map +1 -1
- package/package.json +10 -10
- package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/[chainName]/worlds/[worldAddress]/layout-022e273597c2fa2e.js +0 -1
- package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/layout-6951af4abdb84b18.js +0 -1
- /package/.next/standalone/packages/explorer/.next/static/{timcPlIPw2-liAAvE25KY → zR065i-zyPDAtrtiaXnTv}/_buildManifest.js +0 -0
- /package/.next/standalone/packages/explorer/.next/static/{timcPlIPw2-liAAvE25KY → zR065i-zyPDAtrtiaXnTv}/_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\":\"
|
|
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\":\"zR065i-zyPDAtrtiaXnTv\",\"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:["
|
|
4
|
+
0:["zR065i-zyPDAtrtiaXnTv",[[["",{"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
|
|
@@ -4,12 +4,12 @@
|
|
|
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
6
|
"/(explorer)/page": "app/(explorer)/page.js",
|
|
7
|
-
"/(explorer)/api/world-abi/route": "app/(explorer)/api/world-abi/route.js",
|
|
8
7
|
"/(explorer)/api/sqlite-indexer/route": "app/(explorer)/api/sqlite-indexer/route.js",
|
|
8
|
+
"/(explorer)/api/world-abi/route": "app/(explorer)/api/world-abi/route.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]/
|
|
12
|
+
"/(explorer)/[chainName]/worlds/[worldAddress]/explore/page": "app/(explorer)/[chainName]/worlds/[worldAddress]/explore/page.js",
|
|
13
13
|
"/(explorer)/[chainName]/worlds/[worldAddress]/observe/page": "app/(explorer)/[chainName]/worlds/[worldAddress]/observe/page.js",
|
|
14
|
-
"/(explorer)/[chainName]/worlds/[worldAddress]/
|
|
14
|
+
"/(explorer)/[chainName]/worlds/[worldAddress]/interact/page": "app/(explorer)/[chainName]/worlds/[worldAddress]/interact/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:e===y.O.id?10: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
|
-
exports.id=9490,exports.ids=[9490],exports.modules={11487:(e,r,t)=>{Promise.resolve().then(t.bind(t,21309)),Promise.resolve().then(t.bind(t,57204)),Promise.resolve().then(t.bind(t,15691)),Promise.resolve().then(t.bind(t,36101)),Promise.resolve().then(t.bind(t,7510)),Promise.resolve().then(t.bind(t,8823)),Promise.resolve().then(t.bind(t,53757)),Promise.resolve().then(t.bind(t,13058)),Promise.resolve().then(t.bind(t,30625)),Promise.resolve().then(t.bind(t,81904)),Promise.resolve().then(t.bind(t,77125)),Promise.resolve().then(t.bind(t,39634)),Promise.resolve().then(t.bind(t,53901)),Promise.resolve().then(t.bind(t,74031)),Promise.resolve().then(t.bind(t,49298)),Promise.resolve().then(t.bind(t,97388)),Promise.resolve().then(t.bind(t,66858)),Promise.resolve().then(t.bind(t,30943)),Promise.resolve().then(t.bind(t,7622)),Promise.resolve().then(t.bind(t,14540)),Promise.resolve().then(t.bind(t,85974)),Promise.resolve().then(t.bind(t,67637)),Promise.resolve().then(t.bind(t,52332)),Promise.resolve().then(t.bind(t,18853)),Promise.resolve().then(t.bind(t,77331)),Promise.resolve().then(t.bind(t,15818)),Promise.resolve().then(t.bind(t,54700)),Promise.resolve().then(t.bind(t,65656)),Promise.resolve().then(t.bind(t,59005))},31808:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,60527,23)),Promise.resolve().then(t.t.bind(t,97216,23)),Promise.resolve().then(t.t.bind(t,57116,23)),Promise.resolve().then(t.t.bind(t,74341,23)),Promise.resolve().then(t.t.bind(t,45797,23)),Promise.resolve().then(t.t.bind(t,82132,23))},67780:(e,r,t)=>{Promise.resolve().then(t.bind(t,16253))},3633:(e,r,t)=>{Promise.resolve().then(t.bind(t,8657))},16253:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>d});var s=t(25166),n=t(59276),o=t(6963),i=t(2561),a=t(70454),l=t(41440);function d({reset:e,error:r}){let t=(0,l.g)();return(0,s.jsxs)("main",{className:"px-6 py-24 text-center",children:[s.jsx("p",{className:"text-3xl font-semibold text-orange-600",children:"500"}),s.jsx("h1",{className:"mt-4 text-3xl font-bold tracking-tight text-white sm:text-5xl",children:"Something went wrong :("}),r.message&&s.jsx("pre",{className:"mt-8 inline-block w-[580px] whitespace-normal rounded-md border border-white/15 bg-secondary p-4 text-left font-mono text-sm leading-6 text-white",children:r.message}),(0,s.jsxs)("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:[s.jsx(a.z,{asChild:!0,children:s.jsx(i.default,{href:t("explore"),children:"Go back to explorer"})}),(0,s.jsxs)(a.z,{variant:"secondary",onClick:e,children:["Try again ",s.jsx(n.Z,{className:"ml-2 h-4 w-4"})]}),s.jsx(a.z,{variant:"secondary",asChild:!0,children:(0,s.jsxs)("a",{href:"https://lattice.xyz/discord",target:"_blank",rel:"noopener noreferrer",children:["Contact on Discord ",s.jsx(o.Z,{className:"-mt-0.5 ml-2 h-4 w-4"})]})})]})]})}},41440:(e,r,t)=>{"use strict";t.d(r,{g:()=>o});var s=t(58287),n=t(17490);function o(){let{chainName:e,worldAddress:r}=(0,s.useParams)();return t=>`${(0,n.m)(e,r)}/${t}`}},8657:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>l});var s=t(25166),n=t(6963),o=t(2561),i=t(70454),a=t(41440);function l(){let e=(0,a.g)();return(0,s.jsxs)("main",{className:"px-6 py-24 text-center",children:[s.jsx("p",{className:"text-3xl font-semibold text-orange-600",children:"404"}),s.jsx("h1",{className:"mt-4 text-3xl font-bold tracking-tight text-white sm:text-5xl",children:"Page not found"}),s.jsx("p",{className:"mt-6 text-base leading-7 text-white/70",children:"Sorry, we couldn’t find the page you’re looking for."}),(0,s.jsxs)("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:[s.jsx(i.z,{asChild:!0,children:s.jsx(o.default,{href:e("explore"),children:"Go back to explorer"})}),s.jsx(i.z,{variant:"secondary",asChild:!0,children:(0,s.jsxs)("a",{href:"https://lattice.xyz/discord",target:"_blank",rel:"noopener noreferrer",children:["Contact on Discord ",s.jsx(n.Z,{className:"-mt-0.5 ml-2 h-4 w-4"})]})})]})]})}},17490:(e,r,t)=>{"use strict";function s(e,r){return`/${e}/worlds/${r}`}t.d(r,{m:()=>s})},70454:(e,r,t)=>{"use strict";t.d(r,{z:()=>d});var s=t(25166),n=t(44342),o=t(56356),i=t(9976),a=t(30966);let l=(0,n.j)((0,a.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"}}),d=o.forwardRef(({className:e,variant:r,size:t,type:n="button",asChild:o=!1,...d},c)=>{let m=o?i.g7:"button";return s.jsx(m,{className:(0,a.cn)(l({variant:r,size:t,className:e})),ref:c,type:n,...d})});d.displayName="Button"},91404:(e,r,t)=>{"use strict";t.d(r,{f:()=>n});var s=t(87889);let n=t.n(s)()("mud:explorer").extend("observer")},59005:(e,r,t)=>{"use strict";t.d(r,{store:()=>a});var s=t(35517),n=t(30966);let o="explorer/observer";var i=t(91404);let a=(0,s.M)(()=>({writes:{}}));(0,i.f)("listening for relayed messages",o)
|
|
1
|
+
exports.id=9490,exports.ids=[9490],exports.modules={11487:(e,r,t)=>{Promise.resolve().then(t.bind(t,21309)),Promise.resolve().then(t.bind(t,57204)),Promise.resolve().then(t.bind(t,15691)),Promise.resolve().then(t.bind(t,36101)),Promise.resolve().then(t.bind(t,7510)),Promise.resolve().then(t.bind(t,8823)),Promise.resolve().then(t.bind(t,53757)),Promise.resolve().then(t.bind(t,13058)),Promise.resolve().then(t.bind(t,30625)),Promise.resolve().then(t.bind(t,81904)),Promise.resolve().then(t.bind(t,77125)),Promise.resolve().then(t.bind(t,39634)),Promise.resolve().then(t.bind(t,53901)),Promise.resolve().then(t.bind(t,74031)),Promise.resolve().then(t.bind(t,49298)),Promise.resolve().then(t.bind(t,97388)),Promise.resolve().then(t.bind(t,66858)),Promise.resolve().then(t.bind(t,30943)),Promise.resolve().then(t.bind(t,7622)),Promise.resolve().then(t.bind(t,14540)),Promise.resolve().then(t.bind(t,85974)),Promise.resolve().then(t.bind(t,67637)),Promise.resolve().then(t.bind(t,52332)),Promise.resolve().then(t.bind(t,18853)),Promise.resolve().then(t.bind(t,77331)),Promise.resolve().then(t.bind(t,15818)),Promise.resolve().then(t.bind(t,54700)),Promise.resolve().then(t.bind(t,65656)),Promise.resolve().then(t.bind(t,59005))},31808:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,60527,23)),Promise.resolve().then(t.t.bind(t,97216,23)),Promise.resolve().then(t.t.bind(t,57116,23)),Promise.resolve().then(t.t.bind(t,74341,23)),Promise.resolve().then(t.t.bind(t,45797,23)),Promise.resolve().then(t.t.bind(t,82132,23))},67780:(e,r,t)=>{Promise.resolve().then(t.bind(t,16253))},3633:(e,r,t)=>{Promise.resolve().then(t.bind(t,8657))},16253:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>d});var s=t(25166),n=t(59276),o=t(6963),i=t(2561),a=t(70454),l=t(41440);function d({reset:e,error:r}){let t=(0,l.g)();return(0,s.jsxs)("main",{className:"px-6 py-24 text-center",children:[s.jsx("p",{className:"text-3xl font-semibold text-orange-600",children:"500"}),s.jsx("h1",{className:"mt-4 text-3xl font-bold tracking-tight text-white sm:text-5xl",children:"Something went wrong :("}),r.message&&s.jsx("pre",{className:"mt-8 inline-block w-[580px] whitespace-normal rounded-md border border-white/15 bg-secondary p-4 text-left font-mono text-sm leading-6 text-white",children:r.message}),(0,s.jsxs)("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:[s.jsx(a.z,{asChild:!0,children:s.jsx(i.default,{href:t("explore"),children:"Go back to explorer"})}),(0,s.jsxs)(a.z,{variant:"secondary",onClick:e,children:["Try again ",s.jsx(n.Z,{className:"ml-2 h-4 w-4"})]}),s.jsx(a.z,{variant:"secondary",asChild:!0,children:(0,s.jsxs)("a",{href:"https://lattice.xyz/discord",target:"_blank",rel:"noopener noreferrer",children:["Contact on Discord ",s.jsx(o.Z,{className:"-mt-0.5 ml-2 h-4 w-4"})]})})]})]})}},41440:(e,r,t)=>{"use strict";t.d(r,{g:()=>o});var s=t(58287),n=t(17490);function o(){let{chainName:e,worldAddress:r}=(0,s.useParams)();return t=>`${(0,n.m)(e,r)}/${t}`}},8657:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>l});var s=t(25166),n=t(6963),o=t(2561),i=t(70454),a=t(41440);function l(){let e=(0,a.g)();return(0,s.jsxs)("main",{className:"px-6 py-24 text-center",children:[s.jsx("p",{className:"text-3xl font-semibold text-orange-600",children:"404"}),s.jsx("h1",{className:"mt-4 text-3xl font-bold tracking-tight text-white sm:text-5xl",children:"Page not found"}),s.jsx("p",{className:"mt-6 text-base leading-7 text-white/70",children:"Sorry, we couldn’t find the page you’re looking for."}),(0,s.jsxs)("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:[s.jsx(i.z,{asChild:!0,children:s.jsx(o.default,{href:e("explore"),children:"Go back to explorer"})}),s.jsx(i.z,{variant:"secondary",asChild:!0,children:(0,s.jsxs)("a",{href:"https://lattice.xyz/discord",target:"_blank",rel:"noopener noreferrer",children:["Contact on Discord ",s.jsx(n.Z,{className:"-mt-0.5 ml-2 h-4 w-4"})]})})]})]})}},17490:(e,r,t)=>{"use strict";function s(e,r){return`/${e}/worlds/${r}`}t.d(r,{m:()=>s})},70454:(e,r,t)=>{"use strict";t.d(r,{z:()=>d});var s=t(25166),n=t(44342),o=t(56356),i=t(9976),a=t(30966);let l=(0,n.j)((0,a.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"}}),d=o.forwardRef(({className:e,variant:r,size:t,type:n="button",asChild:o=!1,...d},c)=>{let m=o?i.g7:"button";return s.jsx(m,{className:(0,a.cn)(l({variant:r,size:t,className:e})),ref:c,type:n,...d})});d.displayName="Button"},91404:(e,r,t)=>{"use strict";t.d(r,{f:()=>n});var s=t(87889);let n=t.n(s)()("mud:explorer").extend("observer")},59005:(e,r,t)=>{"use strict";t.d(r,{store:()=>a});var s=t(35517),n=t(30966);let o="explorer/observer";var i=t(91404);let a=(0,s.M)(()=>({writes:{}}));(0,i.f)("listening for relayed messages",o);let l=[];new BroadcastChannel(o).addEventListener("message",e=>{"ping"!==e.data.type&&l.push(e)}),setInterval(function(){0!==l.length&&a.setState(e=>{let r=e;for(let{data:e}of l){if("ping"===e.type)continue;let t="write"===e.type?{...e,events:[]}:r.writes[e.writeId];if(!t)continue;let s=t.hash;"waitForTransactionReceipt"===e.type?s=e.hash:"waitForUserOperationReceipt:result"===e.type&&(0,n.r8)(e)&&(s=e.value.receipt.transactionHash),r={...r,writes:{...r.writes,[e.writeId]:{...t,type:e.type,hash:s,userOpHash:"waitForUserOperationReceipt"===e.type?e.userOpHash:t.userOpHash,events:[...t.events,e]}}}}return l.length=0,r})},100)},30966:(e,r,t)=>{"use strict";t.d(r,{az:()=>l,cn:()=>i,fu:()=>a,r8:()=>d});var s=t(25694),n=t(61846),o=t(84931);function i(...e){return(0,o.m)((0,n.W)(e))}function a(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`).replace(/^_/,"")}function l(e){let r=(0,s.d)(e),t=Math.floor(parseFloat(r)).toString().length;return parseFloat(r).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-t)})}function d(e){return"fulfilled"===e.status}},33854:(e,r,t)=>{"use strict";t.r(r),t.d(r,{$$typeof:()=>i,__esModule:()=>o,default:()=>a});var s=t(12849);let n=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/error.tsx`),{__esModule:o,$$typeof:i}=n;n.default;let a=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/error.tsx#default`)},75990:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>p,metadata:()=>x});var s=t(37570),n=t(28804),o=t.n(n),i=t(21358),a=t.n(i),l=t(54671),d=t(92963);t(51260);var c=t(12849);let m=(0,c.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/observer/store.ts`),{__esModule:u,$$typeof:h}=m;m.default,(0,c.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/observer/store.ts#store`),t(11518);let x={title:"Worlds Explorer",description:"Worlds Explorer is a tool for visually exploring and manipulating the state of worlds"};function p({children:e}){return s.jsx("html",{lang:"en",children:s.jsx("body",{className:`${o().variable} ${a().variable} dark`,children:(0,s.jsxs)(d.Q2,{appearance:"dark",children:[s.jsx("div",{className:"container",children:e}),s.jsx(l.x7,{richColors:!0,closeButton:!0,duration:1e4,theme:"dark"})]})})})}},62253:(e,r,t)=>{"use strict";t.r(r),t.d(r,{$$typeof:()=>i,__esModule:()=>o,default:()=>a});var s=t(12849);let n=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/not-found.tsx`),{__esModule:o,$$typeof:i}=n;n.default;let a=(0,s.createProxy)(String.raw`/home/runner/work/mud/mud/packages/explorer/src/app/(explorer)/not-found.tsx#default`)},51220:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>n});var s=t(613);let n=e=>[{type:"image/svg+xml",sizes:"any",url:(0,s.fillMetadataSegment)("/(explorer)",e.params,"icon.svg")+"?1b9336a64a7ec16a"}]},11518:()=>{}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-78c92fac7aa8fdd8.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:["static/
|
|
1
|
+
self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-78c92fac7aa8fdd8.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:["static/zR065i-zyPDAtrtiaXnTv/_buildManifest.js","static/zR065i-zyPDAtrtiaXnTv/_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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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\":\"
|
|
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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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\":\"zR065i-zyPDAtrtiaXnTv\",\"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/
|
|
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/zR065i-zyPDAtrtiaXnTv/_buildManifest.js" defer=""></script><script src="/_next/static/zR065i-zyPDAtrtiaXnTv/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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":"zR065i-zyPDAtrtiaXnTv","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"/
|
|
1
|
+
{"/_error":"pages/_error.js","/_app":"pages/_app.js","/_document":"pages/_document.js","/404":"pages/404.html"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\"node\":{},\"edge\":{},\"encryptionKey\":\"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\"node\":{},\"edge\":{},\"encryptionKey\":\"qaaB1vsJyWyOT1TyzFpImx2kDJLovxmPknbVHpv2S2M=\"}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"qaaB1vsJyWyOT1TyzFpImx2kDJLovxmPknbVHpv2S2M="}
|
|
@@ -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:e===v.O.id?10: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);let o=[];new BroadcastChannel(s.M).addEventListener("message",e=>{"ping"!==e.data.type&&o.push(e)}),setInterval(function(){0!==o.length&&c.setState(e=>{let t=e;for(let{data:e}of o){if("ping"===e.type)continue;let n="write"===e.type?{...e,events:[]}:t.writes[e.writeId];if(!n)continue;let a=n.hash;"waitForTransactionReceipt"===e.type?a=e.hash:"waitForUserOperationReceipt:result"===e.type&&(0,r.r8)(e)&&(a=e.value.receipt.transactionHash),t={...t,writes:{...t.writes,[e.writeId]:{...n,type:e.type,hash:a,userOpHash:"waitForUserOperationReceipt"===e.type?e.userOpHash:n.userOpHash,events:[...n.events,e]}}}}return o.length=0,t})},100)},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,
|
|
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"}]])},
|
|
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.
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/let o=(0,s.Z)("ReceiptText",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M13 16H8",key:"wsln4y"}]]);var u=r(89702),d=r(46721),h=r(96917),p=r(67157),m=r(66585);let f=(0,p.j)((0,m.cn)("inline-flex items-center px-2.5 py-0.5","rounded-md border","text-xs font-semibold transition-colors","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"),{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",tertiary:"border-transparent bg-tertiary text-tertiary-foreground hover:bg-tertiary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function x(e){let{className:t,variant:r,...s}=e;return(0,n.jsx)("div",{className:(0,m.cn)(f({variant:r}),t),...s})}var g=r(68347),b=r(34431),j=r(71118),v=r(35605),w=r(84367);function y(e){let{hash:t,children:r}=e,{id:s}=(0,v.A)(),a=function(e){var t;let{hash:r,chainId:n}=e;if(!r)return;(0,w.wG)(n);let s=w.is[n],a=w.df[s],i="blockExplorers"in a&&(null===(t=a.blockExplorers)||void 0===t?void 0:t.default.url);if(i)return"".concat(i,"/tx/").concat(r)}({chainId:s,hash:t});return a?(0,n.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex hover:underline",children:r}):r}function N(e){let t=Math.floor(Date.now()/1e3)-Number(e);for(let e of[{name:"y",limit:31536e3,inSeconds:31536e3},{name:"mth",limit:2592e3,inSeconds:2592e3},{name:"d",limit:86400,inSeconds:86400},{name:"h",limit:3600,inSeconds:3600},{name:"m",limit:60,inSeconds:60},{name:"s",limit:1,inSeconds:1}])if(t>=e.limit){let r=Math.floor(t/e.inSeconds);return"".concat(r).concat(e.name," ago")}return"0s ago"}function k(e){let{timestamp:t}=e,[r,s]=(0,u.useState)(()=>N(t));return(0,u.useEffect)(()=>{let e=setInterval(()=>{s(N(t))},1e3);return()=>clearInterval(e)},[t]),(0,n.jsx)("span",{className:"inline-block min-w-[60px] text-white/60",title:new Date(1e3*Number(t)).toISOString(),children:r})}var S=r(32858);let R={write:{priority:1,label:"write"},"write:result":{priority:2},waitForTransaction:{priority:3,label:"state update"},"waitForTransaction:result":{priority:4},waitForTransactionReceipt:{priority:5,label:"transaction receipt"},"waitForTransactionReceipt:result":{priority:6},waitForUserOperationReceipt:{priority:5,label:"user operation receipt"},"waitForUserOperationReceipt:result":{priority:6}};function T(e){let{time:t,events:r}=e,n=Math.max(...r.map(e=>e.time-t));return Object.values(r).sort((e,t)=>{var r,n;return(null===(r=R[e.type])||void 0===r?void 0:r.priority)-(null===(n=R[t.type])||void 0===n?void 0:n.priority)}).map(e=>{var s;let a=e.type;if(a.endsWith(":result"))return;let i=r.find(e=>e.type==="".concat(a,":result")),l=(null!==(s=null==i?void 0:i.time)&&void 0!==s?s:e.time)-e.time,c=e.time-t,o=R[a];return{type:a,label:"label"in o?o.label:a,duration:l,startPercentage:c/n*100,widthPercentage:l/n*100}}).filter(S.$K)}function O(e){let t=T(e);return(0,n.jsx)("div",{className:"ml-4 inline-block h-full w-14 grayscale lg:-mr-8 lg:ml-8 xl:-mr-16 xl:ml-16",children:t.map(e=>(0,n.jsx)("div",{title:e.label,className:(0,m.cn)("h-1",{"bg-[#5c9af6]":"write"===e.type,"mt-0.5 bg-[#4d7cc0]":"waitForTransaction"===e.type,"mt-0.5 bg-[#3d5c8a]":"waitForTransactionReceipt"===e.type||"waitForUserOperationReceipt"===e.type}),style:{width:"".concat(e.widthPercentage,"%"),marginLeft:"".concat(e.startPercentage,"%")}},e.label))})}var M=r(19362),E=r(55823),C=r(84141),F=r(35431),I=r(79701),Z=r(37979),U=r(33586),A=r(42473),H=r(368),P=r(97869);function z(e){let{hash:t}=e,{id:r}=(0,v.A)(),{data:s}=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{hash:n,transactionReceipt:s,query:a={}}=r,i=(0,P.Z)(r),l=(0,H.x)({config:i}),c=function(e,t={}){return{async queryFn({queryKey:t}){let{hash:r,transactionReceipt:n,scopeKey:s,...a}=t[1];if(!r&&!n)throw Error("hash or transactionReceipt is required");return await function(e,t){let{chainId:r,...n}=t,s=e.getClient({chainId:r});return(0,Z.s)(s,I.a,"getTransactionConfirmations")(n)}(e,{hash:r,transactionReceipt:n,...a})??null},queryKey:function(e={}){return["transactionConfirmations",(0,U.OP)(e)]}(t)}}(i,{...r,chainId:null!==(e=r.chainId)&&void 0!==e?e:l}),o=!!(!(n&&s)&&(n||s)&&(null===(t=a.enabled)||void 0===t||t));return(0,A.aM)({...a,...c,enabled:o})}({hash:t,chainId:r,query:{refetchInterval:1e3,enabled:!!t}});return s?(0,n.jsxs)("span",{className:"flex items-center text-xs font-extrabold text-green-600",children:[(0,n.jsx)("span",{className:"mr-2 inline-block h-2 w-2 animate-pulse rounded-full bg-success"}),(0,n.jsx)("span",{className:"opacity-70",children:s.toString()})]}):(0,n.jsx)(g.O,{className:"h-4 w-[50px]"})}function D(e){let t=T(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(F.Z,{className:"my-5"}),(0,n.jsxs)("div",{className:"flex items-start gap-x-4 pb-2",children:[(0,n.jsx)("h3",{className:"inline-block w-[45px] pb-2 text-2xs font-bold uppercase",children:"Timing"}),(0,n.jsx)("div",{className:"w-full border border-white/20 p-2 pb-3",children:(0,n.jsx)("div",{className:"grid grid-cols-[auto_1fr_auto] items-center gap-x-4 gap-y-1",children:t.map(e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:"text-xs",children:[e.label,":"]}),(0,n.jsx)("span",{className:(0,m.cn)("h-1",{"bg-[#5c9af6]":"write"===e.type,"bg-[#4d7cc0]":"waitForTransaction"===e.type,"bg-[#3d5c8a]":"waitForTransactionReceipt"===e.type||"waitForUserOperationReceipt"===e.type}),style:{width:"".concat(e.widthPercentage,"%"),marginLeft:"".concat(e.startPercentage,"%")}}),(0,n.jsxs)("span",{className:"text-right text-xs",children:[e.duration,"ms"]})]}))})})]})]})}function V(e){let{label:t,status:r,children:s}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-2xs font-bold uppercase text-white/60",children:t}),(0,n.jsx)("p",{className:"pt-1 text-xs uppercase",children:null!=s?s:"rejected"===r?(0,n.jsx)("span",{className:"text-white/60",children:"N/A"}):(0,n.jsx)(g.O,{className:"h-4 w-[100px]"})})]})}function _(e){var t;let{row:r}=e,s=null==r?void 0:r.original,a=s.status,i=null==s?void 0:s.logs,l=null==s?void 0:s.receipt;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(b.SC,{className:(0,m.cn)("relative cursor-pointer",{"bg-muted/50":r.getIsExpanded()}),onClick:()=>r.toggleExpanded(),children:[r.getVisibleCells().map(e=>(0,n.jsx)(b.pj,{children:(0,d.ie)(e.column.columnDef.cell,e.getContext())},e.id)),r.getIsExpanded()?(0,n.jsx)(M.Z,{className:"absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 text-white/60"}):(0,n.jsx)(E.Z,{className:"absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 text-white/60"})]}),r.getIsExpanded()&&(0,n.jsx)(b.SC,{className:"border-b-white/20 bg-muted/50 hover:bg-muted/50",children:(0,n.jsx)(b.pj,{colSpan:$.length,children:s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-x-2 gap-y-5 sm:grid-cols-4 md:grid-cols-5",children:[(0,n.jsx)(V,{label:"Confirmations",status:a,children:"rejected"!==a?(0,n.jsx)(z,{hash:null===(t=s.transaction)||void 0===t?void 0:t.hash}):null}),(0,n.jsxs)(V,{label:"Tx value",status:a,children:[s.value?(0,C.d)(s.value):0," ETH"]}),(0,n.jsx)(V,{label:"Gas used",status:a,children:null==l?void 0:l.gasUsed.toString()}),(0,n.jsx)(V,{label:"Gas price",status:a,children:null==l?void 0:l.effectiveGasPrice.toString()}),(0,n.jsx)(V,{label:"Tx cost",status:a,children:l?"".concat((0,C.d)(l.gasUsed*l.effectiveGasPrice)," ETH"):null})]}),(0,n.jsx)(F.Z,{className:"my-5"}),(0,n.jsxs)("div",{className:"flex items-start gap-x-4",children:[(0,n.jsx)("h3",{className:"w-[45px] flex-shrink-0 text-2xs font-bold uppercase",children:"Inputs"}),s.calls.length>0?(0,n.jsx)("div",{className:"flex w-full flex-col gap-y-4",children:s.calls.map((e,t)=>{var r;return(0,n.jsxs)("div",{className:"min-w-0 flex-grow border border-white/20 p-2 pt-1",children:[(0,n.jsxs)("span",{className:"text-xs",children:[e.functionName,":"]}),null===(r=e.args)||void 0===r?void 0:r.map((e,t)=>(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsxs)("span",{className:"flex-shrink-0 text-xs text-white/60",children:["arg ",t+1,":"]}),(0,n.jsx)("span",{className:"ml-2 break-all text-xs",children:"object"==typeof e&&null!==e?JSON.stringify(e,null,2):String(e)})]},t)),e.value&&e.value>0n?(0,n.jsxs)("div",{className:"text-xs text-white/60",children:["value: ",(0,C.d)(e.value)," ETH"]}):null]},t)})}):(0,n.jsx)("p",{className:"text-2xs uppercase text-white/60",children:"No inputs"})]}),s.error?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(F.Z,{className:"my-5"}),(0,n.jsxs)("div",{className:"flex items-start gap-x-4",children:[(0,n.jsx)("h3",{className:"w-[45px] flex-shrink-0 text-2xs font-bold uppercase",children:"Error"}),(0,n.jsx)("div",{className:"flex-grow whitespace-pre-wrap border border-red-500 p-2 font-mono text-xs",children:s.error.message})]})]}):null,s.error?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(F.Z,{className:"my-5"}),(0,n.jsxs)("div",{className:"flex items-start gap-x-4",children:[(0,n.jsx)("h3",{className:"inline-block w-[45px] flex-shrink-0 text-2xs font-bold uppercase",children:"Logs"}),Array.isArray(i)&&i.length>0?(0,n.jsx)("div",{className:"flex-grow break-all border border-white/20 p-2 pb-3",children:(0,n.jsx)("ul",{children:i.map((e,t)=>{let r="eventName"in e?e.eventName:null,s="args"in e?e.args:null;return(0,n.jsxs)("li",{children:[!!r&&(0,n.jsxs)("span",{className:"text-xs",children:[null==r?void 0:r.toString(),":"]}),s&&(0,n.jsx)("ul",{className:"list-inside",children:Object.entries(s).map(e=>{let[t,r]=e;return(0,n.jsxs)("li",{className:"mt-1 flex",children:[(0,n.jsxs)("span",{className:"flex-shrink-0 text-xs text-white/60",children:[t,": "]}),(0,n.jsx)("span",{className:"ml-2 break-all text-xs",children:String(r)})]},t)})}),t<i.length-1&&(0,n.jsx)(F.Z,{className:"my-4"})]},t)})})}):"pending"===a?(0,n.jsx)(g.O,{className:"h-4 w-full"}):(0,n.jsx)("p",{className:"text-2xs uppercase text-white/60",children:"No logs"})]})]}),s.write&&(0,n.jsx)(D,{...s.write})]})})})]})}var q=r(6270),G=r(55024),K=r(60188),L=r(57253),B=r(50011);let W=(0,h.Cl)(),$=[W.accessor("receipt.blockNumber",{header:"Block",cell:e=>{if("rejected"===e.row.original.status)return(0,n.jsx)("span",{className:"text-white/60",children:"N/A"});let t=e.getValue();return t?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(a,{className:"mr-1 h-3 w-3"}),t.toString()]}):(0,n.jsx)(g.O,{className:"h-4 w-full"})}}),W.accessor("from",{header:"From",cell:e=>{let t=e.getValue();return t?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(i,{className:"mr-1 h-3 w-3"}),(0,n.jsx)(j.a,{hex:t})]}):(0,n.jsx)(g.O,{className:"h-4 w-full"})}}),W.accessor("calls",{header:"Function(s)",cell:e=>{let t=e.getValue(),r=e.row.original.status;return(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"flex gap-2",children:t.map((e,t)=>{let{functionName:r}=e;return(0,n.jsx)(x,{variant:"secondary",children:r},t)})}),"pending"===r&&(0,n.jsx)(l,{className:"ml-2 h-4 w-4 text-white/60"}),"success"===r&&(0,n.jsx)(l,{className:"ml-2 h-4 w-4 text-green-400"}),("reverted"===r||"rejected"===r)&&(0,n.jsx)(c.Z,{className:"ml-2 h-4 w-4 text-red-400"})]})}}),W.accessor("hash",{header:"Tx hash",cell:e=>{if("rejected"===e.row.original.status)return(0,n.jsx)("span",{className:"text-white/60",children:"N/A"});let t=e.getValue();return t?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(o,{className:"mr-1 h-3 w-3"}),(0,n.jsx)(y,{hash:t,children:(0,n.jsx)(j.a,{hex:t})})]}):(0,n.jsx)(g.O,{className:"h-4 w-full"})}}),W.accessor("timestamp",{header:"Time",cell:e=>{let t=e.getValue(),r=e.row.original.write;return(0,n.jsxs)(n.Fragment,{children:[t?(0,n.jsx)(k,{timestamp:t}):(0,n.jsx)(g.O,{className:"h-4 w-14"}),r&&(0,n.jsx)(O,{...r})]})}})];function Y(){var e;let t=function(){let{worldAddress:e}=(0,q.useParams)(),t=(0,K.oR)(B.h,e=>e.transactions),r=(0,K.oR)(L.store,e=>e.writes),n=(0,u.useMemo)(()=>Object.values(r).map(t=>({...t,calls:t.calls.filter(t=>t.to&&(0,G.K)(t.to)===(0,G.K)(e))})).filter(e=>{let{calls:t}=e;return t.length>0}),[r,e]);return(0,u.useMemo)(()=>{let r=new Map;for(let t of n){let n=t.events.find(e=>"write:result"===e.type);r.set(t.hash||t.writeId,{hash:t.hash,writeId:t.writeId,from:t.from,status:(null==n?void 0:n.status)==="rejected"?"rejected":"pending",timestamp:BigInt(t.time)/1000n,calls:t.calls.filter(t=>t.to===e),error:n&&"reason"in n?n.reason:void 0,write:t})}for(let e of t){let t=r.get(e.hash);t?r.set(e.hash,{...e,write:t.write}):r.set(e.hash,{...e})}return Array.from(r.values()).sort((e,t)=>{var r,n;return Number(null!==(r=t.timestamp)&&void 0!==r?r:0n)-Number(null!==(n=e.timestamp)&&void 0!==n?n:0n)})},[t,n,e])}(),[r,s]=(0,u.useState)({}),a=(0,d.b7)({data:t,columns:$,state:{expanded:r},getRowId:e=>e.writeId,onExpandedChange:s,getCoreRowModel:(0,h.sC)(),getExpandedRowModel:(0,h.rV)()});return(0,n.jsxs)(b.iA,{children:[(0,n.jsx)(b.xD,{className:"sticky top-0 z-10 bg-[var(--color-background)]",children:a.getHeaderGroups().map(e=>(0,n.jsx)(b.SC,{children:e.headers.map(e=>(0,n.jsx)(b.ss,{className:"text-xs uppercase",children:e.isPlaceholder?null:(0,d.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,n.jsx)(b.RM,{children:(null===(e=a.getRowModel().rows)||void 0===e?void 0:e.length)?a.getRowModel().rows.map(e=>(0,n.jsx)(_,{row:e},e.id)):(0,n.jsx)(b.SC,{children:(0,n.jsx)(b.pj,{colSpan:$.length,children:(0,n.jsxs)("p",{className:"flex items-center justify-center gap-3 py-4 font-mono text-xs font-bold uppercase text-muted-foreground",children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 animate-ping rounded-full bg-muted-foreground"})," Waiting for transactions…"]})})})})]})}},50011:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});let n=(0,r(30521).M)()(e=>({transactions:[],setTransaction:t=>e(e=>({transactions:[...e.transactions,t]})),updateTransaction:(t,r)=>e(e=>({transactions:e.transactions.map(e=>e.hash===t?{...e,...r}:e)}))}))},35605:function(e,t,r){"use strict";r.d(t,{A:function(){return a}});var n=r(6270),s=r(84367);function a(){let{chainName:e}=(0,n.useParams)();return(0,s.Yx)(e),s.df[e]}},84367:function(e,t,r){"use strict";r.d(t,{is:function(){return p},M0:function(){return d},oK:function(){return m},df:function(){return h},wG:function(){return f},Yx:function(){return x}});var n=r(79617),s=r(53103),a=r(20536),i=r(49249),l=r(76271);({...s.t});var c={...a.g,iconUrls:["https://redstone.xyz/chain-icons/redstone.png"],indexerUrl:"https://indexer.mud.redstonechain.com"},o={...i.T,iconUrls:["https://redstone.xyz/chain-icons/garnet.png"],indexerUrl:"https://indexer.mud.garnetchain.com"},u={...l.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 d=["world","store","metadata","puppet","erc20-puppet","erc721-puppet"],h={anvil:n.O,rhodolite:u,garnet:o,redstone:c},p=Object.fromEntries(Object.entries(h).map(e=>{let[t,r]=e;return[r.id,t]}));function m(e){return"string"==typeof e&&e in h}function f(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(h).join(", "),"."))}},35431:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(75536),s=r(89702),a=r(80967),i=r(66585);let l=s.forwardRef((e,t)=>{let{className:r,orientation:s="horizontal",decorative:l=!0,...c}=e;return(0,n.jsx)(a.f,{ref:t,decorative:l,orientation:s,className:(0,i.cn)("shrink-0 bg-border","horizontal"===s?"h-[1px] w-full":"h-full w-[1px]",r),...c})});l.displayName=a.f.displayName},68347:function(e,t,r){"use strict";r.d(t,{O:function(){return a}});var n=r(75536),s=r(66585);function a(e){let{className:t,...r}=e;return(0,n.jsx)("div",{className:(0,s.cn)("animate-pulse rounded-md bg-muted",t),...r})}},34431:function(e,t,r){"use strict";r.d(t,{RM:function(){return c},SC:function(){return o},iA:function(){return i},pj:function(){return d},ss:function(){return u},xD:function(){return l}});var n=r(75536),s=r(89702),a=r(66585);let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("table",{ref:t,className:(0,a.cn)("w-full caption-bottom text-sm",r),...s})});i.displayName="Table";let l=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("thead",{ref:t,className:(0,a.cn)("[&_tr]:border-b",r),...s})});l.displayName="TableHeader";let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tbody",{ref:t,className:(0,a.cn)("[&_tr:last-child]:border-0",r),...s})});c.displayName="TableBody",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tfoot",{ref:t,className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",r),...s})}).displayName="TableFooter";let o=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tr",{ref:t,className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...s})});o.displayName="TableRow";let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("th",{ref:t,className:(0,a.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",r),...s})});u.displayName="TableHead";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("td",{ref:t,className:(0,a.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",r),...s})});d.displayName="TableCell",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("caption",{ref:t,className:(0,a.cn)("mt-4 text-sm text-muted-foreground",r),...s})}).displayName="TableCaption"},71118:function(e,t,r){"use strict";r.d(t,{a:function(){return s}});var n=r(75536);function s(e){let{hex:t}=e;return t.length<=10?(0,n.jsx)("span",{children:t}):(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{className:"after:select-none after:content-['…']",children:t.slice(0,6)}),(0,n.jsx)("span",{className:"tracking-[-1ch] text-transparent",children:t.slice(6,-4)}),t.slice(-4)]})}},83966:function(e,t,r){"use strict";r.d(t,{M:function(){return n}});let n="explorer/observer"},41374:function(e,t,r){"use strict";r.d(t,{f:function(){return s}});var n=r(95674);let s=r.n(n)()("mud:explorer").extend("observer")},57253:function(e,t,r){"use strict";r.d(t,{store:function(){return l}});var n=r(30521),s=r(66585),a=r(83966),i=r(41374);let l=(0,n.M)(()=>({writes:{}}));(0,i.f)("listening for relayed messages",a.M),new BroadcastChannel(a.M).addEventListener("message",e=>{let{data:t}=e;"ping"!==t.type&&l.setState(e=>{let r="write"===t.type?{...t,events:[]}:e.writes[t.writeId];if(!r)return e;let n=r.hash;return"waitForTransactionReceipt"===t.type?n=t.hash:"waitForUserOperationReceipt:result"===t.type&&(0,s.r8)(t)&&(n=t.value.receipt.transactionHash),{...e,writes:{...e.writes,[t.writeId]:{...r,type:t.type,hash:n,userOpHash:"waitForUserOperationReceipt"===t.type?t.userOpHash:r.userOpHash,events:[...r.events,t]}}}})})},66585:function(e,t,r){"use strict";r.d(t,{az:function(){return c},cn:function(){return i},fu:function(){return l},r8:function(){return o}});var n=r(84141),s=r(88014),a=r(47228);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.m)((0,s.W)(t))}function l(e){return e.replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).replace(/^_/,"")}function c(e){let t=(0,n.d)(e),r=Math.floor(parseFloat(t)).toString().length;return parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-r)})}function o(e){return"fulfilled"===e.status}},91502:function(e,t,r){"use strict";r.d(t,{WV:function(){return l},jH:function(){return c}});var n=r(89702),s=r(3020),a=r(14292),i=r(75536),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=n.forwardRef((e,r)=>{let{asChild:n,...s}=e,l=n?a.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(l,{...s,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function c(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}},80967:function(e,t,r){"use strict";r.d(t,{f:function(){return o}});var n=r(89702),s=r(91502),a=r(75536),i="horizontal",l=["horizontal","vertical"],c=n.forwardRef((e,t)=>{let{decorative:r,orientation:n=i,...c}=e,o=l.includes(n)?n:i;return(0,a.jsx)(s.WV.div,{"data-orientation":o,...r?{role:"none"}:{"aria-orientation":"vertical"===o?o:void 0,role:"separator"},...c,ref:t})});c.displayName="Separator";var o=c},60188:function(e,t,r){"use strict";r.d(t,{oR:function(){return a}});var n=r(89702);let{useSyncExternalStoreWithSelector:s}=r(44666);function a(e,t=e.getState,r){let a=s(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return(0,n.useDebugValue)(a),a}},30521:function(e,t,r){"use strict";r.d(t,{M:function(){return s}});let n=e=>{let t;let r=new Set,n=(e,n)=>{let s="function"==typeof e?e(t):e;if(!Object.is(s,t)){let e=t;t=(null!=n?n:"object"!=typeof s)?s:Object.assign({},t,s),r.forEach(r=>r(t,e))}},s=()=>t,a={setState:n,getState:s,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(n,s,a),a},s=e=>e?n(e):n},32858:function(e,t,r){"use strict";function n(e,t){return e<t?-1:e>t?1:0}function s(e,t){let r=new Map;for(let n of e){let e=t(n);r.has(e)||r.set(e,[]),r.get(e).push(n)}return r}function a(e){return void 0!==e}function i(e,t){return Object.fromEntries(Object.entries(e).map(e=>{let[r,n]=e;return[r,t(n,r)]}))}r.d(t,{$K:function(){return a},Xc:function(){return i},iN:function(){return n},vM:function(){return s}})}},function(e){e.O(0,[6095,3388,855,5674,6658,1461,9213,8474,1744],function(){return e(e.s=42981)}),_N_E=e.O()}]);
|
|
21
|
+
*/let o=(0,s.Z)("ReceiptText",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M13 16H8",key:"wsln4y"}]]);var u=r(89702),d=r(46721),h=r(96917),p=r(67157),f=r(66585);let m=(0,p.j)((0,f.cn)("inline-flex items-center px-2.5 py-0.5","rounded-md border","text-xs font-semibold transition-colors","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"),{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",tertiary:"border-transparent bg-tertiary text-tertiary-foreground hover:bg-tertiary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function x(e){let{className:t,variant:r,...s}=e;return(0,n.jsx)("div",{className:(0,f.cn)(m({variant:r}),t),...s})}var g=r(68347),b=r(34431),j=r(71118),v=r(35605),w=r(84367);function y(e){let{hash:t,children:r}=e,{id:s}=(0,v.A)(),a=function(e){var t;let{hash:r,chainId:n}=e;if(!r)return;(0,w.wG)(n);let s=w.is[n],a=w.df[s],i="blockExplorers"in a&&(null===(t=a.blockExplorers)||void 0===t?void 0:t.default.url);if(i)return"".concat(i,"/tx/").concat(r)}({chainId:s,hash:t});return a?(0,n.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex hover:underline",children:r}):r}function N(e){let t=Math.floor(Date.now()/1e3)-Number(e);for(let e of[{name:"y",limit:31536e3,inSeconds:31536e3},{name:"mth",limit:2592e3,inSeconds:2592e3},{name:"d",limit:86400,inSeconds:86400},{name:"h",limit:3600,inSeconds:3600},{name:"m",limit:60,inSeconds:60},{name:"s",limit:1,inSeconds:1}])if(t>=e.limit){let r=Math.floor(t/e.inSeconds);return"".concat(r).concat(e.name," ago")}return"0s ago"}function k(e){let{timestamp:t}=e,[r,s]=(0,u.useState)(()=>N(t));return(0,u.useEffect)(()=>{let e=setInterval(()=>{s(N(t))},1e3);return()=>clearInterval(e)},[t]),(0,n.jsx)("span",{className:"inline-block min-w-[60px] text-white/60",title:new Date(1e3*Number(t)).toISOString(),children:r})}var S=r(32858);let R={write:{priority:1,label:"write"},"write:result":{priority:2},waitForTransaction:{priority:3,label:"state update"},"waitForTransaction:result":{priority:4},waitForTransactionReceipt:{priority:5,label:"transaction receipt"},"waitForTransactionReceipt:result":{priority:6},waitForUserOperationReceipt:{priority:5,label:"user operation receipt"},"waitForUserOperationReceipt:result":{priority:6}};function T(e){let{time:t,events:r}=e,n=Math.max(...r.map(e=>e.time-t));return Object.values(r).sort((e,t)=>{var r,n;return(null===(r=R[e.type])||void 0===r?void 0:r.priority)-(null===(n=R[t.type])||void 0===n?void 0:n.priority)}).map(e=>{var s;let a=e.type;if(a.endsWith(":result"))return;let i=r.find(e=>e.type==="".concat(a,":result")),l=(null!==(s=null==i?void 0:i.time)&&void 0!==s?s:e.time)-e.time,c=e.time-t,o=R[a];return{type:a,label:"label"in o?o.label:a,duration:l,startPercentage:c/n*100,widthPercentage:l/n*100}}).filter(S.$K)}function O(e){let t=T(e);return(0,n.jsx)("div",{className:"ml-4 inline-block h-full w-14 grayscale lg:-mr-8 lg:ml-8 xl:-mr-16 xl:ml-16",children:t.map(e=>(0,n.jsx)("div",{title:e.label,className:(0,f.cn)("h-1",{"bg-[#5c9af6]":"write"===e.type,"mt-0.5 bg-[#4d7cc0]":"waitForTransaction"===e.type,"mt-0.5 bg-[#3d5c8a]":"waitForTransactionReceipt"===e.type||"waitForUserOperationReceipt"===e.type}),style:{width:"".concat(e.widthPercentage,"%"),marginLeft:"".concat(e.startPercentage,"%")}},e.label))})}var M=r(19362),E=r(55823),C=r(84141),F=r(35431),I=r(79701),Z=r(37979),U=r(33586),A=r(42473),H=r(368),P=r(97869);function z(e){let{hash:t}=e,{id:r}=(0,v.A)(),{data:s}=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{hash:n,transactionReceipt:s,query:a={}}=r,i=(0,P.Z)(r),l=(0,H.x)({config:i}),c=function(e,t={}){return{async queryFn({queryKey:t}){let{hash:r,transactionReceipt:n,scopeKey:s,...a}=t[1];if(!r&&!n)throw Error("hash or transactionReceipt is required");return await function(e,t){let{chainId:r,...n}=t,s=e.getClient({chainId:r});return(0,Z.s)(s,I.a,"getTransactionConfirmations")(n)}(e,{hash:r,transactionReceipt:n,...a})??null},queryKey:function(e={}){return["transactionConfirmations",(0,U.OP)(e)]}(t)}}(i,{...r,chainId:null!==(e=r.chainId)&&void 0!==e?e:l}),o=!!(!(n&&s)&&(n||s)&&(null===(t=a.enabled)||void 0===t||t));return(0,A.aM)({...a,...c,enabled:o})}({hash:t,chainId:r,query:{refetchInterval:1e3,enabled:!!t}});return s?(0,n.jsxs)("span",{className:"flex items-center text-xs font-extrabold text-green-600",children:[(0,n.jsx)("span",{className:"mr-2 inline-block h-2 w-2 animate-pulse rounded-full bg-success"}),(0,n.jsx)("span",{className:"opacity-70",children:s.toString()})]}):(0,n.jsx)(g.O,{className:"h-4 w-[50px]"})}function D(e){let t=T(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(F.Z,{className:"my-5"}),(0,n.jsxs)("div",{className:"flex items-start gap-x-4 pb-2",children:[(0,n.jsx)("h3",{className:"inline-block w-[45px] pb-2 text-2xs font-bold uppercase",children:"Timing"}),(0,n.jsx)("div",{className:"w-full border border-white/20 p-2 pb-3",children:(0,n.jsx)("div",{className:"grid grid-cols-[auto_1fr_auto] items-center gap-x-4 gap-y-1",children:t.map(e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:"text-xs",children:[e.label,":"]}),(0,n.jsx)("span",{className:(0,f.cn)("h-1",{"bg-[#5c9af6]":"write"===e.type,"bg-[#4d7cc0]":"waitForTransaction"===e.type,"bg-[#3d5c8a]":"waitForTransactionReceipt"===e.type||"waitForUserOperationReceipt"===e.type}),style:{width:"".concat(e.widthPercentage,"%"),marginLeft:"".concat(e.startPercentage,"%")}}),(0,n.jsxs)("span",{className:"text-right text-xs",children:[e.duration,"ms"]})]}))})})]})]})}function V(e){let{label:t,status:r,children:s}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-2xs font-bold uppercase text-white/60",children:t}),(0,n.jsx)("p",{className:"pt-1 text-xs uppercase",children:null!=s?s:"rejected"===r?(0,n.jsx)("span",{className:"text-white/60",children:"N/A"}):(0,n.jsx)(g.O,{className:"h-4 w-[100px]"})})]})}function _(e){var t;let{row:r}=e,s=null==r?void 0:r.original,a=s.status,i=null==s?void 0:s.logs,l=null==s?void 0:s.receipt;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(b.SC,{className:(0,f.cn)("relative cursor-pointer",{"bg-muted/50":r.getIsExpanded()}),onClick:()=>r.toggleExpanded(),children:[r.getVisibleCells().map(e=>(0,n.jsx)(b.pj,{children:(0,d.ie)(e.column.columnDef.cell,e.getContext())},e.id)),r.getIsExpanded()?(0,n.jsx)(M.Z,{className:"absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 text-white/60"}):(0,n.jsx)(E.Z,{className:"absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 text-white/60"})]}),r.getIsExpanded()&&(0,n.jsx)(b.SC,{className:"border-b-white/20 bg-muted/50 hover:bg-muted/50",children:(0,n.jsx)(b.pj,{colSpan:$.length,children:s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-x-2 gap-y-5 sm:grid-cols-4 md:grid-cols-5",children:[(0,n.jsx)(V,{label:"Confirmations",status:a,children:"rejected"!==a?(0,n.jsx)(z,{hash:null===(t=s.transaction)||void 0===t?void 0:t.hash}):null}),(0,n.jsxs)(V,{label:"Tx value",status:a,children:[s.value?(0,C.d)(s.value):0," ETH"]}),(0,n.jsx)(V,{label:"Gas used",status:a,children:null==l?void 0:l.gasUsed.toString()}),(0,n.jsx)(V,{label:"Gas price",status:a,children:null==l?void 0:l.effectiveGasPrice.toString()}),(0,n.jsx)(V,{label:"Tx cost",status:a,children:l?"".concat((0,C.d)(l.gasUsed*l.effectiveGasPrice)," ETH"):null})]}),(0,n.jsx)(F.Z,{className:"my-5"}),(0,n.jsxs)("div",{className:"flex items-start gap-x-4",children:[(0,n.jsx)("h3",{className:"w-[45px] flex-shrink-0 text-2xs font-bold uppercase",children:"Inputs"}),s.calls.length>0?(0,n.jsx)("div",{className:"flex w-full flex-col gap-y-4",children:s.calls.map((e,t)=>{var r;return(0,n.jsxs)("div",{className:"min-w-0 flex-grow border border-white/20 p-2 pt-1",children:[(0,n.jsxs)("span",{className:"text-xs",children:[e.functionName,":"]}),null===(r=e.args)||void 0===r?void 0:r.map((e,t)=>(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsxs)("span",{className:"flex-shrink-0 text-xs text-white/60",children:["arg ",t+1,":"]}),(0,n.jsx)("span",{className:"ml-2 break-all text-xs",children:"object"==typeof e&&null!==e?JSON.stringify(e,null,2):String(e)})]},t)),e.value&&e.value>0n?(0,n.jsxs)("div",{className:"text-xs text-white/60",children:["value: ",(0,C.d)(e.value)," ETH"]}):null]},t)})}):(0,n.jsx)("p",{className:"text-2xs uppercase text-white/60",children:"No inputs"})]}),s.error?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(F.Z,{className:"my-5"}),(0,n.jsxs)("div",{className:"flex items-start gap-x-4",children:[(0,n.jsx)("h3",{className:"w-[45px] flex-shrink-0 text-2xs font-bold uppercase",children:"Error"}),(0,n.jsx)("div",{className:"flex-grow whitespace-pre-wrap border border-red-500 p-2 font-mono text-xs",children:s.error.message})]})]}):null,s.error?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(F.Z,{className:"my-5"}),(0,n.jsxs)("div",{className:"flex items-start gap-x-4",children:[(0,n.jsx)("h3",{className:"inline-block w-[45px] flex-shrink-0 text-2xs font-bold uppercase",children:"Logs"}),Array.isArray(i)&&i.length>0?(0,n.jsx)("div",{className:"flex-grow break-all border border-white/20 p-2 pb-3",children:(0,n.jsx)("ul",{children:i.map((e,t)=>{let r="eventName"in e?e.eventName:null,s="args"in e?e.args:null;return(0,n.jsxs)("li",{children:[!!r&&(0,n.jsxs)("span",{className:"text-xs",children:[null==r?void 0:r.toString(),":"]}),s&&(0,n.jsx)("ul",{className:"list-inside",children:Object.entries(s).map(e=>{let[t,r]=e;return(0,n.jsxs)("li",{className:"mt-1 flex",children:[(0,n.jsxs)("span",{className:"flex-shrink-0 text-xs text-white/60",children:[t,": "]}),(0,n.jsx)("span",{className:"ml-2 break-all text-xs",children:String(r)})]},t)})}),t<i.length-1&&(0,n.jsx)(F.Z,{className:"my-4"})]},t)})})}):"pending"===a?(0,n.jsx)(g.O,{className:"h-4 w-full"}):(0,n.jsx)("p",{className:"text-2xs uppercase text-white/60",children:"No logs"})]})]}),s.write&&(0,n.jsx)(D,{...s.write})]})})})]})}var q=r(6270),G=r(55024),K=r(60188),L=r(57253),B=r(50011);let W=(0,h.Cl)(),$=[W.accessor("receipt.blockNumber",{header:"Block",cell:e=>{if("rejected"===e.row.original.status)return(0,n.jsx)("span",{className:"text-white/60",children:"N/A"});let t=e.getValue();return t?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(a,{className:"mr-1 h-3 w-3"}),t.toString()]}):(0,n.jsx)(g.O,{className:"h-4 w-full"})}}),W.accessor("from",{header:"From",cell:e=>{let t=e.getValue();return t?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(i,{className:"mr-1 h-3 w-3"}),(0,n.jsx)(j.a,{hex:t})]}):(0,n.jsx)(g.O,{className:"h-4 w-full"})}}),W.accessor("calls",{header:"Function(s)",cell:e=>{let t=e.getValue(),r=e.row.original.status;return(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"flex gap-2",children:t.map((e,t)=>{let{functionName:r}=e;return(0,n.jsx)(x,{variant:"secondary",children:r},t)})}),"pending"===r&&(0,n.jsx)(l,{className:"ml-2 h-4 w-4 text-white/60"}),"success"===r&&(0,n.jsx)(l,{className:"ml-2 h-4 w-4 text-green-400"}),("reverted"===r||"rejected"===r)&&(0,n.jsx)(c.Z,{className:"ml-2 h-4 w-4 text-red-400"})]})}}),W.accessor("hash",{header:"Tx hash",cell:e=>{if("rejected"===e.row.original.status)return(0,n.jsx)("span",{className:"text-white/60",children:"N/A"});let t=e.getValue();return t?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(o,{className:"mr-1 h-3 w-3"}),(0,n.jsx)(y,{hash:t,children:(0,n.jsx)(j.a,{hex:t})})]}):(0,n.jsx)(g.O,{className:"h-4 w-full"})}}),W.accessor("timestamp",{header:"Time",cell:e=>{let t=e.getValue(),r=e.row.original.write;return(0,n.jsxs)(n.Fragment,{children:[t?(0,n.jsx)(k,{timestamp:t}):(0,n.jsx)(g.O,{className:"h-4 w-14"}),r&&(0,n.jsx)(O,{...r})]})}})];function Y(){var e;let t=function(){let{worldAddress:e}=(0,q.useParams)(),t=(0,K.oR)(B.h,e=>e.transactions),r=(0,K.oR)(L.store,e=>e.writes),n=(0,u.useMemo)(()=>Object.values(r).map(t=>({...t,calls:t.calls.filter(t=>t.to&&(0,G.K)(t.to)===(0,G.K)(e))})).filter(e=>{let{calls:t}=e;return t.length>0}),[r,e]);return(0,u.useMemo)(()=>{let r=new Map;for(let t of n){let n=t.events.find(e=>"write:result"===e.type);r.set(t.hash||t.writeId,{hash:t.hash,writeId:t.writeId,from:t.from,status:(null==n?void 0:n.status)==="rejected"?"rejected":"pending",timestamp:BigInt(t.time)/1000n,calls:t.calls.filter(t=>t.to===e),error:n&&"reason"in n?n.reason:void 0,write:t})}for(let e of t){let t=r.get(e.hash);t?r.set(e.hash,{...e,write:t.write}):r.set(e.hash,{...e})}return Array.from(r.values()).sort((e,t)=>{var r,n;return Number(null!==(r=t.timestamp)&&void 0!==r?r:0n)-Number(null!==(n=e.timestamp)&&void 0!==n?n:0n)})},[t,n,e])}(),[r,s]=(0,u.useState)({}),a=(0,d.b7)({data:t,columns:$,state:{expanded:r},getRowId:e=>e.writeId,onExpandedChange:s,getCoreRowModel:(0,h.sC)(),getExpandedRowModel:(0,h.rV)()});return(0,n.jsxs)(b.iA,{children:[(0,n.jsx)(b.xD,{className:"sticky top-0 z-10 bg-[var(--color-background)]",children:a.getHeaderGroups().map(e=>(0,n.jsx)(b.SC,{children:e.headers.map(e=>(0,n.jsx)(b.ss,{className:"text-xs uppercase",children:e.isPlaceholder?null:(0,d.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,n.jsx)(b.RM,{children:(null===(e=a.getRowModel().rows)||void 0===e?void 0:e.length)?a.getRowModel().rows.map(e=>(0,n.jsx)(_,{row:e},e.id)):(0,n.jsx)(b.SC,{children:(0,n.jsx)(b.pj,{colSpan:$.length,children:(0,n.jsxs)("p",{className:"flex items-center justify-center gap-3 py-4 font-mono text-xs font-bold uppercase text-muted-foreground",children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 animate-ping rounded-full bg-muted-foreground"})," Waiting for transactions…"]})})})})]})}},50011:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});let n=(0,r(30521).M)()(e=>({transactions:[],setTransaction:t=>e(e=>({transactions:[...e.transactions,t]})),updateTransaction:(t,r)=>e(e=>({transactions:e.transactions.map(e=>e.hash===t?{...e,...r}:e)}))}))},35605:function(e,t,r){"use strict";r.d(t,{A:function(){return a}});var n=r(6270),s=r(84367);function a(){let{chainName:e}=(0,n.useParams)();return(0,s.Yx)(e),s.df[e]}},84367:function(e,t,r){"use strict";r.d(t,{is:function(){return p},M0:function(){return d},oK:function(){return f},df:function(){return h},wG:function(){return m},Yx:function(){return x}});var n=r(79617),s=r(53103),a=r(20536),i=r(49249),l=r(76271);({...s.t});var c={...a.g,iconUrls:["https://redstone.xyz/chain-icons/redstone.png"],indexerUrl:"https://indexer.mud.redstonechain.com"},o={...i.T,iconUrls:["https://redstone.xyz/chain-icons/garnet.png"],indexerUrl:"https://indexer.mud.garnetchain.com"},u={...l.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 d=["world","store","metadata","puppet","erc20-puppet","erc721-puppet"],h={anvil:n.O,rhodolite:u,garnet:o,redstone:c},p=Object.fromEntries(Object.entries(h).map(e=>{let[t,r]=e;return[r.id,t]}));function f(e){return"string"==typeof e&&e in h}function m(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(!f(e))throw Error("Invalid chain name. Supported chains are: ".concat(Object.keys(h).join(", "),"."))}},35431:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(75536),s=r(89702),a=r(80967),i=r(66585);let l=s.forwardRef((e,t)=>{let{className:r,orientation:s="horizontal",decorative:l=!0,...c}=e;return(0,n.jsx)(a.f,{ref:t,decorative:l,orientation:s,className:(0,i.cn)("shrink-0 bg-border","horizontal"===s?"h-[1px] w-full":"h-full w-[1px]",r),...c})});l.displayName=a.f.displayName},68347:function(e,t,r){"use strict";r.d(t,{O:function(){return a}});var n=r(75536),s=r(66585);function a(e){let{className:t,...r}=e;return(0,n.jsx)("div",{className:(0,s.cn)("animate-pulse rounded-md bg-muted",t),...r})}},34431:function(e,t,r){"use strict";r.d(t,{RM:function(){return c},SC:function(){return o},iA:function(){return i},pj:function(){return d},ss:function(){return u},xD:function(){return l}});var n=r(75536),s=r(89702),a=r(66585);let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("table",{ref:t,className:(0,a.cn)("w-full caption-bottom text-sm",r),...s})});i.displayName="Table";let l=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("thead",{ref:t,className:(0,a.cn)("[&_tr]:border-b",r),...s})});l.displayName="TableHeader";let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tbody",{ref:t,className:(0,a.cn)("[&_tr:last-child]:border-0",r),...s})});c.displayName="TableBody",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tfoot",{ref:t,className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",r),...s})}).displayName="TableFooter";let o=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tr",{ref:t,className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...s})});o.displayName="TableRow";let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("th",{ref:t,className:(0,a.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",r),...s})});u.displayName="TableHead";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("td",{ref:t,className:(0,a.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",r),...s})});d.displayName="TableCell",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("caption",{ref:t,className:(0,a.cn)("mt-4 text-sm text-muted-foreground",r),...s})}).displayName="TableCaption"},71118:function(e,t,r){"use strict";r.d(t,{a:function(){return s}});var n=r(75536);function s(e){let{hex:t}=e;return t.length<=10?(0,n.jsx)("span",{children:t}):(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{className:"after:select-none after:content-['…']",children:t.slice(0,6)}),(0,n.jsx)("span",{className:"tracking-[-1ch] text-transparent",children:t.slice(6,-4)}),t.slice(-4)]})}},83966:function(e,t,r){"use strict";r.d(t,{M:function(){return n}});let n="explorer/observer"},41374:function(e,t,r){"use strict";r.d(t,{f:function(){return s}});var n=r(95674);let s=r.n(n)()("mud:explorer").extend("observer")},57253:function(e,t,r){"use strict";r.d(t,{store:function(){return l}});var n=r(30521),s=r(66585),a=r(83966),i=r(41374);let l=(0,n.M)(()=>({writes:{}}));(0,i.f)("listening for relayed messages",a.M);let c=[];new BroadcastChannel(a.M).addEventListener("message",e=>{"ping"!==e.data.type&&c.push(e)}),setInterval(function(){0!==c.length&&l.setState(e=>{let t=e;for(let{data:e}of c){if("ping"===e.type)continue;let r="write"===e.type?{...e,events:[]}:t.writes[e.writeId];if(!r)continue;let n=r.hash;"waitForTransactionReceipt"===e.type?n=e.hash:"waitForUserOperationReceipt:result"===e.type&&(0,s.r8)(e)&&(n=e.value.receipt.transactionHash),t={...t,writes:{...t.writes,[e.writeId]:{...r,type:e.type,hash:n,userOpHash:"waitForUserOperationReceipt"===e.type?e.userOpHash:r.userOpHash,events:[...r.events,e]}}}}return c.length=0,t})},100)},66585:function(e,t,r){"use strict";r.d(t,{az:function(){return c},cn:function(){return i},fu:function(){return l},r8:function(){return o}});var n=r(84141),s=r(88014),a=r(47228);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.m)((0,s.W)(t))}function l(e){return e.replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).replace(/^_/,"")}function c(e){let t=(0,n.d)(e),r=Math.floor(parseFloat(t)).toString().length;return parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-r)})}function o(e){return"fulfilled"===e.status}},91502:function(e,t,r){"use strict";r.d(t,{WV:function(){return l},jH:function(){return c}});var n=r(89702),s=r(3020),a=r(14292),i=r(75536),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=n.forwardRef((e,r)=>{let{asChild:n,...s}=e,l=n?a.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(l,{...s,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function c(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}},80967:function(e,t,r){"use strict";r.d(t,{f:function(){return o}});var n=r(89702),s=r(91502),a=r(75536),i="horizontal",l=["horizontal","vertical"],c=n.forwardRef((e,t)=>{let{decorative:r,orientation:n=i,...c}=e,o=l.includes(n)?n:i;return(0,a.jsx)(s.WV.div,{"data-orientation":o,...r?{role:"none"}:{"aria-orientation":"vertical"===o?o:void 0,role:"separator"},...c,ref:t})});c.displayName="Separator";var o=c},60188:function(e,t,r){"use strict";r.d(t,{oR:function(){return a}});var n=r(89702);let{useSyncExternalStoreWithSelector:s}=r(44666);function a(e,t=e.getState,r){let a=s(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return(0,n.useDebugValue)(a),a}},30521:function(e,t,r){"use strict";r.d(t,{M:function(){return s}});let n=e=>{let t;let r=new Set,n=(e,n)=>{let s="function"==typeof e?e(t):e;if(!Object.is(s,t)){let e=t;t=(null!=n?n:"object"!=typeof s)?s:Object.assign({},t,s),r.forEach(r=>r(t,e))}},s=()=>t,a={setState:n,getState:s,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(n,s,a),a},s=e=>e?n(e):n},32858:function(e,t,r){"use strict";function n(e,t){return e<t?-1:e>t?1:0}function s(e,t){let r=new Map;for(let n of e){let e=t(n);r.has(e)||r.set(e,[]),r.get(e).push(n)}return r}function a(e){return void 0!==e}function i(e,t){return Object.fromEntries(Object.entries(e).map(e=>{let[r,n]=e;return[r,t(n,r)]}))}r.d(t,{$K:function(){return a},Xc:function(){return i},iN:function(){return n},vM:function(){return s}})}},function(e){e.O(0,[6095,3388,855,5674,6658,1461,9213,8474,1744],function(){return e(e.s=42981)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5004],{33924:function(e,n,r){Promise.resolve().then(r.bind(r,13048)),Promise.resolve().then(r.bind(r,87907)),Promise.resolve().then(r.bind(r,80379)),Promise.resolve().then(r.bind(r,99401)),Promise.resolve().then(r.bind(r,58631)),Promise.resolve().then(r.bind(r,90900)),Promise.resolve().then(r.bind(r,79121)),Promise.resolve().then(r.bind(r,67241)),Promise.resolve().then(r.bind(r,82771)),Promise.resolve().then(r.bind(r,98785)),Promise.resolve().then(r.bind(r,24420)),Promise.resolve().then(r.bind(r,82638)),Promise.resolve().then(r.bind(r,9593)),Promise.resolve().then(r.bind(r,37092)),Promise.resolve().then(r.bind(r,46271)),Promise.resolve().then(r.bind(r,23852)),Promise.resolve().then(r.bind(r,78756)),Promise.resolve().then(r.bind(r,79861)),Promise.resolve().then(r.bind(r,94393)),Promise.resolve().then(r.bind(r,39658)),Promise.resolve().then(r.bind(r,50260)),Promise.resolve().then(r.bind(r,13822)),Promise.resolve().then(r.bind(r,76694)),Promise.resolve().then(r.bind(r,38304)),Promise.resolve().then(r.bind(r,77150)),Promise.resolve().then(r.bind(r,50447)),Promise.resolve().then(r.bind(r,83422)),Promise.resolve().then(r.t.bind(r,80950,23)),Promise.resolve().then(r.t.bind(r,99960,23)),Promise.resolve().then(r.t.bind(r,1887,23)),Promise.resolve().then(r.bind(r,29576)),Promise.resolve().then(r.t.bind(r,80385,23)),Promise.resolve().then(r.bind(r,57253))},83966:function(e,n,r){"use strict";r.d(n,{M:function(){return t}});let t="explorer/observer"},41374:function(e,n,r){"use strict";r.d(n,{f:function(){return i}});var t=r(95674);let i=r.n(t)()("mud:explorer").extend("observer")},57253:function(e,n,r){"use strict";r.d(n,{store:function(){return l}});var t=r(30521),i=r(66585),s=r(83966),o=r(41374);let l=(0,t.M)(()=>({writes:{}}));(0,o.f)("listening for relayed messages",s.M);let u=[];new BroadcastChannel(s.M).addEventListener("message",e=>{"ping"!==e.data.type&&u.push(e)}),setInterval(function(){0!==u.length&&l.setState(e=>{let n=e;for(let{data:e}of u){if("ping"===e.type)continue;let r="write"===e.type?{...e,events:[]}:n.writes[e.writeId];if(!r)continue;let t=r.hash;"waitForTransactionReceipt"===e.type?t=e.hash:"waitForUserOperationReceipt:result"===e.type&&(0,i.r8)(e)&&(t=e.value.receipt.transactionHash),n={...n,writes:{...n.writes,[e.writeId]:{...r,type:e.type,hash:t,userOpHash:"waitForUserOperationReceipt"===e.type?e.userOpHash:r.userOpHash,events:[...r.events,e]}}}}return u.length=0,n})},100)},66585:function(e,n,r){"use strict";r.d(n,{az:function(){return u},cn:function(){return o},fu:function(){return l},r8:function(){return h}});var t=r(84141),i=r(88014),s=r(47228);function o(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0,s.m)((0,i.W)(n))}function l(e){return e.replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).replace(/^_/,"")}function u(e){let n=(0,t.d)(e),r=Math.floor(parseFloat(n)).toString().length;return parseFloat(n).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-r)})}function h(e){return"fulfilled"===e.status}},80385:function(){}},function(e){e.O(0,[8917,1889,1366,6095,9726,5674,8685,426,9576,7907,9001,2252,9213,8474,1744],function(){return e(e.s=33924)}),_N_E=e.O()}]);
|
package/dist/exports/observer.js
CHANGED
|
@@ -100,7 +100,9 @@ function observer({ explorerUrl = "http://localhost:13690", waitForTransaction }
|
|
|
100
100
|
return write;
|
|
101
101
|
emit("write", {
|
|
102
102
|
writeId,
|
|
103
|
-
|
|
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]) => {
|