Closed 0xbok closed 2 years ago
Suggested fix:
supportsInterface
and royaltyInfo
through low-level calls. Are there any significant ERC20s that revert on transfer to the zero address? That is pretty irregular behaviour isn't it?
How would using low level calls address this issue?
Not sure which existing tokens revert on transfer to zero address, but OZ does this: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol#L232. Since we are building it for general erc20s, we should accommodate this case.
low lever calls only address the royaltyInfo
and supportsInterface
revert. Like try catch.
USDC revert on zero address https://etherscan.io/address/0xa2327a938febf5fec13bacfb16ae10ecbc4cbdcf#code
royaltyInfo
may also returnaddress(0)
as royalty receiver. Some erc20 tokens revert on transfer to zero address.