This commit is contained in:
Hadrien Croubois
2023-07-07 16:13:17 +02:00
parent 0bb98cb8c6
commit 5ab254cf95
6 changed files with 6 additions and 30 deletions

View File

@ -138,11 +138,7 @@ abstract contract ERC721Consecutive is IERC2309, ERC721 {
* Warning: Using {ERC721Consecutive} prevents minting during construction in favor of {_mintConsecutive}. * Warning: Using {ERC721Consecutive} prevents minting during construction in favor of {_mintConsecutive}.
* After construction, {_mintConsecutive} is no longer available and minting through {_update} becomes available. * After construction, {_mintConsecutive} is no longer available and minting through {_update} becomes available.
*/ */
function _update( function _update(address from, address to, uint256 tokenId) internal virtual override {
address from,
address to,
uint256 tokenId
) internal virtual override {
super._update(from, to, tokenId); super._update(from, to, tokenId);
// only mint after construction // only mint after construction

View File

@ -76,11 +76,7 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
/** /**
* @dev See {ERC721-_update}. * @dev See {ERC721-_update}.
*/ */
function _update( function _update(address from, address to, uint256 tokenId) internal virtual override {
address from,
address to,
uint256 tokenId
) internal virtual override {
super._update(from, to, tokenId); super._update(from, to, tokenId);
if (from == address(0)) { if (from == address(0)) {

View File

@ -27,11 +27,7 @@ abstract contract ERC721Pausable is ERC721, Pausable {
* *
* - the contract must not be paused. * - the contract must not be paused.
*/ */
function _update( function _update(address from, address to, uint256 tokenId) internal virtual override {
address from,
address to,
uint256 tokenId
) internal virtual override {
_requireNotPaused(); _requireNotPaused();
super._update(from, to, tokenId); super._update(from, to, tokenId);
} }

View File

@ -29,11 +29,7 @@ abstract contract ERC721Royalty is ERC2981, ERC721 {
/** /**
* @dev See {ERC721-_update}. This override additionally clears the royalty information for the token. * @dev See {ERC721-_update}. This override additionally clears the royalty information for the token.
*/ */
function _update( function _update(address from, address to, uint256 tokenId) internal virtual override {
address from,
address to,
uint256 tokenId
) internal virtual override {
super._update(from, to, tokenId); super._update(from, to, tokenId);
if (to == address(0)) { if (to == address(0)) {

View File

@ -68,11 +68,7 @@ abstract contract ERC721URIStorage is IERC4906, ERC721 {
* token-specific URI was set for the token, and if so, it deletes the token URI from * token-specific URI was set for the token, and if so, it deletes the token URI from
* the storage mapping. * the storage mapping.
*/ */
function _update( function _update(address from, address to, uint256 tokenId) internal virtual override {
address from,
address to,
uint256 tokenId
) internal virtual override {
super._update(from, to, tokenId); super._update(from, to, tokenId);
if (to == address(0) && bytes(_tokenURIs[tokenId]).length != 0) { if (to == address(0) && bytes(_tokenURIs[tokenId]).length != 0) {

View File

@ -20,11 +20,7 @@ abstract contract ERC721Votes is ERC721, Votes {
* *
* Emits a {IVotes-DelegateVotesChanged} event. * Emits a {IVotes-DelegateVotesChanged} event.
*/ */
function _update( function _update(address from, address to, uint256 tokenId) internal virtual override {
address from,
address to,
uint256 tokenId
) internal virtual override {
super._update(from, to, tokenId); super._update(from, to, tokenId);
_transferVotingUnits(from, to, 1); _transferVotingUnits(from, to, 1);
} }