Skip to content

Commit ab54fcb

Browse files
committed
make ERC2981:royaltyInfo public (#3305)
(cherry picked from commit d2832ca) Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
1 parent 050180e commit ab54fcb

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* `TimelockController`: Add a separate canceller role for the ability to cancel. ([#3165](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3165))
2222
* `Initializable`: add a reinitializer modifier that enables the initialization of new modules, added to already initialized contracts through upgradeability. ([#3232](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3232))
2323
* `Initializable`: add an Initialized event that tracks initialized version numbers. ([#3294](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3294))
24+
* `ERC2981`: make `royaltiInfo` public to allow super call in overrides. ([#3305](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3305))
2425

2526
### Breaking changes
2627

contracts/token/common/ERC2981.sol

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,7 @@ abstract contract ERC2981 is IERC2981, ERC165 {
4040
/**
4141
* @inheritdoc IERC2981
4242
*/
43-
function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
44-
external
45-
view
46-
virtual
47-
override
48-
returns (address, uint256)
49-
{
43+
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
5044
RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];
5145

5246
if (royalty.receiver == address(0)) {

0 commit comments

Comments
 (0)