Skip to content

Commit

Permalink
make ERC2981:royaltyInfo public (#3305)
Browse files Browse the repository at this point in the history
(cherry picked from commit d2832ca)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
  • Loading branch information
Amxx committed Mar 31, 2022
1 parent 050180e commit ab54fcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* `TimelockController`: Add a separate canceller role for the ability to cancel. ([#3165](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3165))
* `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))
* `Initializable`: add an Initialized event that tracks initialized version numbers. ([#3294](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3294))
* `ERC2981`: make `royaltiInfo` public to allow super call in overrides. ([#3305](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3305))

### Breaking changes

Expand Down
8 changes: 1 addition & 7 deletions contracts/token/common/ERC2981.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit ab54fcb

Please sign in to comment.