I’ve been wondering why there isn’t an ERC for adding supportsInterface
, safeTransfer
, and safeTransferFrom
to ERC20 (along with an ERC2Receiver, a la ERC721 and 1155) - it seems like pretty low-hanging fruit. Just putting EIP-165 into ERC20 seems like a decent idea, it would be a nice building block for other ERC20 extensions to be able to build on, opening up the path for interfaceId
s for governance tokens, staking tokens, or whatever.
In addition, adding safeTransfer
to ERC20 shouldn’t make any backwards compatibility issues, as transfer
and transferFrom
would still exist, meaning smart contract wallets and the like wouldn’t be bricked by it.
I see that EIP-1363 went down a similar path, but didn’t use the same naming conventions in ways that I think are meaningful, and also adds additional functionality around approvals with callbacks that imho would be better handled with EIP-2612 or EIP-3009.
Is there a good reason not to do this?