Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
LABS
Glossary

IERC1155

IERC1155 is the Solidity interface that defines the required functions and events for implementing the ERC-1155 multi-token standard, allowing a single contract to manage multiple token types.
Chainscore © 2026
definition
ERC STANDARD

What is IERC1155?

IERC1155 is the official interface for the ERC-1155 token standard, a multi-token standard for the Ethereum blockchain that enables a single smart contract to manage multiple token types, including both fungible (ERC-20-like) and non-fungible (ERC-721-like) assets.

The IERC1155 interface defines the core functions and events required for a contract to be ERC-1155 compliant. Unlike single-asset standards, it introduces a balanceOfBatch function to query multiple balances in a single call and a safeBatchTransferFrom function for efficient batch transfers, significantly reducing gas costs. This efficiency is critical for applications like blockchain games or platforms where users manage large inventories of diverse items, from common currency tokens to unique digital collectibles.

A key innovation of the standard is its semi-fungibility. A token ID can represent a fungible, divisible asset (e.g., 1000 units of "Gold") or a non-fungible, unique asset (e.g., a specific "Legendary Sword"). The contract logic determines the fungibility of each tokenId. This is managed through the balanceOf function, which returns a quantity for a given ID and owner, and the uri function, which provides metadata for each token type, similar to ERC-721.

The standard mandates two crucial safety mechanisms for secure transfers. The safeTransferFrom and safeBatchTransferFrom functions must call onERC1155Received or onERC1155BatchReceived on the recipient's address if it is a contract. This prevents tokens from being permanently locked in contracts not designed to handle them. Developers implementing wallets or marketplaces must ensure their contracts implement these receiver hooks to interact seamlessly with the ecosystem.

IERC1155's design directly enables powerful new use cases. In gaming, a single contract can govern all in-game assets: fungible resources, consumable potions (semi-fungible), and unique character skins (non-fungible). For digital marketplaces, batch operations allow users to list, buy, or transfer entire bundles of items in one transaction. This composability and efficiency make ERC-1155, defined by the IERC1155 interface, a foundational standard for the evolving tokenized economy on Ethereum and compatible EVM chains.

etymology
STANDARDIZATION

Origin and Naming

The IERC1155 interface, a cornerstone of the Ethereum ecosystem, was formally defined through the Ethereum Improvement Proposal (EIP) process, establishing a standard for a novel type of multi-token contract.

The IERC1155 interface was introduced in EIP-1155, authored by Witek Radomski, Andrew Cooke, Philippe Castonguay, James Therien, Eric Binet, and Ronan Sandford. Published in June 2018, the proposal's primary goal was to create a standard interface for contracts that manage multiple token types—both fungible (like ERC-20) and non-fungible (like ERC-721)—within a single deployed contract. The name itself is a logical extension of the Ethereum Request for Comment (ERC) numbering sequence, where '1155' simply denotes its unique proposal identifier within the EIP repository.

The naming convention IERC1155 follows the common Solidity pattern where an 'I' prefix denotes an interface. This interface defines the required function signatures—such as balanceOf, balanceOfBatch, safeTransferFrom, and safeBatchTransferFrom—that any compliant contract must implement. The '1155' suffix distinguishes it from other token standards, immediately signaling its capability for batch operations and mixed asset types. This efficiency was a direct response to the gas cost and UX limitations of managing numerous single-asset ERC-20 and ERC-721 contracts.

The origin of EIP-1155 is deeply tied to the needs of blockchain gaming and digital asset platforms. Prior to its creation, projects like Enjin Coin required a way to efficiently manage thousands of in-game items (NFTs) and currencies (fungible tokens) without deploying a new contract for each. The standard was designed to minimize transaction costs through batching and to prevent the accidental loss of assets with the safeTransferFrom safety checks inherited from ERC-721. Its design reflects a pragmatic evolution of token standards, combining the best aspects of its predecessors.

Adoption was driven by its clear technical and economic advantages. Major platforms like OpenSea integrated support, and it became the backbone for ecosystems on Ethereum and other EVM-compatible chains like Polygon and Avalanche. The 'IERC1155' name has since become synonymous with multi-token or semi-fungible token management. Its success cemented the pattern of solving ecosystem-wide problems through collaborative, open-standard proposals, influencing later standards like ERC-1155D for dynamic data.

