Skip to content

Commit

Permalink
rename internal methods
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Feb 1, 2024
1 parent a595860 commit e58b76f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
5 changes: 0 additions & 5 deletions .changeset/chatty-timers-hug.md

This file was deleted.

1 change: 1 addition & 0 deletions .changeset/twelve-terms-lay.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
"@latticexyz/store": major
"@latticexyz/world": patch
---

Renamed `StoreCore`'s `registerCoreTables` method to `registerInternalTables`.
22 changes: 11 additions & 11 deletions packages/world/src/modules/core/CoreModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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();
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e58b76f

Please sign in to comment.