mirror of https://github.com/status-im/EIPs.git
Automatically merged updates to draft EIP(s) 1155 (#2101)
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
This commit is contained in:
parent
5a0665ca9c
commit
9a35c0afc0
|
@ -74,7 +74,7 @@ interface ERC1155 /* is ERC165 */ {
|
|||
/**
|
||||
@dev MUST emit when the URI is updated for a token ID.
|
||||
URIs are defined in RFC 3986.
|
||||
The URI MUST point a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
|
||||
The URI MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
|
||||
*/
|
||||
event URI(string _value, uint256 indexed _id);
|
||||
|
||||
|
@ -371,13 +371,12 @@ To be more explicit about how the standard `safeTransferFrom` and `safeBatchTran
|
|||
* A mint/create operation is essentially a specialized transfer and MUST follow these rules:
|
||||
- To broadcast the existence of a token ID with no initial balance, the contract SHOULD emit the `TransferSingle` event from `0x0` to `0x0`, with the token creator as `_operator`, and a `_value` of 0.
|
||||
- The "TransferSingle and TransferBatch event rules" MUST be followed as appropriate for the mint(s) (i.e. singles or batches) however the `_from` argument MUST be set to `0x0` (i.e. zero address) to flag the transfer as a mint to contract observers.
|
||||
- __NOTE:__ This includes tokens that are given an initial balance in the contract. The balance of the contract MUST also be able to be determined by events alone meaning initial contract balances (for eg. in construction) MUST emit events to reflect those balances too.
|
||||
|
||||
- __NOTE:__ This includes tokens that are given an initial balance in the contract. The balance of the contract MUST also be able to be determined by events alone meaning initial contract balances (for eg. in construction) MUST emit events to reflect those balances too.
|
||||
* A burn/destroy operation is essentially a specialized transfer and MUST follow these rules:
|
||||
- The "TransferSingle and TransferBatch event rules" MUST be followed as appropriate for the burn(s) (i.e. singles or batches) however the `_to` argument MUST be set to `0x0` (i.e. zero address) to flag the transfer as a burn to contract observers.
|
||||
- NOTE: When burning/destroying you do not have to actually transfer to `0x0` (that is impl specific), only the `_to` argument in the event MUST be set to `0x0` as above.
|
||||
- When burning/destroying you do not have to actually transfer to `0x0` (that is impl specific), only the `_to` argument in the event MUST be set to `0x0` as above.
|
||||
* The total value transferred from address `0x0` minus the total value transferred to `0x0` observed via the `TransferSingle` and `TransferBatch` events MAY be used by clients and exchanges to determine the "circulating supply" for a given token ID.
|
||||
* As mentioned above mint/create and burn/destroy operations are specialized transfers and so will likely be accomplished with a custom transfer functions rather than `safeTransferFrom` or `safeBatchTransferFrom`. If so the "Implementation specific transfer API rules" section would be appropriate.
|
||||
* As mentioned above mint/create and burn/destroy operations are specialized transfers and so will likely be accomplished with custom transfer functions rather than `safeTransferFrom` or `safeBatchTransferFrom`. If so the "Implementation specific transfer API rules" section would be appropriate.
|
||||
- Even in a non-safe API and/or hybrid standards case the above event rules MUST still be adhered to when minting/creating or burning/destroying.
|
||||
* A contract MAY skip calling the `ERC1155TokenReceiver` hook function(s) if the mint/create operation is transferring the token(s) to itself. In all other cases the `ERC1155TokenReceiver` rules MUST be followed as appropriate for the implementation (i.e. safe, custom and/or hybrid).
|
||||
|
||||
|
@ -415,7 +414,7 @@ Example of such a URI: `https://token-cdn-domain/{id}.json` would be replaced wi
|
|||
|
||||
The following optional extensions can be identified with the (ERC-165 Standard Interface Detection)[https://eips.ethereum.org/EIPS/eip-165].
|
||||
|
||||
Changes to the URI MUST emit the `URI` event if the change can be expressed with an event (i.e. it isn't dynamic). If the optional ERC1155Metadata_URI extension is included, the 'uri' function SHOULD be used to retrieve values for which no event was emitted. The function MUST return the same value as the event if it was emitted.
|
||||
Changes to the URI MUST emit the `URI` event if the change can be expressed with an event (i.e. it isn't dynamic). If the optional ERC1155Metadata_URI extension is included, the `uri` function SHOULD be used to retrieve values for which no event was emitted. The function MUST return the same value as the event if it was emitted.
|
||||
|
||||
```solidity
|
||||
pragma solidity ^0.5.9;
|
||||
|
@ -427,7 +426,7 @@ interface ERC1155Metadata_URI {
|
|||
/**
|
||||
@notice A distinct Uniform Resource Identifier (URI) for a given token.
|
||||
@dev URIs are defined in RFC 3986.
|
||||
The URI may point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
|
||||
The URI MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
|
||||
@return URI string
|
||||
*/
|
||||
function uri(uint256 _id) external view returns (string memory);
|
||||
|
|
Loading…
Reference in New Issue