key-features
ERC-1155 STANDARD

Key Features of the IERC1155 Interface

The IERC1155 interface defines the core functions for a multi-token standard on Ethereum, enabling a single smart contract to manage multiple token types, including both fungible (ERC-20-like) and non-fungible (ERC-721-like) assets.

01

Multi-Token Management

A single IERC1155 contract can manage an infinite number of distinct token types, each identified by a unique uint256 token ID. This allows for:

  • Fungible tokens: Where balances are tracked in aggregate (e.g., 1000 'Gold Coins' with ID #1).
  • Non-fungible tokens (NFTs): Where the balance for a specific ID is 1 (e.g., a unique 'Legendary Sword' with ID #999).
  • Semi-fungible tokens: A hybrid model where items can be fungible in quantity but have unique metadata.
02

Batch Operations

The standard is optimized for gas efficiency through native support for batch transfers and balance queries. Key functions include:

  • safeBatchTransferFrom: Transfers multiple token types (IDs) and amounts in a single transaction, drastically reducing gas costs versus multiple individual transfers.
  • balanceOfBatch: Queries the balances of multiple token IDs for multiple addresses in one call.
  • safeBatchTransferFrom is the atomic, recommended method, ensuring all transfers succeed or the entire transaction reverts.
03

Approval Model

IERC1155 uses a simplified, omnipotent approval system via the setApprovalForAll function. This grants or revokes permission for a specific operator address to manage all of the caller's tokens within that contract. This differs from ERC-20's per-spender allowance and is more akin to ERC-721's model. For granular control, the standard also includes the isApprovedForAll view function to check operator status.

04

Metadata & URI

Token metadata is provided via the uri(uint256 id) function, which returns a URI (e.g., an IPFS hash) pointing to a JSON file for a specific token ID. This JSON follows a standardized schema defining the token's name, description, image, and attributes. A single contract can use a base URI with the token ID appended (e.g., https://api.example.com/{id}.json), allowing for efficient, deterministic metadata resolution for all tokens.

05

Safe Transfer Hooks

The safeTransferFrom and safeBatchTransferFrom functions include a data parameter and implement receiver checks to prevent accidental loss of assets. If the receiving address is a smart contract, these functions call onERC1155Received or onERC1155BatchReceived on that contract. This hook allows the receiver to implement logic to accept or reject the transfer, which is critical for enabling trustless marketplaces, vaults, and other composable DeFi applications.

06

Supply & Minting

While the core IERC1155 interface is non-opinionated about minting, common extension interfaces like OpenZeppelin's ERC1155Supply add crucial functionality:

  • Total Supply Tracking: The totalSupply(uint256 id) function returns the total circulating amount of a specific token ID.
  • Minting & Burning: Functions like _mint and _burn are internal helpers used by contract developers to create (mint) new tokens or destroy (burn) existing ones, updating both individual balances and the total supply.
how-it-works
ERC-1155 STANDARD

How the IERC1155 Interface Works

A technical overview of the IERC1155 interface, the core specification for the multi-token standard on Ethereum and EVM-compatible blockchains.

The IERC1155 interface is the foundational smart contract specification for the ERC-1155 multi-token standard, which enables a single deployed contract to manage multiple token types—including both fungible tokens (like ERC-20), non-fungible tokens (like ERC-721), and semi-fungible assets—through a unified set of functions. This standard is defined by a set of mandatory functions (balanceOf, balanceOfBatch, safeTransferFrom, safeBatchTransferFrom, setApprovalForAll, isApprovedForAll) and events (TransferSingle, TransferBatch, ApprovalForAll, URI) that compliant contracts must implement to ensure interoperability across wallets, marketplaces, and other decentralized applications.

A core innovation of IERC1155 is batch operations, which allow for the gas-efficient transfer and balance querying of multiple token types in a single transaction. For example, a game could transfer 100 gold coins (fungible, tokenId=1), 5 health potions (fungible, tokenId=2), and 1 unique sword (non-fungible, tokenId=3) to a player in one safeBatchTransferFrom call, drastically reducing transaction costs compared to separate calls for each asset type. The balanceOfBatch function similarly allows a dApp to query balances for multiple addresses and token IDs simultaneously.

The interface mandates the use of the ERC-1155 Token Receiver pattern for secure transfers. When tokens are sent to a smart contract (not an Externally Owned Account), the receiving contract must implement the onERC1155Received or onERC1155BatchReceived function and return a predefined magic value. This callback mechanism prevents tokens from being permanently locked in contracts that cannot handle them, a significant improvement over the transfer method in ERC-20 which lacked this safety check.

Beyond transfers, IERC1155 simplifies approval management through a single setApprovalForAll operator model. Instead of approving specific token amounts (as in ERC-20) or individual NFTs (as in ERC-721), a user can grant or revoke unlimited authority for another address (an operator) to manage all tokens within the contract on their behalf. This is particularly useful for decentralized exchanges or marketplace contracts that need to list and trade a user's entire inventory of assets from a single collection.

The standard also defines a metadata extension pattern via the uri(uint256 id) function, which returns a Uniform Resource Identifier (URI) for each tokenId. This URI typically points to a JSON file containing the token's metadata (name, image, attributes). By decoupling the on-chain tokenId from the off-chain metadata, collections can be updated or expanded without costly contract redeployments, providing flexibility for dynamic or evolving asset ecosystems.

code-example
CORE INTERFACE STRUCTURE

IERC1155

The technical specification for a multi-token standard on the Ethereum blockchain, enabling a single smart contract to manage multiple token types.

IERC1155 is the official Solidity interface that defines the Ethereum Request for Comment 1155 standard, a multi-token standard enabling a single smart contract to manage an infinite variety of fungible tokens, non-fungible tokens (NFTs), and semi-fungible assets. Unlike ERC-20 (fungible only) or ERC-721 (NFT only), ERC-1155 uses a unique id parameter to represent each distinct token type, allowing for efficient batch transfers and atomic swaps of multiple token types in a single transaction. This design drastically reduces gas costs and contract deployment overhead for applications like gaming asset marketplaces and decentralized finance (DeFi) platforms.

The interface mandates core functions for token management, including balanceOf to check holdings for a specific token id, balanceOfBatch for checking multiple accounts and token types at once, and safeTransferFrom for transferring tokens. A critical innovation is the safeBatchTransferFrom function, which allows the atomic transfer of multiple token types (e.g., 10 potions, 1 sword, and 100 gold coins) from one address to another in a single call, ensuring state consistency and optimizing network resources. Contracts implementing IERC1155 must also adhere to the IERC1155Receiver interface to safely handle incoming tokens.

A primary use case for IERC1155 is in blockchain gaming and digital asset platforms, where a user's inventory may contain hundreds of distinct item types. Instead of requiring separate approvals and transactions for each item trade, a marketplace contract can bundle the entire trade into one operation. Furthermore, the standard supports metadata extension via the uri(id) function, which returns a Uniform Resource Identifier (URI) pointing to a JSON file describing the token's attributes, making it ideal for representing both fungible commodities with large supplies and unique NFTs with individual traits.

examples
IERC1155

Practical Use Cases

The IERC1155 standard enables a single smart contract to manage multiple token types, from fungible tokens to NFTs. This section explores its primary applications in gaming, DeFi, and digital asset management.

02

Fractionalized NFTs (F-NFTs)

The standard can represent a non-fungible token (the whole asset) and its fungible tokens (ownership shares) within the same contract. This enables fractional ownership of high-value assets like real estate or art. Mechanism:

  • The NFT token ID 1 represents the whole asset.
  • Fungible token ID 2 represents 1,000,000 ownership shares.
  • The contract enforces the link between the NFT and its fractions.
03

Membership & Ticketing Systems

IERC1155 efficiently handles event ticketing and tiered memberships. A concert contract could issue:

  • 5,000 General Admission tickets (fungible, ID: 1).
  • 50 VIP Pass tokens (fungible, ID: 2).
  • 1 Backstage Pass NFT (non-fungible, ID: 3). Batch minting to organizers and batch transfers to buyers significantly reduce transaction overhead compared to individual ERC-721 mints.
04

Digital Collectible Sets

Perfect for trading card platforms or digital art collections where users complete sets. A contract can manage:

  • Common cards with a supply of 10,000 each (fungible).
  • Rare, serial-numbered holographic cards (non-fungible). The balanceOfBatch function allows a marketplace to verify a user's entire collection in a single call, enabling efficient set completion checks and bundled sales.
05

DeFi Collateral Bundles

Enables the creation of a single vault token representing a basket of underlying assets. A user can deposit multiple ERC-20 tokens and receive a single IERC1155 vault receipt token (fungible). This receipt can then be used as collateral or traded. Advantage: Simplifies portfolio management and collateralization by representing a complex basket with a single token ID, while the contract tracks the underlying assets via the uri metadata.

06

Cross-Chain Asset Bridges

IERC1155's efficient batch operations make it well-suited for bridging assets between blockchains. A bridge contract can lock multiple token types on one chain and mint their wrapped equivalents on another in a single batch transaction. This is more gas-efficient than bridging each ERC-721 or ERC-20 asset individually. The standard's uniform balanceOf and safeTransferFrom functions simplify bridge logic.

FEATURE COMPARISON

IERC1155 vs. Other Token Standards

A technical comparison of the ERC-1155 multi-token standard against the primary fungible (ERC-20) and non-fungible (ERC-721) standards.

FeatureERC-1155ERC-721ERC-20

Token Type

Fungible, Non-Fungible, & Semi-Fungible

Non-Fungible Only

Fungible Only

Batch Transfers

Batch Balances

Single Contract for Multiple Assets

Gas Efficiency for Batches

High

Low

Medium

Native Metadata Standard

URI per token ID

URI per token ID

Optional (name, symbol, decimals)

Safe Transfer Hook

onERC1155Received, onERC1155BatchReceived

onERC721Received

ecosystem-usage
STANDARD

Ecosystem Adoption

The IERC1155 standard, also known as the Multi-Token Standard, enables a single smart contract to manage multiple token types (fungible, non-fungible, and semi-fungible), driving its adoption across gaming, digital collectibles, and DeFi.

03

DeFi & Tokenized Real-World Assets

The standard is used in DeFi for representing fractionalized ownership and tokenized bonds or invoices. A single IERC1155 contract can issue multiple bond series (each with a unique ID) as fungible tokens, while also managing the unique legal documentation as a non-fungible token within the same contract. This creates a unified, auditable ledger for complex financial instruments.

04

Enterprise & Supply Chain

Businesses adopt IERC1155 for supply chain and loyalty programs because one contract can track:

  • Batch IDs of products (fungible tokens per batch).
  • Unique serial numbers for high-value items (non-fungible tokens).
  • Loyalty point tiers (different fungible token IDs for silver, gold, platinum). This reduces contract deployment overhead and provides a consolidated view of assets on a shared ledger.
05

Technical Advantages Driving Adoption

Key features that make IERC1155 a preferred choice for developers:

  • Batch Operations: Transfer multiple token types to multiple addresses in one call (safeBatchTransferFrom).
  • Atomic Swaps: Swap any combination of tokens in a single transaction.
  • Supply Tracking: Built-in functions to query total supply per token ID.
  • Gas Efficiency: Significant savings over deploying separate ERC-20 and ERC-721 contracts for related asset ecosystems.
06

Core Interfaces & Functions

The standard is defined by a set of mandatory and optional interfaces. Critical functions include:

  • balanceOf / balanceOfBatch: Check balances for one or many token IDs.
  • safeTransferFrom / safeBatchTransferFrom: Transfer tokens.
  • setApprovalForAll: Grant operator permissions for all tokens.
  • supportsInterface: ERC-165 check for standard compliance. The optional ERC1155Metadata_URI extension provides a way to retrieve metadata for each token ID.
security-considerations
IERC1155

Security Considerations for Implementers

The IERC1155 multi-token standard introduces unique security vectors beyond ERC-20 and ERC-721. Implementers must carefully audit these specific interactions.

01

Batch Operation Reentrancy

The safeBatchTransferFrom and safeBatchMint functions execute multiple transfers in a single call, creating a complex reentrancy surface. An attacker's contract receiving tokens via onERC1155Received could re-enter the batch operation before all internal state updates are complete.

  • Critical: Ensure state updates (balances) occur before making external calls via _safeTransfer or _safeMint helpers.
  • Defense: Use the Checks-Effects-Interactions pattern rigorously within batch logic.
02

Approval Scoping & Granularity

IERC1155 uses setApprovalForAll(operator, approved) for approvals, granting the operator access to all of the caller's tokens of any ID. This is a broader scope than ERC-20's amount-specific or ERC-721's token-specific approvals.

  • Risk: A malicious or compromised operator can drain all user assets.
  • Mitigation: Implementers can consider supplemental mechanisms like ERC-1155 Permit (EIP-2612 style) for safer, single-use approvals. User education on the risk of setApprovalForAll is essential.
03

Receiver Contract Validation

The safeTransferFrom functions mandate a call to onERC1155Received or onERC1155BatchReceived on the recipient if it is a contract. Improper validation can lead to locked or stolen assets.

  • Must Revert: If the recipient contract does not return the correct magic value (bytes4(keccak256(...))), the transfer must revert.
  • Gas Limits: Be aware of gas stipends for these calls; they are fixed and may fail for complex receiver logic, potentially blocking transfers to legitimate contracts.
04

Balance & Supply Manipulation

Since a single contract manages fungible and non-fungible assets, internal accounting for balanceOf and totalSupply (if tracked) is critical.

  • Integer Overflow/Underflow: Use Solidity 0.8+ or SafeMath libraries for all arithmetic, especially in batch operations where sums are calculated.
  • Cross-Function Invariants: Ensure mint, burn, and transfer functions for one token ID cannot corrupt the balances or metadata of another token ID due to shared storage structures.
05

URI & Metadata Integrity

The uri(uint256 id) function returns a location for token metadata. A mutable or attacker-controlled URI is a central risk.

  • Immutable Base URI: Consider setting a base URI in the constructor that cannot be changed, or using a decentralized storage solution like IPFS (ipfs://).
  • Access Control: If the URI is updatable, protect the setter function (e.g., setURI) with strong access control (e.g., onlyOwner). A malicious update can change the perceived value and attributes of all tokens.
06

Integration with External Protocols

IERC1155 tokens are often deposited into lending protocols, marketplaces, or DAO treasuries. These integrations create composability risks.

  • Balance Snapshots: Protocols that snapshot balances for rewards or voting must be aware that IERC1155 balances can change more frequently due to efficient batch transfers.
  • Standard Compliance: Ensure your implementation strictly follows the EIP-1155 specification. Deviations (e.g., missing return values) will cause integrations to fail, potentially locking funds in other protocols.
DEBUNKED

Common Misconceptions About IERC1155

The ERC-1155 multi-token standard is powerful but often misunderstood. This section clarifies frequent technical confusions and implementation pitfalls for developers and architects.

No, IERC1155 is a general-purpose multi-token standard suitable for fungible, non-fungible, and semi-fungible assets. While popular in gaming for managing in-game items, its efficiency makes it ideal for any application requiring batch operations on multiple token types. For example, it can represent:

  • Fungible tokens like in-game gold (balance of 1000 gold).
  • Non-fungible tokens (NFTs) like unique character skins (balance of 1).
  • Semi-fungible tokens like event tickets for the same concert (balance of 5, identical until used). Its core innovation is managing an infinite variety of these asset types within a single smart contract, drastically reducing gas costs and deployment complexity compared to using separate ERC-20 and ERC-721 contracts.
IERC1155 STANDARD

Frequently Asked Questions (FAQ)

Common technical questions about the IERC1155 interface, the Ethereum standard for multi-token smart contracts.

IERC1155 is the interface for the ERC-1155 standard, a multi-token standard for the Ethereum blockchain that allows a single smart contract to manage multiple token types, including both fungible (ERC-20-like) and non-fungible (ERC-721-like) assets. It works by using a unique uint256 ID to represent each token type, where the ID's properties determine its fungibility. The contract tracks balances in a mapping mapping(address => mapping(uint256 => uint256)) private _balances;, allowing an address to hold multiple balances of different token IDs. Key functions include balanceOf, balanceOfBatch, safeTransferFrom, and safeBatchTransferFrom, enabling efficient batch operations that reduce gas costs compared to individual transactions for each token.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected direct pipeline
IERC1155: The Multi-Token Standard Interface | ChainScore Glossary