From d2832ca7a9096afa77a7c5b669292c0ca5f3ddb7 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 31 Mar 2022 20:01:22 +0200 Subject: [PATCH] make ERC2981:royaltyInfo public (#3305) --- CHANGELOG.md | 3 +++ contracts/token/common/ERC2981.sol | 8 +------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae2da67e9e..e3394576a22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## Unreleased + * `ERC2981`: make `royaltiInfo` public to allow super call in overrides. ([#3305](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3305)) + ## Unreleased * `crosschain`: Add a new set of contracts for cross-chain applications. `CrossChainEnabled` is a base contract with instantiations for several chains and bridges, and `AccessControlCrossChain` is an extension of access control that allows cross-chain operation. ([#3183](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3183)) diff --git a/contracts/token/common/ERC2981.sol b/contracts/token/common/ERC2981.sol index 90d7ed34a5f..cee7cb09faf 100644 --- a/contracts/token/common/ERC2981.sol +++ b/contracts/token/common/ERC2981.sol @@ -40,13 +40,7 @@ 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) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) {