(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1072],{8446:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/world/reference/internal/init-module-implementation",function(){return r(34900)}])},73307:function(e,s,r){"use strict";r.d(s,{Z:function(){return l}});var n=r(7505),t=r(11689);let i={logo:function(){return(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.25em",fontSize:"32px",fontFamily:"PP Supply Mono",textTransform:"uppercase"},children:[(0,n.jsx)("img",{src:"/images/logos/mud-white.svg",style:{height:"calc(var(--nextra-navbar-height) - 35px)"},alt:"MUD logo"}),"MUD"]})},useNextSeoProps(){let{asPath:e}=(0,t.useRouter)();return{titleTemplate:"/"===e?"MUD – a framework for ambitious Ethereum applications":"%s – MUD"}},project:{link:"https://github.com/latticexyz/mud"},docsRepositoryBase:"https://github.com/latticexyz/mud/tree/main/docs",head:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("meta",{property:"title",content:"MUD documentation"})}),darkMode:!1,nextThemes:{defaultTheme:"dark"},footer:{text:"MIT 2023 \xa9 MUD"},primaryHue:28,sidebar:{defaultMenuCollapseLevel:1}};var l=i},34900:function(e,s,r){"use strict";r.r(s);var n=r(7505),t=r(42585),i=r(38288),l=r(73307);r(54693);var o=r(26736);r(98823);let c={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.ah)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(a,{...e})}):a(e)},pageOpts:{filePath:"pages/world/reference/internal/init-module-implementation.mdx",route:"/world/reference/internal/init-module-implementation",headings:[{depth:2,value:"AccessManagementSystem",id:"accessmanagementsystem"},{depth:3,value:"Functions",id:"functions"},{depth:4,value:"grantAccess",id:"grantaccess"},{depth:4,value:"revokeAccess",id:"revokeaccess"},{depth:4,value:"transferOwnership",id:"transferownership"},{depth:4,value:"renounceOwnership",id:"renounceownership"},{depth:2,value:"ModuleInstallationSystem",id:"moduleinstallationsystem"},{depth:3,value:"Functions",id:"functions-1"},{depth:4,value:"installModule",id:"installmodule"},{depth:2,value:"BalanceTransferSystem",id:"balancetransfersystem"},{depth:3,value:"Functions",id:"functions-2"},{depth:4,value:"transferBalanceToNamespace",id:"transferbalancetonamespace"},{depth:4,value:"transferBalanceToAddress",id:"transferbalancetoaddress"},{depth:2,value:"StoreRegistrationSystem",id:"storeregistrationsystem"},{depth:3,value:"Functions",id:"functions-3"},{depth:4,value:"registerTable",id:"registertable"},{depth:4,value:"registerStoreHook",id:"registerstorehook"},{depth:4,value:"unregisterStoreHook",id:"unregisterstorehook"},{depth:2,value:"BatchCallSystem",id:"batchcallsystem"},{depth:3,value:"Functions",id:"functions-4"},{depth:4,value:"batchCall",id:"batchcall"},{depth:4,value:"batchCallFrom",id:"batchcallfrom"},{depth:2,value:"WorldRegistrationSystem",id:"worldregistrationsystem"},{depth:3,value:"Functions",id:"functions-5"},{depth:4,value:"registerNamespace",id:"registernamespace"},{depth:4,value:"registerSystemHook",id:"registersystemhook"},{depth:4,value:"unregisterSystemHook",id:"unregistersystemhook"},{depth:4,value:"registerSystem",id:"registersystem"},{depth:4,value:"registerFunctionSelector",id:"registerfunctionselector"},{depth:4,value:"registerRootFunctionSelector",id:"registerrootfunctionselector"},{depth:4,value:"registerDelegation",id:"registerdelegation"},{depth:4,value:"unregisterDelegation",id:"unregisterdelegation"},{depth:4,value:"registerNamespaceDelegation",id:"registernamespacedelegation"},{depth:4,value:"unregisterNamespaceDelegation",id:"unregisternamespacedelegation"}],pageMap:[{kind:"Meta",data:{introduction:{title:"What is MUD?",theme:{breadcrumb:!1}},quickstart:{title:"Get started",theme:{breadcrumb:!1}},protocol:{title:"Protocol",type:"separator"},store:"Store",world:"World",framework:{title:"Framework",type:"separator"},config:"Config",cli:"CLI","state-query":"State Query",services:"Services","---":{title:"",type:"separator"},guides:"Guides",templates:"Templates",contribute:{title:"Contribute",theme:{breadcrumb:!1}},changelog:"Changelog",retrospectives:"Retrospectives",audits:"Audits",version:{title:"2.1.1",type:"menu",items:{changelog:{title:"Changelog",href:"/changelog"},contribute:{title:"Contribute",href:"/contribute"}}},status:{title:"Status",type:"page",href:"https://status.mud.dev",newWindow:!0},community:{title:"Community",type:"page",href:"https://community.mud.dev",newWindow:!0},twitter:{title:"Twitter",type:"page",href:"https://twitter.com/latticexyz",newWindow:!0},discord:{title:"Discord",type:"page",href:"https://lattice.xyz/discord",newWindow:!0}}},{kind:"Folder",name:"audits",route:"/audits",children:[{kind:"MdxPage",name:"2024-02-11-open-zeppelin",route:"/audits/2024-02-11-open-zeppelin"},{kind:"Meta",data:{"2024-02-11-open-zeppelin":"2024-02-11 OpenZeppelin",pdf:{display:"hidden"},icons:{display:"hidden"}}}]},{kind:"MdxPage",name:"changelog",route:"/changelog"},{kind:"Folder",name:"cli",route:"/cli",children:[{kind:"Meta",data:{tablegen:"mud tablegen",worldgen:"mud worldgen",test:"mud test",deploy:"mud deploy",verify:"mud verify","dev-contracts":"mud dev-contracts","abi-ts":"mud abi-ts","set-version":"mud set-version"}},{kind:"MdxPage",name:"abi-ts",route:"/cli/abi-ts"},{kind:"MdxPage",name:"deploy",route:"/cli/deploy"},{kind:"MdxPage",name:"dev-contracts",route:"/cli/dev-contracts"},{kind:"MdxPage",name:"set-version",route:"/cli/set-version"},{kind:"MdxPage",name:"tablegen",route:"/cli/tablegen"},{kind:"MdxPage",name:"test",route:"/cli/test"},{kind:"MdxPage",name:"verify",route:"/cli/verify"},{kind:"MdxPage",name:"worldgen",route:"/cli/worldgen"}]},{kind:"Folder",name:"config",route:"/config",children:[{kind:"MdxPage",name:"reference",route:"/config/reference"},{kind:"Meta",data:{reference:"Reference"}}]},{kind:"MdxPage",name:"config",route:"/config"},{kind:"MdxPage",name:"contribute",route:"/contribute"},{kind:"Folder",name:"guides",route:"/guides",children:[{kind:"Meta",data:{"replicating-onchain-state":"Replicating onchain state","hello-world":"Hello World","extending-a-world":"Extending a World","adding-delegation":"Adding Delegation",modules:"Writing MUD Modules",emojimon:"Emojimon",testing:"Testing","best-practices":"Best Practices"}},{kind:"MdxPage",name:"adding-delegation",route:"/guides/adding-delegation"},{kind:"Folder",name:"best-practices",route:"/guides/best-practices",children:[{kind:"Meta",data:{"dividing-into-systems":"Dividing Code into Systems","system-best-practices":"System Best Practices","deployment-settings":"Recommended Deployment Settings",kms:"Deploy production worlds using AWS KMS"}},{kind:"MdxPage",name:"deployment-settings",route:"/guides/best-practices/deployment-settings"},{kind:"MdxPage",name:"dividing-into-systems",route:"/guides/best-practices/dividing-into-systems"},{kind:"MdxPage",name:"kms",route:"/guides/best-practices/kms"},{kind:"MdxPage",name:"system-best-practices",route:"/guides/best-practices/system-best-practices"}]},{kind:"Folder",name:"emojimon",route:"/guides/emojimon",children:[{kind:"MdxPage",name:"1-preface-the-ecs-model",route:"/guides/emojimon/1-preface-the-ecs-model"},{kind:"MdxPage",name:"2-getting-started",route:"/guides/emojimon/2-getting-started"},{kind:"MdxPage",name:"3-players-and-movement",route:"/guides/emojimon/3-players-and-movement"},{kind:"MdxPage",name:"4-map-and-terrain",route:"/guides/emojimon/4-map-and-terrain"},{kind:"MdxPage",name:"5-a-wild-emojimon-appears",route:"/guides/emojimon/5-a-wild-emojimon-appears"},{kind:"MdxPage",name:"6-advanced",route:"/guides/emojimon/6-advanced"},{kind:"Meta",data:{"1-preface-the-ecs-model":"Preface: the ECS model","2-getting-started":"Getting started","3-players-and-movement":"Players and movement","4-map-and-terrain":"Map and terrain","5-a-wild-emojimon-appears":"A wild Emojimon appears","6-advanced":"Advanced features"}}]},{kind:"MdxPage",name:"emojimon",route:"/guides/emojimon"},{kind:"Folder",name:"extending-a-world",route:"/guides/extending-a-world",children:[{kind:"Meta",data:{index:"Extending a World Permissionlessly"}},{kind:"MdxPage",name:"index",route:"/guides/extending-a-world"}]},{kind:"Folder",name:"hello-world",route:"/guides/hello-world",children:[{kind:"Meta",data:{"add-table":"Add a table","filter-sync":"Filter data synchronization","add-system":"Add a system",deploy:{title:"Deploy to a blockchain",href:"/cli/deploy"},"add-chain-client":"Add chains to the client"}},{kind:"MdxPage",name:"add-chain-client",route:"/guides/hello-world/add-chain-client"},{kind:"MdxPage",name:"add-system",route:"/guides/hello-world/add-system"},{kind:"MdxPage",name:"add-table",route:"/guides/hello-world/add-table"},{kind:"MdxPage",name:"filter-sync",route:"/guides/hello-world/filter-sync"}]},{kind:"MdxPage",name:"hello-world",route:"/guides/hello-world"},{kind:"MdxPage",name:"modules",route:"/guides/modules"},{kind:"MdxPage",name:"replicating-onchain-state",route:"/guides/replicating-onchain-state"},{kind:"MdxPage",name:"testing",route:"/guides/testing"}]},{kind:"MdxPage",name:"introduction",route:"/introduction"},{kind:"MdxPage",name:"quickstart",route:"/quickstart"},{kind:"Folder",name:"retrospectives",route:"/retrospectives",children:[{kind:"MdxPage",name:"2023-09-12-register-system-vulnerability",route:"/retrospectives/2023-09-12-register-system-vulnerability"},{kind:"MdxPage",name:"2024-04-17-storeread-getdynamicfieldlength-bug",route:"/retrospectives/2024-04-17-storeread-getdynamicfieldlength-bug"},{kind:"Meta",data:{"2024-04-17-storeread-getdynamicfieldlength-bug":"2024-04-17 StoreRead.getDynamicFieldLength bug","2023-09-12-register-system-vulnerability":"2023-09-12 registerSystem vulnerability"}}]},{kind:"Folder",name:"services",route:"/services",children:[{kind:"Meta",data:{indexer:"Indexer",faucet:"Faucet"}},{kind:"MdxPage",name:"faucet",route:"/services/faucet"},{kind:"Folder",name:"indexer",route:"/services/indexer",children:[{kind:"Meta",data:{"using-indexer":"Using the Indexer","sqlite-indexer":"SQLite Indexer","postgres-event-only":"PostgreSQL for events","postgres-decoded":"PostgreSQL for data (and events)"}},{kind:"MdxPage",name:"postgres-decoded",route:"/services/indexer/postgres-decoded"},{kind:"MdxPage",name:"postgres-event-only",route:"/services/indexer/postgres-event-only"},{kind:"MdxPage",name:"sqlite-indexer",route:"/services/indexer/sqlite-indexer"},{kind:"MdxPage",name:"using-indexer",route:"/services/indexer/using-indexer"}]},{kind:"MdxPage",name:"indexer",route:"/services/indexer"}]},{kind:"Folder",name:"state-query",route:"/state-query",children:[{kind:"Meta",data:{typescript:"TypeScript"}},{kind:"Folder",name:"typescript",route:"/state-query/typescript",children:[{kind:"Meta",data:{recs:"RECS",zustand:"Zustand"}},{kind:"MdxPage",name:"recs",route:"/state-query/typescript/recs"},{kind:"MdxPage",name:"zustand",route:"/state-query/typescript/zustand"}]}]},{kind:"Folder",name:"store",route:"/store",children:[{kind:"Meta",data:{introduction:"Introduction","data-model":"Data model",tables:"Tables","table-libraries":"Table libraries",encoding:"Encoding","store-hooks":"Store hooks",reference:"Reference"}},{kind:"MdxPage",name:"data-model",route:"/store/data-model"},{kind:"MdxPage",name:"encoding",route:"/store/encoding"},{kind:"MdxPage",name:"introduction",route:"/store/introduction"},{kind:"Folder",name:"reference",route:"/store/reference",children:[{kind:"Meta",data:{"store-core":"StoreCore (internal)",store:"IStore (external)","store-hook":"StoreHook",misc:"Miscellaneous"}},{kind:"MdxPage",name:"misc",route:"/store/reference/misc"},{kind:"MdxPage",name:"store-core",route:"/store/reference/store-core"},{kind:"MdxPage",name:"store-hook",route:"/store/reference/store-hook"},{kind:"MdxPage",name:"store",route:"/store/reference/store"}]},{kind:"MdxPage",name:"store-hooks",route:"/store/store-hooks"},{kind:"MdxPage",name:"table-libraries",route:"/store/table-libraries"},{kind:"MdxPage",name:"tables",route:"/store/tables"}]},{kind:"Folder",name:"templates",route:"/templates",children:[{kind:"Meta",data:{typescript:"TypeScript",godot:"Godot",pwa:"Progressive Web App (for mobile)",swift:"Swift",svelte:"Svelte",unity:"Unity",nethereum:"Nethereum"}},{kind:"MdxPage",name:"godot",route:"/templates/godot"},{kind:"MdxPage",name:"nethereum",route:"/templates/nethereum"},{kind:"MdxPage",name:"pwa",route:"/templates/pwa"},{kind:"MdxPage",name:"svelte",route:"/templates/svelte"},{kind:"MdxPage",name:"swift",route:"/templates/swift"},{kind:"Folder",name:"typescript",route:"/templates/typescript",children:[{kind:"Meta",data:{contracts:"Contracts",vanilla:"Vanilla","react-ecs":"React-ECS",threejs:"Three.js",vue:"Vue"}},{kind:"MdxPage",name:"contracts",route:"/templates/typescript/contracts"},{kind:"MdxPage",name:"react-ecs",route:"/templates/typescript/react-ecs"},{kind:"MdxPage",name:"threejs",route:"/templates/typescript/threejs"},{kind:"MdxPage",name:"vanilla",route:"/templates/typescript/vanilla"},{kind:"MdxPage",name:"vue",route:"/templates/typescript/vue"}]},{kind:"MdxPage",name:"unity",route:"/templates/unity"}]},{kind:"Folder",name:"world",route:"/world",children:[{kind:"Meta",data:{introduction:"Introduction","resource-ids":"Resource Identifiers","namespaces-access-control":"Namespaces & Access Control",tables:"Tables",systems:"Systems","system-hooks":"System Hooks","function-selectors":"Function Selectors",balance:"Balance","account-delegation":"Account Delegation","batch-calls":"Batch Calls",upgrades:"Upgrading",modules:"Modules",reference:"Reference"}},{kind:"MdxPage",name:"account-delegation",route:"/world/account-delegation"},{kind:"MdxPage",name:"balance",route:"/world/balance"},{kind:"MdxPage",name:"batch-calls",route:"/world/batch-calls"},{kind:"MdxPage",name:"function-selectors",route:"/world/function-selectors"},{kind:"MdxPage",name:"introduction",route:"/world/introduction"},{kind:"Folder",name:"modules",route:"/world/modules",children:[{kind:"Meta",data:{keyswithvalue:"Keys with Value",erc721:"ERC-721 (NFT)"}},{kind:"MdxPage",name:"erc721",route:"/world/modules/erc721"},{kind:"MdxPage",name:"keyswithvalue",route:"/world/modules/keyswithvalue"}]},{kind:"MdxPage",name:"modules",route:"/world/modules"},{kind:"MdxPage",name:"namespaces-access-control",route:"/world/namespaces-access-control"},{kind:"Folder",name:"reference",route:"/world/reference",children:[{kind:"Meta",data:{"delegation-external":"Delegation (interface)",module:"Modules","module-external":"Modules (interface)",system:"Systems","system-external":"Systems (interface)",world:"World","world-external":"World (interfaces)","world-context":"World context","world-context-external":"World context (interface)","resource-ids":"Resource IDs",misc:"Miscellaneous",internal:"Internals"}},{kind:"MdxPage",name:"delegation-external",route:"/world/reference/delegation-external"},{kind:"Folder",name:"internal",route:"/world/reference/internal",children:[{kind:"Meta",data:{"access-control":"Access Control",create:"Create2",delegation:"Delegation",erc165:"ERC165","erc165-external":"ERC165 (interface)","init-module":"Init Module","init-module-implementation":"Init Module Implementation",systemcall:"SystemCall"}},{kind:"MdxPage",name:"access-control",route:"/world/reference/internal/access-control"},{kind:"MdxPage",name:"create",route:"/world/reference/internal/create"},{kind:"MdxPage",name:"delegation",route:"/world/reference/internal/delegation"},{kind:"MdxPage",name:"erc165-external",route:"/world/reference/internal/erc165-external"},{kind:"MdxPage",name:"erc165",route:"/world/reference/internal/erc165"},{kind:"MdxPage",name:"init-module-implementation",route:"/world/reference/internal/init-module-implementation"},{kind:"MdxPage",name:"init-module",route:"/world/reference/internal/init-module"},{kind:"MdxPage",name:"systemcall",route:"/world/reference/internal/systemcall"}]},{kind:"MdxPage",name:"misc",route:"/world/reference/misc"},{kind:"MdxPage",name:"module-external",route:"/world/reference/module-external"},{kind:"MdxPage",name:"module",route:"/world/reference/module"},{kind:"MdxPage",name:"resource-ids",route:"/world/reference/resource-ids"},{kind:"MdxPage",name:"system-external",route:"/world/reference/system-external"},{kind:"MdxPage",name:"system",route:"/world/reference/system"},{kind:"MdxPage",name:"world-context-external",route:"/world/reference/world-context-external"},{kind:"MdxPage",name:"world-context",route:"/world/reference/world-context"},{kind:"MdxPage",name:"world-external",route:"/world/reference/world-external"},{kind:"MdxPage",name:"world",route:"/world/reference/world"}]},{kind:"MdxPage",name:"resource-ids",route:"/world/resource-ids"},{kind:"MdxPage",name:"system-hooks",route:"/world/system-hooks"},{kind:"MdxPage",name:"systems",route:"/world/systems"},{kind:"MdxPage",name:"tables",route:"/world/tables"},{kind:"MdxPage",name:"upgrades",route:"/world/upgrades"}]}],flexsearch:{codeblocks:!0},title:"Init Module Implementation"},pageNextRoute:"/world/reference/internal/init-module-implementation",nextraLayout:i.ZP,themeConfig:l.Z};function a(e){let s=Object.assign({h2:"h2",p:"p",a:"a",strong:"strong",em:"em",h3:"h3",h4:"h4",pre:"pre",code:"code",span:"span",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},(0,o.ah)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h2,{id:"accessmanagementsystem",children:"AccessManagementSystem"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/init/implementations/AccessManagementSystem.sol",children:"Git Source"})}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Inherits:"}),"\n",(0,n.jsx)(s.a,{href:"/world/reference/system#system",children:"System"}),", ",(0,n.jsx)(s.a,{href:"/world/reference/internal/init-module#limitedcallcontext",children:"LimitedCallContext"})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"This contract manages the granting and revoking of access from/to resources."})}),"\n",(0,n.jsx)(s.h3,{id:"functions",children:"Functions"}),"\n",(0,n.jsx)(s.h4,{id:"grantaccess",children:"grantAccess"}),"\n",(0,n.jsx)(s.p,{children:"Grant access to the resource at the given resource ID."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Requires the caller to own the namespace."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"grantAccess"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" grantee) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"resourceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID of the resource to grant access to."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"grantee"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"address"})}),(0,n.jsx)(s.td,{children:"The address to which access should be granted."})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"revokeaccess",children:"revokeAccess"}),"\n",(0,n.jsx)(s.p,{children:"Revoke access from the resource at the given resource ID."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Requires the caller to own the namespace."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"revokeAccess"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" grantee) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"resourceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID of the resource to revoke access from."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"grantee"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"address"})}),(0,n.jsx)(s.td,{children:"The address from which access should be revoked."})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"transferownership",children:"transferOwnership"}),"\n",(0,n.jsx)(s.p,{children:"Transfer ownership of the given namespace to newOwner and manages the access."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Requires the caller to own the namespace. Revoke ResourceAccess for previous owner and grant to newOwner."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"transferOwnership"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" namespaceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newOwner) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"namespaceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID of the namespace to transfer ownership."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"newOwner"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"address"})}),(0,n.jsx)(s.td,{children:"The address to which ownership should be transferred."})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"renounceownership",children:"renounceOwnership"}),"\n",(0,n.jsx)(s.p,{children:"Renounces ownership of the given namespace"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Requires the caller to own the namespace. Revoke ResourceAccess for previous owner"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"renounceOwnership"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" namespaceId) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"namespaceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID of the namespace to transfer ownership."})]})})]}),"\n",(0,n.jsx)(s.h2,{id:"moduleinstallationsystem",children:"ModuleInstallationSystem"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/init/implementations/ModuleInstallationSystem.sol",children:"Git Source"})}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Inherits:"}),"\n",(0,n.jsx)(s.a,{href:"/world/reference/system#system",children:"System"}),", ",(0,n.jsx)(s.a,{href:"/world/reference/internal/init-module#limitedcallcontext",children:"LimitedCallContext"})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"A system contract to handle the installation of (non-root) modules in the World."})}),"\n",(0,n.jsx)(s.h3,{id:"functions-1",children:"Functions"}),"\n",(0,n.jsx)(s.h4,{id:"installmodule",children:"installModule"}),"\n",(0,n.jsx)(s.p,{children:"Installs a module into the World under a specified namespace."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Validates the given module against the IModule interface and delegates the installation process.\nThe module is then registered in the InstalledModules table."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"installModule"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"IModule"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" module"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" encodedArgs) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"module"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"IModule"})}),(0,n.jsx)(s.td,{children:"The module to be installed."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"encodedArgs"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"bytes"})}),(0,n.jsx)(s.td,{children:"The ABI encoded arguments for module installation."})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"balancetransfersystem",children:"BalanceTransferSystem"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/init/implementations/BalanceTransferSystem.sol",children:"Git Source"})}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Inherits:"}),"\n",(0,n.jsx)(s.a,{href:"/world/reference/system#system",children:"System"}),", ",(0,n.jsx)(s.a,{href:"/world/reference/world-external#iworlderrors",children:"IWorldErrors"}),", ",(0,n.jsx)(s.a,{href:"/world/reference/internal/init-module#limitedcallcontext",children:"LimitedCallContext"})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"A system contract that facilitates balance transfers in the World and outside of the World."})}),"\n",(0,n.jsx)(s.h3,{id:"functions-2",children:"Functions"}),"\n",(0,n.jsx)(s.h4,{id:"transferbalancetonamespace",children:"transferBalanceToNamespace"}),"\n",(0,n.jsx)(s.p,{children:"Transfer balance to another namespace in the World."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Requires the caller to have access to the source namespace and ensures the destination namespace type is valid."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalanceToNamespace"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fromNamespaceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" toNamespaceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" amount"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"fromNamespaceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The source namespace from which the balance will be deducted."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"toNamespaceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The target namespace where the balance will be added."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"amount"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"uint256"})}),(0,n.jsx)(s.td,{children:"The amount to transfer."})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"transferbalancetoaddress",children:"transferBalanceToAddress"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"/world/balance",children:"Usage Sample"})}),"\n",(0,n.jsx)(s.p,{children:"Transfer balance out of the World to a specific address."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Requires the caller to have access to the source namespace and ensures sufficient balance before transfer."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalanceToAddress"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fromNamespaceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" toAddress"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" amount"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"fromNamespaceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The source namespace from which the balance will be deducted."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"toAddress"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"address"})}),(0,n.jsx)(s.td,{children:"The target address where the balance will be sent."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"amount"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"uint256"})}),(0,n.jsx)(s.td,{children:"The amount to transfer."})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"storeregistrationsystem",children:"StoreRegistrationSystem"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/init/implementations/StoreRegistrationSystem.sol",children:"Git Source"})}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Inherits:"}),"\n",(0,n.jsx)(s.a,{href:"/world/reference/system#system",children:"System"}),", ",(0,n.jsx)(s.a,{href:"/world/reference/world-external#iworlderrors",children:"IWorldErrors"}),", ",(0,n.jsx)(s.a,{href:"/world/reference/internal/init-module#limitedcallcontext",children:"LimitedCallContext"})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"This contract provides functionality for the registration of store-related resources within the World framework."})}),"\n",(0,n.jsx)(s.h3,{id:"functions-3",children:"Functions"}),"\n",(0,n.jsx)(s.h4,{id:"registertable",children:"registerTable"}),"\n",(0,n.jsx)(s.p,{children:"Register a table within the World framework."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Registers a table with the specified configuration. If the namespace for the table does not exist, it's created.\nExisting namespaces require the caller to be the owner for table registration."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerTable"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" tableId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"FieldLayout"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fieldLayout"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"Schema"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" keySchema"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"Schema"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" valueSchema"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" keyNames"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fieldNames"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"tableId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The resource ID of the table."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"fieldLayout"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"FieldLayout"})}),(0,n.jsx)(s.td,{children:"The field layout structure for the table."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"keySchema"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"Schema"})}),(0,n.jsx)(s.td,{children:"The schema for the keys of the table."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"valueSchema"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"Schema"})}),(0,n.jsx)(s.td,{children:"The schema for the values within the table."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"keyNames"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"string[]"})}),(0,n.jsx)(s.td,{children:"The names associated with the keys in the table."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"fieldNames"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"string[]"})}),(0,n.jsx)(s.td,{children:"The names of the fields in the table."})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"registerstorehook",children:"registerStoreHook"}),"\n",(0,n.jsx)(s.p,{children:"Register a storage hook for a specified table."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"The caller must be the owner of the namespace to which the table belongs.\nThe hook must conform to the IStoreHook interface."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerStoreHook"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" tableId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"IStoreHook"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookAddress"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint8"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" enabledHooksBitmap"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"tableId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The resource ID of the table for which the hook is being registered."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"hookAddress"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"IStoreHook"})}),(0,n.jsx)(s.td,{children:"The address of the storage hook contract."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"enabledHooksBitmap"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"uint8"})}),(0,n.jsx)(s.td,{children:"A bitmap indicating which hook functionalities are enabled."})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"unregisterstorehook",children:"unregisterStoreHook"}),"\n",(0,n.jsx)(s.p,{children:"Unregister a previously registered storage hook for a specified table."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"The caller must be the owner of the namespace to which the table belongs."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"unregisterStoreHook"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" tableId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"IStoreHook"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookAddress) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"tableId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The resource ID of the table from which the hook is being unregistered."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"hookAddress"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"IStoreHook"})}),(0,n.jsx)(s.td,{children:"The address of the storage hook contract."})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"batchcallsystem",children:"BatchCallSystem"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/init/implementations/BatchCallSystem.sol",children:"Git Source"})}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Inherits:"}),"\n",(0,n.jsx)(s.a,{href:"/world/reference/system#system",children:"System"}),", ",(0,n.jsx)(s.a,{href:"/world/reference/internal/init-module#limitedcallcontext",children:"LimitedCallContext"})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"A system contract that facilitates batching of calls to various systems in a single transaction."})}),"\n",(0,n.jsx)(s.h3,{id:"functions-4",children:"Functions"}),"\n",(0,n.jsx)(s.h4,{id:"batchcall",children:"batchCall"}),"\n",(0,n.jsx)(s.p,{children:"Make batch calls to multiple systems into a single transaction."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Iterates through an array of system calls, executes them, and returns an array of return data."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"batchCall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"SystemCallData"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemCalls) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" returnDatas);"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"systemCalls"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"SystemCallData[]"})}),(0,n.jsx)(s.td,{children:"An array of SystemCallData that contains systemId and callData for each call."})]})})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"returnDatas"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"bytes[]"})}),(0,n.jsx)(s.td,{children:"An array of bytes containing the return data for each system call."})]})})]}),"\n",(0,n.jsx)(s.h4,{id:"batchcallfrom",children:"batchCallFrom"}),"\n",(0,n.jsx)(s.p,{children:"Make batch calls from specific addresses to multiple systems in a single transaction."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Iterates through an array of system calls with specified 'from' addresses, executes them, and returns an array of return data."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"batchCallFrom"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"SystemCallFromData"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemCalls"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" returnDatas);"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"systemCalls"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"SystemCallFromData[]"})}),(0,n.jsx)(s.td,{children:"An array of SystemCallFromData that contains from, systemId, and callData for each call."})]})})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"returnDatas"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"bytes[]"})}),(0,n.jsx)(s.td,{children:"An array of bytes containing the return data for each system call."})]})})]}),"\n",(0,n.jsx)(s.h2,{id:"worldregistrationsystem",children:"WorldRegistrationSystem"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/init/implementations/WorldRegistrationSystem.sol",children:"Git Source"})}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Inherits:"}),"\n",(0,n.jsx)(s.a,{href:"/world/reference/system#system",children:"System"}),", ",(0,n.jsx)(s.a,{href:"/world/reference/world-external#iworlderrors",children:"IWorldErrors"}),", ",(0,n.jsx)(s.a,{href:"/world/reference/internal/init-module#limitedcallcontext",children:"LimitedCallContext"})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"This contract provides functions related to registering resources other than tables in the World."})}),"\n",(0,n.jsx)(s.h3,{id:"functions-5",children:"Functions"}),"\n",(0,n.jsx)(s.h4,{id:"registernamespace",children:"registerNamespace"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"/world/systems#registering-systems",children:"Usage Sample"})}),"\n",(0,n.jsx)(s.p,{children:"Registers a new namespace"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Creates a new namespace resource with the given ID"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerNamespace"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" namespaceId) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"namespaceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The unique identifier for the new namespace"})]})})]}),"\n",(0,n.jsx)(s.h4,{id:"registersystemhook",children:"registerSystemHook"}),"\n",(0,n.jsx)(s.p,{children:"Registers a new system hook"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Adds a new hook for the system at the provided system ID"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerSystemHook"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ISystemHook"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookAddress"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint8"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" enabledHooksBitmap"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"systemId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID of the system"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"hookAddress"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ISystemHook"})}),(0,n.jsx)(s.td,{children:"The address of the hook being registered"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"enabledHooksBitmap"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"uint8"})}),(0,n.jsx)(s.td,{children:"Bitmap indicating which hooks are enabled"})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"unregistersystemhook",children:"unregisterSystemHook"}),"\n",(0,n.jsx)(s.p,{children:"Unregisters a system hook"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Removes a hook for the system at the provided system ID"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"unregisterSystemHook"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ISystemHook"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookAddress) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"systemId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID of the system"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"hookAddress"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ISystemHook"})}),(0,n.jsx)(s.td,{children:"The address of the hook being unregistered"})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"registersystem",children:"registerSystem"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"/world/systems#registering-systems",children:"Usage Sample"})}),"\n",(0,n.jsx)(s.p,{children:"Registers a system"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Registers or upgrades a system at the given ID\nIf the namespace doesn't exist yet, it is registered.\nThe system is granted access to its namespace, so it can write to any\ntable in the same namespace.\nIf publicAccess is true, no access control check is performed for calling the system.\nThis function doesn't check whether a system already exists at the given selector,\nmaking it possible to upgrade systems."})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerSystem"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"System"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" system"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bool"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" publicAccess) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"systemId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The unique identifier for the system"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"system"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"System"})}),(0,n.jsx)(s.td,{children:"The system being registered"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"publicAccess"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"bool"})}),(0,n.jsx)(s.td,{children:"Flag indicating if access control check is bypassed"})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"registerfunctionselector",children:"registerFunctionSelector"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"/world/function-selectors",children:"Usage Sample"})}),"\n",(0,n.jsx)(s.p,{children:"Registers a new World function selector"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Creates a mapping between a World function and its associated system function"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerFunctionSelector"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemFunctionSignature"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes4"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" worldFunctionSelector);"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"systemId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The system ID"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"systemFunctionSignature"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"string"})}),(0,n.jsx)(s.td,{children:"The signature of the system function"})]})]})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"worldFunctionSelector"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"bytes4"})}),(0,n.jsx)(s.td,{children:"The selector of the World function"})]})})]}),"\n",(0,n.jsx)(s.h4,{id:"registerrootfunctionselector",children:"registerRootFunctionSelector"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"/world/function-selectors#root-function-selectors",children:"Usage Sample"})}),"\n",(0,n.jsx)(s.p,{children:"Registers a root World function selector"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Creates a mapping for a root World function without namespace or name prefix"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerRootFunctionSelector"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" worldFunctionSignature"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemFunctionSignature"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes4"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" worldFunctionSelector);"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"systemId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The system ID"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"worldFunctionSignature"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"string"})}),(0,n.jsx)(s.td,{children:"The signature of the World function"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"systemFunctionSignature"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"string"})}),(0,n.jsx)(s.td,{children:"The signature of the system function"})]})]})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"worldFunctionSelector"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"bytes4"})}),(0,n.jsx)(s.td,{children:"The selector of the World function"})]})})]}),"\n",(0,n.jsx)(s.h4,{id:"registerdelegation",children:"registerDelegation"}),"\n",(0,n.jsx)(s.p,{children:"Registers a delegation for the caller"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Creates a new delegation from the caller to the specified delegatee"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerDelegation"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delegatee"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delegationControlId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" initCallData"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"delegatee"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"address"})}),(0,n.jsx)(s.td,{children:"The address of the delegatee"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"delegationControlId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID controlling the delegation"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"initCallData"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"bytes"})}),(0,n.jsx)(s.td,{children:"The initialization data for the delegation"})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"unregisterdelegation",children:"unregisterDelegation"}),"\n",(0,n.jsx)(s.p,{children:"Unregisters a delegation"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Deletes the new delegation from the caller to the specified delegatee"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"unregisterDelegation"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delegatee) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"delegatee"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"address"})}),(0,n.jsx)(s.td,{children:"The address of the delegatee"})]})})]}),"\n",(0,n.jsx)(s.h4,{id:"registernamespacedelegation",children:"registerNamespaceDelegation"}),"\n",(0,n.jsx)(s.p,{children:"Registers a delegation for a namespace"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Sets up a new delegation control for a specific namespace"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerNamespaceDelegation"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" namespaceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delegationControlId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" initCallData"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})]})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"namespaceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID of the namespace"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"delegationControlId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID controlling the delegation"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"initCallData"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"bytes"})}),(0,n.jsx)(s.td,{children:"The initialization data for the delegation"})]})]})]}),"\n",(0,n.jsx)(s.h4,{id:"unregisternamespacedelegation",children:"unregisterNamespaceDelegation"}),"\n",(0,n.jsx)(s.p,{children:"Unregisters a delegation for a namespace"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"Deletes the delegation control for a specific namespace"})}),"\n",(0,n.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"solidity","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"unregisterNamespaceDelegation"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" namespaceId) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onlyDelegatecall"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Type"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"namespaceId"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"ResourceId"})}),(0,n.jsx)(s.td,{children:"The ID of the namespace"})]})})]})]})}s.default=(0,t.j)(c)}},function(e){e.O(0,[3720,2888,179],function(){return e(e.s=8446)}),_N_E=e.O()}]);