Skip to content

Commit

Permalink
refactor(world): rename functionSelector to worldFunctionSelector (la…
Browse files Browse the repository at this point in the history
  • Loading branch information
yonadaaa authored Mar 7, 2024
1 parent 3f5d33a commit 95f64c8
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 33 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-mails-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/world": patch
---

Renamed the `functionSelector` key in the `FunctionSelectors` table to `worldFunctionSelector`. This clarifies that `FunctionSelectors` is for world function selectors and can be used to generate the world ABI.
2 changes: 1 addition & 1 deletion packages/cli/src/deploy/getFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function getFunctions({
client,
worldDeploy,
table: worldTables.world_FunctionSelectors,
key: { functionSelector: selector },
key: { worldFunctionSelector: selector },
});
const { namespace, name } = hexToResource(systemId);
// TODO: find away around undoing contract logic (https://github.com/latticexyz/mud/issues/1708)
Expand Down
2 changes: 1 addition & 1 deletion packages/world/mud.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default mudConfig({
},
FunctionSelectors: {
keySchema: {
functionSelector: "bytes4",
worldFunctionSelector: "bytes4",
},
valueSchema: {
systemId: "ResourceId",
Expand Down
70 changes: 39 additions & 31 deletions packages/world/src/codegen/tables/FunctionSelectors.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 95f64c8

Please sign in to comment.