PageSourceSearch

https://compose.diamonds/assets/js/2efe05b6.1a55011d.js

js compose.diamonds collected 2026-10-03 23:56:21 UTC 22,267 bytes, 4 lines download raw bytes

1"use strict";(self.webpackChunkcompose_documentation=self.webpackChunkcompose_documentation||[]).push([["9695"],{77670(e,n,s){s.r(n),s.d(n,{metadata:()=>r,default:()=>w,frontMatter:()=>p,contentTitle:()=>m,toc:()=>f,assets:()=>x});var r=JSON.parse('{"id":"library/access/Owner/Transfer/OwnerTransferMod","title":"Owner Transfer Module","description":"ERC-173 ownership transfer helpers for diamond facets","source":"@site/docs/library/access/Owner/Transfer/OwnerTransferMod.mdx","sourceDirName":"library/access/Owner/Transfer","slug":"/library/access/Owner/Transfer/OwnerTransferMod","permalink":"/docs/library/access/Owner/Transfer/OwnerTransferMod","draft":false,"unlisted":false,"editUrl":"https://github.com/Perfect-Abstractions/Compose/tree/main/website/docs/library/access/Owner/Transfer/OwnerTransferMod.mdx","tags":[],"version":"current","sidebarPosition":110,"frontMatter":{"sidebar_position":110,"title":"Owner Transfer Module","description":"ERC-173 ownership transfer helpers for diamond facets","sidebar_label":"Module","gitSource":"https://github.com/Perfect-Abstractions/Compose/tree/main/src/access/Owner/Transfer/OwnerTransferMod.sol"},"sidebar":"mainSidebar","previous":{"title":"Facet","permalink":"/docs/library/access/Owner/Transfer/OwnerTransferFacet"},"next":{"title":"Two Steps","permalink":"/docs/library/access/Owner/TwoSteps/"}}'),t=s(62540),a=s(43023),o=s(93571),c=s(92550),i=s(57458),l=s(72437),d=s(33061);s(18930);var u=s(17942),h=s(66379);let p={sidebar_position:110,title:"Owner Transfer Module",description:"ERC-173 ownership transfer helpers for diamond facets",sidebar_label:"Module",gitSource:"https://github.com/Perfect-Abstractions/Compose/tree/main/src/access/Owner/Transfer/OwnerTransferMod.sol"},m,x={},f=[{value:"Storage",id:"storage",level:2},{value:"State Variables",id:"state-variables",level:3},{value:"OwnerStorage",id:"ownerstorage",level:3},{value:"Functions",id:"functions",level:2},{value:"getStorage",id:"getstorage",level:3},{value:"transferOwnership",id:"transferownership",level:3},{value:"Events",id:"events",level:2},{value:"Errors",id:"errors",level:2},{value:"Best Practices",id:"best-practices",level:2},{value:"Integration Notes",id:"integration-notes",level:2}];function j(e){let n={a:"a",code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.A,{}),"\n",(0,t.jsx)(o.A,{children:(0,t.jsx)(n.p,{children:"Helper functions for ownership transfer and storage access."})}),"\n",(0,t.jsx)(c.A,{type:"info",title:"Key Features",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"transferOwnership"})," guards by requiring ",(0,t.jsx)(n.code,{children:"msg.sender"})," is the current owner."]}),"\n",(0,t.jsxs)(n.li,{children:["Emits ",(0,t.jsx)(n.code,{children:"OwnershipTransferred"})," on successful transfers."]}),"\n"]})}),"\n",(0,t.jsx)(c.A,{type:"important",title:"Module Usage",children:(0,t.jsxs)(n.p,{children:["Use helper functions from Compose using your own custom facets. See ",(0,t.jsx)("a",{href:"/docs/foundations/facets-and-modules",children:"Facets & Modules"})," for more information."]})}),"\n",(0,t.jsx)(n.h2,{id:"storage",children:"Storage"}),"\n",(0,t.jsx)(n.h3,{id:"state-variables",children:"State Variables"}),"\n",(0,t.jsx)(l.A,{properties:[{name:"STORAGE_POSITION",type:"bytes32",description:'Owner storage position within the diamond (Value: `keccak256("erc173.owner")`)'}],showRequired:!1}),"\n",(0,t.jsx)(n.h3,{id:"ownerstorage",children:"OwnerStorage"}),"\n",(0,t.jsx)(d.A,{language:"solidity",maxLines:15,title:"Definition",children:`/** @custom:storage-location erc8042:erc173.owner */
2struct OwnerStorage {
3  address owner;
4}`}),"\n",(0,t.jsx)(n.h2,{id:"functions",children:"Functions"}),"\n",(0,t.jsx)(n.h3,{id:"getstorage",children:"getStorage"}),"\n",(0,t.jsxs)(n.p,{children:["Returns a pointer to the ",(0,t.jsx)(n.code,{children:"OwnerStorage"})," struct."]}),"\n",(0,t.jsx)(d.A,{language:"solidity",maxLines:8,children:"function getStorage() pure returns (OwnerStorage storage s);"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Returns:"})}),"\n",(0,t.jsx)(l.A,{properties:[{name:"s",type:"OwnerStorage storage",description:"The struct in storage."}],showRequired:!1}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"transferownership",children:"transferOwnership"}),"\n",(0,t.jsx)(n.p,{children:"Transfer the diamond ownership from the current owner to the next one. Caller must be the current owner."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"_newOwner"})," may be ",(0,t.jsx)(n.code,{children:"address(0)"})," to clear ownership (same storage effect as ",(0,t.jsx)(n.code,{children:"renounceOwnership()"})," in ",(0,t.jsx)(n.a,{href:"/docs/library/access/Owner/Renounce/OwnerRenounceMod",children:(0,t.jsx)(n.code,{children:"OwnerRenounceMod"})}),")."]}),"\n",(0,t.jsx)(d.A,{language:"solidity",maxLines:8,children:"function transferOwnership(address _newOwner);"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsx)(l.A,{properties:[{name:"_newOwner",type:"address",description:"Next owner, or `address(0)` to clear ownership."}],showRequired:!1}),"\n",(0,t.jsx)(n.h2,{id:"events",children:"Events"}),"\n",(0,t.jsx)(i._,{children:(0,t.jsxs)(i.A,{title:"OwnershipTransferred",defaultOpen:!1,children:[(0,t.jsx)("div",{style:{marginBottom:"1rem"},children:(0,t.jsxs)(n.p,{children:["Emitted when the stored owner changes (including when ",(0,t.jsx)(n.code,{children:"_newOwner"})," is ",(0,t.jsx)(n.code,{children:"address(0)"}),")."]})}),(0,t.jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,t.jsx)("strong",{children:"Signature:"}),(0,t.jsx)(d.A,{language:"solidity",maxLines:5,children:"event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);"})]})]})}),"\n",(0,t.jsx)(n.h2,{id:"errors",children:"Errors"}),"\n",(0,t.jsx)(i._,{children:(0,t.jsxs)(i.A,{title:"OwnerUnauthorizedAccount",defaultOpen:!1,children:[(0,t.jsx)("div",{style:{marginBottom:"1rem"},children:(0,t.jsxs)(n.p,{children:["Thrown when ",(0,t.jsx)(n.code,{children:"msg.sender"})," is not the stored owner during ",(0,t.jsx)(n.code,{children:"transferOwnership"}),"."]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Signature:"}),(0,t.jsx)(d.A,{language:"solidity",maxLines:5,children:"error OwnerUnauthorizedAccount();"})]})]})}),"\n","\n",(0,t.jsx)(n.h2,{id:"best-practices",children:"Best Practices"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Call ",(0,t.jsx)(n.code,{children:"transferOwnership"})," only from trusted ",(0,t.jsx)(n.code,{children:"external"})," wrappers; confirm ",(0,t.jsx)(n.code,{children:"_newOwner"})," before sending a transaction."]}),"\n",(0,t.jsxs)(n.li,{children:["Keep the same ",(0,t.jsx)(n.code,{children:"STORAGE_POSITION"})," and ",(0,t.jsx)(n.code,{children:"OwnerStorage"})," layout as other owner modules; do not introduce a second owner slot."]}),"\n",(0,t.jsxs)(n.li,{children:["If you want a dedicated renounce entrypoint in Solidity, prefer ",(0,t.jsx)(n.a,{href:"/docs/library/access/Owner/Renounce/OwnerRenounceMod",children:(0,t.jsx)(n.code,{children:"OwnerRenounceMod"})})," or pass ",(0,t.jsx)(n.code,{children:"address(0)"})," here. Both target the same storage field."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"integration-notes",children:"Integration Notes"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"OwnerStorage"})," lives at ",(0,t.jsx)(n.code,{children:'keccak256("erc173.owner")'})," inside the diamond. The same slot as ",(0,t.jsx)(n.a,{href:"/docs/library/access/Owner/Data/OwnerDataMod",children:(0,t.jsx)(n.code,{children:"OwnerDataMod"})}),", ",(0,t.jsx)(n.a,{href:"/docs/library/access/Owner/Transfer/OwnerTransferFacet",children:(0,t.jsx)(n.code,{children:"OwnerTransferFacet"})}),", and related owner code. Transferring here updates what ",(0,t.jsx)(n.code,{children:"owner()"})," reads on ",(0,t.jsx)(n.a,{href:"/docs/library/access/Owner/Data/OwnerDataFacet",children:(0,t.jsx)(n.code,{children:"OwnerDataFacet"})}),"."]}),"\n",(0,t.jsx)(u.A,{date:"2026-06-05T12:00:00.000Z"})]})}function w(e={}){let{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(j,{...e})}):j(e)}},28908(e,n,s){s.d(n,{_:()=>c,u:()=>i});var r=s(62540),t=s(63696),a=s(47738);let o=t.createContext(null);function c({children:e,content:n}){let s=(0,t.useMemo)(()=>({metadata:n.metadata,frontMatter:n.frontMatter,assets:n.assets,contentTitle:n.contentTitle,toc:n.toc}),[n]);return(0,r.jsx)(o.Provider,{value:s,children:e})}function i(){let e=(0,t.useContext)(o);if(null===e)throw new a.dV("DocProvider");return e}},72437(e,n,s){s.d(n,{A:()=>a});var r=s(62540),t=s(63696);function a({properties:e=[],showRequired:n=!0,showTypes:s=!0,title:o}){return(0,r.jsxs)("div",{className:"propertyTable_hQUj",children:[o&&(0,r.jsx)("h3",{className:"tableTitle_TWK1",children:o}),(0,r.jsx)("div",{className:"tableWrapper_yEWV",children:(0,r.jsx)("div",{className:"tableContainer_u2JZ",children:(0,r.jsxs)("table",{className:"table_hICG",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"nameColumn_Gg8z",children:"Property"}),s&&(0,r.jsx)("th",{className:"typeColumn_lItm",children:"Type"}),n&&(0,r.jsx)("th",{className:"requiredColumn_iK7o",children:"Required"}),(0,r.jsx)("th",{className:"descriptionColumn_E7Ps",children:"Description"})]})}),(0,r.jsx)("tbody",{children:e.map((e,a)=>{var o;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"nameCell_hWh2",children:(0,r.jsx)("code",{className:"propertyName_VmHE",children:e.name})}),s&&(0,r.jsx)("td",{className:"typeCell_GEa2",children:(0,r.jsx)("code",{className:"typeValue_rCoV",children:e.type||"any"})}),n&&(0,r.jsx)("td",{className:"requiredCell_PYWJ",children:e.required?(0,r.jsx)("span",{className:"requiredBadge_PsMd",children:"Yes"}):(0,r.jsx)("span",{className:"optionalBadge_raTf",children:"No"})}),(0,r.jsxs)("td",{className:"descriptionCell_Am9o",children:[e.descriptionElement||((o=e.description||e.desc)&&"string"==typeof o?o.split(/(`[^`]+`)/g).map((e,n)=>{if(e.startsWith("`")&&e.endsWith("`")){let s=e.slice(1,-1);return(0,r.jsx)("code",{className:"inlineCode_xnr8",children:s},n)}return(0,r.jsx)(t.Fragment,{children:e},n)}):o)||"-",void 0!==e.default&&(0,r.jsxs)("div",{className:"defaultValue_COU2",children:["Default: ",(0,r.jsx)("code",{children:String(e.default)})]}),e.example&&(0,r.jsxs)("div",{className:"exampleValue_LsuJ",children:["Example: ",(0,r.jsx)("code",{children:String(e.example)})]})]})]},a)})})]})})})]})}},33061(e,n,s){s.d(n,{A:()=>i});var r=s(62540),t=s(63696),a=s(4259),o=s(21737),c=s(11750);function i({language:e="javascript",maxLines:n=10,title:s,children:l}){let[d,u]=(0,t.useState)(!1),[h,p]=(0,t.useState)(!1),m="string"==typeof l?l:l?.props?.children||"",x=(0,t.useMemo)(()=>m.split("\n").length,[m]);return(0,t.useEffect)(()=>{p(x>n)},[x,n]),(0,r.jsxs)("div",{className:"expandableCode_aykX",children:[s&&(0,r.jsx)("div",{className:"codeTitle_wT9c",children:s}),(0,r.jsxs)("div",{className:"codeWrapper_Ax0s",children:[(0,r.jsx)(a.A,{language:e,className:(0,
4c.A)("codeBlock_pYoZ",!d&&h&&"codeBlockCollapsed_BbBq"),style:{"--max-lines":n},children:m}),h&&(0,r.jsx)("button",{className:(0,c.A)("expandButton_LI8S",d&&"expandButtonExpanded_f3Av"),onClick:()=>u(!d),"aria-label":d?"Collapse code":"Expand code",children:d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{name:"chevron-up",size:16}),"Show Less"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{name:"chevron-down",size:16}),"Show More (",x-n," more lines)"]})})]})]})}},93571(e,n,s){s.d(n,{A:()=>a});var r=s(62540);s(63696);var t=s(11750);function a({children:e,className:n}){return(0,r.jsx)("p",{className:(0,t.A)("subtitle_jrDb",n),children:e})}},17942(e,n,s){s.d(n,{A:()=>a});var r=s(62540);s(63696);var t=s(21737);function a({date:e,author:n,showAuthor:s=!1}){return e?(0,r.jsxs)("div",{className:"lastUpdated_hhBq",children:[(0,r.jsx)(t.A,{name:"clock-outline",size:16}),(0,r.jsx)("span",{className:"label_ZGd_",children:"Last updated:"}),(0,r.jsx)("time",{className:"date_OqLv",dateTime:new Date(e).toISOString(),children:new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}),s&&n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"separator_WmF6",children:"\u2022"}),(0,r.jsxs)("span",{className:"author_Xhxh",children:["by ",n]})]})]}):null}},66379(e,n,s){s.d(n,{A:()=>o});var r=s(62540),t=s(63696),a=s(28908);function o(){let e,n,{frontMatter:s}=(0,a.u)(),o=s?.gitSource,[c,i]=(0,t.useState)(!1);if(!o)return null;let l=(e="/tree/main/src/",-1===(n=o.indexOf(e))?"":o.slice(n+e.length)),d=async()=>{try{await navigator.clipboard.writeText(`@perfect-abstractions/compose/${l}`),i(!0),setTimeout(()=>i(!1),2e3)}catch{}};return(0,r.jsxs)("div",{className:"packageImport_O1mz",children:[(0,r.jsx)("code",{className:"code_c1Eg",children:`@perfect-abstractions/compose/${l}`}),(0,r.jsx)("button",{className:"copyButton_V60D",onClick:d,"aria-label":"Copy import",title:"Copy import",children:c?"\u2713 Copied":"Copy"})]})}},18930(e,n,s){s.d(n,{A:()=>y});var r=s(62540),t=s(63696),a=s(11750),o=s(34471),c=s(21737),i=s(75793);function l(e){(0,i.Tl)("docs_helpful_vote",(0,i.b6)({helpful:e.helpful,page_id:e.pageId,permalink:e.permalink,title:e.title,variant:e.variant??"card"}))}function d(e){(0,i.Tl)("docs_helpful_submit",(0,i.b6)({helpful:e.helpful,comment:e.comment,comment_length:e.comment.length,page_id:e.pageId,permalink:e.permalink,title:e.title,variant:e.variant??"card"}))}let u="thumbIcon_Yprl",h="thumbIconOnPrimary_xbYk",p="asideRoot_ClLe",m="asideRootWithEndSlot_Nswl",x="asideEndSlot_BHCU",f="asideBtn_WCqR",j="feedbackSubmittedAside_szkH",w="feedbackButton_kDWn",b="feedbackButtonActive_WjaZ",g="feedbackSubmitNo_R4YG",_="feedbackSubmitted_gXG3";function v({size:e=20,className:n}){return(0,r.jsx)("svg",{className:n,width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M16.667 5L7.5 14.167 3.333 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function y({pageId:e,permalink:n,title:s,onSubmit:i,variant:N="card",asideEndSlot:O}){let{colorMode:A}=(0,o.G)(),[C,T]=(0,t.useState)(null),[k,S]=(0,t.useState)(""),[B,I]=(0,t.useState)(!1),R="dark"===A?"thumbs-up-dark":"thumbs-up",M="dark"===A?"thumbs-down-dark":"thumbs-down",E={pageId:e,permalink:n,title:s,variant:N},P=e=>{T(e),l({helpful:e,...E})};if(B){let e=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v,{size:"aside"===N?18:20,className:"feedbackSubmittedCheck_YRcX"}),(0,r.jsx)("span",{children:"Thank you for your feedback!"})]});return"aside"===N&&O?(0,r.jsxs)("div",{className:(0,a.A)(p,m,"asideRootSubmittedAside_uykU"),children:[(0,r.jsx)("div",{className:(0,a.A)(_,j,"asideSubmittedMain_mJRN"),children:e}),(0,r.jsx)("div",{className:x,children:O})]}):(0,r.jsx)("div",{className:(0,a.A)(_,"aside"===N&&j),children:e})}if("aside"===N){let n=(0,r.jsxs)("div",{className:"asideButtons__hm1",children:[(0,r.jsxs)("button",{type:"button",className:f,onClick:()=>{d({helpful:"yes",comment:"",...E}),i&&i({pageId:e,feedback:"yes",comment:""}),I(!0)},"aria-label":"Yes, this was helpful",children:[(0,r.jsx)(c.A,{name:R,size:18,className:u}),"Yes"]}),(0,r.jsxs)("button",{type:"button",className:f,onClick:()=>{T("no"),l({helpful:"no",...E})},"aria-label":"No, this was not helpful",children:[(0,r.jsx)(c.A,{name:M,size:18,className:u}),"No"]})]});return(0,r.jsxs)("div",{className:(0,a.A)(p,O&&m,"no"===C&&"asideRootWithFollowup_ILrp"),children:[(0,r.jsx)("p",{className:"asideLabel_yKdX",children:"Was this helpful?"}),n,"no"===C&&(0,r.jsxs)("div",{className:"asideFollowup_vj8b",children:[(0,r.jsx)("textarea",{className:"asideTextarea_iziv",placeholder:"Tell us more (optional)...",value:k,onChange:e=>S(e.target.value),rows:2}),(0,r.jsx)("button",{type:"button",className:(0,a.A)("asideSubmit_xnWi",g),onClick:()=>{d({helpful:"no",comment:k.trim(),...E}),i&&i({pageId:e,feedback:"no",comment:k.trim()}),I(!0)},children:"Submit"})]}),O?(0,r.jsx)("div",{className:x,children:O}):null]})}return(0,r.jsxs)("div",{className:"wasThisHelpful_LFGY",children:[(0,r.jsxs)("div",{className:"feedbackPrompt_hLbD",children:[(0,r.jsx)("span",{className:"promptText_fpxS",children:"Was this helpful?"}),(0,r.jsxs)("div",{className:"feedbackButtons_VwXX",children:[(0,r.jsxs)("button",{type:"button",className:(0,a.A)(w,"yes"===C&&b),onClick:()=>P("yes"),"aria-label":"Yes, this was helpful",children:[(0,r.jsx)(c.A,{name:R,size:20,className:(0,a.A)(u,"yes"===C&&h)}),"Yes"]}),(0,r.jsxs)("button",{type:"button",className:(0,a.A)(w,"no"===C&&b),onClick:()=>P("no"),"aria-label":"No, this was not helpful",children:[(0,r.jsx)(c.A,{name:M,size:20,className:(0,a.A)(u,"no"===C&&h)}),"No"]})]})]}),C&&(0,r.jsxs)("div",{className:"feedbackForm_ERHR",children:[(0,r.jsx)("textarea",{className:"commentInput_zGC4",placeholder:"Tell us more (optional)...",value:k,onChange:e=>S(e.target.value),rows:3}),(0,r.jsx)("button",{type:"button",className:(0,a.A)("submitButton_Mcou","no"===C&&g),onClick:()=>{i&&i({pageId:e,feedback:C,comment:k}),C&&d({helpful:C,comment:k.trim(),...E}),I(!0)},children:"Submit Feedback"})]})]})}},57458(e,n,s){s.d(n,{A:()=>i,_:()=>l});var r=s(62540),t=s(63696),a=s(11750),o=s(21737);let c={accordion:"accordion_RgZt",accordionHeader:"accordionHeader_lElb",accordionHeaderOpen:"accordionHeaderOpen_ZAvw",accordionTitle:"accordionTitle_KZkk",accordionIcon:"accordionIcon_uuae",accordionIconOpen:"accordionIconOpen_bPA8",accordionContent:"accordionContent_znSG",accordionContentOpen:"accordionContentOpen_wx9
4i",accordionBody:"accordionBody_PoDw","accordion--bordered":"accordion--bordered_Eqiz",accordionGroup:"accordionGroup_GEK0"};function i({title:e,defaultOpen:n=!1,children:s,variant:l="default"}){let[d,u]=(0,t.useState)(n);return(0,r.jsxs)("div",{className:(0,a.A)(c.accordion,c[`accordion--${l}`]),children:[(0,r.jsxs)("button",{className:(0,a.A)(c.accordionHeader,d&&c.accordionHeaderOpen),onClick:()=>{u(!d)},"aria-expanded":d,"aria-controls":`accordion-content-${e?.replace(/\s+/g,"-").toLowerCase()}`,children:[(0,r.jsx)("span",{className:c.accordionTitle,children:e}),(0,r.jsx)(o.A,{name:"accordion-chevron",size:20,className:(0,a.A)(c.accordionIcon,d&&c.accordionIconOpen)})]}),(0,r.jsx)("div",{id:`accordion-content-${e?.replace(/\s+/g,"-").toLowerCase()}`,className:(0,a.A)(c.accordionContent,d&&c.accordionContentOpen),"aria-hidden":!d,children:(0,r.jsx)("div",{className:c.accordionBody,children:s})})]})}function l({children:e,className:n}){return(0,r.jsx)("div",{className:(0,a.A)(c.accordionGroup,n),children:e})}},92550(e,n,s){s.d(n,{A:()=>c});var r=s(62540);s(63696);var t=s(11750),a=s(21737);let o={callout:"callout_aeEX",calloutHeader:"calloutHeader_fXny",calloutIcon:"calloutIcon_vX9X",calloutTitle:"calloutTitle_kaV8",calloutContent:"calloutContent_Hl52","callout--info":"callout--info_TgTd","callout--warning":"callout--warning_ioY5","callout--danger":"callout--danger_OAha","callout--success":"callout--success_rrx_","callout--tip":"callout--tip_iqbU","callout--note":"callout--note_gJ54"};function c({type:e="info",title:n,children:s,icon:i=!0}){let l={info:"lightbulb",warning:"warning",danger:"no-entry",success:"checkmark",tip:"lightbulb",note:"memo"};return(0,r.jsxs)("div",{className:(0,t.A)(o.callout,o[`callout--${e}`]),children:[(0,r.jsxs)("div",{className:o.calloutHeader,children:[i&&(0,r.jsx)("span",{className:o.calloutIcon,children:(0,r.jsx)(a.A,{name:l[e]||l.info,size:24})}),n&&(0,r.jsx)("span",{className:o.calloutTitle,children:n})]}),(0,r.jsx)("div",{className:o.calloutContent,children:s})]})}},43562(e,n,s){s.d(n,{A:()=>p});var r=s(62540),t=s(63696),a=s(11750),o=s(69981),c=s(4209),i=s(96609),l=s(54767),d=s(52977),u=s(75793);let h={copyButtonCopied:"copyButtonCopied_KAEU",copyButtonIcons:"copyButtonIcons_CCmD",copyButtonIcon:"copyButtonIcon_cWY_",copyButtonSuccessIcon:"copyButtonSuccessIcon_YaqN"};function p({className:e}){let{copyCode:n,isCopied:s}=function(){let{metadata:{code:e}}=(0,c.Ph)(),[n,s]=(0,t.useState)(!1),r=(0,t.useRef)(void 0),a=(0,t.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{let n,t="npx @perfect-abstractions/compose-cli init"===(n="string"!=typeof e?"":e.trim().replace(/\r\n/g,"\n"))?"compose_cli_npx":n.startsWith("forge install Perfect-Abstractions/Compose@")?"foundry_forge":"npm install @perfect-abstractions/compose"===n?"hardhat_npm":null;t&&(0,u.Tl)("docs_install_command_copy",(0,u.b6)({install_command_kind:t})),s(!0),r.current=window.setTimeout(()=>{s(!1)},1e3)})},[e]);return(0,t.useEffect)(()=>()=>window.clearTimeout(r.current),[]),{copyCode:a,isCopied:n}}();return(0,r.jsx)(i.A,{"aria-label":s?(0,o.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,o.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for the copy code blocks button"}),title:(0,o.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,a.A)(e,h.copyButton,s&&h.copyButtonCopied),onClick:n,children:(0,r.jsxs)("span",{className:h.copyButtonIcons,"aria-hidden":"true",children:[(0,r.jsx)(l.A,{className:h.copyButtonIcon}),(0,r.jsx)(d.A,{className:h.copyButtonSuccessIcon})]})})}},75793(e,n,s){function r(e,n={}){let s=function(){if("u"<typeof window)return null;let e=window.posthog;return e&&"function"==typeof e.capture?e:null}();s&&s.capture(e,n)}function t(e={}){let n="u">typeof window?window.location?.pathname:void 0,s="u">typeof document?document.title:void 0;return{...e,permalink:e.permalink??n,title:e.title??s}}s.d(n,{Tl:()=>r,b6:()=>t})},43023(e,n,s){s.d(n,{R:()=>o,x:()=>c});var r=s(63696);let t={},a=r.createContext(t);function o(e){let n=r.useContext(a);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.