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

NameTypeDescription
stdTokenStandardThe token standard (e.g., ERC20, ERC777).
addraddressThe address of the token contract.
databytes32The material hash related to the token.

Returns

NameTypeDescription
<none>uint64The 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

NameTypeDescription
tokenuint64The ID of the token element being updated.
databytes32New 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

NameTypeDescription
stdTokenStandardThe token standard (e.g., ERC721, ERC1155).
addraddressThe address of the token contract.
databytes32The material hash related to the token.
idBeguint64The beginning ID of the token.
idEnduint64The ending ID of the token.

Returns

NameTypeDescription
<none>uint64The 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

NameTypeDescription
tokenuint64The ID of the token element being updated.
databytes32New 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

NameTypeDescription
tokenuint64The ID of the newly registered value element.
stdTokenStandardThe token standard (e.g., ERC20, ERC777).
addraddressThe address of the token contract.
databytes32The material hash related to the token.
adminaddressThe address of the administrator.

ValueUpdated

Emitted when a value element is updated.

event ValueUpdated(uint64 token, bytes32 data);

Parameters

NameTypeDescription
tokenuint64The ID of the value element being updated.
databytes32New material hash for the token.

ValueTransferred

Emitted when administrator of a value element is changed.

event ValueTransferred(uint64 token, address from, address to);

Parameters

NameTypeDescription
tokenuint64The ID of the value element.
fromaddressThe address of the current administrator.
toaddressThe 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

NameTypeDescription
tokenuint64The ID of the newly registered artifact element.
stdTokenStandardThe token standard (e.g., ERC721, ERC1155).
addraddressThe address of the token contract.
databytes32The material hash related to the token.
idBeguint64The beginning ID of the token.
idEnduint64The ending ID of the token.
adminaddressThe address of the administrator.

ArtifactUpdated

Emitted when an artifact element is updated.

event ArtifactUpdated(uint64 token, bytes32 data);

Parameters

NameTypeDescription
tokenuint64The ID of the token being updated.
databytes32New material hash for the token.

ArtifactTransferred

Emitted when administrator of an artifact element is changed.

event ArtifactTransferred(uint64 token, address from, address to);

Parameters

NameTypeDescription
tokenuint64The ID of the artifact element.
fromaddressThe address of the current administrator.
toaddressThe address of the new administrator.