System hooks
The namespace owner can register (opens in a new tab) hooks that are called before and/or after calls to a specific System
.
System hook contracts
A system hook contract is a contract that implements the ISystemHook
(opens in a new tab) interface.
This interface requires the implementation of two functions.
onBeforeCallSystem
, which is called before the actual call.onAfterCallSystem
, which is called afterward.supportsInterface
, which is part of IEP-165 (opens in a new tab) used to specify which interfaces are supported by a contract.
To have the correct supportsInterface
you can inherit from SystemHook
(opens in a new tab).