ISet
Inherits: IERC165
Minimal interface for set contracts
Functions
upgrade
Upgrade an object to a new kind or set revision
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
kindRev0 | uint32 | New kind revision (0 = no change) |
setRev0 | uint32 | New set revision (0 = no change) |
Returns
Name | Type | Description |
---|---|---|
od | Descriptor | Descriptor after upgrade |
touch
Touch an object to increment revision without content change
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
Returns
Name | Type | Description |
---|---|---|
od | Descriptor | Descriptor after touch |
transfer
Transfer ownership of an object
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
to | address | Address of the new owner |
uri
Get URI template for metadata
Client should replace {id}
and {rev}
placeholders
Returns
Name | Type | Description |
---|---|---|
uri_ | string | URI template string |
owner
Get current owner of an object
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
Returns
Name | Type | Description |
---|---|---|
owner_ | address | Current owner address |
revision
Resolve and validate a revision number
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
rev0 | uint32 | Revision to check (0 = latest) |
Returns
Name | Type | Description |
---|---|---|
rev | uint32 | Valid revision (0 if invalid) |
descriptor
Get descriptor at a specific revision
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
rev0 | uint32 | Revision number (0 = latest) |
Returns
Name | Type | Description |
---|---|---|
od | Descriptor | Descriptor at that revision |
elements
Get elements at a specific revision
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
rev0 | uint32 | Revision number (0 = latest) |
Returns
Name | Type | Description |
---|---|---|
elems | bytes32[] | Elements array at that revision |
sota
Get the latest descriptor and current owner
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
Returns
Name | Type | Description |
---|---|---|
od | Descriptor | Descriptor at the specified revision |
owner_ | address | Current owner (not historical) |
snapshot
Get descriptor and elements at a specific revision
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
rev0 | uint32 | Revision number to query (0 = latest) |
Returns
Name | Type | Description |
---|---|---|
od | Descriptor | Descriptor at the specified revision |
elems | bytes32[] | Elements at the specified revision |
Events
Created
Emitted when a new object is created
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
od | Descriptor | Object descriptor |
elems | bytes32[] | Elements of the object |
owner | address | Initial owner |
Updated
Emitted when an object is updated
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
od | Descriptor | Updated descriptor |
elems | bytes32[] | Updated elements |
Upgraded
Emitted when an object is upgraded
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
od | Descriptor | Descriptor after upgrade |
Touched
Emitted when an object is touched (bumped without content change)
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
od | Descriptor | Latest descriptor |
Destroyed
Emitted when an object is destroyed
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
od | Descriptor | Descriptor before destruction |
Transferred
Emitted when ownership is transferred
Parameters
Name | Type | Description |
---|---|---|
id | uint64 | Object ID |
from | address | Previous owner |
to | address | New owner |