From b474a043e4a0fc1d29a07c55baad79346e99c7da Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 25 Jan 2022 15:17:45 +0100 Subject: [PATCH 1/2] Make royaltyInfo(uint256 _tokenId, uint256 _salePrice) virtual Should be cherrypicked in release 4.5 --- contracts/token/common/ERC2981.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/token/common/ERC2981.sol b/contracts/token/common/ERC2981.sol index 56260a25aed..dafe4ff02ca 100644 --- a/contracts/token/common/ERC2981.sol +++ b/contracts/token/common/ERC2981.sol @@ -40,7 +40,7 @@ abstract contract ERC2981 is IERC2981, ERC165 { /** * @inheritdoc IERC2981 */ - function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override returns (address, uint256) { + function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { From 68865d623a8be1b66bd35b2598e0e3314ab25dbc Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 25 Jan 2022 21:41:34 +0100 Subject: [PATCH 2/2] fix lint --- contracts/token/common/ERC2981.sol | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contracts/token/common/ERC2981.sol b/contracts/token/common/ERC2981.sol index dafe4ff02ca..f6617bbbb3f 100644 --- a/contracts/token/common/ERC2981.sol +++ b/contracts/token/common/ERC2981.sol @@ -40,7 +40,13 @@ abstract contract ERC2981 is IERC2981, ERC165 { /** * @inheritdoc IERC2981 */ - function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual override returns (address, uint256) { + function royaltyInfo(uint256 _tokenId, uint256 _salePrice) + external + view + virtual + override + returns (address, uint256) + { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) {