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

Remove ERC721Enumerable interface #29

Closed

Conversation

willisk
Copy link
Contributor

@willisk willisk commented Jan 25, 2022

Removes ERC721Enumerable interface. The functionality introduced by the interface has its use in ERC721Enumerable.sol, however here it does not add any value.
In addition, the function tokenOfOwnerByIndex(address owner, uint256 index) should never be called on-chain. To remove any possibility of an accidental call on-chain, I propose to remove the interface (except for totalSupply()).
See #18

@chiru-labs
Copy link
Owner

@willisk would you be open to opening a PR that makes ERC721AEnumerable as an extension, similar to #34, where we can document tradeoffs involved with calling onchain from a Solidity write path?

@@ -6,7 +6,6 @@ pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

Choose a reason for hiding this comment

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

in the comment on line 16 you can delete the "Enumerable" part of "including the Metadata and Enumerable extension".

@chiru-labs
Copy link
Owner

@willisk bumping above comment- otherwise we can work off this branch to add ERC721AEnumerable

@syffs
Copy link

syffs commented Feb 8, 2022

@chiru-labs please see #81

@syffs syffs mentioned this pull request Feb 15, 2022
@cygaar
Copy link
Collaborator

cygaar commented Feb 16, 2022

@willisk we ended up merging #107 because it was based off of the latest main. Regardless, thanks for opening up this PR

@cygaar cygaar closed this Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants