SetRegistry
Interface for registering and managing sets
Functions
setRegister
Registers a new set
Parameters
Name | Type | Description |
---|---|---|
data | bytes32 | Hash of external content (e.g. metadata or schema) |
Returns
Name | Type | Description |
---|---|---|
id | uint64 | ID of the new set |
desc | Descriptor | Descriptor after registration |
setUpdate
Updates the data hash of an existing set
Parameters
Name | Type | Description |
---|---|---|
data | bytes32 | New data hash |
Returns
Name | Type | Description |
---|---|---|
id | uint64 | ID of the updated set |
desc | Descriptor | Updated descriptor |
setUpgrade
Upgrades the kind or set revision
Parameters
Name | Type | Description |
---|---|---|
kindRev | uint32 | New kind revision (0 to skip) |
setRev | uint32 | New set revision (0 to skip) |
Returns
Name | Type | Description |
---|---|---|
id | uint64 | ID of the set |
desc | Descriptor | Descriptor after upgrade |
setTouch
Touches a set (increments revision without any changes)
Returns
Name | Type | Description |
---|---|---|
id | uint64 | ID of the set |
desc | Descriptor | Descriptor after touch |
setRevision
Resolves and validates a specific revision
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Set ID |
rev0 | uint32 | Requested revision (0 = latest) |
Returns
Name | Type | Description |
---|---|---|
rev | uint32 | Validated revision (0 if not found) |
setDescriptor
Returns the descriptor at a given revision
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Set ID |
rev0 | uint32 | Revision to query (0 = latest) |
Returns
Name | Type | Description |
---|---|---|
desc | Descriptor | Descriptor of the set at the specified revision |
setSnapshot
Returns descriptor and elements of a set at a specific revision
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Set ID |
rev0 | uint32 | Revision to query (0 = latest) |
Returns
Name | Type | Description |
---|---|---|
desc | Descriptor | Descriptor at the revision |
elems | bytes32[] | Packed element list |
setOwner
Returns the current owner of a set
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Set ID |
Returns
Name | Type | Description |
---|---|---|
owner | address | Owner address |
setSota
Returns the latest descriptor and current owner
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Set ID |
Returns
Name | Type | Description |
---|---|---|
desc | Descriptor | Latest descriptor |
owner | address | Current owner |
setStatus
Checks whether all provided set IDs are active
Parameters
Name | Type | Description |
---|---|---|
ids | uint64[] | List of set IDs |
Returns
Name | Type | Description |
---|---|---|
active | bool | True if all sets have a revision > 0 |
setContract
Returns the contract address associated with a set
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Set ID |
Returns
Name | Type | Description |
---|---|---|
code | address | Address of the deployed contract |
Events
SetRegistered
Emitted when a new set is registered
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | ID of the new set |
desc | Descriptor | Set descriptor after registration |
code | address | Address of the associated set contract |
data | bytes32 | Hash of the associated matter (external content) |
owner | address | Owner address of the set |
SetUpdated
Emitted when a set is updated
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | ID of the set |
desc | Descriptor | Updated descriptor |
data | bytes32 | New data hash |
SetUpgraded
Emitted when a set is upgraded
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | ID of the set |
desc | Descriptor | Descriptor after upgrade |
SetTouched
Emitted when a set is touched (revision bumped without content change)
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | ID of the set |
desc | Descriptor | Descriptor after touch |