ISetRegistryHook

Git Source

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

NameTypeDescription
setuint64Set ID being registered.
odDescriptorInitial descriptor of the set.

Returns

NameTypeDescription
selectorbytes4Must 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

NameTypeDescription
setuint64Set ID being updated.
odDescriptorUpdated descriptor of the set.

Returns

NameTypeDescription
selectorbytes4Must 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

NameTypeDescription
setuint64Set ID being upgraded.
odDescriptorDescriptor of the set after the upgrade.

Returns

NameTypeDescription
selectorbytes4Must 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

NameTypeDescription
setuint64Set ID being touched.
odDescriptorDescriptor of the set after the touch.

Returns

NameTypeDescription
selectorbytes4Must return onSetTouch.selector to confirm the action.