ERC-1155 Multi-Token Standard
The ERC-1155 is a Multi-Token Standard on Ethereum that provides a standard interface for smart contracts to manage multiple token types within a single deployed contract
1. This standard is designed to represent and control any number of fungible tokens (like ERC-20) and non-fungible tokens (NFTs, like ERC-721), and can even handle both simultaneously
1.
The ERC-1155 standard was officially adopted by the Ethereum Foundation, achieving "Final status" after its initial submission by Enjin on June 17, 2018
23.
Key Features and Improvements
The ERC-1155 standard improves upon previous token standards, such as ERC-20 and ERC-721, by offering greater efficiency and correcting implementation issues
1.
Multi-Token Functionality
A single ERC-1155 contract can manage a combination of fungible, non-fungible, or semi-fungible tokens
1. This allows developers to:
- Batch Transfers Send multiple tokens in a single transaction 4.
- Advanced Features Enable users to perform actions like destroying or upgrading NFTs 4.
Deterministic Smart Contract Execution
ERC-1155 tokens are the first type of token that can execute a deterministic smart contract function simply by sending the token to an address
3. This functionality means that sending a token can trigger a chain of events without needing to access Application Binary Interfaces (ABIs) or interact with the smart contract directly
3.
Examples of this functionality include:
- A decentralized exchange (DEX) could immediately return another token to the sender's address upon receiving an ERC-1155 token 3.
- A blockchain game could perform a game function, such as wrapping, converting, crafting, or escrowing an item, as soon as it receives an ERC-1155 token from a user 3.
This strict requirement for guaranteed execution upon transfer addresses a "fatal problem" found in ERC-721, where transfers were not strictly required to trigger execution, potentially leading to permanent token loss
3.
The ERC-1155 standard moves all metadata about a token to an external JSON file, drawing inspiration from the ERC-721 Metadata Extension
3.
- Removed Legacy Data The standard removed the Symbol and Name fields from the core standard 3.
- Symbol was deemed irrelevant for general virtual items/assets, as three-letter symbols are typically only used for currency trading tickers 3.
- Name was removed because storing a name on the blockchain was considered overkill for many use-cases; instead, the name is defined in the external JSON Metadata Standard 3.