solidstate-network/solidstate-solidity

Add operator argument to `ERC20` `_beforeTokenTransfer` hook

ItsNickBarry opened this issue · 3 comments

Investigate whether this is useful.

The ERC1155 usage of operator in its hook of the same name does not appear to be useful because it is always set to msg.sender. Should operator be set to address(this) for the mint and burn functions?

Other option is to remove operator entirely, simplifying the internal API.

Apparently operator is an integral part of the ERC1155 standard, so it doesn't make sense to change its meaning even in the context of _beforeTokenTransfer.