Skip to content

Commit eddd9d7

Browse files
committed
fix(world): add missing virtual to World methods
1 parent 6a26a04 commit eddd9d7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/world/src/World.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ contract World is StoreKernel, IWorldKernel {
7171
* @param initModule The core module to initialize the World with.
7272
* @dev Only the initial creator can initialize. This can be done only once.
7373
*/
74-
function initialize(IModule initModule) public prohibitDirectCallback {
74+
function initialize(IModule initModule) public virtual prohibitDirectCallback {
7575
// Only the initial creator of the World can initialize it
7676
if (msg.sender != creator) {
7777
revert World_AccessDenied(ROOT_NAMESPACE_ID.toString(), msg.sender);
@@ -94,7 +94,7 @@ contract World is StoreKernel, IWorldKernel {
9494
* @param encodedArgs The ABI encoded arguments for module installation.
9595
* @dev The caller must own the root namespace.
9696
*/
97-
function installRootModule(IModule module, bytes memory encodedArgs) public prohibitDirectCallback {
97+
function installRootModule(IModule module, bytes memory encodedArgs) public virtual prohibitDirectCallback {
9898
AccessControl._requireOwner(ROOT_NAMESPACE_ID, msg.sender);
9999
_installRootModule(module, encodedArgs);
100100
}
@@ -104,7 +104,7 @@ contract World is StoreKernel, IWorldKernel {
104104
* @param module The module to be installed.
105105
* @param encodedArgs The ABI encoded arguments for module installation.
106106
*/
107-
function _installRootModule(IModule module, bytes memory encodedArgs) internal {
107+
function _installRootModule(IModule module, bytes memory encodedArgs) internal virtual {
108108
// Require the provided address to implement the IModule interface
109109
requireInterface(address(module), type(IModule).interfaceId);
110110

@@ -403,15 +403,15 @@ contract World is StoreKernel, IWorldKernel {
403403
/**
404404
* @notice Accepts ETH and adds to the root namespace's balance.
405405
*/
406-
receive() external payable {
406+
receive() external payable virtual {
407407
uint256 rootBalance = Balances._get(ROOT_NAMESPACE_ID);
408408
Balances._set(ROOT_NAMESPACE_ID, rootBalance + msg.value);
409409
}
410410

411411
/**
412412
* @dev Fallback function to call registered function selectors.
413413
*/
414-
fallback() external payable prohibitDirectCallback {
414+
fallback() external payable virtual prohibitDirectCallback {
415415
(ResourceId systemId, bytes4 systemFunctionSelector) = FunctionSelectors._get(msg.sig);
416416

417417
if (ResourceId.unwrap(systemId) == 0) revert World_FunctionSelectorNotFound(msg.sig);

0 commit comments

Comments
 (0)