Relation Object
Metadata
The metadata of a realtion object contains essential information about its type and versioning.| Field | Description |
|---|---|
traits | Flags, 0 for now (reserved for future use) |
rev | Revision number, starting with 0, increased after |
krev | Revision of the Kind of Set |
srev | Revision of the Set of Set |
kind | The id of the kind object of this relation object |
set | The id of the set object of this relation object |
Elements
| Index | Element | Mutable | Description |
|---|---|---|---|
0 | data | Yes | Shared data for all objects minted from this set |
1 | code | Yes | Address of the relation contract |
2 | poss | No | Address of the relation contract |
3 | adjs[0] | Yes | Shared data for all objects minted from this set |
4 | adjs[1] | Yes | Shared data for all objects minted from this set |
Possession
Thepossession element defines the processing of the ownership of the departure objects when they are connected or disconnected from destination objects.
Adjacency
Eachadj_spec_n element is composed of two tuples: (dep_kind, min, max), (dep_kind, min, max).
- dep_kind: The kind ID of the departure object, a
uint64integer. - min: The minimum number of objects that the destination object can accept, a
uint32integer. - max: The maximum number of objects that the destination object can accept, a
uint32integer.
(dep_kind, min, max) of the last adj_spec_n can be all zeros, indicating the end of the adjacency spec array.
Normal dep_kinds must be an integer in the range of [1, (2^ - 2)].
A wildcard dep_kind has a value of 2^{32} - 1, meaning any kind.
The (dep_kind, min, max) tuples must be in increasing order. If a wildcard adjacency spec exists, it must be the last valid one.
min and max can be any uint32 integer in the range [0, (2^ - 1)], as long as max >= min.
If max equals (2^ - 1), it means unlimited.
Omni Registry
Set objects support the following operations:| Operation | Description |
|---|---|
register_relation | Registers a new set into the registry. |
update_relation | Updates the mutable elements of an existing set. |
upgrade_relation | Applies a new revision of kind or set to the set object. |