ISetRegistryHook
Inherits: IERC165
Interface for set contracts that respond to set lifecycle events.
These hooks are invoked by the SetRegistry before the respective action is finalized. The set must return the expected selector for the operation to proceed.
Functions
onSetRegister
Called before a set is registered.
function onSetRegister(uint64 set, Descriptor memory od) external returns (bytes4 selector);
Parameters
Name | Type | Description |
---|---|---|
set | uint64 | Set ID being registered. |
od | Descriptor | Initial descriptor of the set. |
Returns
Name | Type | Description |
---|---|---|
selector | bytes4 | Must return onSetRegister.selector to confirm the action. |
onSetUpdate
Called before a set is updated.
function onSetUpdate(uint64 set, Descriptor memory od) external returns (bytes4 selector);
Parameters
Name | Type | Description |
---|---|---|
set | uint64 | Set ID being updated. |
od | Descriptor | Updated descriptor of the set. |
Returns
Name | Type | Description |
---|---|---|
selector | bytes4 | Must return onSetUpdate.selector to confirm the action. |
onSetUpgrade
Called before a set is upgraded.
function onSetUpgrade(uint64 set, Descriptor memory od) external returns (bytes4 selector);
Parameters
Name | Type | Description |
---|---|---|
set | uint64 | Set ID being upgraded. |
od | Descriptor | Descriptor of the set after the upgrade. |
Returns
Name | Type | Description |
---|---|---|
selector | bytes4 | Must return onSetUpgrade.selector to confirm the action. |
onSetTouch
Called before a set is touched (bumped revision with no content change).
function onSetTouch(uint64 set, Descriptor memory od) external returns (bytes4 selector);
Parameters
Name | Type | Description |
---|---|---|
set | uint64 | Set ID being touched. |
od | Descriptor | Descriptor of the set after the touch. |
Returns
Name | Type | Description |
---|---|---|
selector | bytes4 | Must return onSetTouch.selector to confirm the action. |