Skip to content

Commit

Permalink
Make royaltyInfo(uint256 _tokenId, uint256 _salePrice) virtual (#3133)
Browse files Browse the repository at this point in the history
* Make royaltyInfo(uint256 _tokenId, uint256 _salePrice) virtual

Should be cherrypicked in release 4.5

* fix lint

(cherry picked from commit 6fb1e84)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
  • Loading branch information
Amxx committed Feb 8, 2022
1 parent a976023 commit c1a5c27
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion contracts/token/common/ERC2981.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ 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)) {
Expand Down

0 comments on commit c1a5c27

Please sign in to comment.