Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(world): rename CoreModule to InitModule #2227

Merged
merged 10 commits into from
Feb 2, 2024
Merged
Prev Previous commit
Merge remote-tracking branch 'origin/main' into holic/rename-core-module
holic committed Feb 2, 2024
commit d64b2dd3607330feca35d10f2ddb96f97f4b704d
22 changes: 11 additions & 11 deletions packages/world/src/modules/init/InitModule.sol
Original file line number Diff line number Diff line change
@@ -62,8 +62,8 @@ contract InitModule 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 InitModule 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 InitModule 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(registrationSystem, 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(registrationSystem, 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,
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.