World
Reference
Systems (interface)

ISystemHook

Git Source (opens in a new tab)

Inherits: IERC165

Interface defining system hooks for external functionality. Provides pre and post hooks that can be triggered before and after a system call respectively. This interface adheres to the ERC-165 standard for determining interface support.

Functions

onBeforeCallSystem

Executes before a system call.

Provides the ability to add custom logic or checks before a system is invoked.

function onBeforeCallSystem(address msgSender, ResourceId systemId, bytes memory callData) external;

Parameters

NameTypeDescription
msgSenderaddressThe original sender of the system call.
systemIdResourceIdThe identifier for the system being called.
callDatabytesData being sent as part of the system call.

onAfterCallSystem

Executes after a system call.

Provides the ability to add custom logic or checks after a system call completes.

function onAfterCallSystem(address msgSender, ResourceId systemId, bytes memory callData) external;

Parameters

NameTypeDescription
msgSenderaddressThe original sender of the system call.
systemIdResourceIdThe identifier for the system that was called.
callDatabytesData that was sent as part of the system call.