Implementing this contract inherited in ERC721 I get this warning warning: Unused function parameter.
.
It is related to this function in that the first parameter, idNFT, is not used in it:
/// @inheritdoc IERC2981Royalties
function royaltyInfo(uint256 idNFT, uint256 value)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
RoyaltyInfo memory royalties = _royalties;
receiver = royalties.recipient;
royaltyAmount = (value * royalties.amount) / 10000;
}
As it is a standard I donβt want to alter this function but on the other hand it is annoying to have this warning. What do you advise me to do? would you remove this parameter?
My contract only uses setRoyalties function and it works perfectly.
/// @notice Allows to set the royalties on the contract
/// @dev This function in a real contract should be protected with a onlyOwner (or equivalent) modifier
/// @param recipient the royalties recipient
/// @param value royalties value (between 0 and 10000)
function setRoyalties(address recipient, uint256 value) public onlyOwner {
_setRoyalties(recipient, value);
}