mirror of https://github.com/status-im/EIPs.git
Automatically merged updates to draft EIP(s) 1155 (#2012)
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
774e384691
commit
75c9279e22
|
@ -104,8 +104,8 @@ interface ERC1155 /* is ERC165 */ {
|
|||
Transfers and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).
|
||||
After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (eg. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
|
||||
MUST emit `TransferSingle` or `TransferBatch` event(s) on transfer success (see "Safe Transfer Rules" section of the standard).
|
||||
@param _from Source addresses
|
||||
@param _to Target addresses
|
||||
@param _from Source address
|
||||
@param _to Target address
|
||||
@param _ids IDs of each token type (order and length must match _values array)
|
||||
@param _values Transfer amounts per token type (order and length must match _ids array)
|
||||
@param _data Additional data with no specified format, MUST be sent in call to the `ERC1155TokenReceiver` hook(s) on `_to`
|
||||
|
@ -157,7 +157,7 @@ interface ERC1155TokenReceiver {
|
|||
/**
|
||||
@notice Handle the receipt of a single ERC1155 token type.
|
||||
@dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated.
|
||||
This function MUST return `bytes4(keccak256("accept_erc1155_tokens()"))` if it accepts the transfer.
|
||||
This function MUST return `bytes4(keccak256("accept_erc1155_tokens()"))` (i.e. 0x4dc21a2f) if it accepts the transfer.
|
||||
This function MUST revert if it rejects the transfer.
|
||||
Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
|
||||
@param _operator The address which initiated the transfer (i.e. msg.sender)
|
||||
|
@ -165,14 +165,14 @@ interface ERC1155TokenReceiver {
|
|||
@param _id The id of the token being transferred
|
||||
@param _value The amount of tokens being transferred
|
||||
@param _data Additional data with no specified format
|
||||
@return `bytes4(keccak256("accept_erc1155_tokens()"))`==0x4dc21a2f
|
||||
@return `bytes4(keccak256("accept_erc1155_tokens()"))`
|
||||
*/
|
||||
function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4);
|
||||
|
||||
/**
|
||||
@notice Handle the receipt of multiple ERC1155 token types.
|
||||
@dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated.
|
||||
This function MUST return `bytes4(keccak256("accept_batch_erc1155_tokens()"))` if it accepts the transfer(s).
|
||||
This function MUST return `bytes4(keccak256("accept_batch_erc1155_tokens()"))` (i.e. 0xac007889) if it accepts the transfer(s).
|
||||
This function MUST revert if it rejects the transfer(s).
|
||||
Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
|
||||
@param _operator The address which initiated the batch transfer (i.e. msg.sender)
|
||||
|
@ -180,14 +180,14 @@ interface ERC1155TokenReceiver {
|
|||
@param _ids An array containing ids of each token being transferred (order and length must match _values array)
|
||||
@param _values An array containing amounts of each token being transferred (order and length must match _ids array)
|
||||
@param _data Additional data with no specified format
|
||||
@return `bytes4(keccak256("accept_batch_erc1155_tokens()"))`==0xac007889
|
||||
@return `bytes4(keccak256("accept_batch_erc1155_tokens()"))`
|
||||
*/
|
||||
function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external returns(bytes4);
|
||||
|
||||
/**
|
||||
@notice Indicates whether a contract implements the `ERC1155TokenReceiver` functions and so can accept ERC1155 token types.
|
||||
@dev This function MUST return `bytes4(keccak256("isERC1155TokenReceiver()"))`.
|
||||
@return `bytes4(keccak256("isERC1155TokenReceiver()"))`==0x0d912442
|
||||
@dev This function MUST return `bytes4(keccak256("isERC1155TokenReceiver()"))` (i.e. 0x0d912442).
|
||||
@return `bytes4(keccak256("isERC1155TokenReceiver()"))`
|
||||
*/
|
||||
function isERC1155TokenReceiver() external pure returns (bytes4);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue