跳到主要內容
JobCannon
全部技能

ERC-1155 Multi Token

⬢ 層級 2技術
高
薪資影響
2 個月
學習時長
中等
難度
—
職業
一覽

ERC-1155 is Ethereum's standard for contracts that handle both fungible (identical) and non-fungible (unique) tokens simultaneously. Instead of separate ERC-20 and ERC-721 contracts, one ERC-1155 manages thousands of token types. Used for gaming (weapons, currency, collectibles), DeFi (multiple asset pools), and enterprise (supply chain tokens). Learning takes 2-3 weeks for Solidity devs; mastery (batch operations, custom hooks, gas optimization) takes 2 months. Senior engineers command 20-30% premium designing token systems for $100M+ protocols.

什麼是 ERC-1155 Multi Token

ERC-1155 is Ethereum's standard for contracts that manage multiple token types simultaneously. Unlike ERC-20 (one token per contract) and ERC-721 (one NFT per contract), ERC-1155 can handle thousands of token IDs in a single contract. Each token ID can be fungible (ERC-20-like), non-fungible (ERC-721-like), or semi-fungible (N copies of the same unique asset). A single ERC-1155 contract enables batch operations: transfer 100 token A, 50 token B, and 1 token C in one transaction. This cuts gas costs by 30-50% compared to calling separate transfer functions. The standard includes hooks (onERC1155Received) to ensure recipient contracts know how to handle incoming tokens safely.

🔧 工具與生態
SolidityOpenZeppelin contractsHardhat testingWeb3.js or Ethers.jsToken standards documentationGas optimization tools

💰 各地區薪資

地區初級中級高級
USA$85,000$145,000$220,000
UK£52,000£88,000£135,000
EU€58,000€95,000€145,000
CANADACA$90,000CA$150,000CA$230,000

❓ 常見問題

When should I use ERC-1155 instead of ERC-20 + ERC-721?
ERC-1155 when you have multiple token types in same contract (e.g., game with currency, weapons, armor). Saves deployment cost (1 contract vs 10) and enables batch transfers in single transaction. ERC-20 + ERC-721 if you need them in completely separate contracts (different governance, different security models).
How do batch operations work in ERC-1155?
Standard transfer: move 100 of token ID 1 from Alice to Bob. Batch transfer: move 100 of token 1, 50 of token 2, 1 of token 3 in ONE transaction. Saves gas 30-50% vs calling transfer 3 times. Essential for user experience in games/DeFi.
What's the URI mechanism and why is it important?
Each token ID has a URI (like ipfs://xyz) pointing to metadata (name, image, description). If using on-chain URI storage, gas cost explodes. Use off-chain IPFS URIs with fallback to on-chain if needed. Implement onERC1155Received hook so contracts can accept tokens safely.
How do I prevent token ID collisions?
Assign ranges to different token categories: IDs 1-100 for currency, 101-200 for weapons, etc. Document the scheme. Or use mapping tokenIdToCategory. If upgradeable, use proxy pattern and manage carefully to avoid overwriting state.
What's the royalty standard for ERC-1155?
ERC-2981 (Royalty Standard) lets creators earn % on secondary sales. Implemented on top of ERC-1155. When trading token ID 42, contract queries royaltyInfo(42, salePrice) and returns (recipient, royaltyAmount). Marketplaces must support it to work.

不確定這項技能適不適合你?

做一下職業匹配,我們會推薦合適的方向。

找到最適合我的技能 →

找到理想的職業方向

在 2,521 個職業中進行技能匹配。免費。

免費做職業匹配 →