🧱Methodology

To create a multi-token standard interface based on a dual-layer classification, we couldn’t simply extend the ERC1155 interface as it would require significant modifications to do so. Hence, a standalone interface would be a more suitable approach that draws its design inspiration from the ERC1155 standard.

Each token is assigned with a mainId if it represents a main asset and its sub-assets are assigned with subIds that might have their own metadata, supply, and other attributes. The relationship between a mainId and its subIds is one-to-many but can be extended to support other types of relationships. Furthermore, sub-assets are nested into a main asset and are identified by passing their parent token id (mainId) and their respective subId to each method.

The classification layer is limited to two-levels, this means that a sub-asset can’t have children of their own. Otherwise, it would be necessary to introduce additional methods to track each sub-asset and its derivatives, which is impractical and increases the complexity of the contract.

DLT is the core interface that is required for a DLT-compliant contract whereas DLTReceiver interface handles the safeTransfer of dual-layer token types. The standard is designed to be unopiniated allowing developers to access the internal functions in DLT and expose them as external functions in the way they prefer. Additionally, we offer a DLTEnumerable extension defined in the EIP 6960 that adds enumerability of all the main ids and subIds in the contract as well as the total supply by each mainIds and subIds.

Last updated