ethereum-studio
ethereum-studio copied to clipboard
Update CryptoPizza to inherit from OpenZeppelin ERC721 implementation
Summary
Update CryptoPizza to inherit from OpenZeppelin ERC721 implementation rather than create a separate implementation.
Motivation
https://studio.ethereum.org/ will likely be the entry point for many new developers to the space.
Whilst an example of how to implement ERC721 is useful, it may be more beneficial to show how to appropriately inherit from OpenZeppelin Contracts implementation.
Describe alternatives you've considered
The alternative is to provide some guidance in the README that developers could inherit from OpenZeppelin Contracts ERC721 implementation instead.
Additional context
Disclosure: I am the Community Manager at OpenZeppelin
Is this not what it does already?
Is this not what it does already?
@ChrisChinchilla currently CryptoPizza inherits from the interface IERC721 and creates its own implementation. Instead CryptoPizza could inherit from the OpenZeppelin implementation of ERC721, then the code could be simpler and just focus on the Pizza DNA and uniqueness (as an aside, a mapping to check if a Pizza name exists would be better than a for loop which doesn't scale).
https://docs.openzeppelin.com/contracts/2.x/api/token/erc721
OK, then this is going to be more of a task for the devs here, or a task I can tackle, but not right now, so it may not happen immediately.
@abcoathup great addition and great point. If you guys already do have an implementation there is no need at all to implement it in the template itself.