In this track: Tokens and digital ownership
intermediate · 3 MIN READ

ERC-1155 multiple token types

One contract can manage balances for several item IDs.

LET’S PICTURE IT

A game inventory can track both ten identical arrows and one special sword, with separate item identifiers.

SEE IT FOR YOURSELF
A valid counter call, step by stepStep 1 / 4
A valid counter call, step by stepFunction requestincrement()No argumentsBefore executionstored count0A local teaching example with a defined starting stateIncoming callCheck function dispatchCheck coded conditionsRules passConditions passContinue executionA failed check can revert insteadCalculation0 + 1Result: 1Storage writecount = 1Persists if call succeedsCalculating a local value and storing it are separate stepsPersistent statecount1Later readGetter reports 1No new incrementState, logs and browser display have different roles

This example begins with count zero and a request to call increment(). No real contract is deployed.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

An ID selects a token type

ERC-1155 uses an ID to distinguish types within a contract. An account can hold a quantity of each type, so ownership is not limited to the single-holder model associated with an ERC-721 item.

Batch operations are part of the design

The interface can transfer or query multiple IDs in a batch. This can simplify some inventory operations, but exact costs and safety depend on the implementation and data.

Receiving contracts have rules

Safe transfer mechanisms check compatible receiver behavior for contract recipients under the standard. The word safe describes specific transfer checks, not a guarantee about economic value or every application risk.

Read the complete identity

Keep network, contract, ID and quantity together. A wallet image or item name does not identify all of those fields. Different token standards use different event shapes, so choose the correct interface when decoding.

QUICK CHECK · NO PRESSURE

Can an ERC-1155 account hold several units of the same item ID?

Your progress stays in this browser.
Keep exploring the original referenceEthereum Improvement Proposals ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.