ethereum-studio icon indicating copy to clipboard operation
ethereum-studio copied to clipboard

Update CryptoPizza to inherit from OpenZeppelin ERC721 implementation

Open abcoathup opened this issue 5 years ago • 4 comments

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

abcoathup avatar Dec 06 '19 04:12 abcoathup

Is this not what it does already?

ChrisChinchilla avatar Dec 16 '19 13:12 ChrisChinchilla

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

abcoathup avatar Dec 17 '19 05:12 abcoathup

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.

ChrisChinchilla avatar Dec 17 '19 12:12 ChrisChinchilla

@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.

javier-tarazaga avatar Jan 23 '20 08:01 javier-tarazaga