diff --git a/packages/world/src/modules/core/CoreModule.sol b/packages/world/src/modules/core/CoreModule.sol index cd3937a679..88ebc319b9 100644 --- a/packages/world/src/modules/core/CoreModule.sol +++ b/packages/world/src/modules/core/CoreModule.sol @@ -81,8 +81,7 @@ contract CoreModule is IModule, WorldContext { value: 0, funcSelectorAndArgs: abi.encodeWithSelector( WorldRegistrationSystem.registerSystem.selector, - ROOT_NAMESPACE, - CORE_SYSTEM_NAME, + ResourceSelector.from(ROOT_NAMESPACE, CORE_SYSTEM_NAME), coreSystem, true ) diff --git a/packages/world/test/World.t.sol b/packages/world/test/World.t.sol index bec358ae48..212bb711f5 100644 --- a/packages/world/test/World.t.sol +++ b/packages/world/test/World.t.sol @@ -362,10 +362,10 @@ contract WorldTest is Test, GasReporter { // Register a new system bytes32 resourceSelector2 = ResourceSelector.from("namespace2", "name"); - world.registerSystem(resourceSelector, new System(), false); + world.registerSystem(resourceSelector2, new System(), false); // Expect an error when trying to register a table at the same selector - vm.expectRevert(abi.encodeWithSelector(IWorldErrors.ResourceExists.selector, resourceSelector.toString())); + vm.expectRevert(abi.encodeWithSelector(IWorldErrors.ResourceExists.selector, resourceSelector2.toString())); world.registerTable(resourceSelector2, defaultKeySchema, Bool.getValueSchema(), new string[](1), new string[](1)); } @@ -658,12 +658,13 @@ contract WorldTest is Test, GasReporter { world.registerTable(tableId, defaultKeySchema, Bool.getValueSchema(), new string[](1), new string[](1)); // Register a new system + bytes32 systemId = ResourceSelector.from("namespace", "testSystem"); WorldTestSystem system = new WorldTestSystem(); - world.registerSystem(tableId, system, false); + world.registerSystem(systemId, system, false); // Call a system function that writes data to the World world.call( - tableId, + systemId, abi.encodeWithSelector(WorldTestSystem.writeData.selector, bytes16("namespace"), bytes16("testTable"), true) );