Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update tokenURI mechanism #103

Merged
merged 2 commits into from
Feb 21, 2022
Merged

feat: Update tokenURI mechanism #103

merged 2 commits into from
Feb 21, 2022

Conversation

maximebrugel
Copy link
Contributor

We updated the mechanism to set the tokenURI:

  • Remove mintWithMetadata and backfillTokenURI (with the _tokenURIs map).
  • Add reveal/unrevealed URI
  • Add contract URI

@maximebrugel maximebrugel added the To review Let people know this PR is ready for a review label Feb 20, 2022

/// @dev Stores the original asset of each asset
mapping(uint256 => uint256) public originalAsset;

/// @dev Stores owners of burnt assets
mapping(uint256 => address) public lastOwnerBeforeBurn;

/// @dev True if using the API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💅 "using the API" is not very explicit. Consider rewording this
Same for L20

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +62 to +63
function _baseURI() internal view override returns (string memory) {
return baseUri;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❔ Is this function really necessary? If used by the ERC721 contract, shouldn't it be declared in it already?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes because used in super.tokenURI()

Comment on lines 116 to 117
function reveal() external onlyOwner {
isRevealed = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no mechanism to unreveal to correct a mistake. Consider changing this function to setIsRevealed(bool _isRevealed).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@adrien-supizet adrien-supizet added Fix and merge Minor changes required and removed To review Let people know this PR is ready for a review labels Feb 21, 2022
@maximebrugel maximebrugel added Can merge Good to go and removed Fix and merge Minor changes required labels Feb 21, 2022
@maximebrugel maximebrugel merged commit a832751 into master Feb 21, 2022
@maximebrugel maximebrugel deleted the new-token-uri branch February 21, 2022 09:16
obatirou added a commit to code-423n4/2022-06-nested that referenced this pull request Jun 14, 2022
obatirou added a commit to code-423n4/2022-06-nested that referenced this pull request Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can merge Good to go
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants