Inconsistency between the code and the doc of IERC1820Registry.setInterfaceImplementer
Hi,
The doc of the function IERC1820Registry.setInterfaceImplementer references a parameter name interfaceHash, which is different from the actual parameter name _interfaceHash.
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/fcf35e5722847f5eadaaee052968a8a54d03622a/contracts/utils/introspection/IERC1820Registry.sol#L61-L70
The function IERC1820Registry.getInterfaceImplementer also has the same issue.
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/fcf35e5722847f5eadaaee052968a8a54d03622a/contracts/utils/introspection/IERC1820Registry.sol#L74-L82
Could you please check it?
Thanks.
Hey i'm new to contributing I don't mind updating this in the code, If i'm not mistaken I can't see a reason to have the argument named _interfaceHash, apart from this being an interface for this contract - https://eips.ethereum.org/EIPS/eip-1820#erc-1820-registry-smart-contract Which has this function implemented as - function setInterfaceImplementer(address _addr, bytes32 _interfaceHash, address _implementer) Maybe someone was trying to keep the argument names consistent with that? But looks as though you can name them as you wish.
interfaceHash is a function name defined by IERC1820. This means that using the same name for a parameter would trigger a warning (name shadowing). This is why we prefix the param name with an underscore (that is usually the way we go when there is a name conflict)
"This means that using the same name for a parameter would trigger a warning (name shadowing)" Ah I didn't know this (still learning) :)