Skip to content

Commit

Permalink
Automatically merged updates to draft EIP(s) 1155 (#2023)
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
AC0DEM0NK3Y authored and eip-automerger committed May 13, 2019
1 parent da4c47e commit 0f469ac
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions EIPS/eip-1155.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ interface ERC1155TokenReceiver {
/**
@notice Indicates whether a contract implements the `ERC1155TokenReceiver` functions and so can accept ERC1155 token types.
@dev This function MUST return `bytes4(keccak256("isERC1155TokenReceiver()"))` (i.e. 0x0d912442). and MUST not consume more than 5,000 gas.
@dev This function MUST return `bytes4(keccak256("isERC1155TokenReceiver()"))` (i.e. 0x0d912442).
This function MUST NOT consume more than 5,000 gas.
@return `bytes4(keccak256("isERC1155TokenReceiver()"))`
*/
function isERC1155TokenReceiver() external pure returns (bytes4);
Expand Down Expand Up @@ -251,7 +252,7 @@ To be more explicit about how safeTransferFrom and safeBatchTransferFrom MUST op
* MUST revert if length of `_ids` is not the same as length of `_values`.
* MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.
* MUST revert on any other error.
* After the above conditions are met, this function MUST check if `_to` is a smart contract (eg. code size > 0). If so, it MUST call `onERC1155Received` or `onERC1155BatchReceived` as on `_to` and act appropriately (see "`onERC1155Received` and onERC1155BatchReceived rules" section).
* After the above conditions are met, this function MUST check if `_to` is a smart contract (eg. code size > 0). If so, it MUST call `onERC1155Received` or `onERC1155BatchReceived` on `_to` and act appropriately (see "`onERC1155Received` and onERC1155BatchReceived rules" section).
* MUST emit `TransferSingle` or `TransferBatch` event(s) on transfer success (see "TransferSingle and TransferBatch event rules" section).
* Transfers and events MUST occur in the array order they were submitted (_ids[0]/_values[0] before _ids[1]/_values[1], etc).

Expand Down Expand Up @@ -317,9 +318,9 @@ To be more explicit about how safeTransferFrom and safeBatchTransferFrom MUST op
return 0x0d912442; // bytes4(keccak256("isERC1155TokenReceiver()"))
}
```
* The implementation MAY differ from the above but :
- it MUST return the same value.
- it MUST not spend more than 5,000 gas
* The implementation MAY differ from the above but:
- It MUST return the same value.
- It MUST NOT consume more than 5,000 gas.
**_Implementation specific transfer api rules:_**
* If implementation specific api functions are used to transfer 1155 tokens to a contract, the safeTransferFrom, or safeBatchTransferFrom (as appropriate) rules MUST be followed.
Expand Down

0 comments on commit 0f469ac

Please sign in to comment.