Element Registry
Element registration and management.
Functions
registerValue
Registers a new value element in the registry.
function registerValue(TokenStandard std, address addr, bytes32 data) external returns (uint64);
Parameters
Name | Type | Description |
---|---|---|
std | TokenStandard | The token standard (e.g., ERC20, ERC777). |
addr | address | The address of the token contract. |
data | bytes32 | The material hash related to the token. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint64 | The ID of the newly registered value element. |
updateValue
Updates the material data of an existing value element.
function updateValue(uint64 token, bytes32 data) external;
Parameters
Name | Type | Description |
---|---|---|
token | uint64 | The ID of the token element being updated. |
data | bytes32 | New material hash for the token element. |
registerArtifact
Registers a new artifact element in the registry.
function registerArtifact(TokenStandard std, address addr, bytes32 data, uint64 idBeg, uint64 idEnd)
external
returns (uint64);
Parameters
Name | Type | Description |
---|---|---|
std | TokenStandard | The token standard (e.g., ERC721, ERC1155). |
addr | address | The address of the token contract. |
data | bytes32 | The material hash related to the token. |
idBeg | uint64 | The beginning ID of the token. |
idEnd | uint64 | The ending ID of the token. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint64 | The ID of the newly registered artifact element. |
updateArtifact
Updates the material data of an existing artifact element.
function updateArtifact(uint64 token, bytes32 data) external;
Parameters
Name | Type | Description |
---|---|---|
token | uint64 | The ID of the token element being updated. |
data | bytes32 | New material hash for the token element. |
Events
ValueRegistered
Emitted when a new value element is registered.
event ValueRegistered(uint64 token, TokenStandard std, address addr, bytes32 data, address admin);
Parameters
Name | Type | Description |
---|---|---|
token | uint64 | The ID of the newly registered value element. |
std | TokenStandard | The token standard (e.g., ERC20, ERC777). |
addr | address | The address of the token contract. |
data | bytes32 | The material hash related to the token. |
admin | address | The address of the administrator. |
ValueUpdated
Emitted when a value element is updated.
event ValueUpdated(uint64 token, bytes32 data);
Parameters
Name | Type | Description |
---|---|---|
token | uint64 | The ID of the value element being updated. |
data | bytes32 | New material hash for the token. |
ValueTransferred
Emitted when administrator of a value element is changed.
event ValueTransferred(uint64 token, address from, address to);
Parameters
Name | Type | Description |
---|---|---|
token | uint64 | The ID of the value element. |
from | address | The address of the current administrator. |
to | address | The address of the new administrator. |
ArtifactRegistered
Emitted when a new artifact element is registered.
event ArtifactRegistered(
uint64 token, TokenStandard std, address addr, bytes32 data, uint64 idBeg, uint64 idEnd, address admin
);
Parameters
Name | Type | Description |
---|---|---|
token | uint64 | The ID of the newly registered artifact element. |
std | TokenStandard | The token standard (e.g., ERC721, ERC1155). |
addr | address | The address of the token contract. |
data | bytes32 | The material hash related to the token. |
idBeg | uint64 | The beginning ID of the token. |
idEnd | uint64 | The ending ID of the token. |
admin | address | The address of the administrator. |
ArtifactUpdated
Emitted when an artifact element is updated.
event ArtifactUpdated(uint64 token, bytes32 data);
Parameters
Name | Type | Description |
---|---|---|
token | uint64 | The ID of the token being updated. |
data | bytes32 | New material hash for the token. |
ArtifactTransferred
Emitted when administrator of an artifact element is changed.
event ArtifactTransferred(uint64 token, address from, address to);
Parameters
Name | Type | Description |
---|---|---|
token | uint64 | The ID of the artifact element. |
from | address | The address of the current administrator. |
to | address | The address of the new administrator. |