Elements are the actual components of an object. Each element can represent digital content used by the object, a token wrapped inside the object, or arbitrary data associated with the object.

Elements fall into four categories:

  • Matter — Digital content (e.g. media, code)
  • Value — Fungible tokens
  • Unique — Traditional non-fungible tokens (NFTs). Since objects themselves are NFTs, Unique refers to non-object NFTs.
  • Info — Arbitrary data

All elements are encoded as 32-byte values when stored in token contracts.

Element Types

Matter

Matter elements represent cryptographically committed content stored on the Every Network. Each object that includes a matter element references it by its hash.

Structure:

FieldTypeDescription
formuint8Format or encoding type
mimestring31MIME type (31-byte, zero-padded)
contentbytesThe actual media or content

Forms:

todo: list supported forms in a table

Hashing formula: Only the hash is stored in the token contract. The actual content is stored on the Every Network and is loaded and processed by kind contracts to compute the object’s assets.

Value

A value element represents an amount of fungible tokens wrapped by the object. The token must be registered in the Element Registry and referenced by its token index. The set contract is responsible for ensuring that the object is backed by the correct token balance.

Structure:

FieldTypeDescription
tokenuint64Index of the registered token contract
reserveduint64Reserved (must be zero)
amountuint128Amount of tokens wrapped (max: 2¹²⁸ − 1)

Note: This differs from many token standards that use uint256 for balances. However, uint128 is sufficient for almost all practical use cases.

Unique

Unique elements represent non-fungible tokens wrapped by the object. Like value elements, they refer to a registered NFT contract and must be backed by the set contract.

Structure:

FieldTypeDescription
tokenuint64Index of the registered NFT contract
iduint64Token ID of the NFT
amountuint128Quantity (must be 1 for ERC721-style NFTs)

Info

Info elements are arbitrary 32-byte data fields stored directly on the object.

Element Registry

todo

These fields can be read by set contracts on the universe chain and can also be interpreted or processed by kind contracts on the Every Network.