You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.*/interfaceERC1155TokenReceiver {
/** * @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, bytescalldata_data) externalreturns(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, bytescalldata_data) externalreturns(bytes4);
}
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.
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.
by @Agusx1211
The text was updated successfully, but these errors were encountered: