Skip to content

Commit

Permalink
Add more context to the comment about staticcalls not supported for r…
Browse files Browse the repository at this point in the history
…oot systems
  • Loading branch information
vdrg committed Nov 25, 2024
1 parent e333e28 commit 1d0094e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/world/src/SystemCall.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ library SystemCall {
// Check if the system exists
if (systemAddress == address(0)) revert IWorldErrors.World_ResourceNotFound(systemId, systemId.toString());

// Staticcalls are not supported for root systems
// Staticcalls are not supported for root systems yet, as it would require a runtime check
// that we are in the context of a staticcall
if (systemId.getNamespace() == ROOT_NAMESPACE) revert IWorldErrors.World_InvalidNamespace(ROOT_NAMESPACE);

// Allow access if the system is public or the caller has access to the namespace or name
Expand Down

0 comments on commit 1d0094e

Please sign in to comment.