Skip to content

Commit

Permalink
refactor(world): combine name and namespace to resource selector in W…
Browse files Browse the repository at this point in the history
…orld methods (#1208)

Co-authored-by: Kevin Ingersoll <[email protected]>
Co-authored-by: dk1a <[email protected]>
  • Loading branch information
3 people authored Aug 17, 2023
1 parent 5a6e164 commit c32a926
Show file tree
Hide file tree
Showing 54 changed files with 1,060 additions and 5,095 deletions.
13 changes: 13 additions & 0 deletions .changeset/grumpy-geckos-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@latticexyz/cli": major
"@latticexyz/world": major
---

- All `World` function selectors that previously had `bytes16 namespace, bytes16 name` arguments now use `bytes32 resourceSelector` instead.
This includes `setRecord`, `setField`, `pushToField`, `popFromField`, `updateInField`, `deleteRecord`, `call`, `grantAccess`, `revokeAccess`, `registerTable`,
`registerStoreHook`, `registerSystemHook`, `registerFunctionSelector`, `registerSystem` and `registerRootFunctionSelector`.
This change aligns the `World` function selectors with the `Store` function selectors, reduces clutter, reduces gas cost and reduces the `World`'s contract size.

- The `World`'s `registerHook` function is removed. Use `registerStoreHook` or `registerSystemHook` instead.

- The `deploy` script is updated to integrate the World interface changes
Loading

0 comments on commit c32a926

Please sign in to comment.