Skip to content

Commit e979b93

Browse files
committed
Add documentation for 2981 implementation
1 parent 7fb8bfd commit e979b93

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
* `ERC2891`: add a new extension of `ERC721` to handle royalty information.([]())
56
* `GovernorTimelockControl`: improve the `state()` function to have it reflect cases where a proposal has been canceled directly on the timelock. ([#2977](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2977))
67
* `Math`: add a `abs(int256)` method that returns the unsigned absolute value of a signed value. ([#2984](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2984))
78
* Preset contracts are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com). ([#2986](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2986))

contracts/token/ERC721/extensions/draft-ERC721Royalty.sol

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import "../../../utils/introspection/ERC165Storage.sol";
88
import "hardhat/console.sol";
99

1010
/**
11-
* @dev TBD
11+
* @dev Implementation of the ERC721 Royalty extension allowing royalty information to be stored and retrieved, as defined in
12+
* https://eips.ethereum.org/EIPS/eip-2981[EIP-2981].
13+
*
14+
* Adds the {_setTokenRoyalty} methods to set the token royalty information, and {_setRoyalty} method to set a global
15+
* royalty information.
1216
*
1317
* _Available since v4.5._
1418
*/
@@ -21,7 +25,8 @@ abstract contract ERC721Royalty is IERC721Royalty, ERC165Storage {
2125
RoyaltyInfo private _royaltyInfo;
2226
mapping(uint256 => RoyaltyInfo) private _tokenRoyalty;
2327

24-
/*@dev Sets tokens royalties
28+
/*
29+
* @dev Sets tokens royalties
2530
*
2631
* Requirements:
2732
* - `tokenId` must be already mined.
@@ -39,7 +44,9 @@ abstract contract ERC721Royalty is IERC721Royalty, ERC165Storage {
3944
_tokenRoyalty[tokenId] = RoyaltyInfo(recipient, value);
4045
}
4146

42-
/*@dev Sets global royalty
47+
/*
48+
*
49+
* @dev Sets global royalty
4350
*
4451
* Requirements:
4552
* - `recipient` cannot be the zero address.

0 commit comments

Comments
 (0)