From e58b76fb6940d59327a763b09b847481b40f3b32 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Thu, 1 Feb 2024 20:05:29 +0000 Subject: [PATCH] rename internal methods --- .changeset/chatty-timers-hug.md | 5 ----- .changeset/twelve-terms-lay.md | 1 + .../world/src/modules/core/CoreModule.sol | 22 +++++++++---------- 3 files changed, 12 insertions(+), 16 deletions(-) delete mode 100644 .changeset/chatty-timers-hug.md diff --git a/.changeset/chatty-timers-hug.md b/.changeset/chatty-timers-hug.md deleted file mode 100644 index b28ce16b70..0000000000 --- a/.changeset/chatty-timers-hug.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@latticexyz/world": patch ---- - -Updated `StoreCore` usage after rename and updated `CoreModule`'s internal methods for consistency with `StoreCore`. diff --git a/.changeset/twelve-terms-lay.md b/.changeset/twelve-terms-lay.md index ff64ec629a..9846e51637 100644 --- a/.changeset/twelve-terms-lay.md +++ b/.changeset/twelve-terms-lay.md @@ -1,5 +1,6 @@ --- "@latticexyz/store": major +"@latticexyz/world": patch --- Renamed `StoreCore`'s `registerCoreTables` method to `registerInternalTables`. diff --git a/packages/world/src/modules/core/CoreModule.sol b/packages/world/src/modules/core/CoreModule.sol index a94b629415..580a562de9 100644 --- a/packages/world/src/modules/core/CoreModule.sol +++ b/packages/world/src/modules/core/CoreModule.sol @@ -62,8 +62,8 @@ contract CoreModule is Module { * @dev Registers core tables, systems, and function selectors in the World. */ function installRoot(bytes memory) public override { - _registerInternalTables(); - _registerInternalSystems(); + _registerTables(); + _registerSystems(); _registerFunctionSelectors(); } @@ -76,10 +76,10 @@ contract CoreModule is Module { } /** - * @notice Register World's internal tables. + * @notice Register World's tables. * @dev This internal function registers various tables and sets initial permissions. */ - function _registerInternalTables() internal { + function _registerTables() internal { StoreCore.registerInternalTables(); NamespaceOwner.register(); Balances.register(); @@ -108,20 +108,20 @@ contract CoreModule is Module { } /** - * @notice Register the internal systems in the World. + * @notice Register the systems in the World. */ - function _registerInternalSystems() internal { - _registerInternalSystem(accessManagementSystem, ACCESS_MANAGEMENT_SYSTEM_ID); - _registerInternalSystem(balanceTransferSystem, BALANCE_TRANSFER_SYSTEM_ID); - _registerInternalSystem(batchCallSystem, BATCH_CALL_SYSTEM_ID); - _registerInternalSystem(coreRegistrationSystem, CORE_REGISTRATION_SYSTEM_ID); + function _registerSystems() internal { + _registerSystem(accessManagementSystem, ACCESS_MANAGEMENT_SYSTEM_ID); + _registerSystem(balanceTransferSystem, BALANCE_TRANSFER_SYSTEM_ID); + _registerSystem(batchCallSystem, BATCH_CALL_SYSTEM_ID); + _registerSystem(coreRegistrationSystem, CORE_REGISTRATION_SYSTEM_ID); } /** * @notice Register the internal system in the World. * @dev Uses the WorldRegistrationSystem's `registerSystem` implementation to register the system on the World. */ - function _registerInternalSystem(address target, ResourceId systemId) internal { + function _registerSystem(address target, ResourceId systemId) internal { WorldContextProviderLib.delegatecallWithContextOrRevert({ msgSender: _msgSender(), msgValue: 0,