Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L2 - Noncompliant with _operator definitions by ERC-1155 #27

Open
PhABC opened this issue Jan 6, 2020 · 3 comments
Open

L2 - Noncompliant with _operator definitions by ERC-1155 #27

PhABC opened this issue Jan 6, 2020 · 3 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@PhABC
Copy link
Contributor

PhABC commented Jan 6, 2020

image

by @Agusx1211

@PhABC PhABC added the bug Something isn't working label Jan 6, 2020
@PhABC PhABC self-assigned this Jan 6, 2020
@PhABC
Copy link
Contributor Author

PhABC commented Jan 7, 2020

One can't replace msg.sender with _from for the _operator since the operator is not always "from" and is meant to represent who initiated the transfer. A dex could be the operator, like 0x or Uniswap, for instance.

You can see a slightly different definition of what is meant by operator here ;

/**
    Note: The ERC-165 identifier for this interface is 0x4e2312e0.
*/
interface ERC1155TokenReceiver {
    /**
     * @notice Handle the receipt of a single ERC1155 token type.
     * @param _operator  The address which initiated the transfer (i.e. msg.sender)
     * @param _from        The address which previously owned the token
     */
    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.
     * @param _operator  The address which initiated the batch transfer (i.e. msg.sender)
     * @param _from         The address which previously owned the tokens
     */
    function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external returns(bytes4);       
}

@Agusx1211
Copy link
Member

The ERC-1155 specification seems to have a conflicting definition of _operator, because The address which initiated the transfer is not always authorized to move the coins.

@PhABC
Copy link
Contributor Author

PhABC commented Jan 16, 2020

Indeed. I discussed with other ERC-1155 devs and we agree that this is a bit subjective and what operator might represent could vary. Need to ponder this a bit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants