Make royaltyInfo(uint256 _tokenId, uint256 _salePrice) virtual (#3133)

* Make royaltyInfo(uint256 _tokenId, uint256 _salePrice) virtual

Should be cherrypicked in release 4.5

* fix lint
pull/3138/head
Hadrien Croubois 3 years ago committed by GitHub
parent 78deae5a76
commit 6fb1e843cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      contracts/token/common/ERC2981.sol

@ -40,7 +40,13 @@ abstract contract ERC2981 is IERC2981, ERC165 {
/** /**
* @inheritdoc IERC2981 * @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]; RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];
if (royalty.receiver == address(0)) { if (royalty.receiver == address(0)) {

Loading…
Cancel
Save