Skip to content

Commit

Permalink
Automatically merged updates to draft EIP(s) 1155
Browse files Browse the repository at this point in the history
Hi, I'm a bot! This change was automatically merged because:

 - It only modifies existing Draft or Last Call EIP(s)
 - The PR was approved or written by at least one author of each modified EIP
 - The build is passing
  • Loading branch information
coinfork authored and eip-automerger committed Nov 26, 2018
1 parent e6c3f29 commit 63a63e0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions EIPS/eip-1155.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,20 @@ pragma solidity ^0.4.25;
*/
interface ERC1155 /* is ERC165 */ {
/**
@dev MUST emit when tokens are transferred, including zero value transfers as well as minting or burning. Supports single or multiple _ids and _values.
@dev Either Transfer or TransferBatch MUST emit when tokens are transferred, including zero value transfers as well as minting or burning. This event supports single tokens.
A `Transfer` event from address `0x0` signifies a minting operation. The total value transferred from address 0x0 minus the total value transferred to 0x0 may be used by clients and exchanges to be added to the "circulating supply" for a given token ID
A `Transfer` event to address `0x0` signifies a burning or melting operation.
This MUST emit a 0 value, from `0x0` to `0x0` with `_operator` assuming the role of the token creator. This can be used to define a token ID with no initial balance at the time of creation.
*/
event Transfer(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values);
event Transfer(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value);
/**
@dev Either Transfer or TransferBatch MUST emit when tokens are transferred, including zero value transfers as well as minting or burning. This event supports multiple _ids and _values.
A `Transfer` event from address `0x0` signifies a minting operation. The total value transferred from address 0x0 minus the total value transferred to 0x0 may be used by clients and exchanges to be added to the "circulating supply" for a given token ID
A `Transfer` event to address `0x0` signifies a burning or melting operation.
This MUST emit a 0 value, from `0x0` to `0x0` with `_operator` assuming the role of the token creator. This can be used to define a token ID with no initial balance at the time of creation.
*/
event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values);
/**
@dev MUST emit when an approval is updated
Expand Down Expand Up @@ -175,9 +183,9 @@ interface ERC1155TokenReceiver {

## Enumerating from events

In order to keep storage requirements light for contracts implementing ERC-1155, enumeration (discovering the IDs and values of tokens) must be done using event logs. It is RECOMMENDED that clients such as exchanges and blockchain explorers maintain a local database containing the Token ID, Supply, and URI at the minimum. This can be built from each Transfer and URI event, starting from the block the smart contract was deployed until the latest block.
In order to keep storage requirements light for contracts implementing ERC-1155, enumeration (discovering the IDs and values of tokens) must be done using event logs. It is RECOMMENDED that clients such as exchanges and blockchain explorers maintain a local database containing the Token ID, Supply, and URI at the minimum. This can be built from each Transfer, TransferBatch, and URI event, starting from the block the smart contract was deployed until the latest block.

ERC-1155 contracts must therefore carefully emit Transfer events in any instance where tokens are created, minted, or destroyed.
ERC-1155 contracts must therefore carefully emit Transfer or TransferBatch events in any instance where tokens are created, minted, or destroyed.

## Metadata

Expand Down

0 comments on commit 63a63e0

Please sign in to comment.