World
Reference
Systems

System

Git Source (opens in a new tab)

Inherits: WorldContextConsumer

The System contract currently acts as an alias for WorldContextConsumer. This structure is chosen for potential extensions in the future, where default functionality might be added to the System.

SystemHook

Git Source (opens in a new tab)

Inherits: ISystemHook

The abstract SystemHook contract implements the ERC-165 supportsInterface function for ISystemHook. System hooks are used for executing additional logic before or after certain system actions.

Functions

supportsInterface

Checks if the contract implements a given interface.

Overridden from IERC165 to include the system hook interface.

function supportsInterface(bytes4 interfaceId) public view virtual returns (bool);

Parameters

NameTypeDescription
interfaceIdbytes4The bytes4 interface identifier, as specified in ERC-165.

Returns

NameTypeDescription
<none>booltrue if the contract implements interfaceId, false otherwise.

systemHookTypes.sol constants

Git Source (opens in a new tab)

BEFORE_CALL_SYSTEM

This file provides constants for defining the different types of system hooks. System hooks can be used to execute additional logic before or after system actions.

Constant representing a hook that is triggered before a system call.

uint8 constant BEFORE_CALL_SYSTEM = 1 << 0;

AFTER_CALL_SYSTEM

Constant representing a hook that is triggered after a system call.

uint8 constant AFTER_CALL_SYSTEM = 1 << 1;

ALL

Constant representing all types of system hooks. It's a bitmap with flags from all system hook types enabled.

uint8 constant ALL = BEFORE_CALL_SYSTEM | AFTER_CALL_SYSTEM;