(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3477],{2944:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/changelog",function(){return n(5039)}])},3307:function(e,s,n){"use strict";n.d(s,{Z:function(){return i}});var l=n(7505),r=n(1689);let t={logo:function(){return(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.25em",fontSize:"32px",fontFamily:"PP Supply Mono",textTransform:"uppercase"},children:[(0,l.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,r.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,l.jsx)(l.Fragment,{children:(0,l.jsx)("meta",{property:"title",content:"MUD documentation"})}),darkMode:!1,nextThemes:{defaultTheme:"dark"},footer:{text:"MIT 2023 \xa9 MUD"},primaryHue:28,sidebar:{defaultMenuCollapseLevel:1}};var i=t},5039:function(e,s,n){"use strict";n.r(s);var l=n(7505),r=n(2585),t=n(6252),i=n(3307);n(4693);var o=n(6736);n(8823);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,l.jsx)(s,{...e,children:(0,l.jsx)(a,{...e})}):a(e)},pageOpts:{filePath:"pages/changelog.mdx",route:"/changelog",headings:[{depth:2,value:"Version 2.0.0-next.17",id:"version-200-next17"},{depth:3,value:"Major changes",id:"major-changes"},{depth:3,value:"Minor changes",id:"minor-changes"},{depth:3,value:"Patch changes",id:"patch-changes"},{depth:2,value:"Version 2.0.0-next.16",id:"version-200-next16"},{depth:3,value:"Major changes",id:"major-changes-1"},{depth:3,value:"Minor changes",id:"minor-changes-1"},{depth:3,value:"Patch changes",id:"patch-changes-1"},{depth:2,value:"Version 2.0.0-next.15",id:"version-200-next15"},{depth:3,value:"Major changes",id:"major-changes-2"},{depth:3,value:"Minor changes",id:"minor-changes-2"},{depth:3,value:"Patch changes",id:"patch-changes-2"},{depth:2,value:"Version 2.0.0-next.14",id:"version-200-next14"},{depth:3,value:"Major changes",id:"major-changes-3"},{depth:3,value:"Minor changes",id:"minor-changes-3"},{depth:3,value:"Patch changes",id:"patch-changes-3"},{depth:2,value:"Version 2.0.0-next.13",id:"version-200-next13"},{depth:3,value:"Major changes",id:"major-changes-4"},{depth:3,value:"Minor changes",id:"minor-changes-4"},{depth:3,value:"Patch changes",id:"patch-changes-4"},{depth:2,value:"Version 2.0.0-next.12",id:"version-200-next12"},{depth:3,value:"Major changes",id:"major-changes-5"},{depth:3,value:"Minor changes",id:"minor-changes-5"},{depth:3,value:"Patch changes",id:"patch-changes-5"},{depth:2,value:"Version 2.0.0-next.11",id:"version-200-next11"},{depth:3,value:"Major changes",id:"major-changes-6"},{depth:3,value:"Minor changes",id:"minor-changes-6"},{depth:3,value:"Patch changes",id:"patch-changes-6"},{depth:2,value:"Version 2.0.0-next.10",id:"version-200-next10"},{depth:3,value:"Major changes",id:"major-changes-7"},{depth:3,value:"Minor changes",id:"minor-changes-7"},{depth:3,value:"Patch changes",id:"patch-changes-7"},{depth:2,value:"Version 2.0.0-next.9",id:"version-200-next9"},{depth:3,value:"Major changes",id:"major-changes-8"},{depth:3,value:"Minor changes",id:"minor-changes-8"},{depth:3,value:"Patch changes",id:"patch-changes-8"},{depth:2,value:"Version 2.0.0-next.8",id:"version-200-next8"},{depth:3,value:"Major changes",id:"major-changes-9"},{depth:3,value:"Minor changes",id:"minor-changes-9"},{depth:2,value:"Version 2.0.0-next.7",id:"version-200-next7"},{depth:3,value:"Major changes",id:"major-changes-10"},{depth:3,value:"Patch changes",id:"patch-changes-9"},{depth:2,value:"Version 2.0.0-next.6",id:"version-200-next6"},{depth:3,value:"Major changes",id:"major-changes-11"},{depth:3,value:"Minor changes",id:"minor-changes-10"},{depth:2,value:"Version 2.0.0-next.5",id:"version-200-next5"},{depth:3,value:"Major changes",id:"major-changes-12"},{depth:3,value:"Minor changes",id:"minor-changes-11"},{depth:3,value:"Patch changes",id:"patch-changes-10"},{depth:2,value:"Version 2.0.0-next.4",id:"version-200-next4"},{depth:3,value:"Major changes",id:"major-changes-13"},{depth:2,value:"Version 2.0.0-next.3",id:"version-200-next3"},{depth:3,value:"Major changes",id:"major-changes-14"},{depth:3,value:"Patch changes",id:"patch-changes-11"},{depth:2,value:"Version 2.0.0-next.2",id:"version-200-next2"},{depth:3,value:"Major changes",id:"major-changes-15"},{depth:3,value:"Minor changes",id:"minor-changes-12"},{depth:3,value:"Patch changes",id:"patch-changes-12"},{depth:2,value:"Version 2.0.0-next.1",id:"version-200-next1"},{depth:3,value:"Major changes",id:"major-changes-16"},{depth:3,value:"Minor changes",id:"minor-changes-13"},{depth:3,value:"Patch changes",id:"patch-changes-13"},{depth:2,value:"Version 2.0.0-next.0",id:"version-200-next0"},{depth:3,value:"Minor changes",id:"minor-changes-14"},{depth:3,value:"Patch changes",id:"patch-changes-14"}],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",version:{title:"2.0.0-next.17",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:"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","dev-contracts":"mud dev-contracts","abi-ts":"mud abi-ts",faucet:"mud faucet","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:"faucet",route:"/cli/faucet"},{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:"worldgen",route:"/cli/worldgen"}]},{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",emojimon:"Emojimon"}},{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:"MdxPage",name:"extending-a-world",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"}}},{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:"replicating-onchain-state",route:"/guides/replicating-onchain-state"}]},{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:"Meta",data:{"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:"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",disclaimer:{display:"hidden",title:"Disclaimer"}}},{kind:"MdxPage",name:"disclaimer",route:"/templates/disclaimer"},{kind:"MdxPage",name:"godot",route:"/templates/godot"},{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:{"getting-started":"Getting Started",contracts:"Contracts",vanilla:"Vanilla","react-ecs":"React-ECS",three:"Three.js"}},{kind:"MdxPage",name:"contracts",route:"/templates/typescript/contracts"},{kind:"MdxPage",name:"getting-started",route:"/templates/typescript/getting-started"},{kind:"MdxPage",name:"react-ecs",route:"/templates/typescript/react-ecs"},{kind:"MdxPage",name:"three",route:"/templates/typescript/three"},{kind:"MdxPage",name:"vanilla",route:"/templates/typescript/vanilla"}]},{kind:"MdxPage",name:"unity",route:"/templates/unity"}]},{kind:"Folder",name:"world",route:"/world",children:[{kind:"Meta",data:{introduction:"Introduction","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",modules:"Modules",reference:"Reference","world-table-illustration":{display:"hidden",title:"World Table Illustration"}}},{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"}},{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:"system-hooks",route:"/world/system-hooks"},{kind:"MdxPage",name:"systems",route:"/world/systems"},{kind:"MdxPage",name:"tables",route:"/world/tables"},{kind:"MdxPage",name:"world-table-illustration",route:"/world/world-table-illustration"}]}],flexsearch:{codeblocks:!0},title:"Changelog"},pageNextRoute:"/changelog",nextraLayout:t.ZP,themeConfig:i.Z};function a(e){let s=Object.assign({h2:"h2",p:"p",h3:"h3",strong:"strong",a:"a",code:"code",hr:"hr",pre:"pre",span:"span",ul:"ul",li:"li",ol:"ol"},(0,o.ah)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h2,{id:"version-200-next17",children:"Version 2.0.0-next.17"}),"\n",(0,l.jsx)(s.p,{children:"Release date: Tue Feb 20 2024"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/aabd30767cdda7ce0c32663e7cc483db1b66d967",children:"chore: upgrade to Solidity 0.8.24 (#2202)"})})," (@latticexyz/world-modules, @latticexyz/schema-type, @latticexyz/gas-report, @latticexyz/common, @latticexyz/noise, @latticexyz/store, @latticexyz/world, @latticexyz/cli, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"Bumped Solidity version to 0.8.24."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/db7798be2181c1b9e55380a195a04100aab627fd",children:"feat(world): rename CoreModule to InitModule (#2227)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed ",(0,l.jsx)(s.code,{children:"CoreModule"})," to ",(0,l.jsx)(s.code,{children:"InitModule"})," and ",(0,l.jsx)(s.code,{children:"CoreRegistrationSystem"})," to ",(0,l.jsx)(s.code,{children:"RegistrationSystem"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/618dd0e89232896326c30ce55f183fceb0edabdb",children:"feat(cli,world): add user defined salt in WorldFactory.deployWorld() (#2219)"})})," (@latticexyz/cli, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"WorldFactory"})," now expects a user-provided ",(0,l.jsx)(s.code,{children:"salt"})," when calling ",(0,l.jsx)(s.code,{children:"deployWorld(...)"})," (instead of the previous globally incrementing counter). This enables deterministic world addresses across different chains."]}),"\n",(0,l.jsxs)(s.p,{children:["When using ",(0,l.jsx)(s.code,{children:"mud deploy"}),", you can provide a ",(0,l.jsx)(s.code,{children:"bytes32"})," hex-encoded salt using the ",(0,l.jsx)(s.code,{children:"--salt"})," option, otherwise it defaults to a random hex value."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5c52bee094fe5dad445a2d600cbea83e29302c40",children:"feat(store): rename StoreCore.registerCoreTables to registerInternalTables (#2225)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed ",(0,l.jsx)(s.code,{children:"StoreCore"}),"'s ",(0,l.jsx)(s.code,{children:"registerCoreTables"})," method to ",(0,l.jsx)(s.code,{children:"registerInternalTables"}),"."]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/c4fc850416df72f055be9fb1eb36a0edfaa1febc",children:["fix(world-modules): ",(0,l.jsx)(s.code,{children:"SystemSwitch"})," properly calls systems from root (#2205)"]})})," (@latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed ",(0,l.jsx)(s.code,{children:"SystemSwitch"})," to properly call non-root systems from root systems."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/997286bacafa43bd997c3c752b445acc23726bde",children:"feat(store-sync): wait for idle after each chunk of logs in a block (#2254)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"createStoreSync"})," now ",(0,l.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback",children:"waits for idle"})," between each chunk of logs in a block to allow for downstream render cycles to trigger. This means that hydrating logs from an indexer will no longer block until hydration completes, but rather allow for ",(0,l.jsx)(s.code,{children:"onProgress"})," callbacks to trigger."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6470fe1fd1fc73104cfdd01d79793203bffe5d1c",children:"feat(world): deployment salt by msg.sender (#2210)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"WorldFactory"})," now derives a salt based on number of worlds deployed by ",(0,l.jsx)(s.code,{children:"msg.sender"}),", which should help with predictable world deployments across chains."]}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/a35c05ea95395e9c7da3e18030fc200c2cde1353",children:"feat(cli): hardcode table ID with codegen (#2229)"})})," (@latticexyz/cli, @latticexyz/common, @latticexyz/store, @latticexyz/world-modules, @latticexyz/world, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Table libraries now hardcode the ",(0,l.jsx)(s.code,{children:"bytes32"})," table ID value rather than computing it in Solidity. This saves a bit of gas across all storage operations."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/05b3e8882ef846e26dbf18946f64533f70d3bf41",children:"fix(store): reorder core table registration (#2164)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed a race condition when registering core tables, where we would set a record in the ",(0,l.jsx)(s.code,{children:"ResourceIds"})," table before the table was registered."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/745485cda0d3a46e3d63d05c0149b2448e578010",children:"fix(world): check table exists for register store and system hook [L-09] (#2195)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updated ",(0,l.jsx)(s.code,{children:"WorldRegistrationSystem"})," to check that systems exist before registering system hooks."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6c615b608e73d3bdabde3ad03823f1dce87f2ac6",children:"fix(store-sync): fix overflowing column types, bump postgres sync version (#2270)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Bumped the Postgres column size for ",(0,l.jsx)(s.code,{children:"int32"}),", ",(0,l.jsx)(s.code,{children:"uint32"}),", ",(0,l.jsx)(s.code,{children:"int64"}),", and ",(0,l.jsx)(s.code,{children:"uint64"})," types to avoid overflows"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4e445a1abb764de970381f5c5570ce135b712c4c",children:"feat(store-sync): bool array column types for decoded indexer (#2283)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsx)(s.p,{children:"Moved boolean array types to use array column types (instead of JSON columns) for the Postgres decoded indexer"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/669fa43e5adcd2b3e44a298544c62ef9e0df642a",children:"docs: add missing changeset (#2282)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsx)(s.p,{children:"Moved numerical array types to use array column types (instead of JSON columns) for the Postgres decoded indexer"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/78a837167e527511d1a03fe67f60eb1d2e80aaa2",children:"docs: changeset for #2187 (#2188)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed registration of world signatures/selectors for namespaced systems. We changed these signatures in ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/pull/2160",children:"#2160"}),", but missed updating part of the deploy step."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c162ad5a546a92009aafc6150d9449738234b1ef",children:"fix(common): include only errors defined in the contract (#2194)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:["Prevented errors not included in the contract (but present in the file) from being included in the interface by ",(0,l.jsx)(s.code,{children:"contractToInterface"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/55a05fd7af2abe68d2a041f55bafdd03f5d68788",children:"refactor(store): push to StoreHooks with StoreCore method (#2201)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Refactored ",(0,l.jsx)(s.code,{children:"StoreCore.registerStoreHook"})," to use ",(0,l.jsx)(s.code,{children:"StoreHooks._push"})," for gas efficiency."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e2d089c6d3970094e0310e84b096db0487967cc9",children:"refactor(world,world-modules): rename module args to encodedArgs (#2199)"})})," (@latticexyz/world-modules, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed the Module ",(0,l.jsx)(s.code,{children:"args"})," parameter to ",(0,l.jsx)(s.code,{children:"encodedArgs"})," to better reflect that it is ABI-encoded arguments."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/db7798be2181c1b9e55380a195a04100aab627fd",children:"feat(world): rename CoreModule to InitModule (#2227)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updated deployer with world's new ",(0,l.jsx)(s.code,{children:"InitModule"})," naming."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/17f98720928444ce8f82639b6d1f1eb01012a1c8",children:"fix(world): prevent namespace from ending with underscore [M-05] (#2182)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Added a check to prevent namespaces from ending with an underscore (which could cause problems with world function signatures)."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/745485cda0d3a46e3d63d05c0149b2448e578010",children:"fix(world): check table exists for register store and system hook [L-09] (#2195)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updated ",(0,l.jsx)(s.code,{children:"StoreCore"})," to check that tables exist before registering store hooks."]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next16",children:"Version 2.0.0-next.16"}),"\n",(0,l.jsx)(s.p,{children:"Release date: Tue Jan 23 2024"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-1",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/0f27afddb73d855d119ea432d7943cd96952e4da",children:"feat(world): remove system name from function signatures/selectors [M-05] (#2160)"})})," (@latticexyz/world-modules, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["World function signatures for namespaced systems have changed from ",(0,l.jsx)(s.code,{children:"{namespace}_{systemName}_{functionName}"})," to ",(0,l.jsx)(s.code,{children:"{namespace}__{functionName}"})," (double underscore, no system name). This is more ergonomic and is more consistent with namespaced resources in other parts of the codebase (e.g. MUD config types, table names in the schemaful indexer)."]}),"\n",(0,l.jsxs)(s.p,{children:["If you have a project using the ",(0,l.jsx)(s.code,{children:"namespace"})," key in your ",(0,l.jsx)(s.code,{children:"mud.config.ts"})," or are manually registering systems and function selectors on a namespace, you will likely need to codegen your system interfaces (",(0,l.jsx)(s.code,{children:"pnpm build"}),") and update any calls to these systems through the world's namespaced function signatures."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/865253dba0aeccf30615e446c8946583ee6b1068",children:"chore: add module addresses changeset (#2172)"})})," (@latticexyz/world, @latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Refactored ",(0,l.jsx)(s.code,{children:"InstalledModules"})," to key modules by addresses instead of pre-defined names. Previously, modules could report arbitrary names, meaning misconfigured modules could be installed under a name intended for another module."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/063daf80ef9aa9151903061fc7d80c170a96cb07",children:"feat(world): require namespace to exist before registering systems/tables in it [C-01] (#2007)"})})," (@latticexyz/cli, @latticexyz/world-modules, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Previously ",(0,l.jsx)(s.code,{children:"registerSystem"})," and ",(0,l.jsx)(s.code,{children:"registerTable"})," had a side effect of registering namespaces if the system or table's namespace didn't exist yet.\nThis caused a possible frontrunning issue, where an attacker could detect a ",(0,l.jsx)(s.code,{children:"registerSystem"}),"/",(0,l.jsx)(s.code,{children:"registerTable"})," transaction in the mempool,\ninsert a ",(0,l.jsx)(s.code,{children:"registerNamespace"})," transaction before it, grant themselves access to the namespace, transfer ownership of the namespace to the victim,\nso that the ",(0,l.jsx)(s.code,{children:"registerSystem"}),"/",(0,l.jsx)(s.code,{children:"registerTable"})," transactions still went through successfully.\nTo mitigate this issue, the side effect of registering a namespace in ",(0,l.jsx)(s.code,{children:"registerSystem"})," and ",(0,l.jsx)(s.code,{children:"registerTable"})," has been removed.\nCalls to these functions now expect the respective namespace to exist and the caller to own the namespace, otherwise they revert."]}),"\n",(0,l.jsx)(s.p,{children:"Changes in consuming projects are only necessary if tables or systems are registered manually.\nIf only the MUD deployer is used to register tables and systems, no changes are necessary, as the MUD deployer has been updated accordingly."}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+  world.registerNamespace(namespaceId);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"   world.registerSystem(systemId, system, true);"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+  world.registerNamespace(namespaceId);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"   MyTable.register();"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/57d8965dfaa5275bd803a48c22d42b50b83c23ed",children:"refactor(cli,world,world-modules): split and separately deploy core systems (#2128)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Separated core systems deployment from ",(0,l.jsx)(s.code,{children:"CoreModule"}),", and added the systems as arguments to ",(0,l.jsx)(s.code,{children:"CoreModule"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/57d8965dfaa5275bd803a48c22d42b50b83c23ed",children:"refactor(cli,world,world-modules): split and separately deploy core systems (#2128)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Split ",(0,l.jsx)(s.code,{children:"CoreSystem"})," into ",(0,l.jsx)(s.code,{children:"AccessManagementSystem"}),", ",(0,l.jsx)(s.code,{children:"BalanceTransferSystem"}),", ",(0,l.jsx)(s.code,{children:"BatchCallSystem"}),", ",(0,l.jsx)(s.code,{children:"CoreRegistrationSystem"})]}),"\n",(0,l.jsxs)(s.li,{children:["Changed ",(0,l.jsx)(s.code,{children:"CoreModule"})," to receive the addresses of these systems as arguments, instead of deploying them"]}),"\n",(0,l.jsxs)(s.li,{children:["Replaced ",(0,l.jsx)(s.code,{children:"CORE_SYSTEM_ID"})," constant with ",(0,l.jsx)(s.code,{children:"ACCESS_MANAGEMENT_SYSTEM_ID"}),", ",(0,l.jsx)(s.code,{children:"BALANCE_TRANSFER_SYSTEM_ID"}),", ",(0,l.jsx)(s.code,{children:"BATCH_CALL_SYSTEM_ID"}),", ",(0,l.jsx)(s.code,{children:"CORE_REGISTRATION_SYSTEM_ID"}),", for each respective system"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["These changes separate the initcode of ",(0,l.jsx)(s.code,{children:"CoreModule"})," from the bytecode of core systems, which effectively removes a limit on the total bytecode of all core systems."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c642ff3a0ad0d6f47d53d7c381ad6d3fffe52bbf",children:"feat(world): prevent invalid namespace strings [M-05] (#2169)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:['Namespaces are not allowed to contain double underscores ("__") anymore, as this sequence of characters is used to ',(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/pull/2168",children:"separate the namespace and function selector"})," in namespaced systems.\nThis is to prevent signature clashes of functions in different namespaces."]}),"\n",(0,l.jsx)(s.p,{children:'(Example: If namespaces were allowed to contain this separator string, a function "function" in namespace "namespace__my" would result in the namespaced function selector "namespace__my__function",\nand would clash with a function "my__function" in namespace "namespace".)'}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/854de0761fd3744c2076a2b995f0f9274a8ef971",children:"fix(cli): mud set-version --link shouldn't fetch versions (#2000)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsx)(s.p,{children:"Postgres storage adapter now uses snake case for decoded table names and column names. This allows for better SQL ergonomics when querying these tables."}),"\n",(0,l.jsxs)(s.p,{children:["To avoid naming conflicts for now, schemas are still case-sensitive and need to be queried with double quotes. We may change this in the future with ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/issues/1991",children:"namespace validation"}),"."]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-1",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/3ac68ade6e60dae2caad9f12ca146b1d461cb1c4",children:"feat(store): never allow empty FieldLayout (#2122)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removed ",(0,l.jsx)(s.code,{children:"allowEmpty"})," option from ",(0,l.jsx)(s.code,{children:"FieldLayout.validate()"})," as field layouts should never be empty."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/103f635ebc20ac1aecc5c526c4bcb928e860a7ed",children:"feat(store): improve FieldLayout errors [N-03] (#2114)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Improved error messages for invalid ",(0,l.jsx)(s.code,{children:"FieldLayout"}),"s"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-error FieldLayoutLib_InvalidLength(uint256 length);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+error FieldLayoutLib_TooManyFields(uint256 numFields, uint256 maxFields);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+error FieldLayoutLib_TooManyDynamicFields(uint256 numFields, uint256 maxFields);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+error FieldLayoutLib_Empty();"})})]})}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-1",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c6c13f2ea7e405cac2bc9cf77659d2d66bfdc0d2",children:"fix(store): emit event after calling beforeSetRecord hook [L-02] (#2017)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsx)(s.p,{children:'Storage events are now emitted after "before" hooks, so that the resulting logs are now correctly ordered and reflect onchain logic. This resolves issues with store writes and event emissions happening in "before" hooks.'}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/eaa766ef7d68b76bb783531a1a2691abdaa27df5",children:"refactor(world-modules): simplify getUniqueEntity call (#2161)"})})," (@latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removed ",(0,l.jsx)(s.code,{children:"IUniqueEntitySystem"})," in favor of calling ",(0,l.jsx)(s.code,{children:"getUniqueEntity"})," via ",(0,l.jsx)(s.code,{children:"world.call"})," instead of the world function selector. This had a small gas improvement."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e6c03a87a5c80b5ed9ddc1aaf6ad73f544c03648",children:"refactor(store,world): rename ambiguous elements [N-03] (#2091)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed the ",(0,l.jsx)(s.code,{children:"requireNoCallback"})," modifier to ",(0,l.jsx)(s.code,{children:"prohibitDirectCallback"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c207d35e822afe5f04225d6854fb039116cc7840",children:"refactor(world): use _getSystem when fetching system addresses [N-11] (#2022)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Optimised ",(0,l.jsx)(s.code,{children:"StoreRegistrationSystem"})," and ",(0,l.jsx)(s.code,{children:"WorldRegistrationSystem"})," by fetching individual fields instead of entire records where possible."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/d00c4a9af5fe54b1d21caa9f5cd525e48b3960f5",children:"fix(world): inline debug constants [L-11] (#1976)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removed ",(0,l.jsx)(s.code,{children:"ROOT_NAMESPACE_STRING"})," and ",(0,l.jsx)(s.code,{children:"ROOT_NAME_STRING"})," exports in favor of inlining these constants, to avoid reuse as they're meant for internal error messages and debugging."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Refactored various files to specify integers in a hex base instead of decimals."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1bf2e908763529e08c3d233f68eaf6705c9fffab",children:"fix(store): do not render push and pop for static arrays, use static length [M-02] (#2175)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updated codegen to not render ",(0,l.jsx)(s.code,{children:"push"})," and ",(0,l.jsx)(s.code,{children:"pop"})," methods for static arrays. The ",(0,l.jsx)(s.code,{children:"length"})," method now returns the hardcoded known length instead of calculating it like with a dynamic array."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f6f402896d8256da3b868f865a960db68393caf4",children:"fix(world): module supports world context consumer id [L-12] (#2032)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added the WorldContextConsumer interface ID to ",(0,l.jsx)(s.code,{children:"supportsInterface"})," in the Module contract."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/08b4221712cb004867e5c43b4b408aa45d9e3355",children:["fix(world): limit call context of ",(0,l.jsx)(s.code,{children:"CoreSystem"})," to delegatecall [C-02] (#2111)"]})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Systems are expected to be always called via the central World contract.\nDepending on whether it is a root or non-root system, the call is performed via ",(0,l.jsx)(s.code,{children:"delegatecall"})," or ",(0,l.jsx)(s.code,{children:"call"}),".\nSince Systems are expected to be stateless and only interact with the World state, it is not necessary to prevent direct calls to the systems.\nHowever, since the ",(0,l.jsx)(s.code,{children:"CoreSystem"})," is known to always be registered as a root system in the World, it is always expected to be delegatecalled,\nso we made this expectation explicit by reverting if it is not delegatecalled."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Made the ",(0,l.jsx)(s.code,{children:"coreModule"})," variable in ",(0,l.jsx)(s.code,{children:"WorldFactory"})," immutable."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removed the unnecessary ",(0,l.jsx)(s.code,{children:"extcodesize"})," check from the ",(0,l.jsx)(s.code,{children:"Create2"})," library."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/world-modules, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Refactored ",(0,l.jsx)(s.code,{children:"ResourceId"})," to use a global Solidity ",(0,l.jsx)(s.code,{children:"using"})," statement."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/world-modules, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Refactored EIP165 usages to use the built-in interfaceId property instead of pre-defined constants."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/2bfee9217c0b08b2cca5b4a5aef6f4c2f0e7d2f2",children:"fix(world): prevent initialising the world multiple times [L-05] (#2170)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a table to track the ",(0,l.jsx)(s.code,{children:"CoreModule"})," address the world was initialised with."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/a735e14b44f7bd0ed72745610d49b55a181f5401",children:"fix(store-sync): improve syncToZustand hydration speed (#2145)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Improved ",(0,l.jsx)(s.code,{children:"syncToZustand"})," speed of hydrating from snapshot by only applying block logs once per block instead of once per log."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/7b28d32e579a0ed09122982617bb938b3e2b5a98",children:"fix(store): revert if slice bound is invalid [L-10] (#2034)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a custom error ",(0,l.jsx)(s.code,{children:"Store_InvalidBounds"})," for when the ",(0,l.jsx)(s.code,{children:"start:end"})," slice in ",(0,l.jsx)(s.code,{children:"getDynamicFieldSlice"})," is invalid (it used to revert with the default overflow error)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9f8b84e733412323103fdd81067f8edc9d681a17",children:"refactor(store): order load function arguments [N-02] (#2033)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Aligned the order of function arguments in the ",(0,l.jsx)(s.code,{children:"Storage"})," library."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"store"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" storagePointer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" offset"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"store"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" storagePointer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" offset"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" length"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" memoryPointer)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"load"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" storagePointer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" offset"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" length)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"load"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" storagePointer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" offset"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" length"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" memoryPointer)"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/aee8020a65ca5cfebb2ca479357a535bbf07269b",children:"fix(world): check namespace exists before balance transfer [L-03] (#2095)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Namespace balances can no longer be transferred to non-existent namespaces."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/ad4ac44594f222fdfeca77e4d262eb47ef735836",children:"fix(store): add missing FieldLayout and Schema validations [L-07] (#2046)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added more validation checks for ",(0,l.jsx)(s.code,{children:"FieldLayout"})," and ",(0,l.jsx)(s.code,{children:"Schema"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e4a6189df7b2bbf5c88cc050c529d8f0ee49bc5a",children:"fix(world): prevent misconfigured delegations, allow unregistering [L-04] (#2096)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Prevented invalid delegations by performing full validation regardless of whether ",(0,l.jsx)(s.code,{children:"initCallData"})," is empty. Added an ",(0,l.jsx)(s.code,{children:"unregisterDelegation"})," function which allows explicit unregistration, as opposed of passing in zero bytes into ",(0,l.jsx)(s.code,{children:"registerDelegation"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/world-modules, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Refactored various Solidity files to not explicitly initialise variables to zero."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsx)(s.p,{children:"Refactored some Store functions to use a right bit mask instead of left."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Simplified a check in ",(0,l.jsx)(s.code,{children:"Slice.getSubslice"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Refactored ",(0,l.jsx)(s.code,{children:"WorldContext"})," to get the world address from ",(0,l.jsx)(s.code,{children:"WorldContextConsumerLib"})," instead of ",(0,l.jsx)(s.code,{children:"StoreSwitch"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/37c228c63235e184a40623d9bb1f6494abdf25e4",children:"refactor(store,world,world-modules): code suggestions [N-08] (#2140)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Optimised the ",(0,l.jsx)(s.code,{children:"Schema.validate"})," function to decrease gas use."]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next15",children:"Version 2.0.0-next.15"}),"\n",(0,l.jsx)(s.p,{children:"Release date: Wed Jan 03 2024"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-2",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/504e25dc83a210a1ef3b66d8487d9e292470620c",children:"fix(store-sync,store-indexer): make last updated block number not null (#1972)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"lastUpdatedBlockNumber"})," columns in Postgres storage adapters are no longer nullable"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e48fb3b037d2ee888a8c61a6fc51721c903559e3",children:"feat(store-indexer): clean database if outdated (#1984)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed singleton ",(0,l.jsx)(s.code,{children:"chain"})," table to ",(0,l.jsx)(s.code,{children:"config"})," table for clarity."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/85b94614b83cd0964a305d488c1efb247445b915",children:"feat(store-sync, store-indexer): order logs by logIndex (#2037)"})})," (@latticexyz/store-indexer, @latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["The postgres indexer is now storing the ",(0,l.jsx)(s.code,{children:"logIndex"})," of the last update of a record to be able to return the snapshot logs in the order they were emitted onchain."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/a4aff73c538265ecfd2a17ecf98edcaa6a2ef935",children:"feat(store-sync): fetch and store logs (#2003)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Previously, all ",(0,l.jsx)(s.code,{children:"store-sync"})," strategies were susceptible to a potential memory leak where the stream that fetches logs from the RPC would get ahead of the stream that stores the logs in the provided storage adapter. We saw this most often when syncing to remote Postgres servers, where inserting records was much slower than we retrieving them from the RPC. In these cases, the stream would build up a backlog of items until the machine ran out of memory."]}),"\n",(0,l.jsxs)(s.p,{children:["This is now fixed by waiting for logs to be stored before fetching the next batch of logs from the RPC. To make this strategy work, we no longer return ",(0,l.jsx)(s.code,{children:"blockLogs$"})," (stream of logs fetched from RPC but before they're stored) and instead just return ",(0,l.jsx)(s.code,{children:"storedBlockLogs$"})," (stream of logs fetched from RPC after they're stored)."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1b5eb0d075579d2437b4329266ca37735e65ce41",children:"feat(store-sync,store-indexer): schemaless indexer (#1965)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"syncToPostgres"})," from ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync/postgres"})," now uses a single table to store all records in their bytes form (",(0,l.jsx)(s.code,{children:"staticData"}),", ",(0,l.jsx)(s.code,{children:"encodedLengths"}),", and ",(0,l.jsx)(s.code,{children:"dynamicData"}),"), more closely mirroring onchain state and enabling more scalability and stability for automatic indexing of many worlds."]}),"\n",(0,l.jsxs)(s.p,{children:["The previous behavior, where schemaful SQL tables are created and populated for each MUD table, has been moved to a separate ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync/postgres-decoded"})," export bundle. This approach is considered less stable and is intended to be used for analytics purposes rather than hydrating clients. Some previous metadata columns on these tables have been removed in favor of the bytes records table as the source of truth for onchain state."]}),"\n",(0,l.jsx)(s.p,{children:"This overhaul is considered breaking and we recommend starting a fresh database when syncing with either of these strategies."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/7b73f44d98dd25483c037e76d174e30e99488bd3",children:"feat(store-sync): snake case postgres names in decoded tables (#1989)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsx)(s.p,{children:"Postgres storage adapter now uses snake case for decoded table names and column names. This allows for better SQL ergonomics when querying these tables."}),"\n",(0,l.jsxs)(s.p,{children:["To avoid naming conflicts for now, schemas are still case-sensitive and need to be queried with double quotes. We may change this in the future with ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/issues/1991",children:"namespace validation"}),"."]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-2",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5df1f31bc9d35969de6f03396905778748017f38",children:"feat(store-sync,store-indexer): sync from getLogs indexer endpoint (#1973)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Refactored how we fetch snapshots from an indexer, preferring the new ",(0,l.jsx)(s.code,{children:"getLogs"})," endpoint and falling back to the previous ",(0,l.jsx)(s.code,{children:"findAll"})," if it isn't available. This refactor also prepares for an easier entry point for adding client caching of snapshots."]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"initialState"})," option for various sync methods (",(0,l.jsx)(s.code,{children:"syncToPostgres"}),", ",(0,l.jsx)(s.code,{children:"syncToRecs"}),", etc.) is now deprecated in favor of ",(0,l.jsx)(s.code,{children:"initialBlockLogs"}),". For now, we'll automatically convert ",(0,l.jsx)(s.code,{children:"initialState"})," into ",(0,l.jsx)(s.code,{children:"initialBlockLogs"}),", but if you want to update your code, you can do:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { tablesWithRecordsToLogs } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"initialBlockLogs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  blockNumber"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"initialState"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".blockNumber"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  logs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"tablesWithRecordsToLogs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"initialState"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".tables)"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f6133591a86eb169a7b1b2b8d342733a887af610",children:"feat(create-mud): remove window global usage in vanilla template (#1774)"})})," (create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Replaced usage of ",(0,l.jsx)(s.code,{children:"window"})," global in vanilla JS template with an event listener on the button."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/59d78c93ba80d20e5d7c4f47b9fe24575bcdc8cd",children:"feat(cli): add build command (#1990)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a ",(0,l.jsx)(s.code,{children:"mud build"})," command that generates table libraries, system interfaces, and typed ABIs."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1b5eb0d075579d2437b4329266ca37735e65ce41",children:"feat(store-sync,store-indexer): schemaless indexer (#1965)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added ",(0,l.jsx)(s.code,{children:"unique"})," and ",(0,l.jsx)(s.code,{children:"groupBy"})," array helpers to ",(0,l.jsx)(s.code,{children:"@latticexyz/common/utils"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { unique } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/common/utils"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"unique"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(["}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// [1, 2, 4, 3]"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { groupBy } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/common/utils"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"records"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  { type"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cat"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Bob"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  { type"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cat"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Spot"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  { type"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"dog"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Rover"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"];"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Object"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".fromEntries"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"groupBy"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(records"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (record) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"record"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".type));"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'//   "cat": [{ type: "cat", name: "Bob" }, { type: "cat", name: "Spot" }],'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'//   "dog: [{ type: "dog", name: "Rover" }]'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// }"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1b5eb0d075579d2437b4329266ca37735e65ce41",children:"feat(store-sync,store-indexer): schemaless indexer (#1965)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"findAll"})," method is now considered deprecated in favor of a new ",(0,l.jsx)(s.code,{children:"getLogs"})," method. This is only implemented in the Postgres indexer for now, with SQLite coming soon. The new ",(0,l.jsx)(s.code,{children:"getLogs"})," method will be an easier and more robust data source to hydrate the client and other indexers and will allow us to add streaming updates from the indexer in the near future."]}),"\n",(0,l.jsxs)(s.p,{children:["For backwards compatibility, ",(0,l.jsx)(s.code,{children:"findAll"})," is now implemented on top of ",(0,l.jsx)(s.code,{children:"getLogs"}),", with record key/value decoding done in memory at request time. This may not scale for large databases, so use wisely."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e48fb3b037d2ee888a8c61a6fc51721c903559e3",children:"feat(store-indexer): clean database if outdated (#1984)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsx)(s.p,{children:"When the Postgres indexer starts up, it will now attempt to detect if the database is outdated and, if so, cleans up all MUD-related schemas and tables before proceeding."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4c1dcd81eae44c37f66bd80871daf02834c04fb5",children:"feat(store-indexer, store-sync): improve query performance and enable compression, add new api (#2026)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Added a ",(0,l.jsx)(s.code,{children:"Result<Ok, Err>"})," type for more explicit and typesafe error handling (",(0,l.jsx)(s.a,{href:"https://doc.rust-lang.org/std/result/",children:"inspired by Rust"}),")."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Added a ",(0,l.jsx)(s.code,{children:"includes"})," util as typesafe alternative to ",(0,l.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes",children:(0,l.jsx)(s.code,{children:"Array.prototype.includes()"})}),"."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/7eabd06f7af9748aba842d116f1dcd0ef5635999",children:"docs: add changeset for zustand sync progress (#1931)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added and populated ",(0,l.jsx)(s.code,{children:"syncProgress"})," key in Zustand store for sync progress, like we do for RECS sync. This will let apps using ",(0,l.jsx)(s.code,{children:"syncToZustand"})," render a loading state while initial client hydration is in progress."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"tsx","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"tsx","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"syncProgress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"useStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((state) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"state"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".syncProgress);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"syncProgress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".step "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!=="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"SyncStep"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"LIVE"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <>Loading ({"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Math"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".floor"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"syncProgress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".percentage)}%)</>;"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5df1f31bc9d35969de6f03396905778748017f38",children:"feat(store-sync,store-indexer): sync from getLogs indexer endpoint (#1973)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updated ",(0,l.jsx)(s.code,{children:"chunk"})," types to use readonly arrays"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5df1f31bc9d35969de6f03396905778748017f38",children:"feat(store-sync,store-indexer): sync from getLogs indexer endpoint (#1973)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added ",(0,l.jsx)(s.code,{children:"getLogs"})," query support to sqlite indexer"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4c1dcd81eae44c37f66bd80871daf02834c04fb5",children:"feat(store-indexer, store-sync): improve query performance and enable compression, add new api (#2026)"})})," (@latticexyz/store-indexer, @latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Improved query performance by 10x by moving from drizzle ORM to handcrafted SQL."}),"\n",(0,l.jsxs)(s.li,{children:["Moved away from ",(0,l.jsx)(s.code,{children:"trpc"})," for more granular control over the transport layer.\nAdded an ",(0,l.jsx)(s.code,{children:"/api/logs"})," endpoint using the new query and gzip compression for 40x less data transferred over the wire.\nDeprecated the ",(0,l.jsx)(s.code,{children:"/trpc/getLogs"})," and ",(0,l.jsx)(s.code,{children:"/trpc/findAll"})," endpoints."]}),"\n",(0,l.jsxs)(s.li,{children:["Added a ",(0,l.jsx)(s.code,{children:"createIndexerClient"})," client for the new ",(0,l.jsx)(s.code,{children:"/api"})," indexer API exported from ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync/indexer-client"}),".\nThe ",(0,l.jsx)(s.code,{children:"createIndexerClient"})," export from ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync/trpc-indexer"})," is deprecated."]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { createIndexerClient } from "@latticexyz/store-sync/trpc-indexer";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { createIndexerClient } from "@latticexyz/store-sync/indexer-client";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- const indexer = createIndexerClient({ url: "https://indexer.holesky.redstone.xyz/trpc" });'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ const indexer = createIndexerClient({ url: "https://indexer.holesky.redstone.xyz" });'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- const snapshot = indexer.getLogs.query(options);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ const snapshot = indexer.getLogs(options);"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/f61b4bc0903d09c4c71f01270012953adee50701",children:['feat(store-indexer): return a "not found" error when no snapshot is found for a ',(0,l.jsx)(s.code,{children:"/api/logs"})," request (#2043)"]})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"/api/logs"})," indexer endpoint is now returning a ",(0,l.jsx)(s.code,{children:"404"})," snapshot not found error when no snapshot is found for the provided filter instead of an empty ",(0,l.jsx)(s.code,{children:"200"})," response."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1feecf4955462554c650f56e4777aa330e31f667",children:"fix(cli): add worldAddress to dev-contracts (#1892)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added ",(0,l.jsx)(s.code,{children:"STORE_ADDRESS"})," environment variable to index only a specific MUD Store."]}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-2",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/d8c8f66bfd403994216e856d5e92368f7a63be38",children:"fix(store,world): exclude ERC165 interface ID from custom interface ID's [L-06] (#2014)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Exclude ERC165 interface ID from custom interface ID's."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/504e25dc83a210a1ef3b66d8487d9e292470620c",children:"fix(store-sync,store-indexer): make last updated block number not null (#1972)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Records are now ordered by ",(0,l.jsx)(s.code,{children:"lastUpdatedBlockNumber"})," at the Postgres SQL query level"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1b86eac0530d069ff267f6fee8d6a71d6bbb365b",children:"fix(store): slice4 output should be bytes4 [M-03] (#2031)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Changed the type of the output variable in the ",(0,l.jsx)(s.code,{children:"slice4"})," function to ",(0,l.jsx)(s.code,{children:"bytes4"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/854de0761fd3744c2076a2b995f0f9274a8ef971",children:"fix(cli): mud set-version --link shouldn't fetch versions (#2000)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Using ",(0,l.jsx)(s.code,{children:"mud set-version --link"})," will no longer attempt to fetch the latest version from npm."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1077c7f53b6c0d6ea7663fe2722b0e768d407741",children:"fix(store,world): fix mud config TS errors (#1974)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed an issue where ",(0,l.jsx)(s.code,{children:"mud.config.ts"})," source file was not included in the package, causing TS errors downstream."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b00550cef2a3824dd38122a16b6e768bd88f9357",children:"feat(store-indexer): command to run decoded indexer (#2001)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsx)(s.p,{children:"Added a script to run the decoded postgres indexer."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/0a3b9b1c9c821b153cb07281b585feb006ec621e",children:"chore(store-indexer, store-sync): add explicit error logs (#2045)"})})," (@latticexyz/store-indexer, @latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added explicit error logs for unexpected situations.\nPreviously all ",(0,l.jsx)(s.code,{children:"debug"})," logs were going to ",(0,l.jsx)(s.code,{children:"stderr"}),", which made it hard to find the unexpected errors.\nNow ",(0,l.jsx)(s.code,{children:"debug"})," logs go to ",(0,l.jsx)(s.code,{children:"stdout"})," and we can add explicit ",(0,l.jsx)(s.code,{children:"stderr"})," logs."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/933b54b5fcdd9400e21e8e0114bb4c691e830fec",children:"chore(common): log benchmark to stderr (#2047)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:["The benchmark util now logs to ",(0,l.jsx)(s.code,{children:"stdout"})," instead of ",(0,l.jsx)(s.code,{children:"stderr"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f8dab7334d41d1a53dfad0bbd13a1bbe6fc0cbf8",children:"chore(world): add explicit visibility to coreSystem [N-07] (#2029)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added explicit ",(0,l.jsx)(s.code,{children:"internal"})," visibility to the ",(0,l.jsx)(s.code,{children:"coreSystem"})," variable in ",(0,l.jsx)(s.code,{children:"CoreModule"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1a0fa7974b493258c7fc8f0708c442ed548e227e",children:"fix(world,world-modules): requireInterface correctly specifies ERC165 [M-02] (#2016)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed ",(0,l.jsx)(s.code,{children:"requireInterface"})," to correctly specify ERC165."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/eb384bb0e073b1261b8ab92bc74c32ec4956c886",children:"feat(world): add isInstalled to Module (#2056)"})})," (@latticexyz/world-modules, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added ",(0,l.jsx)(s.code,{children:"isInstalled"})," and ",(0,l.jsx)(s.code,{children:"requireNotInstalled"})," helpers to ",(0,l.jsx)(s.code,{children:"Module"})," base contract."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/712866f5fb392a4e39b59cd4565da61adc3c005f",children:"fix(store-sync): create table registration logs from indexer records (#1919)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"createStoreSync"})," now correctly creates table registration logs from indexer records."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/85d16e48b6b3d15fe895dba550fb8d176481e1cd",children:"chore(store-indexer): setup Sentry middleware in indexer (#2054)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a Sentry middleware and ",(0,l.jsx)(s.code,{children:"SENTRY_DNS"})," environment variable to the postgres indexer."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e5a962bc31086fc4c13bbb4aa049b7a14599b11d",children:"fix(world): register FunctionSignatures table [L-01] (#1841)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"World"})," now correctly registers the ",(0,l.jsx)(s.code,{children:"FunctionSignatures"})," table."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c314badd13412a7a96692046b0402a00988994f1",children:"feat(store-indexer): replace fastify with koa (#2006)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsx)(s.p,{children:"Replaced Fastify with Koa for store-indexer frontends"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/6963a9e85ea97b47be2edd199afa98100f728cf1",children:["fix(create-mud): include ",(0,l.jsx)(s.code,{children:".gitignore"})," files in created projects (#1945)"]})})," (create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Templates now correctly include their respective ",(0,l.jsx)(s.code,{children:".gitignore"})," files"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/2699630c0e0c2027f331a9defe7f90a8968f7b3d",children:"fix(cli): always rebuild IWorld ABI (#1929)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Deploys will now always rebuild ",(0,l.jsx)(s.code,{children:"IWorld.sol"})," interface (a workaround for ",(0,l.jsx)(s.a,{href:"https://github.com/foundry-rs/foundry/issues/6241",children:"https://github.com/foundry-rs/foundry/issues/6241"}),")"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/590542030e7500f8d3cce6e54e4961d9f8a1a6d5",children:["build: allow use by TypeScript projects with ",(0,l.jsx)(s.code,{children:"bundler"}),"/",(0,l.jsx)(s.code,{children:"node16"})," config (#2084)"]})})," (@latticexyz/abi-ts, @latticexyz/block-logs-stream, @latticexyz/common, @latticexyz/config, @latticexyz/dev-tools, @latticexyz/faucet, @latticexyz/gas-report, @latticexyz/noise, @latticexyz/phaserx, @latticexyz/protocol-parser, @latticexyz/react, @latticexyz/recs, @latticexyz/schema-type, @latticexyz/services, @latticexyz/store-sync, @latticexyz/store, @latticexyz/utils, @latticexyz/world-modules, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["TS packages now generate their respective ",(0,l.jsx)(s.code,{children:".d.ts"})," type definition files for better compatibility when using MUD with ",(0,l.jsx)(s.code,{children:"moduleResolution"})," set to ",(0,l.jsx)(s.code,{children:"bundler"})," or ",(0,l.jsx)(s.code,{children:"node16"})," and fixes issues around missing type declarations for dependent packages."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6db95ce15e1c51422ca0494883210105c3e742ba",children:"fix(store): onBeforeSpliceDynamicData receives the previous encoded lengths [M-01] (#2020)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed ",(0,l.jsx)(s.code,{children:"StoreCore"})," to pass ",(0,l.jsx)(s.code,{children:"previousEncodedLengths"})," into ",(0,l.jsx)(s.code,{children:"onBeforeSpliceDynamicData"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/392c4b88d033d2d175541b974189a3f4da49e335",children:"fix(store-indexer): disable prepared statements (#2058)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Disabled prepared statements for the postgres indexer, which led to issues in combination with ",(0,l.jsx)(s.code,{children:"pgBouncer"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5d737cf2e7a1a305d7ef0bee99c07c17d80233c8",children:"chore: pipe debug logs to stdout, add separate util to pipe to stderr (#2044)"})})," (@latticexyz/abi-ts, @latticexyz/block-logs-stream, @latticexyz/cli, @latticexyz/common, @latticexyz/faucet, @latticexyz/store-indexer, @latticexyz/store-sync, @latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updated the ",(0,l.jsx)(s.code,{children:"debug"})," util to pipe to ",(0,l.jsx)(s.code,{children:"stdout"})," and added an additional util to explicitly pipe to ",(0,l.jsx)(s.code,{children:"stderr"})," when needed."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5ab67e3350bd08d15fbbe28c498cec62d2aaa116",children:"chore(store-indexer): stringify filter in error log (#2048)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["The error log if no data is found in ",(0,l.jsx)(s.code,{children:"/api/logs"})," is now stringifying the filter instead of logging ",(0,l.jsx)(s.code,{children:"[object Object]"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5ac4c97f43756e3fca4ab01f6c881822100fa56d",children:"fix(store): fix potential memory corruption [M-04] (#1978)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed M-04 Memory Corruption on Load From Storage\nIt only affected external use of ",(0,l.jsx)(s.code,{children:"Storage.load"})," with a ",(0,l.jsx)(s.code,{children:"memoryPointer"})," argument"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e481717413a280e830b33b44a16c8c2475452b07",children:"chore(store,world): remove unused imports [N-05] (#2028)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removed unused imports from various files in the ",(0,l.jsx)(s.code,{children:"store"})," and ",(0,l.jsx)(s.code,{children:"world"})," packages."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/735d957c6906e896e3e496158b9afd35da4688d4",children:"fix(store-indexer): add postgres-decoded-indexer binary (#2062)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a binary for the ",(0,l.jsx)(s.code,{children:"postgres-decoded"})," indexer."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/747d8d1b819882c1f84b8029fd4ade669f772322",children:"fix(world-modules): rename token address fields (#1986)"})})," (@latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed token address fields in ERC20 and ERC721 modules to ",(0,l.jsx)(s.code,{children:"tokenAddress"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9ef3f9a7c2ea52778027fb61988f876b590b22b0",children:"fix(react): trigger useComponentValue on deleted records (#1959)"})})," (@latticexyz/react)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed an issue where ",(0,l.jsx)(s.code,{children:"useComponentValue"})," would not detect a change and re-render if the component value was immediately removed."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/34203e4ed88c2aa79f994b99a96be4fcff21ca06",children:"fix(store-sync): use dynamic data in postgres decoded indexer (#1983)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed invalid value when decoding records in ",(0,l.jsx)(s.code,{children:"postgres-decoded"})," storage adapter"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9082c179c5a1907cc79ec95543664e63fc327bb4",children:"fix(faucet): use MUD's sendTransaction for better nonce handling (#2080)"})})," (@latticexyz/faucet)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updated to use MUD's ",(0,l.jsx)(s.code,{children:"sendTransaction"}),", which does a better of managing nonces for higher volumes of transactions."]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next14",children:"Version 2.0.0-next.14"}),"\n",(0,l.jsx)(s.p,{children:"Release date: Fri Nov 10 2023"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-3",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1faf7f697481a92c02ca40edbf71e317de1c06e3",children:"feat(dev-tools): show zustand tables (#1891)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"syncToZustand"})," now uses ",(0,l.jsx)(s.code,{children:"tables"})," argument to populate the Zustand store's ",(0,l.jsx)(s.code,{children:"tables"})," key, rather than the on-chain table registration events. This means we'll no longer store data into Zustand you haven't opted into receiving (e.g. other namespaces)."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5ecccfe751b0d217f98a45e8e7fdc73d15ad6494",children:"feat(store-indexer): separate postgres indexer/frontend services (#1887)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsx)(s.p,{children:"Separated frontend server and indexer service for Postgres indexer. Now you can run the Postgres indexer with one writer and many readers."}),"\n",(0,l.jsxs)(s.p,{children:["If you were previously using the ",(0,l.jsx)(s.code,{children:"postgres-indexer"})," binary, you'll now need to run both ",(0,l.jsx)(s.code,{children:"postgres-indexer"})," and ",(0,l.jsx)(s.code,{children:"postgres-frontend"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"For consistency, the Postgres database logs are now disabled by default. If you were using these, please let us know so we can add them back in with an environment variable flag."}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-3",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/bdb46fe3aa124014a53f1f070eb0db25771ace19",children:"feat(cli): warn when contract is over or close to the size limit (#1894)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsx)(s.p,{children:'Deploys now validate contract size before deploying and warns when a contract is over or close to the size limit (24kb). This should help identify the most common cause of "evm revert" errors during system and module contract deploys.'}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/bb91edaa01c8a66fc3eef4d5c93ccd20ae9a5066",children:"fix(store): resolveUserTypes for static arrays (#1876)"})})," (@latticexyz/schema-type)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added ",(0,l.jsx)(s.code,{children:"isSchemaAbiType"})," helper function to check and narrow an unknown string to the ",(0,l.jsx)(s.code,{children:"SchemaAbiType"})," type"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1faf7f697481a92c02ca40edbf71e317de1c06e3",children:"feat(dev-tools): show zustand tables (#1891)"})})," (@latticexyz/dev-tools, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"Added Zustand support to Dev Tools:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"syncToZustand"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:' } from "@latticexyz/store-sync";'})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"mount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"as"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"mountDevTools"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:' } from "@latticexyz/dev-tools";'})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"useStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToZustand"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" });"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"mountDevTools"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  useStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/fdbba6d88563034be607600a7af25b234f306103",children:"docs: add changeset for SystemboundDelegationControl (#1906)"})})," (@latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a new delegation control called ",(0,l.jsx)(s.code,{children:"SystemboundDelegationControl"})," that delegates control of a specific system for some maximum number of calls. It is almost identical to ",(0,l.jsx)(s.code,{children:"CallboundDelegationControl"})," except the delegatee can call the system with any function and args."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f318f2fe736767230442f074fffd2d39c5629b38",children:"feat(store-indexer): add env var to index only one store (#1886)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added ",(0,l.jsx)(s.code,{children:"STORE_ADDRESS"})," environment variable to index only a specific MUD Store."]}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-3",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/aacffcb59ad75826b33a437ce430ac0e8bfe0ddb",children:"fix(create-mud): pin prettier-plugin-solidity (#1889)"})})," (@latticexyz/common, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"Pinned prettier-plugin-solidity version to 1.1.3"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1feecf4955462554c650f56e4777aa330e31f667",children:"fix(cli): add worldAddress to dev-contracts (#1892)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added ",(0,l.jsx)(s.code,{children:"--worldAddress"})," argument to ",(0,l.jsx)(s.code,{children:"dev-contracts"})," CLI command so that you can develop against an existing world."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b2d2aa715b30cdbcddf8e442c663bd319235c209",children:"fix(store,world): explicit mud.config exports (#1900)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added an explicit package export for ",(0,l.jsx)(s.code,{children:"mud.config"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1327ea8c88f99fd268c743966dabed6122be098d",children:"fix(store-sync): show TS error for non-existent tables when using zustand (#1896)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed ",(0,l.jsx)(s.code,{children:"syncToZustand"})," types so that non-existent tables give an error and ",(0,l.jsx)(s.code,{children:"never"})," type instead of a generic ",(0,l.jsx)(s.code,{children:"Table"})," type."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/bb91edaa01c8a66fc3eef4d5c93ccd20ae9a5066",children:"fix(store): resolveUserTypes for static arrays (#1876)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed ",(0,l.jsx)(s.code,{children:"resolveUserTypes"})," for static arrays.\n",(0,l.jsx)(s.code,{children:"resolveUserTypes"})," is used by ",(0,l.jsx)(s.code,{children:"deploy"}),", which prevented deploying tables with static arrays."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9ad27046c5fbc814cb7d9339097eed96a922c083",children:"docs(faucet): fix default port in readme (#1835)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"mud test"})," cli now exits with code 1 on test failure. It used to exit with code 0, which meant that CIs didn't notice test failures."]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next13",children:"Version 2.0.0-next.13"}),"\n",(0,l.jsx)(s.p,{children:"Release date: Thu Nov 02 2023"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-4",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/52182f70d350bb99cdfa6054cd6d181e58a91aa6",children:"feat(utils): remove hash utils and ethers (#1783)"})})," (@latticexyz/utils)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removed ",(0,l.jsx)(s.code,{children:"keccak256"})," and ",(0,l.jsx)(s.code,{children:"keccak256Coord"})," hash utils in favor of ",(0,l.jsxs)(s.a,{href:"https://viem.sh/docs/utilities/keccak256.html#keccak256",children:["viem's ",(0,l.jsx)(s.code,{children:"keccak256"})]}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { keccak256 } from "@latticexyz/utils";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { keccak256, toHex } from "viem";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- const hash = keccak256("some string");'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ const hash = keccak256(toHex("some string"));'})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { keccak256Coord } from "@latticexyz/utils";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { encodeAbiParameters, keccak256, parseAbiParameters } from "viem";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  const coord = { x: 1, y: 1 };"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- const hash = keccak256Coord(coord);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ const hash = keccak256(encodeAbiParameters(parseAbiParameters("int32, int32"), [coord.x, coord.y]));'})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f6d214e3d79f9591fddd3687aa987a57f417256c",children:"feat(store-indexer,store-sync): filter by table and key (#1794)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removed ",(0,l.jsx)(s.code,{children:"tableIds"})," filter option in favor of the more flexible ",(0,l.jsx)(s.code,{children:"filters"})," option that accepts ",(0,l.jsx)(s.code,{children:"tableId"})," and an optional ",(0,l.jsx)(s.code,{children:"key0"})," and/or ",(0,l.jsx)(s.code,{children:"key1"})," to filter data by tables and keys."]}),"\n",(0,l.jsx)(s.p,{children:"If you were using an indexer client directly, you'll need to update your query:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  await indexer.findAll.query({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    chainId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    address,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   tableIds: ['0x...'],"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   filters: [{ tableId: '0x...' }],"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  });"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/78949f2c939ff5f743c026367c5978cb459f6f88",children:"feat(create-mud): move react template to zustand, add react-ecs template (#1851)"})})," (create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Replaced the ",(0,l.jsx)(s.code,{children:"react"})," template with a basic task list app using the new Zustand storage adapter and sync method. This new template better demonstrates the different ways of building with MUD and has fewer concepts to learn (i.e. just tables and records, no more ECS)."]}),"\n",(0,l.jsxs)(s.p,{children:["For ECS-based React apps, you can use ",(0,l.jsx)(s.code,{children:"react-ecs"})," template for the previous RECS storage adapter."]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-4",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6288f9033b5f26124ab0ae3cde5934a7aef50f95",children:"feat(create-mud): replace concurrently with mprocs (#1862)"})})," (create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updated templates to use ",(0,l.jsx)(s.a,{href:"https://github.com/pvolok/mprocs",children:"mprocs"})," instead of ",(0,l.jsx)(s.a,{href:"https://github.com/open-cli-tools/concurrently",children:"concurrently"})," for running dev scripts."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/de47d698f031a28ef8d9e329e3cffc85e904c6a1",children:"feat(store-sync): extra table definitions (#1840)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added an optional ",(0,l.jsx)(s.code,{children:"tables"})," option to ",(0,l.jsx)(s.code,{children:"syncToRecs"})," to allow you to sync from tables that may not be expressed by your MUD config. This will be useful for namespaced tables used by ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/pull/1789",children:"ERC20"})," and ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/pull/1844",children:"ERC721"})," token modules until the MUD config gains ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/issues/994",children:"namespace support"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["Here's how we use this in our example project with the ",(0,l.jsx)(s.code,{children:"KeysWithValue"})," module:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToRecs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  tables: {"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    KeysWithValue"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      namespace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"keywval"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      name"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Inventory"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      tableId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"resourceToHex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ type"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"table"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" namespace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"keywval"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Inventory"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      keySchema"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        valueHash"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bytes32"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      valueSchema"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        keysWithValue"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bytes32[]"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/d7325e517ce18597d55e8bce41036e78e00c3a78",children:"feat(world-modules): add ERC721 module (#1844)"})})," (@latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added the ",(0,l.jsx)(s.code,{children:"ERC721Module"})," to ",(0,l.jsx)(s.code,{children:"@latticexyz/world-modules"}),".\nThis module allows the registration of ",(0,l.jsx)(s.code,{children:"ERC721"})," tokens in an existing World."]}),"\n",(0,l.jsx)(s.p,{children:"Important note: this module has not been audited yet, so any production use is discouraged for now."}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PuppetModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world-modules/src/modules/puppet/PuppetModule.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ERC721MetadataData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world-modules/src/modules/erc721-puppet/tables/ERC721Metadata.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"IERC721Mintable"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world-modules/src/modules/erc721-puppet/IERC721Mintable.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerERC721"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world-modules/src/modules/erc721-puppet/registerERC721.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// The ERC721 module requires the Puppet module to be installed first"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"world."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"installModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PuppetModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// After the Puppet module is installed, new ERC721 tokens can be registered"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IERC721Mintable token "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerERC721"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(world"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"myERC721"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ERC721MetadataData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ name"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Token"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" symbol"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"TKN"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" baseURI"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }));```"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/35348f831b923aed6e9bdf8b38bf337f3e944a48",children:"feat(world-modules): add puppet module (#1793)"})})," (@latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added the ",(0,l.jsx)(s.code,{children:"PuppetModule"})," to ",(0,l.jsx)(s.code,{children:"@latticexyz/world-modules"}),". The puppet pattern allows an external contract to be registered as an external interface for a MUD system.\nThis allows standards like ",(0,l.jsx)(s.code,{children:"ERC20"})," (that require a specific interface and events to be emitted by a unique contract) to be implemented inside a MUD World."]}),"\n",(0,l.jsx)(s.p,{children:'The puppet serves as a proxy, forwarding all calls to the implementation system (also called the "puppet master").\nThe "puppet master" system can emit events from the puppet contract.'}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PuppetModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world-modules/src/modules/puppet/PuppetModule.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createPuppet"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world-modules/src/modules/puppet/createPuppet.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Install the puppet module"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"world."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"installModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PuppetModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Register a new puppet for any system"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// The system must implement the `CustomInterface`,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// and the caller must own the system's namespace"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"CustomInterface puppet "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CustomInterface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createPuppet"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(world"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"systemId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b68e1699b52714561c9ac62fa593d0b6cd9fe656",children:"feat(create-mud): enable MUD CLI debug logs (#1861)"})})," (create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"Enabled MUD CLI debug logs for all templates."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f6d214e3d79f9591fddd3687aa987a57f417256c",children:"feat(store-indexer,store-sync): filter by table and key (#1794)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a ",(0,l.jsx)(s.code,{children:"filters"})," option to store sync to allow filtering client data on tables and keys. Previously, it was only possible to filter on ",(0,l.jsx)(s.code,{children:"tableIds"}),", but the new filter option allows for more flexible filtering by key."]}),"\n",(0,l.jsx)(s.p,{children:"If you are building a large MUD application, you can use positional keys as a way to shard data and make it possible to load only the data needed in the client for a particular section of your app. We're using this already in Sky Strife to load match-specific data into match pages without having to load data for all matches, greatly improving load time and client performance."}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToRecs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  filters: [{ tableId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'0x...'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" key0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'0x...'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"tableIds"})," option is now deprecated and will be removed in the future, but is kept here for backwards compatibility."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/83638373450af5d8f703a183a74107ef7efb4152",children:"feat(world-modules): add ERC20 module (#1789)"})})," (@latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added the ",(0,l.jsx)(s.code,{children:"ERC20Module"})," to ",(0,l.jsx)(s.code,{children:"@latticexyz/world-modules"}),".\nThis module allows the registration of ",(0,l.jsx)(s.code,{children:"ERC20"})," tokens in an existing World."]}),"\n",(0,l.jsx)(s.p,{children:"Important note: this module has not been audited yet, so any production use is discouraged for now."}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PuppetModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world-modules/src/modules/puppet/PuppetModule.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"IERC20Mintable"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world-modules/src/modules/erc20-puppet/IERC20Mintable.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerERC20"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world-modules/src/modules/erc20-puppet/registerERC20.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// The ERC20 module requires the Puppet module to be installed first"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"world."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"installModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PuppetModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// After the Puppet module is installed, new ERC20 tokens can be registered"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IERC20Mintable token "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerERC20"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(world"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"myERC20"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ERC20MetadataData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ decimals"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"18"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Token"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" symbol"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"TKN"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }));"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/fa77635839e760a9de5fc8959ee492b7a4d8a7cd",children:"feat(store-sync): sync to zustand (#1843)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a Zustand storage adapter and corresponding ",(0,l.jsx)(s.code,{children:"syncToZustand"})," method for use in vanilla and React apps. It's used much like the other sync methods, except it returns a bound store and set of typed tables."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { syncToZustand } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync/zustand"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" config "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"contracts/mud.config"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"tables"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"useStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"latestBlock$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"storedBlockLogs$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"waitForTransaction"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToZustand"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  config"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// in vanilla apps"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"positions"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"useStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".getState"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".getRecords"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"tables"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".Position);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// in React apps"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"positions"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"useStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((state) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"state"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".getRecords"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"tables"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".Position));"})]})]})}),"\n",(0,l.jsx)(s.p,{children:"This change will be shortly followed by an update to our templates that uses Zustand as the default client data store and sync method."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b1d41727d4b1964ad3cd907c1c2126b02172b413",children:"feat(store): add experimental config resolve helper (#1826)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a ",(0,l.jsx)(s.code,{children:"mapObject"})," helper to map the value of each property of an object to a new value."]}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-4",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c5148da763645e0adc1250245ea447904014bef2",children:"fix(create-mud): set store address in PostDeploy script (#1817)"})})," (create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"Updated templates' PostDeploy script to set store address so that tables can be used directly inside PostDeploy."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1b33a915c56247599c19c5de04090b776b87d561",children:"fix(create-mud): workaround create-create-app templating (#1863)"})})," (create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fixed an issue when creating a new project from the ",(0,l.jsx)(s.code,{children:"react"})," app, where React's expressions were overlapping with Handlebars expressions (used by our template command)."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/21a626ae9bd79f1a275edc70b43d19ed43f48131",children:"fix(cli): change import order so .env file is loaded first (#1860)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Changed ",(0,l.jsx)(s.code,{children:"mud"})," CLI import order so that environment variables from the ",(0,l.jsx)(s.code,{children:".env"})," file are loaded before other imports."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/3e057061da17dd2d0c5fd23e6f5a027bdf9a9223",children:"fix(common,config): remove chalk usage (#1824)"})})," (@latticexyz/common, @latticexyz/config)"]}),"\n",(0,l.jsx)(s.p,{children:"Removed chalk usage from modules imported in client fix downstream client builds (vite in particular)."}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next12",children:"Version 2.0.0-next.12"}),"\n",(0,l.jsx)(s.p,{children:"Release date: Fri Oct 20 2023"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-5",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/7ce82b6fc6bbf390ae159fe990d5d4fca5a4b0cb",children:"feat(store): default off storeArgument (#1741)"})})," (@latticexyz/cli, @latticexyz/store, @latticexyz/world-modules, @latticexyz/world, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Store config now defaults ",(0,l.jsx)(s.code,{children:"storeArgument: false"})," for all tables. This means that table libraries, by default, will no longer include the extra functions with the ",(0,l.jsx)(s.code,{children:"_store"})," argument. This default was changed to clear up the confusion around using table libraries in tests, ",(0,l.jsx)(s.code,{children:"PostDeploy"})," scripts, etc."]}),"\n",(0,l.jsxs)(s.p,{children:["If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with ",(0,l.jsx)(s.code,{children:"storeArgument: true"})," in the table settings of your MUD config."]}),"\n",(0,l.jsxs)(s.p,{children:["If you want to use table libraries in ",(0,l.jsx)(s.code,{children:"PostDeploy.s.sol"}),", you can add the following lines:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'  import { Script } from "forge-std/Script.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'  import { console } from "forge-std/console.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'  import { IWorld } from "../src/codegen/world/IWorld.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  contract PostDeploy is Script {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    function run(address worldAddress) external {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+     StoreSwitch.setStoreAddress(worldAddress);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+     SomeTable.get(someKey);"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/29c3f5087017dbc9dc2c9160e10bfbac5806741f",children:"feat(cli): declarative deployment (#1702)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"deploy"}),", ",(0,l.jsx)(s.code,{children:"test"}),", ",(0,l.jsx)(s.code,{children:"dev-contracts"})," were overhauled using a declarative deployment approach under the hood. Deploys are now idempotent and re-running them will introspect the world and figure out the minimal changes necessary to bring the world into alignment with its config: adding tables, adding/upgrading systems, changing access control, etc."]}),"\n",(0,l.jsx)(s.p,{children:"The following CLI arguments are now removed from these commands:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"--debug"})," (you can now adjust CLI output with ",(0,l.jsx)(s.code,{children:"DEBUG"})," environment variable, e.g. ",(0,l.jsx)(s.code,{children:"DEBUG=mud:*"}),")"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"--priorityFeeMultiplier"})," (now calculated automatically)"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"--disableTxWait"})," (everything is now parallelized with smarter nonce management)"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"--pollInterval"})," (we now lean on viem defaults and we don't wait/poll until the very end of the deploy)"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["Most deployment-in-progress logs are now behind a ",(0,l.jsx)(s.a,{href:"https://github.com/debug-js/debug",children:"debug"})," flag, which you can enable with a ",(0,l.jsx)(s.code,{children:"DEBUG=mud:*"})," environment variable."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6ca1874e02161c8feb08b5fafb20b57ce0c8fe72",children:"feat(world-modules): only install modules once (#1756)"})})," (@latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Modules now revert with ",(0,l.jsx)(s.code,{children:"Module_AlreadyInstalled"})," if attempting to install more than once with the same calldata."]}),"\n",(0,l.jsx)(s.p,{children:"This is a temporary workaround for our deploy pipeline. We'll make these install steps more idempotent in the future."}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-5",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/7fa2ca1831234b54a55c20632d29877e5e711eb7",children:"docs(world): add changeset for system call helpers (#1747)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Added TS helpers for calling systems dynamically via the World."}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"encodeSystemCall"})," for ",(0,l.jsx)(s.code,{children:"world.call"})]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"worldContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"write"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".call"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encodeSystemCall"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  abi"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"worldContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".abi"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  systemId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"resourceToHex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  functionName"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"registerDelegation"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  args"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}));"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"encodeSystemCallFrom"})," for ",(0,l.jsx)(s.code,{children:"world.callFrom"})]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"worldContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"write"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".callFrom"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encodeSystemCallFrom"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  abi"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"worldContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".abi"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"0x..."'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  systemId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"resourceToHex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  functionName"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"registerDelegation"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  args"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}));"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"encodeSystemCalls"})," for ",(0,l.jsx)(s.code,{children:"world.batchCall"})]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"worldContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"write"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".batchCall"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encodeSystemCalls"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(abi"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [{"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  systemId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"resourceToHex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  functionName"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"registerDelegation"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  args"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}]));"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"encodeSystemCallsFrom"})," for ",(0,l.jsx)(s.code,{children:"world.batchCallFrom"})]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"worldContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"write"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".batchCallFrom"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encodeSystemCallsFrom"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(abi"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"0x..."'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [{"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  systemId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"resourceToHex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  functionName"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"registerDelegation"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  args"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}]));"})})]})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6ca1874e02161c8feb08b5fafb20b57ce0c8fe72",children:"feat(world-modules): only install modules once (#1756)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a ",(0,l.jsx)(s.code,{children:"Module_AlreadyInstalled"})," error to ",(0,l.jsx)(s.code,{children:"IModule"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/0660561545910b03f8358e5ed7698f74e64f955b",children:"feat(common): add sendTransaction, add mempool queue to nonce manager (#1717)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Added a ",(0,l.jsx)(s.code,{children:"sendTransaction"})," helper to mirror viem's ",(0,l.jsx)(s.code,{children:"sendTransaction"}),", but with our nonce manager"]}),"\n",(0,l.jsxs)(s.li,{children:["Added an internal mempool queue to ",(0,l.jsx)(s.code,{children:"sendTransaction"})," and ",(0,l.jsx)(s.code,{children:"writeContract"})," for better nonce handling"]}),"\n",(0,l.jsxs)(s.li,{children:["Defaults block tag to ",(0,l.jsx)(s.code,{children:"pending"})," for transaction simulation and transaction count (when initializing the nonce manager)"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/ccc21e91387cb09de9dc56729983776eb9bcdcc4",children:["feat(cli): add ",(0,l.jsx)(s.code,{children:"--alwaysPostDeploy"})," flag to deploys (#1765)"]})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a ",(0,l.jsx)(s.code,{children:"--alwaysRunPostDeploy"})," flag to deploys (",(0,l.jsx)(s.code,{children:"deploy"}),", ",(0,l.jsx)(s.code,{children:"test"}),", ",(0,l.jsx)(s.code,{children:"dev-contracts"})," commands) to always run ",(0,l.jsx)(s.code,{children:"PostDeploy.s.sol"})," script after each deploy. By default, ",(0,l.jsx)(s.code,{children:"PostDeploy.s.sol"})," is only run once after a new world is deployed."]}),"\n",(0,l.jsxs)(s.p,{children:["This is helpful if you want to continue a deploy that may not have finished (due to an error or otherwise) or to run deploys with an idempotent ",(0,l.jsx)(s.code,{children:"PostDeploy.s.sol"})," script."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/ca32917519eb9065829f11af105abbbb31d6efa2",children:"feat(abi-ts): move logs to debug (#1736)"})})," (@latticexyz/abi-ts)"]}),"\n",(0,l.jsxs)(s.p,{children:["Moves log output behind a debug flag. You can enable logging with ",(0,l.jsx)(s.code,{children:"DEBUG=abi-ts"})," environment variable."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e667ee808b5362ff215ba3faea028b526660eccb",children:"feat(cli): remove forge clean from deploy (#1759)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["CLI ",(0,l.jsx)(s.code,{children:"deploy"}),", ",(0,l.jsx)(s.code,{children:"test"}),", ",(0,l.jsx)(s.code,{children:"dev-contracts"})," no longer run ",(0,l.jsx)(s.code,{children:"forge clean"})," before each deploy. We previously cleaned to ensure no outdated artifacts were checked into git (ABIs, typechain types, etc.). Now that all artifacts are gitignored, we can let forge use its cache again."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/d2f8e940048e56d9be204bf5b2cbcf8d29cc1dee",children:"feat(common): clarify resourceId (hex) from resource (object) (#1706)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renames ",(0,l.jsx)(s.code,{children:"resourceIdToHex"})," to ",(0,l.jsx)(s.code,{children:"resourceToHex"})," and ",(0,l.jsx)(s.code,{children:"hexToResourceId"})," to ",(0,l.jsx)(s.code,{children:"hexToResource"}),", to better distinguish between a resource ID (hex value) and a resource reference (type, namespace, name)."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- resourceIdToHex({ type: 'table', namespace: '', name: 'Position' });"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ resourceToHex({ type: 'table', namespace: '', name: 'Position' });"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- hexToResourceId('0x...');"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ hexToResource('0x...');"})})]})}),"\n",(0,l.jsx)(s.p,{children:"Previous methods still exist but are now deprecated to ease migration and reduce breaking changes. These will be removed in a future version."}),"\n",(0,l.jsx)(s.p,{children:"Also removes the previously deprecated and unused table ID utils (replaced by these resource ID utils)."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/25086be5f34d7289f21395595ac8a6aeabfe9b7c",children:"feat(cli): remove .mudtest file in favor of env var (#1722)"})})," (@latticexyz/cli, @latticexyz/common, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Replaced temporary ",(0,l.jsx)(s.code,{children:".mudtest"})," file in favor of ",(0,l.jsx)(s.code,{children:"WORLD_ADDRESS"})," environment variable when running tests with ",(0,l.jsx)(s.code,{children:"MudTest"})," contract"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1d0f7e22b7fb8f6295b149a6584933a3a657ec08",children:"feat(faucet,store-indexer): add k8s healthcheck endpoints (#1739)"})})," (@latticexyz/faucet, @latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added ",(0,l.jsx)(s.code,{children:"/healthz"})," and ",(0,l.jsx)(s.code,{children:"/readyz"})," healthcheck endpoints for Kubernetes"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e1dc88ebe7f66e4ece13805643e932e038863b6e",children:"feat(cli): add retries to deploy (#1766)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsx)(s.p,{children:"Transactions sent via deploy will now be retried a few times before giving up. This hopefully helps with large deploys on some chains."}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-5",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/3bfee32cf4d036a73b35f059e0159f1b7a7088e9",children:"fix(cli): don't bail dev-contracts during deploy failure (#1808)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"dev-contracts"})," will no longer bail when there was an issue with deploying (e.g. typo in contracts) and instead wait for file changes before retrying."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f62c767e7ff3bda807c592d85227221a00dd9353",children:"feat(store): parallelize table codegen (#1754)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Parallelized table codegen. Also put logs behind debug flag, which can be enabled using the ",(0,l.jsx)(s.code,{children:"DEBUG=mud:*"})," environment variable."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4e2a170f9185a03c2c504912e3d738f06b45137b",children:"fix(cli): handle module already installed (#1769)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Deploys now continue if they detect a ",(0,l.jsx)(s.code,{children:"Module_AlreadyInstalled"})," revert error."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/61c6ab70555dc29e8e9428212ee710d7af681cc9",children:"fix(cli): deploy systems/modules before registering/installing them (#1767)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsx)(s.p,{children:"Changed deploy order so that system/module contracts are fully deployed before registering/installing them on the world."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/69d55ce3265e10a1ae62ddca9e32e34f1cd52dea",children:"fix(cli): run worldgen with deploy (#1807)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Deploy commands (",(0,l.jsx)(s.code,{children:"deploy"}),", ",(0,l.jsx)(s.code,{children:"dev-contracts"}),", ",(0,l.jsx)(s.code,{children:"test"}),") now correctly run ",(0,l.jsx)(s.code,{children:"worldgen"})," to generate system interfaces before deploying."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f62c767e7ff3bda807c592d85227221a00dd9353",children:"feat(store): parallelize table codegen (#1754)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:["Moved some codegen to use ",(0,l.jsx)(s.code,{children:"fs/promises"})," for better parallelism."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4fe079309fae04ffd2e611311937906f65bf91e6",children:"fix(cli): support enums in deploy, only deploy modules/systems once (#1749)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsx)(s.p,{children:"Fixed a few issues with deploys:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"properly handle enums in MUD config"}),"\n",(0,l.jsx)(s.li,{children:"only deploy each unique module/system once"}),"\n",(0,l.jsx)(s.li,{children:"waits for transactions serially instead of in parallel, to avoid RPC errors"}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/d844cd441c40264ddc90d023e4354adea617febd",children:"feat(cli,create-mud): use forge cache (#1777)"})})," (@latticexyz/cli, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"Sped up builds by using more of forge's cache."}),"\n",(0,l.jsx)(s.p,{children:"Previously we'd build only what we needed because we would check in ABIs and other build artifacts into git, but that meant that we'd get a lot of forge cache misses. Now that we no longer need these files visible, we can take advantage of forge's caching and greatly speed up builds, especially incremental ones."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/29c3f5087017dbc9dc2c9160e10bfbac5806741f",children:"feat(cli): declarative deployment (#1702)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["With ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/pull/1544",children:"resource types in resource IDs"}),", the World config no longer requires table and system names to be unique."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/d2f8e940048e56d9be204bf5b2cbcf8d29cc1dee",children:"feat(common): clarify resourceId (hex) from resource (object) (#1706)"})})," (@latticexyz/cli, @latticexyz/dev-tools, @latticexyz/store-sync)"]}),"\n",(0,l.jsx)(s.p,{children:"Moved to new resource ID utils."}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next11",children:"Version 2.0.0-next.11"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-6",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/3d0b3edb46b266fccb40e26e8243d7628bea8baf",children:"feat(cli): remove backup/restore/force options from set-version (#1687)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removes ",(0,l.jsx)(s.code,{children:".mudbackup"})," file handling and ",(0,l.jsx)(s.code,{children:"--backup"}),", ",(0,l.jsx)(s.code,{children:"--restore"}),", and ",(0,l.jsx)(s.code,{children:"--force"})," options from ",(0,l.jsx)(s.code,{children:"mud set-version"})," command."]}),"\n",(0,l.jsxs)(s.p,{children:["To revert to a previous MUD version, use ",(0,l.jsx)(s.code,{children:"git diff"})," to find the version that you changed from and want to revert to and run ",(0,l.jsx)(s.code,{children:"pnpm mud set-version <prior-version>"})," again."]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-6",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9352648b19800f28b1d96ec448283808342a41f7",children:"feat(world-modules): add SystemSwitch util (#1665)"})})," (@latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["Since ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/pull/1564",children:"#1564"})," the World can no longer call itself via an external call.\nThis made the developer experience of calling other systems via root systems worse, since calls from root systems are executed from the context of the World.\nThe recommended approach is to use ",(0,l.jsx)(s.code,{children:"delegatecall"})," to the system if in the context of a root system, and an external call via the World if in the context of a non-root system.\nTo bring back the developer experience of calling systems from other sysyems without caring about the context in which the call is executed, we added the ",(0,l.jsx)(s.code,{children:"SystemSwitch"})," util."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- // Instead of calling the system via an external call to world..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- uint256 value = IBaseWorld(_world()).callMySystem();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ // ...you can now use the `SystemSwitch` util."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ // This works independent of whether used in a root system or non-root system."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ uint256 value = abi.decode(SystemSwitch.call(abi.encodeCall(IBaseWorld.callMySystem, ()), (uint256));"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["Note that if you already know your system is always executed as non-root system, you can continue to use the approach of calling other systems via the ",(0,l.jsx)(s.code,{children:"IBaseWorld(world)"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/d075f82f30f4969a353e4ea29ca2a25a04810523",children:["refactor(common): move ",(0,l.jsx)(s.code,{children:"createContract"}),"'s internal write logic to ",(0,l.jsx)(s.code,{children:"writeContract"})," (#1693)"]})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Moves contract write logic out of ",(0,l.jsx)(s.code,{children:"createContract"})," into its own ",(0,l.jsx)(s.code,{children:"writeContract"})," method so that it can be used outside of the contract instance, and for consistency with viem."]}),"\n",(0,l.jsxs)(s.li,{children:["Deprecates ",(0,l.jsx)(s.code,{children:"createContract"})," in favor of ",(0,l.jsx)(s.code,{children:"getContract"})," for consistency with viem."]}),"\n",(0,l.jsxs)(s.li,{children:["Reworks ",(0,l.jsx)(s.code,{children:"createNonceManager"}),"'s ",(0,l.jsx)(s.code,{children:"BroadcastChannel"}),' setup and moves out the notion of a "nonce manager ID" to ',(0,l.jsx)(s.code,{children:"getNonceManagerId"})," so we can create an internal cache with ",(0,l.jsx)(s.code,{children:"getNonceManager"})," for use in ",(0,l.jsx)(s.code,{children:"writeContract"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["If you were using the ",(0,l.jsx)(s.code,{children:"createNonceManager"})," before, you'll just need to rename ",(0,l.jsx)(s.code,{children:"publicClient"})," argument to ",(0,l.jsx)(s.code,{children:"client"}),":"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  const publicClient = createPublicClient({ ... });"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- const nonceManager = createNonceManager({ publicClient, ... });"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ const nonceManager = createNonceManager({ client: publicClient, ... });"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4385c5a4c0e2d5550c041acc4386ae7fc1cb4b7e",children:"feat(gas-reporter): allow gas-reporter to parse stdin (#1688)"})})," (@latticexyz/gas-report)"]}),"\n",(0,l.jsxs)(s.p,{children:["Allow the ",(0,l.jsx)(s.code,{children:"gas-report"})," CLI to parse logs via ",(0,l.jsx)(s.code,{children:"stdin"}),", so it can be used with custom test commands (e.g. ",(0,l.jsx)(s.code,{children:"mud test"}),")."]}),"\n",(0,l.jsx)(s.p,{children:"Usage:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"sh","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"sh","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# replace `forge test -vvv` with the custom test command"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"GAS_REPORTER_ENABLED"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forge"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"test"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"-vvv"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"|"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"gas-report"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"--stdin"})]})]})}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-6",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/08d7c471f9a2f4d6c237641eea316313d010373c",children:"feat(store-sync): export postgres column type helpers (#1699)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Export postgres column type helpers from ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/16b13ea8fc5e7f63ce08bc6baa2087cab9c8089f",children:"fix(common): workaround for zero base fee (#1689)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsx)(s.p,{children:"Adds viem workaround for zero base fee used by MUD's anvil config"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/430e6b29a9207122d48e386925bdb9fc12c201b9",children:"fix(world): register store namespace during initialization (#1712)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Register the ",(0,l.jsx)(s.code,{children:"store"})," namespace in the ",(0,l.jsx)(s.code,{children:"CoreModule"}),".\nSince namespaces are a World concept, registering the Store's internal tables does not automatically register the Store's namespace, so we do this manually during initialization in the ",(0,l.jsx)(s.code,{children:"CoreModule"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f99e889872e6881bf32bcb9a605b8b5c1b05fac4",children:"build: bump viem and abitype (#1684)"})})," (@latticexyz/block-logs-stream, @latticexyz/cli, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/faucet, @latticexyz/protocol-parser, @latticexyz/schema-type, @latticexyz/store-indexer, @latticexyz/store-sync, @latticexyz/store, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"Bump viem to 1.14.0 and abitype to 0.9.8"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/ba17bdab5c8b2a3aa56e86722134174e2799ddfa",children:"feat(gas-report): add more logs to stdin piping (#1694)"})})," (@latticexyz/gas-report)"]}),"\n",(0,l.jsxs)(s.p,{children:["Pass through ",(0,l.jsx)(s.code,{children:"stdin"})," logs in ",(0,l.jsx)(s.code,{children:"gas-report"}),". Since the script piping in logs to ",(0,l.jsx)(s.code,{children:"gas-report"})," can be long-running, it is useful to see its logs to know if it's stalling."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/a2f41ade977a5374c400ef8bfc2cb8c8698f185e",children:"fix(protocol-parser): allow arbitrary key order when encoding values (#1674)"})})," (@latticexyz/protocol-parser)"]}),"\n",(0,l.jsx)(s.p,{children:"Allow arbitrary key order when encoding values"}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next10",children:"Version 2.0.0-next.10"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-7",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/88b1a5a191b4adadf190de51cd47a5b033b6fb29",children:"refactor(world): expose library for WorldContextConsumer (#1624)"})})," (@latticexyz/world-modules, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["We now expose a ",(0,l.jsx)(s.code,{children:"WorldContextConsumerLib"})," library with the same functionality as the ",(0,l.jsx)(s.code,{children:"WorldContextConsumer"})," contract, but the ability to be used inside of internal libraries.\nWe also renamed the ",(0,l.jsx)(s.code,{children:"WorldContextProvider"})," library to ",(0,l.jsx)(s.code,{children:"WorldContextProviderLib"})," for consistency."]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-7",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4081493b84ab5c78a5147d4af8d41fc2d9e027a5",children:"docs: changeset for indexer/store sync table IDs param (#1662)"})})," (@latticexyz/store-indexer, @latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a ",(0,l.jsx)(s.code,{children:"tableIds"})," parameter to store sync methods and indexer to allow filtering data streams by table IDs. Store sync methods automatically include all internal table IDs from Store and World."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { syncToRecs } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync/recs"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { resourceIdToHex } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/common"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToRecs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  tableIds: ["}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"resourceIdToHex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createIndexerClient } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync/trpc-indexer"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { resourceIdToHex } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/common"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createIndexerClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" });"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".findAll"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  tableIds: ["}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"resourceIdToHex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/7987c94d61a2c759916a708774db9f3cf08edca8",children:"feat(world): return world address from WorldFactory (#1675)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Return address of the newly created World from ",(0,l.jsx)(s.code,{children:"WorldFactory.deployWorld"}),"."]}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-7",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/87235a21b28fc831b5fb7a1546835ef08bd51655",children:"fix(cli): fix table IDs for module install (#1663)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsx)(s.p,{children:"Fix table IDs for module install step of deploy"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1d403962283c5b5f62410867be01f6adff277f41",children:"fix(cli): register namespace with namespaceId (#1619)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsx)(s.p,{children:"We fixed a bug in the deploy script that would cause the deployment to fail if a non-root namespace was used in the config."}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next9",children:"Version 2.0.0-next.9"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-8",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/77dce993a12989dc58534ccf1a8928b156be494a",children:"feat(world): move interfaces/factories to root (#1606)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Moves World interfaces and factories files for consistency with our other packages."}),"\n",(0,l.jsx)(s.p,{children:"If you import any World interfaces or factories directly, you'll need to update the import path:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { IBaseWorld } from "@latticexyz/world/src/interfaces/IBaseWorld.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { IBaseWorld } from "@latticexyz/world/src/IBaseWorld.sol";'})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { IBaseWorld } from "@latticexyz/world/src/factories/WorldFactory.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { IBaseWorld } from "@latticexyz/world/src/WorldFactory.sol";'})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/748f4588a218928bca041760448c26991c0d8033",children:["feat(world): prevent the ",(0,l.jsx)(s.code,{children:"World"})," from calling itself (#1563)"]})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["All ",(0,l.jsx)(s.code,{children:"World"})," methods now revert if the ",(0,l.jsx)(s.code,{children:"World"})," calls itself.\nThe ",(0,l.jsx)(s.code,{children:"World"})," should never need to externally call itself, since all internal table operations happen via library calls, and all root system operations happen via delegate call."]}),"\n",(0,l.jsxs)(s.p,{children:["It should not be possible to make the ",(0,l.jsx)(s.code,{children:"World"})," call itself as an external actor.\nIf it were possible to make the ",(0,l.jsx)(s.code,{children:"World"})," call itself, it would be possible to write to internal tables that only the ",(0,l.jsx)(s.code,{children:"World"})," should have access to.\nAs this is a very important invariance, we made it explicit in a requirement check in every ",(0,l.jsx)(s.code,{children:"World"})," method, rather than just relying on making it impossible to trigger the ",(0,l.jsx)(s.code,{children:"World"})," to call itself."]}),"\n",(0,l.jsxs)(s.p,{children:["This is a breaking change for modules that previously used external calls to the ",(0,l.jsx)(s.code,{children:"World"})," in the ",(0,l.jsx)(s.code,{children:"installRoot"})," method.\nIn the ",(0,l.jsx)(s.code,{children:"installRoot"})," method, the ",(0,l.jsx)(s.code,{children:"World"})," can only be called via ",(0,l.jsx)(s.code,{children:"delegatecall"}),", and table operations should be performed via the internal table methods (e.g. ",(0,l.jsx)(s.code,{children:"_set"})," instead of ",(0,l.jsx)(s.code,{children:"set"}),")."]}),"\n",(0,l.jsxs)(s.p,{children:["Example for how to replace external calls to ",(0,l.jsx)(s.code,{children:"world"})," in root systems / root modules (",(0,l.jsx)(s.code,{children:"installRoot"}),") with ",(0,l.jsx)(s.code,{children:"delegatecall"}),":"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- world.grantAccess(tableId, address(hook));"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ (bool success, bytes memory returnData) = address(world).delegatecall("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   abi.encodeCall(world.grantAccess, (tableId, address(hook)))"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ );"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ if (!success) revertWithBytes(returnData);"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/07dd6f32c9bb9f0e807bac3586c5cc9833f14ab9",children:"feat: rename schema to valueSchema (#1482)"})})," (@latticexyz/cli, @latticexyz/protocol-parser, @latticexyz/store-sync, @latticexyz/store, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed all occurrences of ",(0,l.jsx)(s.code,{children:"schema"}),' where it is used as "value schema" to ',(0,l.jsx)(s.code,{children:"valueSchema"}),' to clearly distinguish it from "key schema".\nThe only breaking change for users is the change from ',(0,l.jsx)(s.code,{children:"schema"})," to ",(0,l.jsx)(s.code,{children:"valueSchema"})," in ",(0,l.jsx)(s.code,{children:"mud.config.ts"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"// mud.config.ts"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"export default mudConfig({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  tables: {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    CounterTable: {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      keySchema: {},"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-     schema: {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+     valueSchema: {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'        value: "uint32",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      },"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    },"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c07fa021501ff92be35c0491dd89bbb8161e1c07",children:"refactor(world): move codegen files (#1592)"})})," (@latticexyz/cli, @latticexyz/world-modules, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Tables and interfaces in the ",(0,l.jsx)(s.code,{children:"world"})," package are now generated to the ",(0,l.jsx)(s.code,{children:"codegen"})," folder.\nThis is only a breaking change if you imported tables or codegenerated interfaces from ",(0,l.jsx)(s.code,{children:"@latticexyz/world"})," directly.\nIf you're using the MUD CLI, the changed import paths are already integrated and no further changes are necessary."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { IBaseWorld } from "@latticexyz/world/src/interfaces/IBaseWorld.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/65c9546c4ee8a410b21d032f02b0050442152e7e",children:"refactor(store): always render field methods with suffix and conditionally without (#1550)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"renderWithFieldSuffix"})," helper method to always render a field function with a suffix, and optionally render the same function without a suffix."]}),"\n",(0,l.jsxs)(s.li,{children:["Remove ",(0,l.jsx)(s.code,{children:"methodNameSuffix"})," from ",(0,l.jsx)(s.code,{children:"RenderField"})," interface, because the suffix is now computed as part of ",(0,l.jsx)(s.code,{children:"renderWithFieldSuffix"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/331dbfdcbbda404de4b0fd4d439d636ae2033853",children:"feat(store,): add splice events (#1354)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:'We\'ve updated Store events to be "schemaless", meaning there is enough information in each event to only need to operate on the bytes of each record to make an update to that record without having to first decode the record by its schema. This enables new kinds of indexers and sync strategies.'}),"\n",(0,l.jsx)(s.p,{children:"If you've written your own sync logic or are interacting with Store calls directly, this is a breaking change. We have a few more breaking protocol changes upcoming, so you may hold off on upgrading until those land."}),"\n",(0,l.jsx)(s.p,{children:"If you are using MUD's built-in tooling (table codegen, indexer, store sync, etc.), you don't have to make any changes except upgrading to the latest versions and deploying a fresh World."}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"data"})," field in each ",(0,l.jsx)(s.code,{children:"StoreSetRecord"})," and ",(0,l.jsx)(s.code,{children:"StoreEphemeralRecord"})," has been replaced with three new fields: ",(0,l.jsx)(s.code,{children:"staticData"}),", ",(0,l.jsx)(s.code,{children:"encodedLengths"}),", and ",(0,l.jsx)(s.code,{children:"dynamicData"}),". This better reflects the on-chain state and makes it easier to perform modifications to the raw bytes. We recommend storing each of these fields individually in your off-chain storage of choice (indexer, client, etc.)."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- event StoreSetRecord(bytes32 tableId, bytes32[] keyTuple, bytes data);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ event StoreSetRecord(bytes32 tableId, bytes32[] keyTuple, bytes staticData, bytes32 encodedLengths, bytes dynamicData);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- event StoreEphemeralRecord(bytes32 tableId, bytes32[] keyTuple, bytes data);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ event StoreEphemeralRecord(bytes32 tableId, bytes32[] keyTuple, bytes staticData, bytes32 encodedLengths, bytes dynamicData);"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"StoreSetField"})," event is now replaced by two new events: ",(0,l.jsx)(s.code,{children:"StoreSpliceStaticData"})," and ",(0,l.jsx)(s.code,{children:"StoreSpliceDynamicData"}),". Splicing allows us to perform efficient operations like push and pop, in addition to replacing a field value. We use two events because updating a dynamic-length field also requires updating the record's ",(0,l.jsx)(s.code,{children:"encodedLengths"})," (aka PackedCounter)."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- event StoreSetField(bytes32 tableId, bytes32[] keyTuple, uint8 fieldIndex, bytes data);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ event StoreSpliceStaticData(bytes32 tableId, bytes32[] keyTuple, uint48 start, uint40 deleteCount, bytes data);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ event StoreSpliceDynamicData(bytes32 tableId, bytes32[] keyTuple, uint48 start, uint40 deleteCount, bytes data, bytes32 encodedLengths);"})})]})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["Similarly, Store setter methods (e.g. ",(0,l.jsx)(s.code,{children:"setRecord"}),") have been updated to reflect the ",(0,l.jsx)(s.code,{children:"data"})," to ",(0,l.jsx)(s.code,{children:"staticData"}),", ",(0,l.jsx)(s.code,{children:"encodedLengths"}),", and ",(0,l.jsx)(s.code,{children:"dynamicData"})," changes. We'll be following up shortly with Store getter method changes for more gas efficient storage reads."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/f9f9609ef69d7fa58cad6a9af3fe6d2eed6d8aa2",children:["refactor(store): change argument order on ",(0,l.jsx)(s.code,{children:"Store_SpliceDynamicData"})," and hooks for consistency (#1589)"]})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["The argument order on ",(0,l.jsx)(s.code,{children:"Store_SpliceDynamicData"}),", ",(0,l.jsx)(s.code,{children:"onBeforeSpliceDynamicData"})," and ",(0,l.jsx)(s.code,{children:"onAfterSpliceDynamicData"})," has been changed to match the argument order on ",(0,l.jsx)(s.code,{children:"Store_SetRecord"}),",\nwhere the ",(0,l.jsx)(s.code,{children:"PackedCounter encodedLength"})," field comes before the ",(0,l.jsx)(s.code,{children:"bytes dynamicData"})," field."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IStore {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  event Store_SpliceDynamicData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId indexed tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint48 start,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   PackedCounter encodedLengths,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   PackedCounter encodedLengths"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  );"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IStoreHook {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function onBeforeSpliceDynamicData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint8 dynamicFieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint40 startWithinField,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   PackedCounter encodedLengths,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes memory data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   PackedCounter encodedLengths"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function onAfterSpliceDynamicData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint8 dynamicFieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint40 startWithinField,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   PackedCounter encodedLengths,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes memory data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   PackedCounter encodedLengths"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/331dbfdcbbda404de4b0fd4d439d636ae2033853",children:"feat(store,): add splice events (#1354)"})})," (@latticexyz/common, @latticexyz/protocol-parser)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"readHex"})," was moved from ",(0,l.jsx)(s.code,{children:"@latticexyz/protocol-parser"})," to ",(0,l.jsx)(s.code,{children:"@latticexyz/common"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/759514d8b980fa5fe49a4ef919d8008b215f2af8",children:"feat(store,world): move hooks to bit flags (#1527)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Moved the registration of store hooks and systems hooks to bitmaps with bitwise operator instead of a struct."}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { StoreHookLib } from "@latticexyz/src/StoreHook.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ import {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   BEFORE_SET_RECORD,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   BEFORE_SET_FIELD,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   BEFORE_DELETE_RECORD"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ } from "@latticexyz/store/storeHookTypes.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  StoreCore.registerStoreHook("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    subscriber,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   StoreHookLib.encodeBitmap({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-     onBeforeSetRecord: true,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-     onAfterSetRecord: false,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-     onBeforeSetField: true,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-     onAfterSetField: false,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-     onBeforeDeleteRecord: true,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-     onAfterDeleteRecord: false"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   })"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   BEFORE_SET_RECORD | BEFORE_SET_FIELD | BEFORE_DELETE_RECORD"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  );"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { SystemHookLib } from "../src/SystemHook.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { BEFORE_CALL_SYSTEM, AFTER_CALL_SYSTEM } from "../src/systemHookTypes.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  world.registerSystemHook("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    systemId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    subscriber,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   SystemHookLib.encodeBitmap({ onBeforeCallSystem: true, onAfterCallSystem: true })"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   BEFORE_CALL_SYSTEM | AFTER_CALL_SYSTEM"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  );"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/d5094a2421cf2882a317e3ad9600c8de004b20d4",children:"feat(store,world): add splice hooks, expose spliceStaticData, spliceDynamicData (#1531)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"IStoreHook"})," interface was changed to replace ",(0,l.jsx)(s.code,{children:"onBeforeSetField"})," and ",(0,l.jsx)(s.code,{children:"onAfterSetField"})," with ",(0,l.jsx)(s.code,{children:"onBeforeSpliceStaticData"}),", ",(0,l.jsx)(s.code,{children:"onAfterSpliceStaticData"}),", ",(0,l.jsx)(s.code,{children:"onBeforeSpliceDynamicData"})," and ",(0,l.jsx)(s.code,{children:"onAfterSpliceDynamicData"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["This new interface matches the new ",(0,l.jsx)(s.code,{children:"StoreSpliceStaticData"})," and ",(0,l.jsx)(s.code,{children:"StoreSpliceDynamicData"})," events, and avoids having to read the entire field from storage when only a subset of the field was updated\n(e.g. when pushing elements to a field)."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"interface IStoreHook {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function onBeforeSetField("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   uint8 fieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   bytes memory data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   FieldLayout fieldLayout"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function onAfterSetField("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   uint8 fieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   bytes memory data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   FieldLayout fieldLayout"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function onBeforeSpliceStaticData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint48 start,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes memory data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function onAfterSpliceStaticData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint48 start,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes memory data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function onBeforeSpliceDynamicData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint8 dynamicFieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint40 startWithinField,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes memory data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   PackedCounter encodedLengths"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function onAfterSpliceDynamicData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint8 dynamicFieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint40 startWithinField,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes memory data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   PackedCounter encodedLengths"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["All ",(0,l.jsx)(s.code,{children:"calldata"})," parameters on the ",(0,l.jsx)(s.code,{children:"IStoreHook"})," interface were changed to ",(0,l.jsx)(s.code,{children:"memory"}),", since the functions are called with ",(0,l.jsx)(s.code,{children:"memory"})," from the ",(0,l.jsx)(s.code,{children:"World"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"IStore"})," exposes two new functions: ",(0,l.jsx)(s.code,{children:"spliceStaticData"})," and ",(0,l.jsx)(s.code,{children:"spliceDynamicData"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["These functions provide lower level access to the operations happening under the hood in ",(0,l.jsx)(s.code,{children:"setField"}),", ",(0,l.jsx)(s.code,{children:"pushToField"}),", ",(0,l.jsx)(s.code,{children:"popFromField"})," and ",(0,l.jsx)(s.code,{children:"updateInField"})," and simplify handling\nthe new splice hooks."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"StoreCore"}),"'s internal logic was simplified to use the ",(0,l.jsx)(s.code,{children:"spliceStaticData"})," and ",(0,l.jsx)(s.code,{children:"spliceDynamicData"})," functions instead of duplicating similar logic in different functions."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Splice data in the static part of the record"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"spliceStaticData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" tableId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" keyTuple"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint48"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" start"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint40"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" deleteCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Splice data in the dynamic part of the record"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"spliceDynamicData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" tableId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" keyTuple"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint8"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dynamicFieldIndex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint40"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" startWithinField"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint40"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" deleteCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/de151fec07b63a6022483c1ad133c556dd44992e",children:"feat: replace Schema with FieldLayout for contract internals (#1336)"})})," (@latticexyz/cli, @latticexyz/protocol-parser, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Add ",(0,l.jsx)(s.code,{children:"FieldLayout"}),", which is a ",(0,l.jsx)(s.code,{children:"bytes32"})," user-type similar to ",(0,l.jsx)(s.code,{children:"Schema"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["Both ",(0,l.jsx)(s.code,{children:"FieldLayout"})," and ",(0,l.jsx)(s.code,{children:"Schema"})," have the same kind of data in the first 4 bytes."]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"2 bytes for total length of all static fields"}),"\n",(0,l.jsx)(s.li,{children:"1 byte for number of static size fields"}),"\n",(0,l.jsx)(s.li,{children:"1 byte for number of dynamic size fields"}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["But whereas ",(0,l.jsx)(s.code,{children:"Schema"})," has ",(0,l.jsx)(s.code,{children:"SchemaType"})," enum in each of the other 28 bytes, ",(0,l.jsx)(s.code,{children:"FieldLayout"})," has static byte lengths in each of the other 28 bytes."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Replace ",(0,l.jsx)(s.code,{children:"Schema valueSchema"})," with ",(0,l.jsx)(s.code,{children:"FieldLayout fieldLayout"})," in Store and World contracts."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"FieldLayout"})," is more gas-efficient because it already has lengths, and ",(0,l.jsx)(s.code,{children:"Schema"})," has types which need to be converted to lengths."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Add ",(0,l.jsx)(s.code,{children:"getFieldLayout"})," to ",(0,l.jsx)(s.code,{children:"IStore"})," interface."]}),"\n",(0,l.jsxs)(s.p,{children:["There is no ",(0,l.jsx)(s.code,{children:"FieldLayout"})," for keys, only for values, because key byte lengths aren't usually relevant on-chain. You can still use ",(0,l.jsx)(s.code,{children:"getKeySchema"})," if you need key types."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Add ",(0,l.jsx)(s.code,{children:"fieldLayoutToHex"})," utility to ",(0,l.jsx)(s.code,{children:"protocol-parser"})," package."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Add ",(0,l.jsx)(s.code,{children:"constants.sol"})," for constants shared between ",(0,l.jsx)(s.code,{children:"FieldLayout"}),", ",(0,l.jsx)(s.code,{children:"Schema"})," and ",(0,l.jsx)(s.code,{children:"PackedCounter"}),"."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/ae340b2bfd98f4812ed3a94c746af3611645a623",children:"refactor: separate data into staticData, encodedLengths, dynamicData in getRecord (#1532)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Store's ",(0,l.jsx)(s.code,{children:"getRecord"})," has been updated to return ",(0,l.jsx)(s.code,{children:"staticData"}),", ",(0,l.jsx)(s.code,{children:"encodedLengths"}),", and ",(0,l.jsx)(s.code,{children:"dynamicData"})," instead of a single ",(0,l.jsx)(s.code,{children:"data"})," blob, to match the new behaviour of Store setter methods."]}),"\n",(0,l.jsxs)(s.p,{children:["If you use codegenerated libraries, you will only need to update ",(0,l.jsx)(s.code,{children:"encode"})," calls."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bytes memory data = Position.encode(x, y);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ (bytes memory staticData, PackedCounter encodedLengths, bytes memory dynamicData) = Position.encode(x, y);"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/e5d208e40b2b2fae223b48716ce3f62c530ea1ca",children:["feat(world): add ",(0,l.jsx)(s.code,{children:"FunctionSignatures"})," offchain table (#1575)"]})})," (@latticexyz/cli, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"registerRootFunctionSelector"})," function's signature was changed to accept a ",(0,l.jsx)(s.code,{children:"string functionSignature"})," parameter instead of a ",(0,l.jsx)(s.code,{children:"bytes4 functionSelector"})," parameter.\nThis change enables the ",(0,l.jsx)(s.code,{children:"World"})," to store the function signatures of all registered functions in a ",(0,l.jsx)(s.code,{children:"FunctionSignatures"})," offchain table, which will allow for the automatic generation of interfaces for a given ",(0,l.jsx)(s.code,{children:"World"})," address in the future."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IBaseWorld {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function registerRootFunctionSelector("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId systemId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   bytes4 worldFunctionSelector,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   string memory worldFunctionSignature,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes4 systemFunctionSelector"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external returns (bytes4 worldFunctionSelector);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/83583a5053de4e5e643572e3b1c0f49467e8e2ab",children:"feat: move forge build + abi + abi-ts to out (#1483)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Store and World contract ABIs are now exported from the ",(0,l.jsx)(s.code,{children:"out"})," directory. You'll need to update your imports like:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import IBaseWorldAbi from "@latticexyz/world/abi/IBaseWorld.sol/IBaseWorldAbi.json";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorldAbi.json";'})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"MudTest.sol"})," was also moved to the World package. You can update your import like:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { MudTest } from "@latticexyz/store/src/MudTest.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";'})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/44a5432acb9c5af3dca1447c50219a00894c45a9",children:"feat(common,store): add support for user-defined types (#1566)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["These breaking changes only affect store utilities, you aren't affected if you use ",(0,l.jsx)(s.code,{children:"@latticexyz/cli"})," codegen scripts."]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"remappings"})," argument to the ",(0,l.jsx)(s.code,{children:"tablegen"})," codegen function, so that it can read user-provided files."]}),"\n",(0,l.jsxs)(s.li,{children:["In ",(0,l.jsx)(s.code,{children:"RenderTableOptions"})," change the type of ",(0,l.jsx)(s.code,{children:"imports"})," from ",(0,l.jsx)(s.code,{children:"RelativeImportDatum"})," to ",(0,l.jsx)(s.code,{children:"ImportDatum"}),", to allow passing absolute imports to the table renderer."]}),"\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"solidityUserTypes"})," argument to several functions that need to resolve user or abi types: ",(0,l.jsx)(s.code,{children:"resolveAbiOrUserType"}),", ",(0,l.jsx)(s.code,{children:"importForAbiOrUserType"}),", ",(0,l.jsx)(s.code,{children:"getUserTypeInfo"}),"."]}),"\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"userTypes"})," config option to MUD config, which takes user types mapped to file paths from which to import them."]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/65c9546c4ee8a410b21d032f02b0050442152e7e",children:"refactor(store): always render field methods with suffix and conditionally without (#1550)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Always render field methods with a suffix in tablegen (they used to not be rendered if field methods without a suffix were rendered)."}),"\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"withSuffixlessFieldMethods"})," to ",(0,l.jsx)(s.code,{children:"RenderTableOptions"}),", which indicates that field methods without a suffix should be rendered."]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/672d05ca130649bd90df337c2bf03204a5878840",children:"refactor(store,world): move around interfaces and base contracts (#1602)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Moves Store events into its own ",(0,l.jsx)(s.code,{children:"IStoreEvents"})," interface"]}),"\n",(0,l.jsx)(s.li,{children:"Moves Store interfaces to their own files"}),"\n",(0,l.jsxs)(s.li,{children:["Adds a ",(0,l.jsx)(s.code,{children:"StoreData"})," abstract contract to initialize a Store and expose the Store version"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"If you're using MUD out of the box, you won't have to make any changes. You will only need to update if you're using any of the base Store interfaces."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/31ffc9d5d0a6d030cc61349f0f8fbcf6748ebc48",children:"feat(world): change registerFunctionSelector signature to accept system signature as a single string (#1574)"})})," (@latticexyz/cli, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"registerFunctionSelector"})," function now accepts a single ",(0,l.jsx)(s.code,{children:"functionSignature"})," string paramemer instead of separating function name and function arguments into separate parameters."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IBaseWorld {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function registerFunctionSelector("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId systemId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   string memory systemFunctionName,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   string memory systemFunctionArguments"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   string memory systemFunctionSignature"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external returns (bytes4 worldFunctionSelector);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["This is a breaking change if you were manually registering function selectors, e.g. in a ",(0,l.jsx)(s.code,{children:"PostDeploy.s.sol"})," script or a module.\nTo upgrade, simply replace the separate ",(0,l.jsx)(s.code,{children:"systemFunctionName"})," and ",(0,l.jsx)(s.code,{children:"systemFunctionArguments"})," parameters with a single ",(0,l.jsx)(s.code,{children:"systemFunctionSignature"})," parameter."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  world.registerFunctionSelector("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    systemId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   systemFunctionName,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   systemFunctionArguments,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   string(abi.encodePacked(systemFunctionName, systemFunctionArguments))"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  );"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/5e723b90e6b18bc70d357ff4b0a1b217611236ae",children:["feat(store,world): replace ",(0,l.jsx)(s.code,{children:"ResourceSelector"})," with ",(0,l.jsx)(s.code,{children:"ResourceId"})," and ",(0,l.jsx)(s.code,{children:"WorldResourceId"})," (#1544)"]})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["All ",(0,l.jsx)(s.code,{children:"World"})," methods acting on namespaces as resources have been updated to use ",(0,l.jsx)(s.code,{children:"ResourceId namespaceId"})," as parameter instead of ",(0,l.jsx)(s.code,{children:"bytes14 namespace"}),".\nThe reason for this change is to make it clearer when a namespace is used as resource, as opposed to being part of another resource's ID."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IBaseWorld {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function registerNamespace(bytes14 namespace) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function registerNamespace(ResourceId namespaceId) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function transferOwnership(bytes14 namespace, address newOwner) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function transferOwnership(ResourceId namespaceId, address newOwner) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function transferBalanceToNamespace(bytes14 fromNamespace, bytes14 toNamespace, uint256 amount) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function transferBalanceToNamespace(ResourceId fromNamespaceId, ResourceId toNamespaceId, uint256 amount) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function transferBalanceToAddress(bytes14 fromNamespace, address toAddress, uint256 amount) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function transferBalanceToAddress(ResourceId fromNamespaceId, address toAddress, uint256 amount) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/92de59982fb9fc4e00e50c4a5232ed541f3ce71a",children:"feat: bump solidity to 0.8.21 (#1473)"})})," (@latticexyz/cli, @latticexyz/common, @latticexyz/gas-report, @latticexyz/noise, @latticexyz/schema-type, @latticexyz/store, @latticexyz/world, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"Bump Solidity version to 0.8.21"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/5741d53d0a39990a0d7b2842f1f012973655e060",children:["feat(world): add ",(0,l.jsx)(s.code,{children:"batchCallFrom"})," (#1594)"]})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"IBaseWorld"})," now has a ",(0,l.jsx)(s.code,{children:"batchCallFrom"})," method, which allows system calls via ",(0,l.jsx)(s.code,{children:"callFrom"})," to be executed in batch."]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SystemCallFromData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world/modules/core/types.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IBaseWorld"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"batchCallFrom"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"SystemCallFromData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemCalls) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" returnDatas);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["The ",(0,l.jsx)(s.code,{children:"callBatch"})," method of ",(0,l.jsx)(s.code,{children:"IBaseWorld"})," has been renamed to ",(0,l.jsx)(s.code,{children:"batchCall"})," to align better with the ",(0,l.jsx)(s.code,{children:"batchCallFrom"})," method."]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"interface IBaseWorld {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function callBatch(SystemCallData[] calldata systemCalls) external returns (bytes[] memory returnDatas);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function batchCall(SystemCallData[] calldata systemCalls) external returns (bytes[] memory returnDatas);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/ac508bf189b098e66b59a725f58a2008537be130",children:"feat(store): codegen index and common files (#1318)"})})," (@latticexyz/cli, @latticexyz/store, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed the default filename of generated user types from ",(0,l.jsx)(s.code,{children:"Types.sol"})," to ",(0,l.jsx)(s.code,{children:"common.sol"})," and the default filename of the generated table index file from ",(0,l.jsx)(s.code,{children:"Tables.sol"})," to ",(0,l.jsx)(s.code,{children:"index.sol"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"Both can be overridden via the MUD config:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"mudConfig"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"/** Filename where common user types will be generated and imported from. */"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  userTypesFilename"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"common.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"/** Filename where codegen index will be generated. */"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  codegenIndexFilename"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"index.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["Note: ",(0,l.jsx)(s.code,{children:"userTypesFilename"})," was renamed from ",(0,l.jsx)(s.code,{children:"userTypesPath"})," and ",(0,l.jsx)(s.code,{children:".sol"})," is not appended automatically anymore but needs to be part of the provided filename."]}),"\n",(0,l.jsxs)(s.p,{children:["To update your existing project, update all imports from ",(0,l.jsx)(s.code,{children:"Tables.sol"})," to ",(0,l.jsx)(s.code,{children:"index.sol"})," and all imports from ",(0,l.jsx)(s.code,{children:"Types.sol"})," to ",(0,l.jsx)(s.code,{children:"common.sol"}),", or override the defaults in your MUD config to the previous values."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { Counter } from "../src/codegen/Tables.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { Counter } from "../src/codegen/index.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { ExampleEnum } from "../src/codegen/Types.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { ExampleEnum } from "../src/codegen/common.sol";'})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/331dbfdcbbda404de4b0fd4d439d636ae2033853",children:"feat(store,): add splice events (#1354)"})})," (@latticexyz/dev-tools, @latticexyz/store-sync, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:'We\'ve updated Store events to be "schemaless", meaning there is enough information in each event to only need to operate on the bytes of each record to make an update to that record without having to first decode the record by its schema. This enables new kinds of indexers and sync strategies.'}),"\n",(0,l.jsxs)(s.p,{children:["As such, we've replaced ",(0,l.jsx)(s.code,{children:"blockStorageOperations$"})," with ",(0,l.jsx)(s.code,{children:"storedBlockLogs$"}),', a stream of simplified Store event logs after they\'ve been synced to the configured storage adapter. These logs may not reflect exactly the events that are on chain when e.g. hydrating from an indexer, but they will still allow the client to "catch up" to the on-chain state of your tables.']}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/bfcb293d1931edde7f8a3e077f6f555a26fd1d2f",children:["feat(store,world): replace ",(0,l.jsx)(s.code,{children:"ephemeral"})," tables with ",(0,l.jsx)(s.code,{children:"offchain"})," tables (#1558)"]})})," (@latticexyz/block-logs-stream, @latticexyz/cli, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/store-sync, @latticexyz/store, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["What used to be known as ",(0,l.jsx)(s.code,{children:"ephemeral"})," table is now called ",(0,l.jsx)(s.code,{children:"offchain"})," table.\nThe previous ",(0,l.jsx)(s.code,{children:"ephemeral"})," tables only supported an ",(0,l.jsx)(s.code,{children:"emitEphemeral"})," method, which emitted a ",(0,l.jsx)(s.code,{children:"StoreSetEphemeralRecord"})," event."]}),"\n",(0,l.jsxs)(s.p,{children:["Now ",(0,l.jsx)(s.code,{children:"offchain"})," tables support all regular table methods, except partial operations on dynamic fields (",(0,l.jsx)(s.code,{children:"push"}),", ",(0,l.jsx)(s.code,{children:"pop"}),", ",(0,l.jsx)(s.code,{children:"update"}),").\nUnlike regular tables they don't store data on-chain but emit the same events as regular tables (",(0,l.jsx)(s.code,{children:"StoreSetRecord"}),", ",(0,l.jsx)(s.code,{children:"StoreSpliceStaticData"}),", ",(0,l.jsx)(s.code,{children:"StoreDeleteRecord"}),"), so their data can be indexed by offchain indexers/clients."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- EphemeralTable.emitEphemeral(value);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ OffchainTable.set(value);"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/1890f1a0603982477bfde1b7335969f51e2dce70",children:["refactor(store,world): move store tables to ",(0,l.jsx)(s.code,{children:"store"})," namespace, world tables to ",(0,l.jsx)(s.code,{children:"world"})," namespace (#1601)"]})})," (@latticexyz/store-sync, @latticexyz/store, @latticexyz/world-modules, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Moved ",(0,l.jsx)(s.code,{children:"store"})," tables to the ",(0,l.jsx)(s.code,{children:'"store"'}),' namespace (previously "mudstore") and ',(0,l.jsx)(s.code,{children:"world"})," tables to the ",(0,l.jsx)(s.code,{children:'"world"'})," namespace (previously root namespace)."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/af639a26446ca4b689029855767f8a723557f62c",children:"feat(store): rename events for readability and consistency with errors (#1577)"})})," (@latticexyz/block-logs-stream, @latticexyz/dev-tools, @latticexyz/store-sync, @latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"Store"})," events have been renamed for consistency and readability.\nIf you're parsing ",(0,l.jsx)(s.code,{children:"Store"})," events manually, you need to update your ABI.\nIf you're using the MUD sync stack, the new events are already integrated and no further changes are necessary."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- event StoreSetRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ event Store_SetRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId indexed tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes staticData,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32 encodedLengths,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes dynamicData"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  );"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- event StoreSpliceStaticData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ event Store_SpliceStaticData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId indexed tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint48 start,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  );"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- event StoreSpliceDynamicData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ event Store_SpliceDynamicData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId indexed tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint48 start,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32 encodedLengths"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  );"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- event StoreDeleteRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ event Store_DeleteRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId indexed tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] keyTuple"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  );"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/5e723b90e6b18bc70d357ff4b0a1b217611236ae",children:["feat(store,world): replace ",(0,l.jsx)(s.code,{children:"ResourceSelector"})," with ",(0,l.jsx)(s.code,{children:"ResourceId"})," and ",(0,l.jsx)(s.code,{children:"WorldResourceId"})," (#1544)"]})})," (@latticexyz/cli, @latticexyz/common, @latticexyz/config, @latticexyz/store)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"ResourceSelector"})," is replaced with ",(0,l.jsx)(s.code,{children:"ResourceId"}),", ",(0,l.jsx)(s.code,{children:"ResourceIdLib"}),", ",(0,l.jsx)(s.code,{children:"ResourceIdInstance"}),", ",(0,l.jsx)(s.code,{children:"WorldResourceIdLib"})," and ",(0,l.jsx)(s.code,{children:"WorldResourceIdInstance"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:['Previously a "resource selector" was a ',(0,l.jsx)(s.code,{children:"bytes32"})," value with the first 16 bytes reserved for the resource's namespace, and the last 16 bytes reserved for the resource's name.\nNow a \"resource ID\" is a ",(0,l.jsx)(s.code,{children:"bytes32"})," value with the first 2 bytes reserved for the resource type, the next 14 bytes reserved for the resource's namespace, and the last 16 bytes reserved for the resource's name."]}),"\n",(0,l.jsxs)(s.p,{children:["Previously ",(0,l.jsx)(s.code,{children:"ResouceSelector"})," was a library and the resource selector type was a plain ",(0,l.jsx)(s.code,{children:"bytes32"}),".\nNow ",(0,l.jsx)(s.code,{children:"ResourceId"})," is a user type, and the functionality is implemented in the ",(0,l.jsx)(s.code,{children:"ResourceIdInstance"})," (for type) and ",(0,l.jsx)(s.code,{children:"WorldResourceIdInstance"})," (for namespace and name) libraries.\nWe split the logic into two libraries, because ",(0,l.jsx)(s.code,{children:"Store"})," now also uses ",(0,l.jsx)(s.code,{children:"ResourceId"})," and needs to be aware of resource types, but not of namespaces/names."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { ResourceSelector } from "@latticexyz/world/src/ResourceSelector.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { ResourceId, ResourceIdInstance } from "@latticexyz/store/src/ResourceId.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { WorldResourceIdLib, WorldResourceIdInstance } from "@latticexyz/world/src/WorldResourceId.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { RESOURCE_SYSTEM } from "@latticexyz/world/src/worldResourceTypes.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- bytes32 systemId = ResourceSelector.from("namespace", "name");'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ ResourceId systemId = WorldResourceIdLib.encode(RESOURCE_SYSTEM, "namespace", "name");'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- using ResourceSelector for bytes32;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ using WorldResourceIdInstance for ResourceId;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ using ResourceIdInstance for ResourceId;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  systemId.getName();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  systemId.getNamespace();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ systemId.getType();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["All ",(0,l.jsx)(s.code,{children:"Store"})," and ",(0,l.jsx)(s.code,{children:"World"})," methods now use the ",(0,l.jsx)(s.code,{children:"ResourceId"})," type for ",(0,l.jsx)(s.code,{children:"tableId"}),", ",(0,l.jsx)(s.code,{children:"systemId"}),", ",(0,l.jsx)(s.code,{children:"moduleId"})," and ",(0,l.jsx)(s.code,{children:"namespaceId"}),".\nAll mentions of ",(0,l.jsx)(s.code,{children:"resourceSelector"})," were renamed to ",(0,l.jsx)(s.code,{children:"resourceId"})," or the more specific type (e.g. ",(0,l.jsx)(s.code,{children:"tableId"}),", ",(0,l.jsx)(s.code,{children:"systemId"}),")"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IStore {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function setRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] calldata keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes calldata staticData,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    PackedCounter encodedLengths,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes calldata dynamicData,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    FieldLayout fieldLayout"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  // Same for all other methods"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IBaseWorld {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function callFrom("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    address delegator,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   bytes32 resourceSelector,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   ResourceId systemId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes memory callData"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external payable returns (bytes memory);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  // Same for all other methods"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/99ab9cd6fff1a732b47d63ead894292661682380",children:["feat(store): indexed ",(0,l.jsx)(s.code,{children:"tableId"})," in store events (#1520)"]})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Store events now use an ",(0,l.jsx)(s.code,{children:"indexed"})," ",(0,l.jsx)(s.code,{children:"tableId"}),". This adds ~100 gas per write, but means we our sync stack can filter events by table."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c049c23f48b93ac7881fb1a5a8417831611d5cbf",children:"feat(world,store): add initialize method, initialize core tables in core module (#1472)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"StoreCore"}),"'s ",(0,l.jsx)(s.code,{children:"initialize"})," function is split into ",(0,l.jsx)(s.code,{children:"initialize"})," (to set the ",(0,l.jsx)(s.code,{children:"StoreSwitch"}),"'s ",(0,l.jsx)(s.code,{children:"storeAddress"}),") and ",(0,l.jsx)(s.code,{children:"registerCoreTables"})," (to register the ",(0,l.jsx)(s.code,{children:"Tables"})," and ",(0,l.jsx)(s.code,{children:"StoreHooks"})," tables).\nThe purpose of this is to give consumers more granular control over the setup flow."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"StoreRead"})," contract no longer calls ",(0,l.jsx)(s.code,{children:"StoreCore.initialize"})," in its constructor.\n",(0,l.jsx)(s.code,{children:"StoreCore"})," consumers are expected to call ",(0,l.jsx)(s.code,{children:"StoreCore.initialize"})," and ",(0,l.jsx)(s.code,{children:"StoreCore.registerCoreTable"})," in their own setup logic."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/24a6cd536f0c31cab93fb7644751cb9376be383d",children:["feat(store): add ",(0,l.jsx)(s.code,{children:"internalType"})," property to user types config for type inference (#1587)"]})})," (@latticexyz/cli, @latticexyz/common, @latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Changed the ",(0,l.jsx)(s.code,{children:"userTypes"})," property to accept ",(0,l.jsx)(s.code,{children:"{ filePath: string, internalType: SchemaAbiType }"})," to enable strong type inference from the config."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/251170e1ef0b07466c597ea84df0cb49de7d6a23",children:["refactor(world,world-modules): move optional modules from ",(0,l.jsx)(s.code,{children:"world"})," to ",(0,l.jsx)(s.code,{children:"world-modules"})," package (#1591)"]})})," (@latticexyz/cli, @latticexyz/world, @latticexyz/world-modules)"]}),"\n",(0,l.jsxs)(s.p,{children:["All optional modules have been moved from ",(0,l.jsx)(s.code,{children:"@latticexyz/world"})," to ",(0,l.jsx)(s.code,{children:"@latticexyz/world-modules"}),".\nIf you're using the MUD CLI, the import is already updated and no changes are necessary."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/cea754dde0d8abf7392e93faa319b260956ae92b",children:"feat(store,world): polish store methods (#1581)"})})," (@latticexyz/block-logs-stream, @latticexyz/cli, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/store-sync, @latticexyz/store, @latticexyz/world, create-mud)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The external ",(0,l.jsx)(s.code,{children:"setRecord"})," and ",(0,l.jsx)(s.code,{children:"deleteRecord"})," methods of ",(0,l.jsx)(s.code,{children:"IStore"})," no longer accept a ",(0,l.jsx)(s.code,{children:"FieldLayout"})," as input, but load it from storage instead.\nThis is to prevent invalid ",(0,l.jsx)(s.code,{children:"FieldLayout"})," values being passed, which could cause the onchain state to diverge from the indexer state.\nHowever, the internal ",(0,l.jsx)(s.code,{children:"StoreCore"})," library still exposes a ",(0,l.jsx)(s.code,{children:"setRecord"})," and ",(0,l.jsx)(s.code,{children:"deleteRecord"})," method that allows a ",(0,l.jsx)(s.code,{children:"FieldLayout"})," to be passed.\nThis is because ",(0,l.jsx)(s.code,{children:"StoreCore"})," can only be used internally, so the ",(0,l.jsx)(s.code,{children:"FieldLayout"})," value can be trusted and we can save the gas for accessing storage."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"interface IStore {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function setRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] calldata keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes calldata staticData,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    PackedCounter encodedLengths,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes calldata dynamicData,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   FieldLayout fieldLayout"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function deleteRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   FieldLayout fieldLayout"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"spliceStaticData"})," method and ",(0,l.jsx)(s.code,{children:"Store_SpliceStaticData"})," event of ",(0,l.jsx)(s.code,{children:"IStore"})," and ",(0,l.jsx)(s.code,{children:"StoreCore"})," no longer include ",(0,l.jsx)(s.code,{children:"deleteCount"})," in their signature.\nThis is because when splicing static data, the data after ",(0,l.jsx)(s.code,{children:"start"})," is always overwritten with ",(0,l.jsx)(s.code,{children:"data"})," instead of being shifted, so ",(0,l.jsx)(s.code,{children:"deleteCount"})," is always the length of the data to be written."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"event Store_SpliceStaticData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ResourceId indexed tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32[] keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  uint48 start,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"interface IStore {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function spliceStaticData("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] calldata keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint48 start,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   uint40 deleteCount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes calldata data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"updateInField"})," method has been removed from ",(0,l.jsx)(s.code,{children:"IStore"}),", as it's almost identical to the more general ",(0,l.jsx)(s.code,{children:"spliceDynamicData"}),".\nIf you're manually calling ",(0,l.jsx)(s.code,{children:"updateInField"}),", here is how to upgrade to ",(0,l.jsx)(s.code,{children:"spliceDynamicData"}),":"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- store.updateInField(tableId, keyTuple, fieldIndex, startByteIndex, dataToSet, fieldLayout);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ uint8 dynamicFieldIndex = fieldIndex - fieldLayout.numStaticFields();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ store.spliceDynamicData(tableId, keyTuple, dynamicFieldIndex, uint40(startByteIndex), uint40(dataToSet.length), dataToSet);"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["All other methods that are only valid for dynamic fields (",(0,l.jsx)(s.code,{children:"pushToField"}),", ",(0,l.jsx)(s.code,{children:"popFromField"}),", ",(0,l.jsx)(s.code,{children:"getFieldSlice"}),")\nhave been renamed to make this more explicit (",(0,l.jsx)(s.code,{children:"pushToDynamicField"}),", ",(0,l.jsx)(s.code,{children:"popFromDynamicField"}),", ",(0,l.jsx)(s.code,{children:"getDynamicFieldSlice"}),")."]}),"\n",(0,l.jsxs)(s.p,{children:["Their ",(0,l.jsx)(s.code,{children:"fieldIndex"})," parameter has been replaced by a ",(0,l.jsx)(s.code,{children:"dynamicFieldIndex"})," parameter, which is the index relative to the first dynamic field (i.e. ",(0,l.jsx)(s.code,{children:"dynamicFieldIndex"})," = ",(0,l.jsx)(s.code,{children:"fieldIndex"})," - ",(0,l.jsx)(s.code,{children:"numStaticFields"}),").\nThe ",(0,l.jsx)(s.code,{children:"FieldLayout"})," parameter has been removed, as it was only used to calculate the ",(0,l.jsx)(s.code,{children:"dynamicFieldIndex"})," in the method."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"interface IStore {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function pushToField("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function pushToDynamicField("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] calldata keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   uint8 fieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint8 dynamicFieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes calldata dataToPush,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   FieldLayout fieldLayout"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function popFromField("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function popFromDynamicField("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] calldata keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   uint8 fieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint8 dynamicFieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint256 byteLengthToPop,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   FieldLayout fieldLayout"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function getFieldSlice("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function getDynamicFieldSlice("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   uint8 fieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint8 dynamicFieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   FieldLayout fieldLayout,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint256 start,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    uint256 end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external view returns (bytes memory data);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"IStore"})," has a new ",(0,l.jsx)(s.code,{children:"getDynamicFieldLength"})," length method, which returns the byte length of the given dynamic field and doesn't require the ",(0,l.jsx)(s.code,{children:"FieldLayout"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IStore {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function getDynamicFieldLength("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   ResourceId tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32[] memory keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   uint8 dynamicFieldIndex"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ ) external view returns (uint256);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"IStore"})," now has additional overloads for ",(0,l.jsx)(s.code,{children:"getRecord"}),", ",(0,l.jsx)(s.code,{children:"getField"}),", ",(0,l.jsx)(s.code,{children:"getFieldLength"})," and ",(0,l.jsx)(s.code,{children:"setField"})," that don't require a ",(0,l.jsx)(s.code,{children:"FieldLength"})," to be passed, but instead load it from storage."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"IStore"})," now exposes ",(0,l.jsx)(s.code,{children:"setStaticField"})," and ",(0,l.jsx)(s.code,{children:"setDynamicField"})," to save gas by avoiding the dynamic inference of whether the field is static or dynamic."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"getDynamicFieldSlice"})," method no longer accepts reading outside the bounds of the dynamic field.\nThis is to avoid returning invalid data, as the data of a dynamic field is not deleted when the record is deleted, but only its length is set to zero."]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-8",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/24a0dd4440d6fe661640c581ff5348d62eae9302",children:"feat(dev-tools): update actions to display function name instead of callFrom (#1497)"})})," (@latticexyz/dev-tools)"]}),"\n",(0,l.jsxs)(s.p,{children:["Improved rendering of transactions that make calls via World's ",(0,l.jsx)(s.code,{children:"call"})," and ",(0,l.jsx)(s.code,{children:"callFrom"})," methods"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9940fdb3e036e03aa8ede1ca80cd44d86d3b85b7",children:"feat(faucet): add faucet service (#1517)"})})," (@latticexyz/faucet)"]}),"\n",(0,l.jsxs)(s.p,{children:["New package to run your own faucet service. We'll use this soon for our testnet in place of ",(0,l.jsx)(s.code,{children:"@latticexyz/services"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"To run the faucet server:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Add the package with ",(0,l.jsx)(s.code,{children:"pnpm add @latticexyz/faucet"})]}),"\n",(0,l.jsxs)(s.li,{children:["Add a ",(0,l.jsx)(s.code,{children:".env"})," file that has a ",(0,l.jsx)(s.code,{children:"RPC_HTTP_URL"})," and ",(0,l.jsx)(s.code,{children:"FAUCET_PRIVATE_KEY"})," (or pass the environment variables into the next command)"]}),"\n",(0,l.jsxs)(s.li,{children:["Run ",(0,l.jsx)(s.code,{children:"pnpm faucet-server"})," to start the server"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["You can also adjust the server's ",(0,l.jsx)(s.code,{children:"HOST"})," (defaults to ",(0,l.jsx)(s.code,{children:"0.0.0.0"}),") and ",(0,l.jsx)(s.code,{children:"PORT"})," (defaults to ",(0,l.jsx)(s.code,{children:"3002"}),"). The tRPC routes are accessible under ",(0,l.jsx)(s.code,{children:"/trpc"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["To connect a tRPC client, add the package with ",(0,l.jsx)(s.code,{children:"pnpm add @latticexyz/faucet"})," and then use ",(0,l.jsx)(s.code,{children:"createClient"}),":"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createClient } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/faucet"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"faucet"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ url"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"http://localhost:3002/trpc"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" });"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"faucet"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"mutate"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".drip"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"burnerAccount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".address });"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/1f80a0b52a5c2d051e3697d6e60aad7364b0a925",children:["feat(world): add ",(0,l.jsx)(s.code,{children:"registerNamespaceDelegation"})," for namespace-bound fallback delegation controls (#1590)"]})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["It is now possible for namespace owners to register a fallback delegation control system for the namespace.\nThis fallback delegation control system is used to verify a delegation in ",(0,l.jsx)(s.code,{children:"IBaseWorld.callFrom"}),", after the user's individual and fallback delegations have been checked."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"IBaseWorld {"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerNamespaceDelegation"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" namespaceId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ResourceId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delegationControlId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" initCallData"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/83583a5053de4e5e643572e3b1c0f49467e8e2ab",children:"feat: move forge build + abi + abi-ts to out (#1483)"})})," (create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Templates now use ",(0,l.jsx)(s.code,{children:"out"})," for their ",(0,l.jsx)(s.code,{children:"forge build"})," artifacts, including ABIs. If you have a project created from a previous template, you can update your ",(0,l.jsx)(s.code,{children:"packages/contracts/package.json"})," with:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- "build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- \"build:abi-ts\": \"mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'\","})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ "build:abi": "forge clean && forge build --skip test script",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ "build:abi-ts": "mud abi-ts && prettier --write \'**/*.abi.json.d.ts\'",'})})]})}),"\n",(0,l.jsxs)(s.p,{children:["And your ",(0,l.jsx)(s.code,{children:"packages/client/src/mud/setupNetwork"})," with:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import IWorldAbi from "contracts/out/IWorld.sol/IWorld.abi.json";'})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/44a5432acb9c5af3dca1447c50219a00894c45a9",children:"feat(common,store): add support for user-defined types (#1566)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"getRemappings"})," to get foundry remappings as an array of ",(0,l.jsx)(s.code,{children:"[to, from]"})," tuples."]}),"\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"extractUserTypes"})," solidity parser utility to extract user-defined types."]}),"\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"loadAndExtractUserTypes"})," helper to load and parse a solidity file, extracting user-defined types."]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/498d05e3604cd422064e5548dc53bec327e936ee",children:"feat(store-indexer): run indexers with npx (#1526)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["You can now install and run ",(0,l.jsx)(s.code,{children:"@latticexyz/store-indexer"})," from the npm package itself, without having to clone/build the MUD repo:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"sh","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"sh","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@latticexyz/store-indexer"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"sqlite-indexer"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# or"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"postgres-indexer"})]})]})}),"\n",(0,l.jsx)(s.p,{children:"or"}),"\n",(0,l.jsx)(s.pre,{"data-language":"sh","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"sh","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npx"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"-p"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@latticexyz/store-indexer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"sqlite-indexer"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# or"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npx"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"-p"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@latticexyz/store-indexer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"postgres-indexer"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:["The binary will also load the nearby ",(0,l.jsx)(s.code,{children:".env"})," file for easier local configuration."]}),"\n",(0,l.jsxs)(s.p,{children:["We've removed the ",(0,l.jsx)(s.code,{children:"CHAIN_ID"})," requirement and instead require just a ",(0,l.jsx)(s.code,{children:"RPC_HTTP_URL"})," or ",(0,l.jsx)(s.code,{children:"RPC_WS_URL"})," or both. You can now also adjust the polling interval with ",(0,l.jsx)(s.code,{children:"POLLING_INTERVAL"})," (defaults to 1000ms, which corresponds to MUD's default block time)."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/331dbfdcbbda404de4b0fd4d439d636ae2033853",children:"feat(store,): add splice events (#1354)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"spliceHex"})," was added, which has a similar API as JavaScript's ",(0,l.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice",children:(0,l.jsx)(s.code,{children:"Array.prototype.splice"})}),", but for ",(0,l.jsx)(s.code,{children:"Hex"})," strings."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"spliceHex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"0x123456"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"0x0000"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"); "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'// "0x12000056"'})]})})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9ff4dd955fd6dca36eb15cfe7e46bb522d2e943b",children:"feat(protoocl-parser): add valueSchemaToFieldLayoutHex (#1476)"})})," (@latticexyz/protocol-parser)"]}),"\n",(0,l.jsxs)(s.p,{children:["Adds ",(0,l.jsx)(s.code,{children:"valueSchemaToFieldLayoutHex"})," helper"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9b43029c3c888f8e82b146312f5c2e92321c28a7",children:"feat(store,world): emit Store/World versions (#1511)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Add protocol version with corresponding getter and event on deploy"}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"world."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"worldVersion"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"world."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"storeVersion"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(); "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// a World is also a Store"})]})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"event"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"HelloWorld"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"indexed"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" worldVersion);"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"event"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"HelloStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"indexed"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" storeVersion);"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/55ab88a60adb3ad72ebafef4d50513eb71e3c314",children:["feat(store): expose ",(0,l.jsx)(s.code,{children:"getStaticField"})," and ",(0,l.jsx)(s.code,{children:"getDynamicField"})," on ",(0,l.jsx)(s.code,{children:"IStore"})," and use it in codegen tables (#1521)"]})})," (@latticexyz/cli, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"StoreCore"})," and ",(0,l.jsx)(s.code,{children:"IStore"})," now expose specific functions for ",(0,l.jsx)(s.code,{children:"getStaticField"})," and ",(0,l.jsx)(s.code,{children:"getDynamicField"})," in addition to the general ",(0,l.jsx)(s.code,{children:"getField"}),".\nUsing the specific functions reduces gas overhead because more optimized logic can be executed."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"/**"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * Get a single static field from the given tableId and key tuple, with the given value field layout."})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"Note"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:": the field value is left-aligned in the returned bytes32, the rest of the word is not zeroed out."})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * Consumers are expected to truncate the returned value as needed."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   */"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getStaticField"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" tableId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" keyTuple"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint8"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fieldIndex"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"FieldLayout"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fieldLayout"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"view"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"/**"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * Get a single dynamic field from the given tableId and key tuple at the given dynamic field index."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * (Dynamic field index = field index - number of static fields)"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   */"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getDynamicField"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" tableId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" keyTuple"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint8"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dynamicFieldIndex"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"view"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/80dd6992e98c90a91d417fc785d0d53260df6ce2",children:"refactor(store): inline logic in codegenned set method which uses struct (#1542)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Add an optional ",(0,l.jsx)(s.code,{children:"namePrefix"})," argument to ",(0,l.jsx)(s.code,{children:"renderRecordData"}),", to support inlined logic in codegenned ",(0,l.jsx)(s.code,{children:"set"})," method which uses a struct."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/99ab9cd6fff1a732b47d63ead894292661682380",children:["feat(store): indexed ",(0,l.jsx)(s.code,{children:"tableId"})," in store events (#1520)"]})})," (@latticexyz/cli, @latticexyz/common, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Generated table libraries now have a set of functions prefixed with ",(0,l.jsx)(s.code,{children:"_"})," that always use their own storage for read/write.\nThis saves gas for use cases where the functionality to dynamically determine which ",(0,l.jsx)(s.code,{children:"Store"})," to use for read/write is not needed, e.g. root systems in a ",(0,l.jsx)(s.code,{children:"World"}),", or when using ",(0,l.jsx)(s.code,{children:"Store"})," without ",(0,l.jsx)(s.code,{children:"World"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["We decided to continue to always generate a set of functions that dynamically decide which ",(0,l.jsx)(s.code,{children:"Store"})," to use, so that the generated table libraries can still be imported by non-root systems."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"library"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Counter"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Dynamically determine which store to write to based on the context"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"internal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Always write to own storage"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"_set"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"internal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// ... equivalent functions for all other Store methods"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c049c23f48b93ac7881fb1a5a8417831611d5cbf",children:"feat(world,store): add initialize method, initialize core tables in core module (#1472)"})})," (@latticexyz/cli, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"World"})," contract now has an ",(0,l.jsx)(s.code,{children:"initialize"})," function, which can be called once by the creator of the World to install the core module.\nThis change allows the registration of all core tables to happen in the ",(0,l.jsx)(s.code,{children:"CoreModule"}),", so no table metadata has to be included in the ",(0,l.jsx)(s.code,{children:"World"}),"'s bytecode."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IBaseWorld"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"initialize"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"IModule"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" coreModule) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"public"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"World"})," contract now stores the original creator of the ",(0,l.jsx)(s.code,{children:"World"})," in an immutable state variable.\nIt is used internally to only allow the original creator to initialize the ",(0,l.jsx)(s.code,{children:"World"})," in a separate transaction."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IBaseWorld"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"creator"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"view"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The deploy script is updated to use the ",(0,l.jsx)(s.code,{children:"World"}),"'s ",(0,l.jsx)(s.code,{children:"initialize"})," function to install the ",(0,l.jsx)(s.code,{children:"CoreModule"})," instead of ",(0,l.jsx)(s.code,{children:"registerRootModule"})," as before."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/95c59b203259c20a6f944c5f9af008b44e2902b6",children:"feat(world): add CallBatchSystem to core module (#1500)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"World"})," now has a ",(0,l.jsx)(s.code,{children:"callBatch"})," method which allows multiple system calls to be batched into a single transaction."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SystemCallData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world/modules/core/types.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IBaseWorld"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"callBatch"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"SystemCallData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemCalls) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" returnDatas);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-8",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/ed07018b86046fec20786f4752ac98a4175eb5eb",children:"fix(store-indexer): subscribe postgres indexer to stream (#1514)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsx)(s.p,{children:"Fixes postgres indexer stopping sync after it catches up to the latest block."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/aea67c5804efb2a8b919f5aa3a053d9b04184e84",children:"fix: release bytecode on npm and import abi in cli deploy (#1490)"})})," (@latticexyz/cli, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Include bytecode for ",(0,l.jsx)(s.code,{children:"World"})," and ",(0,l.jsx)(s.code,{children:"Store"})," in npm packages."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/90e4161bb8574a279d9edb517ce7def3624adaa8",children:"refactor(store,world): move test table config out of main table config (#1600)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Moved the test tables out of the main config in ",(0,l.jsx)(s.code,{children:"world"})," and ",(0,l.jsx)(s.code,{children:"store"})," and into their own separate config."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/0b8ce3f2c9b540dbd1c9ba21354f8bf850e72a96",children:"fix(common): always import relative sol files from ./ (#1585)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:["Minor fix to resolving user types: ",(0,l.jsx)(s.code,{children:"solc"})," doesn't like relative imports without ",(0,l.jsx)(s.code,{children:"./"}),", but is fine with relative imports from ",(0,l.jsx)(s.code,{children:"./../"}),", so we always append ",(0,l.jsx)(s.code,{children:"./"})," to the relative path."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/211be2a1eba8600ad53be6f8c70c64a8523113b9",children:"feat(store): compute FieldLayout at compile time (#1508)"})})," (@latticexyz/cli, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"FieldLayout"})," in table libraries is now generated at compile time instead of dynamically in a table library function.\nThis significantly reduces gas cost in all table library functions."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/0f3e2e02b5114e08fe700c18326db76816ffad3c",children:"feat(store): add Storage.loadField for optimized loading of 32 bytes or less from storage (#1512)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added ",(0,l.jsx)(s.code,{children:"Storage.loadField"})," to optimize loading 32 bytes or less from storage (which is always the case when loading data for static fields)."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/d08789282c8b8d4c12897e2ff5a688af9115fb1c",children:"refactor(store,world): prefix errors with library/contract name (#1568)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Prefixed all errors with their respective library/contract for improved debugging."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4c7fd3eb29e3d3954f2f1f36ace474a436082651",children:"refactor(world): remove workaround in mud config (#1501)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Remove a workaround for the internal ",(0,l.jsx)(s.code,{children:"InstalledModules"})," table that is not needed anymore."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/a0341daf9fd87e8072ffa292a33f508dd37b8ca6",children:["feat(world): rename ",(0,l.jsx)(s.code,{children:"funcSelectorAndArgs"})," to ",(0,l.jsx)(s.code,{children:"callData"})," (#1524)"]})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed all ",(0,l.jsx)(s.code,{children:"funcSelectorAndArgs"})," arguments to ",(0,l.jsx)(s.code,{children:"callData"})," for clarity."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/301bcb75dd8c15b8ea1a9d0ca8c75c15d7cd92bd",children:"fix(faucet,store-indexer): fix invalid env message (#1546)"})})," (@latticexyz/faucet, @latticexyz/store-indexer)"]}),"\n",(0,l.jsx)(s.p,{children:"Improves error message when parsing env variables"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/5e723b90e6b18bc70d357ff4b0a1b217611236ae",children:["feat(store,world): replace ",(0,l.jsx)(s.code,{children:"ResourceSelector"})," with ",(0,l.jsx)(s.code,{children:"ResourceId"})," and ",(0,l.jsx)(s.code,{children:"WorldResourceId"})," (#1544)"]})})," (@latticexyz/world, @latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"ResourceType"})," table is removed.\nIt was previously used to store the resource type for each resource ID in a ",(0,l.jsx)(s.code,{children:"World"}),". This is no longer necessary as the ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/pull/1544",children:"resource type is now encoded in the resource ID"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["To still be able to determine whether a given resource ID exists, a ",(0,l.jsx)(s.code,{children:"ResourceIds"})," table has been added.\nThe previous ",(0,l.jsx)(s.code,{children:"ResourceType"})," table was part of ",(0,l.jsx)(s.code,{children:"World"})," and missed tables that were registered directly via ",(0,l.jsx)(s.code,{children:"StoreCore.registerTable"})," instead of via ",(0,l.jsx)(s.code,{children:"World.registerTable"})," (e.g. when a table was registered as part of a root module).\nThis problem is solved by the new table ",(0,l.jsx)(s.code,{children:"ResourceIds"})," being part of ",(0,l.jsx)(s.code,{children:"Store"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"StoreCore"}),"'s ",(0,l.jsx)(s.code,{children:"hasTable"})," function was removed in favor of using ",(0,l.jsx)(s.code,{children:"ResourceIds.getExists(tableId)"})," directly."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { ResourceType } from "@latticexyz/world/src/tables/ResourceType.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { StoreCore } from "@latticexyz/store/src/StoreCore.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { ResourceIds } from "@latticexyz/store/src/codegen/tables/ResourceIds.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bool tableExists = StoreCore.hasTable(tableId);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bool tableExists = ResourceIds.getExists(tableId);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bool systemExists = ResourceType.get(systemId) != Resource.NONE;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bool systemExists = ResourceIds.getExists(systemId);"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6573e38e9064121540aa46ce204d8ca5d61ed847",children:"feat: rename table to tableId (#1484)"})})," (@latticexyz/block-logs-stream, @latticexyz/store-sync, @latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed all occurrences of ",(0,l.jsx)(s.code,{children:"table"}),' where it is used as "table ID" to ',(0,l.jsx)(s.code,{children:"tableId"}),".\nThis is only a breaking change for consumers who manually decode ",(0,l.jsx)(s.code,{children:"Store"})," events, but not for consumers who use the MUD libraries."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"event StoreSetRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bytes32 table,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32[] key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"event StoreSetField("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bytes32 table,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32[] key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  uint8 fieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"event StoreDeleteRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bytes32 table,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32[] key"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"event StoreEphemeralRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bytes32 table,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32[] key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/bd9cc8ec2608efcb05ef95df64448b2ec28bcb49",children:"docs: cli changeset after deploy changes (#1503)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Refactor ",(0,l.jsx)(s.code,{children:"deploy"})," command to break up logic into modules"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6e66c5b745a036c5bc5422819de9c518a6f6cc96",children:"feat: rename key to keyTuple (#1492)"})})," (@latticexyz/block-logs-stream, @latticexyz/store-sync, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renamed all occurrences of ",(0,l.jsx)(s.code,{children:"key"}),' where it is used as "key tuple" to ',(0,l.jsx)(s.code,{children:"keyTuple"}),".\nThis is only a breaking change for consumers who manually decode ",(0,l.jsx)(s.code,{children:"Store"})," events, but not for consumers who use the MUD libraries."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"event StoreSetRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bytes32[] key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bytes32[] keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"event StoreSetField("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bytes32[] key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bytes32[] keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  uint8 fieldIndex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"event StoreDeleteRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bytes32[] key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bytes32[] keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"event StoreEphemeralRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- bytes32[] key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ bytes32[] keyTuple,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes data"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f8a01a047d73a15326ebf6577ea033674d8e61a9",children:"fix(protocol-parser): export valueSchemaToFieldLayoutHex (#1481)"})})," (@latticexyz/protocol-parser)"]}),"\n",(0,l.jsxs)(s.p,{children:["Export ",(0,l.jsx)(s.code,{children:"valueSchemaToFieldLayoutHex"})," helper"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f1cd43bf9264d5a23a3edf2a1ea4212361a72203",children:"fix(world): register Delegations table in CoreModule (#1452)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Register ",(0,l.jsx)(s.code,{children:"Delegations"})," table in the ",(0,l.jsx)(s.code,{children:"CoreModule"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/7e6e5157bb124f19bd8ed9f02b93afadc97cdf50",children:"fix(store-indexer): catch errors when parsing logs to tables and storage operations (#1488)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsx)(s.p,{children:"Catch errors when parsing logs to tables and storage operations, log and skip"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/63831a264b6b09501f380a4601f82ba7bf07a619",children:["refactor(store): rename ",(0,l.jsx)(s.code,{children:"Utils.sol"})," to ",(0,l.jsx)(s.code,{children:"leftMask.sol"})," and minor cleanup (#1599)"]})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Minor ",(0,l.jsx)(s.code,{children:"Store"})," cleanups: renamed ",(0,l.jsx)(s.code,{children:"Utils.sol"})," to ",(0,l.jsx)(s.code,{children:"leftMask.sol"})," since it only contains a single free function, and removed a leftover sanity check."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/22ee4470047e4611a3cae62e9d0af4713aa1e612",children:["feat(store,world): use user-types for ",(0,l.jsx)(s.code,{children:"ResourceId"}),", ",(0,l.jsx)(s.code,{children:"FieldLayout"})," and ",(0,l.jsx)(s.code,{children:"Schema"})," in table libraries (#1586)"]})})," (@latticexyz/store-sync, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["All ",(0,l.jsx)(s.code,{children:"Store"})," and ",(0,l.jsx)(s.code,{children:"World"})," tables now use the appropriate user-types for ",(0,l.jsx)(s.code,{children:"ResourceId"}),", ",(0,l.jsx)(s.code,{children:"FieldLayout"})," and ",(0,l.jsx)(s.code,{children:"Schema"})," to avoid manual ",(0,l.jsx)(s.code,{children:"wrap"}),"/",(0,l.jsx)(s.code,{children:"unwrap"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/be313068b158265c2deada55eebfd6ba753abb87",children:"feat(store): optimize storage location hash (#1509)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Optimized the ",(0,l.jsx)(s.code,{children:"StoreCore"})," hash function determining the data location to use less gas."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e0193e5737fa2148d5d2b888d71df01d1e46b6d5",children:"fix(dev-tools): key -> keyTuple (#1505)"})})," (@latticexyz/dev-tools)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updates store event ",(0,l.jsx)(s.code,{children:"key"})," reference to ",(0,l.jsx)(s.code,{children:"keyTuple"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e0377761c3a3f83a23de78f6bcb0733c500a0825",children:"fix(dev-tools): table -> tableId (#1502)"})})," (@latticexyz/dev-tools)"]}),"\n",(0,l.jsxs)(s.p,{children:["Updates ",(0,l.jsx)(s.code,{children:"table"})," reference to ",(0,l.jsx)(s.code,{children:"tableId"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/83583a5053de4e5e643572e3b1c0f49467e8e2ab",children:"feat: move forge build + abi + abi-ts to out (#1483)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"deploy"})," and ",(0,l.jsx)(s.code,{children:"dev-contracts"})," CLI commands now use ",(0,l.jsx)(s.code,{children:"forge build --skip test script"})," before deploying and run ",(0,l.jsx)(s.code,{children:"mud abi-ts"})," to generate strong types for ABIs."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b3c22a183c0b288b9eb1487e4fef125bf7dae915",children:"refactor(store-indexer): add readme, refactor common env (#1533)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsx)(s.p,{children:"Added README and refactored handling of common environment variables"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/22ba7b675bd50d1bb18b8a71c0de17c6d70d78c7",children:"refactor(store,world): simplify constants (#1569)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Simplified a couple internal constants used for bitshifting."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/fa409e83db6b76422d525f7d2e9c947dc3c51262",children:"docs(faucet): add readme (#1534)"})})," (@latticexyz/faucet)"]}),"\n",(0,l.jsx)(s.p,{children:"Added README"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c4f49240d7767c3fa7a25926f74b4b62ad67ca04",children:"fix(common): fix memory corruption for dynamic to static array conversion (#1598)"})})," (@latticexyz/cli, @latticexyz/common)"]}),"\n",(0,l.jsx)(s.p,{children:"Table libraries now correctly handle uninitialized fixed length arrays."}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next8",children:"Version 2.0.0-next.8"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-9",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b9e562d8f7a6051bb1a7262979b268fd2c83daac",children:"feat(world,store): add ERC165 checks for all registration methods (#1458)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"World"})," now performs ",(0,l.jsx)(s.code,{children:"ERC165"})," interface checks to ensure that the ",(0,l.jsx)(s.code,{children:"StoreHook"}),", ",(0,l.jsx)(s.code,{children:"SystemHook"}),", ",(0,l.jsx)(s.code,{children:"System"}),", ",(0,l.jsx)(s.code,{children:"DelegationControl"})," and ",(0,l.jsx)(s.code,{children:"Module"})," contracts to actually implement their respective interfaces before registering them in the World."]}),"\n",(0,l.jsxs)(s.p,{children:["The required ",(0,l.jsx)(s.code,{children:"supportsInterface"})," methods are implemented on the respective base contracts.\nWhen creating one of these contracts, the recommended approach is to extend the base contract rather than the interface."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { IStoreHook } from "@latticexyz/store/src/IStore.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { StoreHook } from "@latticexyz/store/src/StoreHook.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- contract MyStoreHook is IStoreHook {}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ contract MyStoreHook is StoreHook {}"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { ISystemHook } from "@latticexyz/world/src/interfaces/ISystemHook.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { SystemHook } from "@latticexyz/world/src/SystemHook.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- contract MySystemHook is ISystemHook {}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ contract MySystemHook is SystemHook {}"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { IDelegationControl } from "@latticexyz/world/src/interfaces/IDelegationControl.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { DelegationControl } from "@latticexyz/world/src/DelegationControl.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- contract MyDelegationControl is IDelegationControl {}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ contract MyDelegationControl is DelegationControl {}"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { IModule } from "@latticexyz/world/src/interfaces/IModule.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { Module } from "@latticexyz/world/src/Module.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- contract MyModule is IModule {}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ contract MyModule is Module {}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/51914d656d8cd8d851ccc8296d249cf09f53e670",children:"feat(world): change requireOwnerOrSelf to requireOwner (#1457)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The access control library no longer allows calls by the ",(0,l.jsx)(s.code,{children:"World"})," contract to itself to bypass the ownership check.\nThis is a breaking change for root modules that relied on this mechanism to register root tables, systems or function selectors.\nTo upgrade, root modules must use ",(0,l.jsx)(s.code,{children:"delegatecall"})," instead of a regular ",(0,l.jsx)(s.code,{children:"call"})," to install root tables, systems or function selectors."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- world.registerSystem(rootSystemId, rootSystemAddress);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ address(world).delegatecall(abi.encodeCall(world.registerSystem, (rootSystemId, rootSystemAddress)));"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["An ",(0,l.jsx)(s.code,{children:"installRoot"})," method was added to the ",(0,l.jsx)(s.code,{children:"IModule"})," interface.\nThis method is now called when installing a root module via ",(0,l.jsx)(s.code,{children:"world.installRootModule"}),".\nWhen installing non-root modules via ",(0,l.jsx)(s.code,{children:"world.installModule"}),", the module's ",(0,l.jsx)(s.code,{children:"install"})," function continues to be called."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/2ca75f9b9063ea33524e6c609b87f5494f678fa0",children:"feat(world): add Balance table and BalanceTransferSystem (#1425)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"The World now maintains a balance per namespace.\nWhen a system is called with value, the value stored in the World contract and credited to the system's namespace."}),"\n",(0,l.jsx)(s.p,{children:"Previously, the World contract did not store value, but passed it on to the system contracts.\nHowever, as systems are expected to be stateless (reading/writing state only via the calling World) and can be registered in multiple Worlds, this could have led to exploits."}),"\n",(0,l.jsx)(s.p,{children:"Any address with access to a namespace can use the balance of that namespace.\nThis allows all systems registered in the same namespace to work with the same balance."}),"\n",(0,l.jsxs)(s.p,{children:["There are two new World methods to transfer balance between namespaces (",(0,l.jsx)(s.code,{children:"transferBalanceToNamespace"}),") or to an address (",(0,l.jsx)(s.code,{children:"transferBalanceToAddress"}),")."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IBaseWorld"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalanceToNamespace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes16"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fromNamespace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes16"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" toNamespace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" amount) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalanceToAddress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes16"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fromNamespace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" toAddress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" amount) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-9",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1d60930d6d4c9a0bda262e5e23a5f719b9dd48c7",children:"feat(store,world): add ability to unregister hooks (#1422)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"It is now possible to unregister Store hooks and System hooks."}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IStore"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"unregisterStoreHook"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" table"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"IStoreHook"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookAddress) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// ..."})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IWorld"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"unregisterSystemHook"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceSelector"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"ISystemHook"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookAddress) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// ..."})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5e71e1cb541b0a18ee414e18dd80f1dd24a92b98",children:"feat(protocol-parser): add keySchema/valueSchema helpers (#1443)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Moved ",(0,l.jsx)(s.code,{children:"KeySchema"}),", ",(0,l.jsx)(s.code,{children:"ValueSchema"}),", ",(0,l.jsx)(s.code,{children:"SchemaToPrimitives"})," and ",(0,l.jsx)(s.code,{children:"TableRecord"})," types into ",(0,l.jsx)(s.code,{children:"@latticexyz/protocol-parser"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5e71e1cb541b0a18ee414e18dd80f1dd24a92b98",children:"feat(protocol-parser): add keySchema/valueSchema helpers (#1443)"})})," (@latticexyz/protocol-parser)"]}),"\n",(0,l.jsxs)(s.p,{children:["Adds ",(0,l.jsx)(s.code,{children:"decodeKey"}),", ",(0,l.jsx)(s.code,{children:"decodeValue"}),", ",(0,l.jsx)(s.code,{children:"encodeKey"}),", and ",(0,l.jsx)(s.code,{children:"encodeValue"})," helpers to decode/encode from key/value schemas. Deprecates previous methods that use a schema object with static/dynamic field arrays, originally attempting to model our on-chain behavior but ended up not very ergonomic when working with table configs."]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next7",children:"Version 2.0.0-next.7"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-10",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15",children:"feat(store,world): more granularity for onchain hooks (#1399)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"onSetRecord"})," hook is split into ",(0,l.jsx)(s.code,{children:"onBeforeSetRecord"})," and ",(0,l.jsx)(s.code,{children:"onAfterSetRecord"})," and the ",(0,l.jsx)(s.code,{children:"onDeleteRecord"})," hook is split into ",(0,l.jsx)(s.code,{children:"onBeforeDeleteRecord"})," and ",(0,l.jsx)(s.code,{children:"onAfterDeleteRecord"}),".\nThe purpose of this change is to allow more fine-grained control over the point in the lifecycle at which hooks are executed."]}),"\n",(0,l.jsxs)(s.p,{children:["The previous hooks were executed before modifying data, so they can be replaced with the respective ",(0,l.jsx)(s.code,{children:"onBefore"})," hooks."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function onSetRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function onBeforeSetRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32 table,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] memory key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes memory data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    Schema valueSchema"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) public;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function onDeleteRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function onBeforeDeleteRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32 table,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] memory key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    Schema valueSchema"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) public;"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsx)(s.p,{children:"It is now possible to specify which methods of a hook contract should be called when registering a hook. The purpose of this change is to save gas by avoiding to call no-op hook methods."}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"function registerStoreHook("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32 tableId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- IStoreHook hookAddress"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ IStoreHook hookAddress,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ uint8 enabledHooksBitmap"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") public;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"function registerSystemHook("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  bytes32 systemId,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- ISystemHook hookAddress"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ ISystemHook hookAddress,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ uint8 enabledHooksBitmap"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") public;"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["There are ",(0,l.jsx)(s.code,{children:"StoreHookLib"})," and ",(0,l.jsx)(s.code,{children:"SystemHookLib"})," with helper functions to encode the bitmap of enabled hooks."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"StoreHookLib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store/src/StoreHook.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint8"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" storeHookBitmap "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" StoreBookLib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encodeBitmap"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  onBeforeSetRecord"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  onAfterSetRecord"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  onBeforeSetField"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  onAfterSetField"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  onBeforeDeleteRecord"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  onAfterDeleteRecord"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SystemHookLib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/world/src/SystemHook.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint8"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemHookBitmap "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" SystemHookLib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encodeBitmap"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  onBeforeCallSystem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  onAfterCallSystem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"onSetRecord"})," hook call for ",(0,l.jsx)(s.code,{children:"emitEphemeralRecord"})," has been removed to save gas and to more clearly distinguish ephemeral tables as offchain tables."]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-9",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/2459e15fc9bf49fff2d769b9efba07b99635f2cc",children:"fix(abi-ts): remove cwd join (#1418)"})})," (@latticexyz/abi-ts)"]}),"\n",(0,l.jsxs)(s.p,{children:["Let ",(0,l.jsx)(s.code,{children:"glob"})," handle resolving the glob against the current working directory."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/18d3aea55b1d7f4b442c21343795c299a56fc481",children:"feat(world): allow callFrom from own address without explicit delegation (#1407)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Allow ",(0,l.jsx)(s.code,{children:"callFrom"})," with the own address as ",(0,l.jsx)(s.code,{children:"delegator"})," without requiring an explicit delegation"]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next6",children:"Version 2.0.0-next.6"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-11",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9af542d3e29e2699144534dec3430e19294077d4",children:"style(gas-report): rename mud-gas-report to gas-report (#1410)"})})," (@latticexyz/gas-report)"]}),"\n",(0,l.jsxs)(s.p,{children:["Renames ",(0,l.jsx)(s.code,{children:"mud-gas-report"})," binary to ",(0,l.jsx)(s.code,{children:"gas-report"}),", since it's no longer MUD specific."]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-10",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/8025c3505a7411d8539b1cfd72265aed27e04561",children:"docs: rework abi-ts changesets (#1413)"})})," (@latticexyz/abi-ts, @latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Added a new ",(0,l.jsx)(s.code,{children:"@latticexyz/abi-ts"})," package to generate TS type declaration files (",(0,l.jsx)(s.code,{children:".d.ts"}),") for each ABI JSON file."]}),"\n",(0,l.jsxs)(s.p,{children:["This allows you to import your JSON ABI and use it directly with libraries like ",(0,l.jsx)(s.a,{href:"https://npmjs.com/package/viem",children:"viem"})," and ",(0,l.jsx)(s.a,{href:"https://npmjs.com/package/abitype",children:"abitype"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"text","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"text","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"pnpm add @latticexyz/abi-ts"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"pnpm abi-ts"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["By default, ",(0,l.jsx)(s.code,{children:"abi-ts"})," looks for files with the glob ",(0,l.jsx)(s.code,{children:"**/*.abi.json"}),", but you can customize this glob with the ",(0,l.jsx)(s.code,{children:"--input"})," argument, e.g."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"console","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"console","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"abi-ts"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"--input"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abi/IWorld.sol/IWorld.abi.json'"})]})})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/8025c3505a7411d8539b1cfd72265aed27e04561",children:"docs: rework abi-ts changesets (#1413)"})})," (create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["We now use ",(0,l.jsx)(s.code,{children:"@latticexyz/abi-ts"})," to generate TS type declaration files (",(0,l.jsx)(s.code,{children:".d.ts"}),") for each ABI JSON file. This replaces our usage TypeChain everywhere."]}),"\n",(0,l.jsxs)(s.p,{children:["If you have a MUD project created from an older template, you can replace TypeChain with ",(0,l.jsx)(s.code,{children:"abi-ts"})," by first updating your contracts' ",(0,l.jsx)(s.code,{children:"package.json"}),":"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:typechain",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-"build:abi": "forge clean && forge build",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+"build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+\"build:abi-ts\": \"mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'\","})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:' "build:mud": "mud tablegen && mud worldgen",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-"build:typechain": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json",'})})]})}),"\n",(0,l.jsxs)(s.p,{children:["And update your client's ",(0,l.jsx)(s.code,{children:"setupNetwork.ts"})," with:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" const worldContract = createContract({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"   address: networkConfig.worldAddress as Hex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-  abi: IWorld__factory.abi,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+  abi: IWorldAbi,"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/8025c3505a7411d8539b1cfd72265aed27e04561",children:"docs: rework abi-ts changesets (#1413)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["We now use ",(0,l.jsx)(s.code,{children:"@latticexyz/abi-ts"})," to generate TS type declaration files (",(0,l.jsx)(s.code,{children:".d.ts"}),") for each ABI JSON file. This replaces our usage TypeChain everywhere."]}),"\n",(0,l.jsxs)(s.p,{children:["If you previously relied on TypeChain types from ",(0,l.jsx)(s.code,{children:"@latticexyz/store"})," or ",(0,l.jsx)(s.code,{children:"@latticexyz/world"}),", you will either need to migrate to viem or abitype using ABI JSON imports or generate TypeChain types from our exported ABI JSON files."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { getContract } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"viem"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" IStoreAbi "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store/abi/IStore.sol/IStore.abi.json"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"storeContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  abi"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" IStoreAbi"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"storeContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"write"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setRecord"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next5",children:"Version 2.0.0-next.5"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-12",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/9d0f492a90e5d94c6b38ad732e78fd4b13b2adbe",children:["refactor(world): separate call utils into ",(0,l.jsx)(s.code,{children:"WorldContextProvider"})," and ",(0,l.jsx)(s.code,{children:"SystemCall"})," (#1370)"]})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The previous ",(0,l.jsx)(s.code,{children:"Call.withSender"})," util is replaced with ",(0,l.jsx)(s.code,{children:"WorldContextProvider"}),", since the usecase of appending the ",(0,l.jsx)(s.code,{children:"msg.sender"})," to the calldata is tightly coupled with ",(0,l.jsx)(s.code,{children:"WorldContextConsumer"})," (which extracts the appended context from the calldata)."]}),"\n",(0,l.jsxs)(s.p,{children:["The previous ",(0,l.jsx)(s.code,{children:"Call.withSender"})," utility reverted if the call failed and only returned the returndata on success. This is replaced with ",(0,l.jsx)(s.code,{children:"callWithContextOrRevert"}),"/",(0,l.jsx)(s.code,{children:"delegatecallWithContextOrRevert"})]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-import { Call } from "@latticexyz/world/src/Call.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+import { WorldContextProvider } from "@latticexyz/world/src/WorldContext.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-Call.withSender({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-  delegate: false,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-  value: 0,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-  ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+WorldContextProvider.callWithContextOrRevert({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+  value: 0,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+  ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-Call.withSender({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-  delegate: true,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-  value: 0,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-  ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+WorldContextProvider.delegatecallWithContextOrRevert({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+  ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["In addition there are utils that return a ",(0,l.jsx)(s.code,{children:"bool success"})," flag instead of reverting on errors. This mirrors the behavior of Solidity's low level ",(0,l.jsx)(s.code,{children:"call"}),"/",(0,l.jsx)(s.code,{children:"delegatecall"})," functions and is useful in situations where additional logic should be executed in case of a reverting external call."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"library"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"WorldContextProvider"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"callWithContext"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" target"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Address to call"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" funcSelectorAndArgs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Abi encoded function selector and arguments to pass to pass to the contract"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" msgSender"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Address to append to the calldata as context for msgSender"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Value to pass with the call"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"internal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bool"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"delegatecallWithContext"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" target"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Address to call"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" funcSelectorAndArgs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Abi encoded function selector and arguments to pass to pass to the contract"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" msgSender "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Address to append to the calldata as context for msgSender"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"internal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bool"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"WorldContext"})," is renamed to ",(0,l.jsx)(s.code,{children:"WorldContextConsumer"})," to clarify the relationship between ",(0,l.jsx)(s.code,{children:"WorldContextProvider"})," (appending context to the calldata) and ",(0,l.jsx)(s.code,{children:"WorldContextConsumer"})," (extracting context from the calldata)"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-import { WorldContext } from "@latticexyz/world/src/WorldContext.sol";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-import { WorldContextConsumer } from "@latticexyz/world/src/WorldContext.sol";'})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"World"})," contract previously had a ",(0,l.jsx)(s.code,{children:"_call"})," method to handle calling systems via their resource selector, performing accesss control checks and call hooks registered for the system."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"library"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SystemCall"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"/**"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * Calls a system via its resource selector and perform access control checks."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * Does not revert if the call fails, but returns a `success` flag along with the returndata."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   */"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"call"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" caller"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceSelector"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" funcSelectorAndArgs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"internal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bool"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"/**"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * Calls a system via its resource selector, perform access control checks and trigger hooks registered for the system."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * Does not revert if the call fails, but returns a `success` flag along with the returndata."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   */"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"callWithHooks"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" caller"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceSelector"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" funcSelectorAndArgs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"internal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bool"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"/**"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * Calls a system via its resource selector, perform access control checks and trigger hooks registered for the system."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   * Reverts if the call fails."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"   */"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"callWithHooksOrRevert"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" caller"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceSelector"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" funcSelectorAndArgs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uint256"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"internal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["System hooks now are called with the system's resource selector instead of its address. The system's address can still easily obtained within the hook via ",(0,l.jsx)(s.code,{children:"Systems.get(resourceSelector)"})," if necessary."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"interface ISystemHook {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function onBeforeCallSystem("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    address msgSender,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   address systemAddress,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32 resourceSelector,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes memory funcSelectorAndArgs"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function onAfterCallSystem("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    address msgSender,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   address systemAddress,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   bytes32 resourceSelector,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes memory funcSelectorAndArgs"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-11",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/ce97426c0d70832e5efdb8bad83207a9d840302b",children:"feat(world): add support for upgrading systems (#1378)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["It is now possible to upgrade systems by calling ",(0,l.jsx)(s.code,{children:"registerSystem"})," again with an existing system id (resource selector)."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Register a system"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"world."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerSystem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(systemId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemAddress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" publicAccess);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Upgrade the system by calling `registerSystem` with the"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// same system id but a new system address or publicAccess flag"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"world."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerSystem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(systemId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newSystemAddress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newPublicAccess);"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1ca35e9a1630a51dfd1e082c26399f76f2cd06ed",children:"feat(world): add callFrom entry point (#1364)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"World"})," has a new ",(0,l.jsx)(s.code,{children:"callFrom"})," entry point which allows systems to be called on behalf of other addresses if those addresses have registered a delegation.\nIf there is a delegation, the call is forwarded to the system with ",(0,l.jsx)(s.code,{children:"delegator"})," as ",(0,l.jsx)(s.code,{children:"msgSender"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IBaseWorld"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"callFrom"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delegator"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceSelector"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" funcSelectorAndArgs"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"payable"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"virtual"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["A delegation can be registered via the ",(0,l.jsx)(s.code,{children:"World"}),"'s ",(0,l.jsx)(s.code,{children:"registerDelegation"})," function.\nIf ",(0,l.jsx)(s.code,{children:"delegatee"})," is ",(0,l.jsx)(s.code,{children:"address(0)"}),', the delegation is considered to be a "fallback" delegation and is used in ',(0,l.jsx)(s.code,{children:"callFrom"})," if there is no delegation is found for the specific caller.\nOtherwise the delegation is registered for the specific ",(0,l.jsx)(s.code,{children:"delegatee"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IBaseWorld"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerDelegation"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delegatee"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delegationControl"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"memory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" initFuncSelectorAndArgs"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"delegationControl"})," refers to the resource selector of a ",(0,l.jsx)(s.code,{children:"DelegationControl"})," system that must have been registered beforehand.\nAs part of registering the delegation, the ",(0,l.jsx)(s.code,{children:"DelegationControl"})," system is called with the provided ",(0,l.jsx)(s.code,{children:"initFuncSelectorAndArgs"}),".\nThis can be used to initialize data in the given ",(0,l.jsx)(s.code,{children:"DelegationControl"})," system."]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"DelegationControl"})," system must implement the ",(0,l.jsx)(s.code,{children:"IDelegationControl"})," interface:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:" IDelegationControl"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"verify"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delegator"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes32"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" systemId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bytes"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"calldata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" funcSelectorAndArgs) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"external"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"returns"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"bool"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["When ",(0,l.jsx)(s.code,{children:"callFrom"})," is called, the ",(0,l.jsx)(s.code,{children:"World"})," checks if a delegation is registered for the given caller, and if so calls the delegation control's ",(0,l.jsx)(s.code,{children:"verify"})," function with the same same arguments as ",(0,l.jsx)(s.code,{children:"callFrom"}),".\nIf the call to ",(0,l.jsx)(s.code,{children:"verify"})," is successful and returns ",(0,l.jsx)(s.code,{children:"true"}),", the delegation is valid and the call is forwarded to the system with ",(0,l.jsx)(s.code,{children:"delegator"})," as ",(0,l.jsx)(s.code,{children:"msgSender"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["Note: if ",(0,l.jsx)(s.code,{children:"UNLIMITED_DELEGATION"})," (from ",(0,l.jsx)(s.code,{children:"@latticexyz/world/src/constants.sol"}),") is passed as ",(0,l.jsx)(s.code,{children:"delegationControl"}),", the external call to the delegation control contract is skipped and the delegation is considered valid."]}),"\n",(0,l.jsxs)(s.p,{children:["For examples of ",(0,l.jsx)(s.code,{children:"DelegationControl"})," systems, check out the ",(0,l.jsx)(s.code,{children:"CallboundDelegationControl"})," or ",(0,l.jsx)(s.code,{children:"TimeboundDelegationControl"})," systems in the ",(0,l.jsx)(s.code,{children:"std-delegations"})," module.\nSee ",(0,l.jsx)(s.code,{children:"StandardDelegations.t.sol"})," for usage examples."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c583f3cd08767575ce9df39725ec51195b5feb5b",children:"feat(world): allow transferring ownership of namespaces (#1274)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"It is now possible to transfer ownership of namespaces!"}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Register a new namespace"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"world."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerNamespace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"namespace"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// It's owned by the caller of the function (address(this))"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Transfer ownership of the namespace to address(42)"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"world."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"transferOwnership"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"namespace"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"42"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// It's now owned by address(42)"})})]})}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-10",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/33f50f8a473398dcc19b17d10a17a552a82678c7",children:"fix(services): correctly export typescript types (#1377)"})})," (@latticexyz/services)"]}),"\n",(0,l.jsx)(s.p,{children:"Fixed an issue where the TypeScript types for createFaucetService were not exported correctly from the @latticexyz/services package"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/80a26419f15177333b523bac5d09767487b4ffef",children:"feat: docker monorepo build (#1219)"})})," (@latticexyz/services)"]}),"\n",(0,l.jsx)(s.p,{children:"The build phase of services now works on machines with older protobuf compilers"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1",children:"refactor: remove v1 network package, remove snap sync module, deprecate std-client (#1311)"})})," (@latticexyz/common, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Refactor tightcoder to use typescript functions instead of ejs"}),"\n",(0,l.jsxs)(s.li,{children:["Optimize ",(0,l.jsx)(s.code,{children:"TightCoder"})," library"]}),"\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"isLeftAligned"})," and ",(0,l.jsx)(s.code,{children:"getLeftPaddingBits"})," common codegen helpers"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/dc258e6860196ad34bf1d4ac7fce382f70e2c0c8",children:"fix(cli): make mud test exit with code 1 on test error (#1371)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"mud test"})," cli now exits with code 1 on test failure. It used to exit with code 0, which meant that CIs didn't notice test failures."]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next4",children:"Version 2.0.0-next.4"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-13",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/42c7d898630c93805a5e345bdc8d87c2674b5110",children:"docs: changeset for deleted network package (#1348)"})})," (@latticexyz/network)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removes ",(0,l.jsx)(s.code,{children:"network"})," package. Please see the ",(0,l.jsx)(s.a,{href:"https://mud.dev/changelog",children:"changelog"})," for how to migrate your app to the new ",(0,l.jsx)(s.code,{children:"store-sync"})," package. Or create a new project from an up-to-date template with ",(0,l.jsx)(s.code,{children:"pnpm create mud@next your-app-name"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c32c8e8f2ccac02c4242f715f296bffd5465bd71",children:"chore: delete std-contracts package (#1341)"})})," (@latticexyz/cli, @latticexyz/std-contracts)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removes ",(0,l.jsx)(s.code,{children:"std-contracts"})," package. These were v1 contracts, now entirely replaced by our v2 tooling. See the ",(0,l.jsx)(s.a,{href:"https://mud.dev/",children:"MUD docs"})," for building with v2 or create a new project from our v2 templates with ",(0,l.jsx)(s.code,{children:"pnpm create mud@next your-app-name"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/ce7125a1b97efd3db47c5ea1593d5a37ba143f64",children:"chore: delete solecs package (#1340)"})})," (@latticexyz/cli, @latticexyz/recs, @latticexyz/solecs, @latticexyz/std-client)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removes ",(0,l.jsx)(s.code,{children:"solecs"})," package. These were v1 contracts, now entirely replaced by our v2 tooling. See the ",(0,l.jsx)(s.a,{href:"https://mud.dev/",children:"MUD docs"})," for building with v2 or create a new project from our v2 templates with ",(0,l.jsx)(s.code,{children:"pnpm create mud@next your-app-name"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c14f8bf1ec8c199902c12899853ac144aa69bb9c",children:"feat(recs,std-client): move action system to recs (#1351)"})})," (@latticexyz/recs, @latticexyz/std-client)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Moved ",(0,l.jsx)(s.code,{children:"createActionSystem"})," from ",(0,l.jsx)(s.code,{children:"std-client"})," to ",(0,l.jsx)(s.code,{children:"recs"})," package and updated it to better support v2 sync stack."]}),"\n",(0,l.jsxs)(s.p,{children:["If you want to use ",(0,l.jsx)(s.code,{children:"createActionSystem"})," alongside ",(0,l.jsx)(s.code,{children:"syncToRecs"}),", you'll need to pass in arguments like so:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { syncToRecs } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync/recs"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createActionSystem } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/recs/deprecated"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mergeMap } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rxjs"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"blockLogsStorage$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"waitForTransaction"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToRecs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  world"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"txReduced$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"blockLogsStorage$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".pipe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"mergeMap"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(({ operations }) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"operations"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".map"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((op) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"op"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"log"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?.transactionHash)"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".filter"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(isDefined)))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"actionSystem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createActionSystem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(world"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" txReduced$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" waitForTransaction);"})]})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Fixed a bug in ",(0,l.jsx)(s.code,{children:"waitForComponentValueIn"})," that caused the promise to not resolve if the component value was already set when the function was called."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Fixed a bug in ",(0,l.jsx)(s.code,{children:"createActionSystem"})," that caused optimistic updates to be incorrectly propagated to requirement checks. To fix the bug, you must now pass in the full component object to the action's ",(0,l.jsx)(s.code,{children:"updates"})," instead of just the component name."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  actions.add({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    updates: () => ["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-       component: "Resource",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+       component: Resource,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ],"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  });"})})]})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c03aff39e9882c8a827a3ed1ee81816231973816",children:"chore: delete std-client package (#1342)"})})," (@latticexyz/std-client)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removes ",(0,l.jsx)(s.code,{children:"std-client"})," package. Please see the ",(0,l.jsx)(s.a,{href:"https://mud.dev/changelog",children:"changelog"})," for how to migrate your app to the new ",(0,l.jsx)(s.code,{children:"store-sync"})," package. Or create a new project from an up-to-date template with ",(0,l.jsx)(s.code,{children:"pnpm create mud@next your-app-name"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6255a314240b1d36a8735f3dc7eb1672e16bac1a",children:"chore: delete ecs-browser package (#1339)"})})," (@latticexyz/ecs-browser)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removes ",(0,l.jsx)(s.code,{children:"ecs-browser"})," package. This has now been replaced by ",(0,l.jsx)(s.code,{children:"dev-tools"}),", which comes out-of-the-box when creating a new MUD app from the templates (",(0,l.jsx)(s.code,{children:"pnpm create mud@next your-app-name"}),"). We'll be adding deeper RECS support (querying for entities) in a future release."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e3de1a338fe110ac33ba9fb833366541e4cf4cf1",children:"chore: delete store-cache package (#1343)"})})," (@latticexyz/store-cache)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removes ",(0,l.jsx)(s.code,{children:"store-cache"})," package. Please see the ",(0,l.jsx)(s.a,{href:"https://mud.dev/changelog",children:"changelog"})," for how to migrate your app to the new ",(0,l.jsx)(s.code,{children:"store-sync"})," package. Or create a new project from an up-to-date template with ",(0,l.jsx)(s.code,{children:"pnpm create mud@next your-app-name"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["If you need reactivity, we recommend using ",(0,l.jsx)(s.code,{children:"recs"})," package and ",(0,l.jsx)(s.code,{children:"syncToRecs"}),". We'll be adding reactivity to ",(0,l.jsx)(s.code,{children:"syncToSqlite"})," in a future release."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e3de1a338fe110ac33ba9fb833366541e4cf4cf1",children:"chore: delete store-cache package (#1343)"})})," (@latticexyz/react)"]}),"\n",(0,l.jsxs)(s.p,{children:["Removes ",(0,l.jsx)(s.code,{children:"useRow"})," and ",(0,l.jsx)(s.code,{children:"useRows"})," hooks, previously powered by ",(0,l.jsx)(s.code,{children:"store-cache"}),", which is now deprecated. Please use ",(0,l.jsx)(s.code,{children:"recs"})," and the corresponding ",(0,l.jsx)(s.code,{children:"useEntityQuery"})," and ",(0,l.jsx)(s.code,{children:"useComponentValue"})," hooks. We'll have more hooks soon for SQL.js sync backends."]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next3",children:"Version 2.0.0-next.3"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-14",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57",children:"feat(world, store): stop loading schema from storage, require schema as an argument (#1174)"})})," (@latticexyz/cli, @latticexyz/store, @latticexyz/world, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["All ",(0,l.jsx)(s.code,{children:"Store"})," methods now require the table's value schema to be passed in as an argument instead of loading it from storage.\nThis decreases gas cost and removes circular dependencies of the Schema table (where it was not possible to write to the Schema table before the Schema table was registered)."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  function setRecord("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32 table,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes32[] calldata key,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    bytes calldata data,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   Schema valueSchema"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) external;"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["The same diff applies to ",(0,l.jsx)(s.code,{children:"getRecord"}),", ",(0,l.jsx)(s.code,{children:"getField"}),", ",(0,l.jsx)(s.code,{children:"setField"}),", ",(0,l.jsx)(s.code,{children:"pushToField"}),", ",(0,l.jsx)(s.code,{children:"popFromField"}),", ",(0,l.jsx)(s.code,{children:"updateInField"}),", and ",(0,l.jsx)(s.code,{children:"deleteRecord"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["This change only requires changes in downstream projects if the ",(0,l.jsx)(s.code,{children:"Store"})," methods were accessed directly. In most cases it is fully abstracted in the generated table libraries,\nso downstream projects only need to regenerate their table libraries after updating MUD."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c32a9269a30c1898932ebbf7e3b60e25d1bd884c",children:"refactor(world): combine name and namespace to resource selector in World methods (#1208)"})})," (@latticexyz/cli, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["All ",(0,l.jsx)(s.code,{children:"World"})," function selectors that previously had ",(0,l.jsx)(s.code,{children:"bytes16 namespace, bytes16 name"})," arguments now use ",(0,l.jsx)(s.code,{children:"bytes32 resourceSelector"})," instead.\nThis includes ",(0,l.jsx)(s.code,{children:"setRecord"}),", ",(0,l.jsx)(s.code,{children:"setField"}),", ",(0,l.jsx)(s.code,{children:"pushToField"}),", ",(0,l.jsx)(s.code,{children:"popFromField"}),", ",(0,l.jsx)(s.code,{children:"updateInField"}),", ",(0,l.jsx)(s.code,{children:"deleteRecord"}),", ",(0,l.jsx)(s.code,{children:"call"}),", ",(0,l.jsx)(s.code,{children:"grantAccess"}),", ",(0,l.jsx)(s.code,{children:"revokeAccess"}),", ",(0,l.jsx)(s.code,{children:"registerTable"}),",\n",(0,l.jsx)(s.code,{children:"registerStoreHook"}),", ",(0,l.jsx)(s.code,{children:"registerSystemHook"}),", ",(0,l.jsx)(s.code,{children:"registerFunctionSelector"}),", ",(0,l.jsx)(s.code,{children:"registerSystem"})," and ",(0,l.jsx)(s.code,{children:"registerRootFunctionSelector"}),".\nThis change aligns the ",(0,l.jsx)(s.code,{children:"World"})," function selectors with the ",(0,l.jsx)(s.code,{children:"Store"})," function selectors, reduces clutter, reduces gas cost and reduces the ",(0,l.jsx)(s.code,{children:"World"}),"'s contract size."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"World"}),"'s ",(0,l.jsx)(s.code,{children:"registerHook"})," function is removed. Use ",(0,l.jsx)(s.code,{children:"registerStoreHook"})," or ",(0,l.jsx)(s.code,{children:"registerSystemHook"})," instead."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"deploy"})," script is updated to integrate the World interface changes"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1",children:"refactor: remove v1 network package, remove snap sync module, deprecate std-client (#1311)"})})," (@latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"SnapSyncModule"})," is removed. The recommended way of loading the initial state of a MUD app is via the new ",(0,l.jsx)(s.a,{href:"https://mud.dev/indexer",children:(0,l.jsx)(s.code,{children:"store-indexer"})}),". Loading state via contract getter functions is not recommended, as it's computationally heavy on the RPC, can't be cached, and is an easy way to shoot yourself in the foot with exploding RPC costs."]}),"\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"@latticexyz/network"})," package was deprecated and is now removed. All consumers should upgrade to the new sync stack from ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/433078c54c22fa1b4e32d7204fb41bd5f79ca1db",children:"refactor(store): optimize PackedCounter (#1231)"})})," (@latticexyz/cli, @latticexyz/protocol-parser, @latticexyz/services, @latticexyz/store-sync, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Reverse PackedCounter encoding, to optimize gas for bitshifts.\nInts are right-aligned, shifting using an index is straightforward if they are indexed right-to-left."}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Previous encoding: (7 bytes | accumulator),(5 bytes | counter 1),...,(5 bytes | counter 5)"}),"\n",(0,l.jsx)(s.li,{children:"New encoding: (5 bytes | counter 5),...,(5 bytes | counter 1),(7 bytes | accumulator)"}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab",children:"feat(store,world): combine schema and metadata registration, rename getSchema to getValueSchema, change Schema table id (#1182)"})})," (@latticexyz/cli, @latticexyz/store, @latticexyz/world, @latticexyz/store-sync, create-mud)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"Store"}),"'s internal schema table is now a normal table instead of using special code paths. It is renamed to Tables, and the table ID changed from ",(0,l.jsx)(s.code,{children:"mudstore:schema"})," to ",(0,l.jsx)(s.code,{children:"mudstore:Tables"})]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"Store"}),"'s ",(0,l.jsx)(s.code,{children:"registerSchema"})," and ",(0,l.jsx)(s.code,{children:"setMetadata"})," are combined into a single ",(0,l.jsx)(s.code,{children:"registerTable"})," method. This means metadata (key names, field names) is immutable and indexers can create tables with this metadata when a new table is registered on-chain."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-  function registerSchema(bytes32 table, Schema schema, Schema keySchema) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-  function setMetadata(bytes32 table, string calldata tableName, string[] calldata fieldNames) external;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+  function registerTable("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+    bytes32 table,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+    Schema keySchema,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+    Schema valueSchema,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+    string[] calldata keyNames,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+    string[] calldata fieldNames"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+  ) external;"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"World"}),"'s ",(0,l.jsx)(s.code,{children:"registerTable"})," method is updated to match the ",(0,l.jsx)(s.code,{children:"Store"})," interface, ",(0,l.jsx)(s.code,{children:"setMetadata"})," is removed"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"getSchema"})," method is renamed to ",(0,l.jsx)(s.code,{children:"getValueSchema"})," on all interfaces"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- function getSchema(bytes32 table) external view returns (Schema schema);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ function getValueSchema(bytes32 table) external view returns (Schema valueSchema);"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The ",(0,l.jsx)(s.code,{children:"store-sync"})," and ",(0,l.jsx)(s.code,{children:"cli"})," packages are updated to integrate the breaking protocol changes. Downstream projects only need to manually integrate these changes if they access low level ",(0,l.jsx)(s.code,{children:"Store"})," or ",(0,l.jsx)(s.code,{children:"World"})," functions. Otherwise, a fresh deploy with the latest MUD will get you these changes."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1",children:"refactor: remove v1 network package, remove snap sync module, deprecate std-client (#1311)"})})," (@latticexyz/services, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Move ",(0,l.jsx)(s.code,{children:"createFaucetService"})," from ",(0,l.jsx)(s.code,{children:"@latticexyz/network"})," to ",(0,l.jsx)(s.code,{children:"@latticexyz/services/faucet"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { createFaucetService } from "@latticexyz/network";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { createFaucetService } from "@latticexyz/services/faucet";'})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1",children:"refactor: remove v1 network package, remove snap sync module, deprecate std-client (#1311)"})})," (@latticexyz/std-client, @latticexyz/common, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Deprecate ",(0,l.jsx)(s.code,{children:"@latticexyz/std-client"})," and remove v1 network dependencies."]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"getBurnerWallet"})," is replaced by ",(0,l.jsx)(s.code,{children:"getBurnerPrivateKey"})," from ",(0,l.jsx)(s.code,{children:"@latticexyz/common"}),". It now returns a ",(0,l.jsx)(s.code,{children:"Hex"})," string instead of an ",(0,l.jsx)(s.code,{children:"rxjs"})," ",(0,l.jsx)(s.code,{children:"BehaviorSubject"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"text","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"text","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'- import { getBurnerWallet } from "@latticexyz/std-client";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'+ import { getBurnerPrivateKey } from "@latticexyz/common";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"}})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"- const privateKey = getBurnerWallet().value;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"- const privateKey = getBurnerPrivateKey();"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["All functions from ",(0,l.jsx)(s.code,{children:"std-client"})," that depended on v1 network code are removed (most notably ",(0,l.jsx)(s.code,{children:"setupMUDNetwork"})," and ",(0,l.jsx)(s.code,{children:"setupMUDV2Network"}),"). Consumers should upgrade to v2 networking code from ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["The following functions are removed from ",(0,l.jsx)(s.code,{children:"std-client"})," because they are very use-case specific and depend on deprecated code: ",(0,l.jsx)(s.code,{children:"getCurrentTurn"}),", ",(0,l.jsx)(s.code,{children:"getTurnAtTime"}),", ",(0,l.jsx)(s.code,{children:"getGameConfig"}),", ",(0,l.jsx)(s.code,{children:"isUntraversable"}),", ",(0,l.jsx)(s.code,{children:"getPlayerEntity"}),", ",(0,l.jsx)(s.code,{children:"resolveRelationshipChain"}),", ",(0,l.jsx)(s.code,{children:"findEntityWithComponentInRelationshipChain"}),", ",(0,l.jsx)(s.code,{children:"findInRelationshipChain"}),". Consumers should vendor these functions if they are still needed."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Remaining exports from ",(0,l.jsx)(s.code,{children:"std-client"})," are moved to ",(0,l.jsx)(s.code,{children:"/deprecated"}),". The package will be removed in a future release (once there are replacements for the deprecated exports)."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { ... } from "@latticexyz/std-client";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { ... } from "@latticexyz/std-client/deprecated";'})})]})}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-11",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/bb6ada74016bdd5fdf83c930008c694f2f62505e",children:"feat(common,store-sync): improve initial sync to not block returned promise (#1315)"})})," (@latticexyz/common, @latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Initial sync from indexer no longer blocks the promise returning from ",(0,l.jsx)(s.code,{children:"createStoreSync"}),", ",(0,l.jsx)(s.code,{children:"syncToRecs"}),", and ",(0,l.jsx)(s.code,{children:"syncToSqlite"}),". This should help with rendering loading screens using the ",(0,l.jsx)(s.code,{children:"SyncProgress"})," RECS component and avoid the long flashes of no content in templates."]}),"\n",(0,l.jsxs)(s.p,{children:["By default, ",(0,l.jsx)(s.code,{children:"syncToRecs"})," and ",(0,l.jsx)(s.code,{children:"syncToSqlite"})," will start syncing (via observable subscription) immediately after called."]}),"\n",(0,l.jsxs)(s.p,{children:["If your app needs to control when syncing starts, you can use the ",(0,l.jsx)(s.code,{children:"startSync: false"})," option and then ",(0,l.jsx)(s.code,{children:"blockStoreOperations$.subscribe()"})," to start the sync yourself. Just be sure to unsubscribe to avoid memory leaks."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"blockStorageOperations$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToRecs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  startSync: "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// start sync manually by subscribing to `blockStorageOperation$`"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"subcription"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"blockStorageOperation$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".subscribe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// clean up subscription"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"subscription"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".unsubscribe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd",children:"refactor(store): optimize table libraries (#1303)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsx)(s.p,{children:"Optimize autogenerated table libraries"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/3e024fcf395a1c1b38d12362fc98472290eb7cf1",children:"feat(store-sync): add more logging to waitForTransaction (#1317)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["add retry attempts and more logging to ",(0,l.jsx)(s.code,{children:"waitForTransaction"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61",children:"refactor(store): optimize Schema (#1252)"})})," (@latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Optimize Schema methods.\nReturn ",(0,l.jsx)(s.code,{children:"uint256"})," instead of ",(0,l.jsx)(s.code,{children:"uint8"})," in SchemaInstance numFields methods"]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next2",children:"Version 2.0.0-next.2"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-15",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b621fb97731a0ceed9b67d741f40648a8aa64817",children:"feat(store-indexer): use fastify, move trpc to /trpc (#1232)"})})," (@latticexyz/store-indexer)"]}),"\n",(0,l.jsxs)(s.p,{children:["Adds a ",(0,l.jsx)(s.a,{href:"https://fastify.dev/",children:"Fastify"})," server in front of tRPC and puts tRPC endpoints under ",(0,l.jsx)(s.code,{children:"/trpc"})," to make way for other top-level endpoints (e.g. ",(0,l.jsx)(s.a,{href:"https://github.com/iway1/trpc-panel",children:"tRPC panel"})," or other API frontends like REST or gRPC)."]}),"\n",(0,l.jsxs)(s.p,{children:["If you're using ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync"})," packages with an indexer (either ",(0,l.jsx)(s.code,{children:"createIndexerClient"})," or ",(0,l.jsx)(s.code,{children:"indexerUrl"})," argument of ",(0,l.jsx)(s.code,{children:"syncToRecs"}),"), then you'll want to update your indexer URL:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" createIndexerClient({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-  url: "https://indexer.dev.linfra.xyz",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+  url: "https://indexer.dev.linfra.xyz/trpc",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" });"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" syncToRecs({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"   ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-  indexerUrl: "https://indexer.dev.linfra.xyz",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+  indexerUrl: "https://indexer.dev.linfra.xyz/trpc",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" });"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062",children:"refactor(store): remove TableId library (#1279)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsxs)(s.p,{children:["Remove ",(0,l.jsx)(s.code,{children:"TableId"})," library to simplify ",(0,l.jsx)(s.code,{children:"store"})," package"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473",children:"feat(create-mud): infer recs components from config (#1278)"})})," (@latticexyz/cli, @latticexyz/std-client, @latticexyz/store-sync, @latticexyz/store, @latticexyz/world, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["RECS components are now dynamically created and inferred from your MUD config when using ",(0,l.jsx)(s.code,{children:"syncToRecs"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"To migrate existing projects after upgrading to this MUD version:"}),"\n",(0,l.jsxs)(s.ol,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Remove ",(0,l.jsx)(s.code,{children:"contractComponents.ts"})," from ",(0,l.jsx)(s.code,{children:"client/src/mud"})]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Remove ",(0,l.jsx)(s.code,{children:"components"})," argument from ",(0,l.jsx)(s.code,{children:"syncToRecs"})]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Update ",(0,l.jsx)(s.code,{children:"build:mud"})," and ",(0,l.jsx)(s.code,{children:"dev"})," scripts in ",(0,l.jsx)(s.code,{children:"contracts/package.json"})," to remove tsgen"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ "build:mud": "mud tablegen && mud worldgen",'})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ "dev": "pnpm mud dev-contracts",'})})]})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39",children:"feat: bump viem to 1.6.0 (#1308)"})})," (@latticexyz/block-logs-stream)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["removes our own ",(0,l.jsx)(s.code,{children:"getLogs"})," function now that viem's ",(0,l.jsx)(s.code,{children:"getLogs"})," supports using multiple ",(0,l.jsx)(s.code,{children:"events"})," per RPC call."]}),"\n",(0,l.jsxs)(s.li,{children:["removes ",(0,l.jsx)(s.code,{children:"isNonPendingBlock"})," and ",(0,l.jsx)(s.code,{children:"isNonPendingLog"})," helpers now that viem narrows ",(0,l.jsx)(s.code,{children:"Block"})," and ",(0,l.jsx)(s.code,{children:"Log"})," types based on inputs"]}),"\n",(0,l.jsxs)(s.li,{children:["simplifies ",(0,l.jsx)(s.code,{children:"groupLogsByBlockNumber"})," types and tests"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad",children:"feat(dev-tools): use new sync stack (#1284)"})})," (@latticexyz/dev-tools, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"MUD dev tools is updated to latest sync stack. You must now pass in all of its data requirements rather than relying on magic globals."}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'import { mount as mountDevTools } from "@latticexyz/dev-tools";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- mountDevTools();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ mountDevTools({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   config,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   publicClient,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   walletClient,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   latestBlock$,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   blockStorageOperations$,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   worldAddress,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   worldAbi,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   write$,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   // if you're using recs"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   recsWorld,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ });"})})]})}),"\n",(0,l.jsx)(s.p,{children:"It's also advised to wrap dev tools so that it is only mounted during development mode. Here's how you do this with Vite:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// https://vitejs.dev/guide/env-and-mode.html"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"meta"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"DEV"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"mountDevTools"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" });"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-12",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad",children:"feat(dev-tools): use new sync stack (#1284)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"createContract"})," now has an ",(0,l.jsx)(s.code,{children:"onWrite"})," callback so you can observe writes. This is useful for wiring up the transanction log in MUD dev tools."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ContractWrite } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/common"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { Subject } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rxjs"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"write$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Subject"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ContractWrite"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">();"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"creactContract"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  onWrite: (write) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"write$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".next"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(write)"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39",children:"feat: bump viem to 1.6.0 (#1308)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["adds ",(0,l.jsx)(s.code,{children:"defaultPriorityFee"})," to ",(0,l.jsx)(s.code,{children:"mudFoundry"})," for better support with MUD's default anvil config and removes workaround in ",(0,l.jsx)(s.code,{children:"createContract"})]}),"\n",(0,l.jsx)(s.li,{children:"improves nonce error detection using viem's custom errors"}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/753bdce41597200641daba60727ff1b53d2b512e",children:"feat(store-sync,store-indexer): consolidate sync logic, add syncToSqlite (#1240)"})})," (@latticexyz/dev-tools, @latticexyz/store-indexer, @latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Store sync logic is now consolidated into a ",(0,l.jsx)(s.code,{children:"createStoreSync"})," function exported from ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync"}),". This simplifies each storage sync strategy to just a simple wrapper around the storage adapter. You can now sync to RECS with ",(0,l.jsx)(s.code,{children:"syncToRecs"})," or SQLite with ",(0,l.jsx)(s.code,{children:"syncToSqlite"})," and PostgreSQL support coming soon."]}),"\n",(0,l.jsxs)(s.p,{children:["There are no breaking changes if you were just using ",(0,l.jsx)(s.code,{children:"syncToRecs"})," from ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync"})," or running the ",(0,l.jsx)(s.code,{children:"sqlite-indexer"})," binary from ",(0,l.jsx)(s.code,{children:"@latticexyz/store-indexer"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad",children:"feat(dev-tools): use new sync stack (#1284)"})})," (@latticexyz/react)"]}),"\n",(0,l.jsxs)(s.p,{children:["Adds a ",(0,l.jsx)(s.code,{children:"usePromise"})," hook that returns a ",(0,l.jsxs)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled",children:["native ",(0,l.jsx)(s.code,{children:"PromiseSettledResult"})," object"]}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"tsx","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"tsx","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"promise"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"fetch"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(url);"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"usePromise"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(promise);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".status "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"idle"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".status "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"pending"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <>fetching</>;"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".status "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rejected"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <>error fetching: {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"String"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".reason)}</>;"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".status "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"fulfilled"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <>fetch status: {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"value"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".status}</>;"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-12",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39",children:"feat: bump viem to 1.6.0 (#1308)"})})," (@latticexyz/block-logs-stream, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/network, @latticexyz/protocol-parser, @latticexyz/schema-type, @latticexyz/std-client, @latticexyz/store-indexer, @latticexyz/store-sync, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"bump viem to 1.6.0"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5294a7d5983c52cb336373566afd6a8ec7fc4bfb",children:"feat(dev-tools): improve support for non-store recs components (#1302)"})})," (@latticexyz/dev-tools, @latticexyz/store-sync)"]}),"\n",(0,l.jsx)(s.p,{children:"Improves support for internal/client-only RECS components"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39",children:"feat: bump viem to 1.6.0 (#1308)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["remove usages of ",(0,l.jsx)(s.code,{children:"isNonPendingBlock"})," and ",(0,l.jsx)(s.code,{children:"isNonPendingLog"})," (fixed with more specific viem types)"]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next1",children:"Version 2.0.0-next.1"}),"\n",(0,l.jsx)(s.h3,{id:"major-changes-16",children:"Major changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/2f6cfef91daacf09db82a4b7c69cff3af583b8f6",children:"chore: fix changeset type (#1220)"})})," (@latticexyz/store-indexer, @latticexyz/store-sync)"]}),"\n",(0,l.jsx)(s.p,{children:"Adds store indexer service package with utils to query the indexer service."}),"\n",(0,l.jsxs)(s.p,{children:["You can run the indexer locally by checking out the MUD monorepo, installing/building everything, and running ",(0,l.jsx)(s.code,{children:"pnpm start:local"})," from ",(0,l.jsx)(s.code,{children:"packages/store-indexer"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"To query the indexer in the client, you can create a tRPC client with a URL pointing to the indexer service and call the available tRPC methods:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createIndexerClient } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync/trpc-indexer"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"indexer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createIndexerClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ url"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" indexerUrl });"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"indexer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"findAll"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".query"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  chainId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"publicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"chain"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".id"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:["If you're using ",(0,l.jsx)(s.code,{children:"syncToRecs"}),", you can just pass in the ",(0,l.jsx)(s.code,{children:"indexerUrl"})," option as a shortcut to the above:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { syncToRecs } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync/recs"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToRecs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  indexerUrl: "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://your.indexer.service"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9a7c9009a43bc5691bb33996bcf669711cc51503",children:"fix: changeset package name (#1270)"})})," (@latticexyz/cli, @latticexyz/common, @latticexyz/recs, @latticexyz/store-indexer, create-mud)"]}),"\n",(0,l.jsxs)(s.p,{children:["Templates and examples now use MUD's new sync packages, all built on top of ",(0,l.jsx)(s.a,{href:"https://viem.sh/",children:"viem"}),". This greatly speeds up and stabilizes our networking code and improves types throughout."]}),"\n",(0,l.jsxs)(s.p,{children:["These new sync packages come with support for our ",(0,l.jsx)(s.code,{children:"recs"})," package, including ",(0,l.jsx)(s.code,{children:"encodeEntity"})," and ",(0,l.jsx)(s.code,{children:"decodeEntity"})," utilities for composite keys."]}),"\n",(0,l.jsxs)(s.p,{children:["If you're using ",(0,l.jsx)(s.code,{children:"store-cache"})," and ",(0,l.jsx)(s.code,{children:"useRow"}),"/",(0,l.jsx)(s.code,{children:"useRows"}),", you should wait to upgrade until we have a suitable replacement for those libraries. We're working on a ",(0,l.jsx)(s.a,{href:"https://github.com/sql-js/sql.js/",children:"sql.js"}),"-powered sync module that will replace ",(0,l.jsx)(s.code,{children:"store-cache"}),"."]}),"\n",(0,l.jsx)(s.p,{children:(0,l.jsx)(s.strong,{children:"Migrate existing RECS apps to new sync packages"})}),"\n",(0,l.jsxs)(s.p,{children:["As you migrate, you may find some features replaced, removed, or not included by default. Please ",(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/issues/new",children:"open an issue"})," and let us know if we missed anything."]}),"\n",(0,l.jsxs)(s.ol,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Add ",(0,l.jsx)(s.code,{children:"@latticexyz/store-sync"})," package to your app's ",(0,l.jsx)(s.code,{children:"client"})," package and make sure ",(0,l.jsx)(s.code,{children:"viem"})," is pinned to version ",(0,l.jsx)(s.code,{children:"1.3.1"})," (otherwise you may get type errors)"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["In your ",(0,l.jsx)(s.code,{children:"supportedChains.ts"}),", replace ",(0,l.jsx)(s.code,{children:"foundry"})," chain with our new ",(0,l.jsx)(s.code,{children:"mudFoundry"})," chain."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { foundry } from "viem/chains";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { MUDChain, latticeTestnet } from "@latticexyz/common/chains";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { MUDChain, latticeTestnet, mudFoundry } from "@latticexyz/common/chains";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- export const supportedChains: MUDChain[] = [foundry, latticeTestnet];"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ export const supportedChains: MUDChain[] = [mudFoundry, latticeTestnet];"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["In ",(0,l.jsx)(s.code,{children:"getNetworkConfig.ts"}),", remove the return type (to let TS infer it for now), remove now-unused config values, and add the viem ",(0,l.jsx)(s.code,{children:"chain"})," object."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- export async function getNetworkConfig(): Promise<NetworkConfig> {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ export async function getNetworkConfig() {"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'  const initialBlockNumber = params.has("initialBlockNumber")'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:'    ? Number(params.get("initialBlockNumber"))'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   : world?.blockNumber ?? -1; // -1 will attempt to find the block number from RPC"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   : world?.blockNumber ?? 0n;"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ return {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   privateKey: getBurnerWallet().value,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   chain,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   worldAddress,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   initialBlockNumber,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+   faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ };"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["In ",(0,l.jsx)(s.code,{children:"setupNetwork.ts"}),", replace ",(0,l.jsx)(s.code,{children:"setupMUDV2Network"})," with ",(0,l.jsx)(s.code,{children:"syncToRecs"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { setupMUDV2Network } from "@latticexyz/std-client";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'- import { createFastTxExecutor, createFaucetService, getSnapSyncRecords } from "@latticexyz/network";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { createFaucetService } from "@latticexyz/network";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { createPublicClient, fallback, webSocket, http, createWalletClient, getContract, Hex, parseEther, ClientConfig } from "viem";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { encodeEntity, syncToRecs } from "@latticexyz/store-sync/recs";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { createBurnerAccount, createContract, transportObserver } from "@latticexyz/common";'})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- const result = await setupMUDV2Network({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- });"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ const clientOptions = {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   chain: networkConfig.chain,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   transport: transportObserver(fallback([webSocket(), http()])),"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   pollingInterval: 1000,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ } as const satisfies ClientConfig;"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ const publicClient = createPublicClient(clientOptions);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ const burnerAccount = createBurnerAccount(networkConfig.privateKey as Hex);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ const burnerWalletClient = createWalletClient({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   ...clientOptions,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   account: burnerAccount,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ });"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ const { components, latestBlock$, blockStorageOperations$, waitForTransaction } = await syncToRecs({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   world,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   config: storeConfig,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   address: networkConfig.worldAddress as Hex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   publicClient,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   components: contractComponents,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   startBlock: BigInt(networkConfig.initialBlockNumber),"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   indexerUrl: networkConfig.indexerUrl ?? undefined,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ });"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ const worldContract = createContract({"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   address: networkConfig.worldAddress as Hex,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   abi: IWorld__factory.abi,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   publicClient,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   walletClient: burnerWalletClient,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ });"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  // Request drip from faucet"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- const signer = result.network.signer.get();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- if (networkConfig.faucetServiceUrl && signer) {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   const address = await signer.getAddress();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ if (networkConfig.faucetServiceUrl) {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   const address = burnerAccount.address;"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  const requestDrip = async () => {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   const balance = await signer.getBalance();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   const balance = await publicClient.getBalance({ address });"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    console.info(`[Dev Faucet]: Player balance -> ${balance}`);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-   const lowBalance = balance?.lte(utils.parseEther("1"));'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+   const lowBalance = balance < parseEther("1");'})})]})}),"\n",(0,l.jsxs)(s.p,{children:["You can remove the previous ethers ",(0,l.jsx)(s.code,{children:"worldContract"}),", snap sync code, and fast transaction executor."]}),"\n",(0,l.jsxs)(s.p,{children:["The return of ",(0,l.jsx)(s.code,{children:"setupNetwork"})," is a bit different than before, so you may have to do corresponding app changes."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ return {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   world,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   components,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+   playerEntity: encodeEntity({ address: "address" }, { address: burnerWalletClient.account.address }),'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   publicClient,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   walletClient: burnerWalletClient,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   latestBlock$,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   blockStorageOperations$,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   waitForTransaction,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   worldContract,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ };"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:["Update ",(0,l.jsx)(s.code,{children:"createSystemCalls"})," with the new return type of ",(0,l.jsx)(s.code,{children:"setupNetwork"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  export function createSystemCalls("})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-   { worldSend, txReduced$, singletonEntity }: SetupNetworkResult,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+   { worldContract, waitForTransaction }: SetupNetworkResult,"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    { Counter }: ClientComponents"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  ) {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"     const increment = async () => {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:'-      const tx = await worldSend("increment", []);'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"-      await awaitStreamValue(txReduced$, (txHash) => txHash === tx.hash);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+      const tx = await worldContract.write.increment();"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+      await waitForTransaction(tx);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"       return getComponentValue(Counter, singletonEntity);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"     };"})})]})}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsx)(s.p,{children:"(optional) If you still need a clock, you can create it with:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { map"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" filter } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rxjs"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createClock } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/network"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"clock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createClock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  period"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  initialTime"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  syncInterval"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"world"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".registerDisposer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(() "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"clock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".dispose"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"());"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"latestBlock$"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".pipe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"map"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((block) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Number"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"block"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".timestamp) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Map to timestamp in ms"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"filter"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((blockTimestamp) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" blockTimestamp "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!=="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"clock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".lastUpdateTime)"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Ignore if the clock was already refreshed with this block"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"filter"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((blockTimestamp) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" blockTimestamp "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!=="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"clock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".currentTime)"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Ignore if the current local timestamp is correct"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  )"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".subscribe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"clock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".update); "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Update the local clock"})]})]})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["If you're using the previous ",(0,l.jsx)(s.code,{children:"LoadingState"})," component, you'll want to migrate to the new ",(0,l.jsx)(s.code,{children:"SyncProgress"}),":"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { SyncStep"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" singletonEntity } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync/recs"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"syncProgress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"useComponentValue"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(SyncProgress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" singletonEntity"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  message"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Connecting"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  percentage"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  step"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"SyncStep"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"INITIALIZE"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"syncProgress"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".step "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"SyncStep"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"LIVE"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// we're live!"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/6c6733256f91cddb0e913217cbd8e02e6bc484c7",children:"feat(common): replace TableId with tableIdToHex/hexToTableId (#1258)"})})," (@latticexyz/cli, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/network, @latticexyz/std-client, @latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Add ",(0,l.jsx)(s.code,{children:"tableIdToHex"})," and ",(0,l.jsx)(s.code,{children:"hexToTableId"})," pure functions and move/deprecate ",(0,l.jsx)(s.code,{children:"TableId"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/cd5abcc3b4744fab9a45c322bc76ff013355ffcb",children:"feat(common): add createContract, createNonceManager utils (#1261)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsx)(s.p,{children:"Add utils for using viem with MUD"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"createContract"})," is a wrapper around ",(0,l.jsxs)(s.a,{href:"https://viem.sh/docs/contract/getContract.html",children:["viem's ",(0,l.jsx)(s.code,{children:"getContract"})]})," but with better nonce handling for faster executing of transactions. It has the same arguments and return type as ",(0,l.jsx)(s.code,{children:"getContract"}),"."]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"createNonceManager"})," helps track local nonces, used by ",(0,l.jsx)(s.code,{children:"createContract"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["Also renames ",(0,l.jsx)(s.code,{children:"mudTransportObserver"})," to ",(0,l.jsx)(s.code,{children:"transportObserver"}),"."]}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-13",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/3fb9ce2839271a0dcfe97f86394195f7a6f70f50",children:"feat(common): add viem utils (#1245)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsx)(s.p,{children:"Add utils for using viem with MUD"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"mudFoundry"})," chain with a transaction request formatter that temporarily removes max fees to work better with anvil ",(0,l.jsx)(s.code,{children:"--base-fee 0"})]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"createBurnerAccount"})," that also temporarily removes max fees during transaction signing to work better with anvil ",(0,l.jsx)(s.code,{children:"--base-fee 0"})]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"mudTransportObserver"})," that will soon let MUD Dev Tools observe transactions"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"You can use them like:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createBurnerAccount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mudTransportObserver } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/common"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { mudFoundry } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/common/chains"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createWalletClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  account"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createBurnerAccount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(privateKey)"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  chain"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mudFoundry"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  transport"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"mudTransportObserver"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"http"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"())"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  pollingInterval"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/131c63e539a8e9947835dcc323c8b37562aed9ca",children:"feat(store-indexer,store-sync): make chain optional, configure indexer with RPC (#1234)"})})," (@latticexyz/store-indexer, @latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Accept a plain viem ",(0,l.jsx)(s.code,{children:"PublicClient"})," (instead of requiring a ",(0,l.jsx)(s.code,{children:"Chain"})," to be set) in ",(0,l.jsx)(s.code,{children:"store-sync"})," and ",(0,l.jsx)(s.code,{children:"store-indexer"})," functions. These functions now fetch chain ID using ",(0,l.jsx)(s.code,{children:"publicClient.getChainId()"})," when no ",(0,l.jsx)(s.code,{children:"publicClient.chain.id"})," is present."]}),"\n",(0,l.jsxs)(s.li,{children:["Allow configuring ",(0,l.jsx)(s.code,{children:"store-indexer"})," with a set of RPC URLs (",(0,l.jsx)(s.code,{children:"RPC_HTTP_URL"})," and ",(0,l.jsx)(s.code,{children:"RPC_WS_URL"}),") instead of ",(0,l.jsx)(s.code,{children:"CHAIN_ID"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/582388ba5f95c3efde56779058220dbd7aedee0b",children:"feat(store-sync): export singletonEntity as const, allow startBlock in syncToRecs (#1235)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Export ",(0,l.jsx)(s.code,{children:"singletonEntity"})," as const rather than within the ",(0,l.jsx)(s.code,{children:"syncToRecs"})," result."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"diff","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"diff","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#EF6270"},children:"- const { singletonEntity, ... } = syncToRecs({ ... });"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:'+ import { singletonEntity, syncToRecs } from "@latticexyz/store-sync/recs";'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"#4BB74A"},children:"+ const { ... } = syncToRecs({ ... });"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b02f9d0e43089e5f9b46d817ea2032ce0a1b0b07",children:"feat(schema-type): add type narrowing isStaticAbiType (#1196)"})})," (@latticexyz/schema-type)"]}),"\n",(0,l.jsxs)(s.p,{children:["add type narrowing ",(0,l.jsx)(s.code,{children:"isStaticAbiType"})]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/6071163f70599384c5034dd772ef6fc7cdae9983",children:["feat(common): move zero gas fee override to ",(0,l.jsx)(s.code,{children:"createContract"})," (#1266)"]})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Moves zero gas fee override to ",(0,l.jsx)(s.code,{children:"createContract"})," until ",(0,l.jsx)(s.a,{href:"https://github.com/wagmi-dev/viem/pull/963",children:"https://github.com/wagmi-dev/viem/pull/963"})," or similar feature lands"]}),"\n",(0,l.jsxs)(s.li,{children:["Skip simulation if ",(0,l.jsx)(s.code,{children:"gas"})," is provided"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-13",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/168a4cb43ce4f7bfbdb7b1b9d4c305b912a0d3f2",children:"fix(cli): add support for legacy transactions in deploy script (#1178)"})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.p,{children:["Add support for legacy transactions in deploy script by falling back to ",(0,l.jsx)(s.code,{children:"gasPrice"})," if ",(0,l.jsx)(s.code,{children:"lastBaseFeePerGas"})," is not available"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/3236f799e501be227da6e42e7b41a4928750115c",children:"feat: protocol-parser in go (#1116)"})})," (@latticexyz/services)"]}),"\n",(0,l.jsx)(s.p,{children:"protocol-parser in Go"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/c963b46c7eaceebc652930936643365b8c48a021",children:"refactor(store): optimize Storage library (#1194)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsx)(s.p,{children:"Optimize storage library"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/35c9f33dfb84b0bb94e0f7a8b0c9830761795bdb",children:["feat(common): remove need for tx queue in ",(0,l.jsx)(s.code,{children:"createContract"})," (#1271)"]})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Remove need for tx queue in ",(0,l.jsx)(s.code,{children:"createContract"})]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/57a5260830401c9ad93196a895a50b0fc4a86183",children:"feat(store-sync): add block numbers to SyncProgress (#1228)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Adds ",(0,l.jsx)(s.code,{children:"latestBlockNumber"})," and ",(0,l.jsx)(s.code,{children:"lastBlockNumberProcessed"})," to internal ",(0,l.jsx)(s.code,{children:"SyncProgress"})," component"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/9e5baf4fff0c60615b8f2b4645fb11cb78cb0bd8",children:"feat(store-sync): sync to RECS (#1197)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsx)(s.p,{children:"Add RECS sync strategy and corresponding utils"}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createPublicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" http } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'viem'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { syncToRecs } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@latticexyz/store-sync'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" storeConfig "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'contracts/mud.config'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { defineContractComponents } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./defineContractComponents'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"publicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createPublicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  chain"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  transport"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"http"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  pollingInterval"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"components"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"singletonEntity"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"latestBlock$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"blockStorageOperations$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"waitForTransaction"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToRecs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  world"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  config"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" storeConfig"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'0x...'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  publicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  components"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"defineContractComponents"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/5c965a919355bf98d7ea69463890fe605bcde206",children:"fix(store): align Store event names between IStoreWrite and StoreCore (#1237)"})})," (@latticexyz/store)"]}),"\n",(0,l.jsx)(s.p,{children:"Align Store events parameter naming between IStoreWrite and StoreCore"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e259ef79f4d9026353176d0f74628cae50c2f69b",children:"fix(cli): explicit import of world as type (#1206)"})})," (@latticexyz/cli, @latticexyz/std-client)"]}),"\n",(0,l.jsxs)(s.p,{children:["Generated ",(0,l.jsx)(s.code,{children:"contractComponents"})," now properly import ",(0,l.jsx)(s.code,{children:"World"})," as type"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/582388ba5f95c3efde56779058220dbd7aedee0b",children:"feat(store-sync): export singletonEntity as const, allow startBlock in syncToRecs (#1235)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:["Add ",(0,l.jsx)(s.code,{children:"startBlock"})," option to ",(0,l.jsx)(s.code,{children:"syncToRecs"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { syncToRecs } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync/recs"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" worlds "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"contracts/worlds.json"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"syncToRecs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  startBlock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" worlds["}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'31337'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"].blockNumber"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/0d1a7e03a0c8258c76d0b4b76a1a558ae07bbf85",children:"chore: pin node to 18.16.1 (#1200)"})})," (@latticexyz/network)"]}),"\n",(0,l.jsx)(s.p,{children:"Remove devEmit function when sending network events from SyncWorker because they can't be serialized across the web worker boundary."}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/afdba793fd84abf17eef5ef59dd56fabe353c8bd",children:"feat(cli,recs,std-client): update RECS components with v2 key/value schemas (#1195)"})})," (@latticexyz/cli, @latticexyz/recs, @latticexyz/std-client)"]}),"\n",(0,l.jsx)(s.p,{children:"Update RECS components with v2 key/value schemas. This helps with encoding/decoding composite keys and strong types for keys/values."}),"\n",(0,l.jsxs)(s.p,{children:["This may break if you were previously dependent on ",(0,l.jsx)(s.code,{children:"component.id"}),", ",(0,l.jsx)(s.code,{children:"component.metadata.componentId"}),", or ",(0,l.jsx)(s.code,{children:"component.metadata.tableId"}),":"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"component.id"})," is now the on-chain ",(0,l.jsx)(s.code,{children:"bytes32"})," hex representation of the table ID"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"component.metadata.componentName"})," is the table name (e.g. ",(0,l.jsx)(s.code,{children:"Position"}),")"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"component.metadata.tableName"})," is the namespaced table name (e.g. ",(0,l.jsx)(s.code,{children:"myworld:Position"}),")"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"component.metadata.keySchema"})," is an object with key names and their corresponding ABI types"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"component.metadata.valueSchema"})," is an object with field names and their corresponding ABI types"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/cc2c8da000c32c02a82a1a0fd17075d11eac56c3",children:"refactor(store): update tightcoder codegen, optimize TightCoder library (#1210)"})})," (@latticexyz/common, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Refactor tightcoder to use typescript functions instead of ejs"}),"\n",(0,l.jsxs)(s.li,{children:["Optimize ",(0,l.jsx)(s.code,{children:"TightCoder"})," library"]}),"\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"isLeftAligned"})," and ",(0,l.jsx)(s.code,{children:"getLeftPaddingBits"})," common codegen helpers"]}),"\n"]}),"\n",(0,l.jsx)(s.hr,{}),"\n",(0,l.jsx)(s.h2,{id:"version-200-next0",children:"Version 2.0.0-next.0"}),"\n",(0,l.jsx)(s.h3,{id:"minor-changes-14",children:"Minor changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/904fd7d4ee06a86e481e3e02fd5744224376d0c9",children:"feat(store-sync): add store sync package (#1075)"})})," (@latticexyz/block-logs-stream, @latticexyz/protocol-parser, @latticexyz/store-sync, @latticexyz/store)"]}),"\n",(0,l.jsx)(s.p,{children:"Add store sync package"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/b98e51808aaa29f922ac215cf666cf6049e692d6",children:"feat(protocol-parser): add abiTypesToSchema (#1100)"})})," (@latticexyz/protocol-parser)"]}),"\n",(0,l.jsx)(s.p,{children:"feat: add abiTypesToSchema, a util to turn a list of abi types into a Schema by separating static and dynamic types"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/ca50fef8108422a121d03571fb4679060bd4891a",children:"chore(protocol-parser): add changeset for #1099 (#1111)"})})," (@latticexyz/protocol-parser)"]}),"\n",(0,l.jsxs)(s.p,{children:["feat: add ",(0,l.jsx)(s.code,{children:"encodeKeyTuple"}),", a util to encode key tuples in Typescript (equivalent to key tuple encoding in Solidity and inverse of ",(0,l.jsx)(s.code,{children:"decodeKeyTuple"}),").\nExample:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encodeKeyTuple"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ staticFields"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"uint256"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"int32"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bytes16"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"address"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bool"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"int8"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dynamicFields"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [] }"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"42"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"n"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"42"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"0x12340000000000000000000000000000"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// ["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'//  "0x000000000000000000000000000000000000000000000000000000000000002a",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'//  "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd6",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'//  "0x1234000000000000000000000000000000000000000000000000000000000000",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'//  "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'//  "0x0000000000000000000000000000000000000000000000000000000000000001",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'//  "0x0000000000000000000000000000000000000000000000000000000000000003",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// ]"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/eeb15cc06fcbe80c37ba3926d9387f6bd5947234",children:"feat(store-sync): rework blockLogsToStorage (#1176)"})})," (@latticexyz/block-logs-stream, @latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Replace ",(0,l.jsx)(s.code,{children:"blockEventsToStorage"})," with ",(0,l.jsx)(s.code,{children:"blockLogsToStorage"})," that exposes a ",(0,l.jsx)(s.code,{children:"storeOperations"})," callback to perform database writes from store operations. This helps encapsulates database adapters into a single wrapper/instance of ",(0,l.jsx)(s.code,{children:"blockLogsToStorage"})," and allows for wrapping a block of store operations in a database transaction."]}),"\n",(0,l.jsxs)(s.li,{children:["Add ",(0,l.jsx)(s.code,{children:"toBlock"})," option to ",(0,l.jsx)(s.code,{children:"groupLogsByBlockNumber"})," and remove ",(0,l.jsx)(s.code,{children:"blockHash"})," from results. This helps track the last block number for a given set of logs when used in the context of RxJS streams."]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/72b806979db6eb2880772193898351d657b94f75",children:"feat(block-logs-stream): add block logs stream package (#1070)"})})," (@latticexyz/block-logs-stream)"]}),"\n",(0,l.jsx)(s.p,{children:"Add block logs stream package"}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { filter"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" map"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mergeMap } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rxjs"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createPublicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" parseAbi } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"viem"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  createBlockStream"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  isNonPendingBlock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  groupLogsByBlockNumber"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  blockRangeToLogs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/block-logs-stream"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"publicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createPublicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// your viem public client config here"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"latestBlock$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createBlockStream"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ publicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" blockTag"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"latest"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" });"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"latestBlockNumber$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"latestBlock$"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".pipe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"filter"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(isNonPendingBlock)"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"map"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((block) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"block"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".number)"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"latestBlockNumber$"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".pipe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"map"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((latestBlockNumber) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ({ startBlock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"n"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" endBlock"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" latestBlockNumber }))"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"blockRangeToLogs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      publicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      address"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      events"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"parseAbi"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(["})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"event StoreDeleteRecord(bytes32 table, bytes32[] key)"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"event StoreSetField(bytes32 table, bytes32[] key, uint8 schemaIndex, bytes data)"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"event StoreSetRecord(bytes32 table, bytes32[] key, bytes data)"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"event StoreEphemeralRecord(bytes32 table, bytes32[] key, bytes data)"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      ])"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    })"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"mergeMap"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(({ logs }) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"groupLogsByBlockNumber"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(logs)))"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  )"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".subscribe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((block) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"got events for block"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" block);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  });"})})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/66cc35a8ccb21c50a1882d6c741dd045acd8bc11",children:"feat(gas-report): create package, move relevant files to it (#1147)"})})," (@latticexyz/cli, @latticexyz/gas-report, @latticexyz/store)"]}),"\n",(0,l.jsx)(s.p,{children:"Create gas-report package, move gas-report cli command and GasReporter contract to it"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/a7b30c79bcc78530d2d01858de46a0fb87954fda",children:"refactor(store,world): replace isStore with storeAddress (#1061)"})})," (@latticexyz/std-contracts, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsxs)(s.p,{children:["Rename ",(0,l.jsx)(s.code,{children:"MudV2Test"})," to ",(0,l.jsx)(s.code,{children:"MudTest"})," and move from ",(0,l.jsx)(s.code,{children:"@latticexyz/std-contracts"})," to ",(0,l.jsx)(s.code,{children:"@latticexyz/store"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"solidity","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"solidity","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// old import"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MudV2Test"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/std-contracts/src/test/MudV2Test.t.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// new import"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MudTest"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store/src/MudTest.sol"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:["Refactor ",(0,l.jsx)(s.code,{children:"StoreSwitch"})," to use a storage slot instead of ",(0,l.jsx)(s.code,{children:"function isStore()"})," to determine which contract is Store:"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["Previously ",(0,l.jsx)(s.code,{children:"StoreSwitch"})," called ",(0,l.jsx)(s.code,{children:"isStore()"})," on ",(0,l.jsx)(s.code,{children:"msg.sender"})," to determine if ",(0,l.jsx)(s.code,{children:"msg.sender"})," is a ",(0,l.jsx)(s.code,{children:"Store"})," contract. If the call succeeded, the ",(0,l.jsx)(s.code,{children:"Store"})," methods were called on ",(0,l.jsx)(s.code,{children:"msg.sender"}),", otherwise the data was written to the own storage."]}),"\n",(0,l.jsxs)(s.li,{children:["With this change ",(0,l.jsx)(s.code,{children:"StoreSwitch"})," instead checks for an ",(0,l.jsx)(s.code,{children:"address"})," in a known storage slot. If the address equals the own address, data is written to the own storage. If it is an external address, ",(0,l.jsx)(s.code,{children:"Store"})," methods are called on this address. If it is unset (",(0,l.jsx)(s.code,{children:"address(0)"}),"), store methods are called on ",(0,l.jsx)(s.code,{children:"msg.sender"}),"."]}),"\n",(0,l.jsxs)(s.li,{children:["In practice this has the same effect as before: By default the ",(0,l.jsx)(s.code,{children:"World"})," contracts sets its own address in ",(0,l.jsx)(s.code,{children:"StoreSwitch"}),", while ",(0,l.jsx)(s.code,{children:"System"})," contracts keep the Store address undefined, so ",(0,l.jsx)(s.code,{children:"Systems"})," write to their caller (",(0,l.jsx)(s.code,{children:"World"}),") if they are executed via ",(0,l.jsx)(s.code,{children:"call"})," or directly to the ",(0,l.jsx)(s.code,{children:"World"})," storage if they are executed via ",(0,l.jsx)(s.code,{children:"delegatecall"}),"."]}),"\n",(0,l.jsxs)(s.li,{children:["Besides gas savings, this change has two additional benefits:","\n",(0,l.jsxs)(s.ol,{children:["\n",(0,l.jsxs)(s.li,{children:["it is now possible for ",(0,l.jsx)(s.code,{children:"Systems"})," to explicitly set a ",(0,l.jsx)(s.code,{children:"Store"})," address to make them exclusive to that ",(0,l.jsx)(s.code,{children:"Store"})," and"]}),"\n",(0,l.jsxs)(s.li,{children:["table libraries can now be used in tests without having to provide an explicit ",(0,l.jsx)(s.code,{children:"Store"})," argument, because the ",(0,l.jsx)(s.code,{children:"MudTest"})," base contract redirects reads and writes to the internal ",(0,l.jsx)(s.code,{children:"World"})," contract."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/69a96f109065ae2564a340208d5f9a0be3616747",children:"feat(store-sync): sync to sqlite (#1185)"})})," (@latticexyz/store-sync)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"blockLogsToStorage(sqliteStorage(...))"})," converts block logs to SQLite operations. You can use it like:"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { drizzle } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"drizzle-orm/better-sqlite3"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Database "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"better-sqlite3"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { BaseSQLiteDatabase } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"drizzle-orm/sqlite-core"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { createPublicClient } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"viem"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { blockLogsToStorage } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { sqliteStorage } "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@latticexyz/store-sync/sqlite"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"database"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"drizzle"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Database"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'store.db'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"any"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"BaseSQLiteDatabase"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sync"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"void"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">;"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"publicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"createPublicClient"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" });"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"blockLogs$"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".pipe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"concatMap"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"blockLogsToStorage"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"sqliteStorage"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ database"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" publicClient })))"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"tap"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(({ blockNumber"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" operations }) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"stored"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"operations"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"length"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"operations for block"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" blockNumber);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    })"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  )"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".subscribe"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/0c4f9fea9e38ba122316cdd52c3d158c62f8cfee",children:"feat(common): new utils, truncate table ID parts (#1173)"})})," (@latticexyz/common)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"TableId.toHex()"})," now truncates name/namespace to 16 bytes each, to properly fit into a ",(0,l.jsx)(s.code,{children:"bytes32"})," hex string."]}),"\n",(0,l.jsx)(s.p,{children:"Also adds a few utils we'll need in the indexer:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"bigIntMin"})," is similar to ",(0,l.jsx)(s.code,{children:"Math.min"})," but for ",(0,l.jsx)(s.code,{children:"bigint"}),"s"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"bigIntMax"})," is similar to ",(0,l.jsx)(s.code,{children:"Math.max"})," but for ",(0,l.jsx)(s.code,{children:"bigint"}),"s"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"bigIntSort"})," for sorting an array of ",(0,l.jsx)(s.code,{children:"bigint"}),"s"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"chunk"})," to split an array into chunks"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"wait"})," returns a ",(0,l.jsx)(s.code,{children:"Promise"})," that resolves after specified number of milliseconds"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsxs)(s.a,{href:"https://github.com/latticexyz/mud/commit/c36ffd13c3d859d9a4eadd0e07f6f73ad96b54aa",children:["feat(cli): update set-version to match new release structure, add ",(0,l.jsx)(s.code,{children:"--tag"}),", ",(0,l.jsx)(s.code,{children:"--commit"})," (#1157)"]})})," (@latticexyz/cli)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["update the ",(0,l.jsx)(s.code,{children:"set-version"})," cli command to work with the new release process by adding two new options:","\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"--tag"}),": install the latest version of the given tag. For snapshot releases tags correspond to the branch name, commits to ",(0,l.jsx)(s.code,{children:"main"})," result in an automatic snapshot release, so ",(0,l.jsx)(s.code,{children:"--tag main"})," is equivalent to what used to be ",(0,l.jsx)(s.code,{children:"-v canary"})]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"--commit"}),": install a version based on a given commit hash. Since commits from ",(0,l.jsx)(s.code,{children:"main"})," result in an automatic snapshot release it works for all commits on main, and it works for manual snapshot releases from branches other than main"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"set-version"})," now updates all ",(0,l.jsx)(s.code,{children:"package.json"})," nested below the current working directory (expect ",(0,l.jsx)(s.code,{children:"node_modules"}),"), so no need for running it each workspace of a monorepo separately."]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Example:"}),"\n",(0,l.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mud"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"set-version"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"--tag"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"main"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:"&&"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mud"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"set-version"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"--commit"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"db19ea39"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:"&&"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"})]})]})}),"\n",(0,l.jsx)(s.h3,{id:"patch-changes-14",children:"Patch changes"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4bb7e8cbf0da45c85b70532dc73791e0e2e1d78c",children:"fix(protocol-parser): properly decode empty records (#1177)"})})," (@latticexyz/protocol-parser)"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"decodeRecord"})," now properly decodes empty records"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/8d51a03486bc20006d8cc982f798dfdfe16f169f",children:"refactor(store): clean up Memory, make mcopy pure (#1153)"})})," (@latticexyz/cli, @latticexyz/common, @latticexyz/store, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"Clean up Memory.sol, make mcopy pure"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/1e2ad78e277b551dd1b8efb0e4438fb10441644c",children:"fix(recs): improve messages for v2 components (#1167)"})})," (@latticexyz/recs)"]}),"\n",(0,l.jsx)(s.p,{children:"improve RECS error messages for v2 components"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/48909d151b3dfceab128c120bc6bb77de53c456b",children:"test: bump forge-std and ds-test (#1168)"})})," (@latticexyz/cli, @latticexyz/gas-report, @latticexyz/noise, @latticexyz/schema-type, @latticexyz/solecs, @latticexyz/std-contracts, @latticexyz/store, @latticexyz/world, create-mud)"]}),"\n",(0,l.jsx)(s.p,{children:"bump forge-std and ds-test dependencies"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/f03531d97c999954a626ef63bc5bbae51a7b90f3",children:"fix(schema-type): fix byte lengths for uint64/int64 (#1175)"})})," (@latticexyz/schema-type)"]}),"\n",(0,l.jsxs)(s.p,{children:["Fix byte lengths for ",(0,l.jsx)(s.code,{children:"uint64"})," and ",(0,l.jsx)(s.code,{children:"int64"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/4e4a34150aeae988c8e61e25d55c227afb6c2d4b",children:"build: bump TS (#1165)"})})," (@latticexyz/cli, create-mud, @latticexyz/utils, @latticexyz/world)"]}),"\n",(0,l.jsx)(s.p,{children:"bump to latest TS version (5.1.6)"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/535229984565539e6168042150b45fe0f9b48b0f",children:"build: bump viem, abitype (#1179)"})})," (@latticexyz/block-logs-stream, @latticexyz/cli, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/network, @latticexyz/protocol-parser, @latticexyz/schema-type, @latticexyz/std-client, @latticexyz/store-cache, @latticexyz/store-sync, @latticexyz/store)"]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"bump to viem 1.3.0 and abitype 0.9.3"}),"\n",(0,l.jsxs)(s.li,{children:["move ",(0,l.jsx)(s.code,{children:"@wagmi/chains"})," imports to ",(0,l.jsx)(s.code,{children:"viem/chains"})]}),"\n",(0,l.jsx)(s.li,{children:"refine a few types"}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/086be4ef4f3c1ecb3eac0e9554d7d4eb64531fc2",children:"test(e2e): add more test cases (#1074)"})})," (@latticexyz/services)"]}),"\n",(0,l.jsx)(s.p,{children:"fix a bug related to encoding negative bigints in MODE"}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.strong,{children:(0,l.jsx)(s.a,{href:"https://github.com/latticexyz/mud/commit/e019c77619f0ace6b7ee01f6ce96498446895934",children:"fix: remove devEmit when sending events from SyncWorker (#1109)"})})," (@latticexyz/network)"]}),"\n",(0,l.jsx)(s.p,{children:"Remove devEmit function when sending network events from SyncWorker because they can't be serialized across the web worker boundary."}),"\n",(0,l.jsx)(s.hr,{})]})}s.default=(0,r.j)(c)}},function(e){e.O(0,[1877,2888,179],function(){return e(e.s=2944)}),_N_E=e.O()}]);