How does ERC-1155 transfer several item types together?
ERC-1155 tracks balances for multiple IDs in one contract. A safe batch transfer supplies matching arrays of IDs and amounts.
EIP-1155 in practice
To send two potions and one ticket, pass their IDs with amounts [2,1] in the same order. A receiving contract must implement the required acceptance behavior.
中文
ERC-1155 如何一次转移多种物品?
ERC-1155 在一个合约内维护多个物品编号及各自余额,安全批量转账以成对的编号和数量表示多项转移。
EIP-1155 应用实例
发送两瓶药水和一张门票时,可传入两个编号和数量 [2,1]。数组位置必须对应,接收方若是合约还需满足接收接口要求。