IInteroperable
Inherits: IERC165
Interface for set contracts that support object-level interoperability
Enables a set to react to registry lifecycle events and object interactions. These callbacks are invoked before the respective action is finalized. The protocol requires that the callback returns the expected value for the action to proceed.
Functions
onSetRegister
Called before a set is registered
Parameters
Name | Type | Description |
---|---|---|
set | uint64 | Set ID |
od | Descriptor | Descriptor of the set |
Returns
Name | Type | Description |
---|---|---|
selector | bytes4 | Must return onSetRegister.selector |
onSetUpdate
Called before a set is updated
Parameters
Name | Type | Description |
---|---|---|
set | uint64 | Set ID |
od | Descriptor | Updated descriptor |
Returns
Name | Type | Description |
---|---|---|
selector | bytes4 | Must return onSetUpdate.selector |
onSetUpgrade
Called before a set is upgraded
Parameters
Name | Type | Description |
---|---|---|
set | uint64 | Set ID |
od | Descriptor | Descriptor after upgrade |
Returns
Name | Type | Description |
---|---|---|
selector | bytes4 | Must return onSetUpgrade.selector |
onSetTouch
Called before a set is touched (revision bump with no content change)
Parameters
Name | Type | Description |
---|---|---|
set | uint64 | Set ID |
od | Descriptor | Descriptor after touch |
Returns
Name | Type | Description |
---|---|---|
selector | bytes4 | Must return onSetTouch.selector |
onObjectRelate
Called before an object from this set is linked to another object
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Head object ID (belongs to this set) |
rel | uint64 | Relation ID |
data | uint64 | Optional relation data (uint64 encoded) |
tailSet | uint64 | Set ID of the tail object |
tailId | uint64 | ID of the tail object |
tailKind | uint64 | Kind ID of the tail object |
Returns
Name | Type | Description |
---|---|---|
od | Descriptor | Updated descriptor of the head object |
onObjectUnrelate
Called before an object from this set is unlinked from another object
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Head object ID (belongs to this set) |
rel | uint64 | Relation ID |
data | uint64 | Optional relation data (uint64 encoded) |
tailSet | uint64 | Set ID of the tail object |
tailId | uint64 | ID of the tail object |
tailKind | uint64 | Kind ID of the tail object |
Returns
Name | Type | Description |
---|---|---|
od | Descriptor | Updated descriptor of the head object |
onObjectTransfer
Called before ownership of an object from this set is transferred as part of a relation or unrelation operation.
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | ID of the object being transferred |
from | address | Current owner |
to | address | New owner |
Returns
Name | Type | Description |
---|---|---|
selector | bytes4 | Must return onObjectTransfer.selector to proceed |