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

erc721 mintable and bouncer updates #1020

Conversation

shrugs
Copy link
Contributor

@shrugs shrugs commented Jun 16, 2018

Supercedes #957 and #950

fixes #962

πŸš€ Description

cc @vittominacori for review

  • DefaultTokenURI.sol β€” implement tokenURI(uint256 _tokenId) and returns a default tokenURI if a specific token URI is not set. saves the developer from storing the same tokenURI for every token

  • RBACMintable.sol β€” a super simple mintable role with onlyMinter modifier. Does not suggest role authorization, which is left up to the implementer. Pairs well with RBACOwnable

  • RBACOwnable β€” an Ownable implementation that allows multiple owners that can add/remove themselves

  • MintableERC721Token.sol β€” an ERC721Token that can be minted by anyone with the minter role.

  • ERC721Burnable β€” an interface to support burnFrom() mechanism

  • BurnableERC721Token β€” an implementation of that interface

  • πŸ“˜ I've reviewed the OpenZeppelin Contributor Guidelines

  • βœ… I've added tests where applicable to test my new functionality.

  • πŸ“– I've made sure that my contracts are well-documented.

  • 🎨 I've run the JS/Solidity linters and fixed any issues (npm run lint:all:fix).

@vittominacori
Copy link
Contributor

@shrugs pushed in your repo

shrugs#1

It should solve test failing.

@shrugs shrugs force-pushed the feat/erc721-mintable-and-bouncer-updates branch from 672a7a2 to e8a8333 Compare June 17, 2018 21:08
@frangio
Copy link
Contributor

frangio commented Jun 17, 2018

I see a few problems with this PR.

It's very complex, and doesn't feel very cohesive. There's additions to our ERC721 stack, SignatureBouncer and RBAC, as well as new stuff like NonceTracker and AutoIncrementing. It's very hard to review such disparate components. The huge new context in which they are presented results in a lot of overhead. We should aim for more cohesive and as small as possible PRs. I believe this will lead to better reviews by making better use of our time and focus. (In the possible case that a huge feature has to be developed, it should probably be done in an ongoing in progress PR with incremental reviews from the same reviewer.)

Additionally, I'm not quite convinced that ERC721Minter should be a part of OpenZeppelin. Although SignatureBouncer is very interesting, we shouldn't start writing bouncers for every feature in the library. ERC721Minter is a fine example of how a developer might build a system by composing a MintableERC721Token with a SignatureBouncer. What we should aim for is designing, writing, and documenting building blocks that can be safely composed by developers with little code. ERC721Minter is a success in this sense: it is very little code doing something quite powerful built out of OpenZeppelin components, but it is not something that I would include in the library.

What do you think about this?

My concrete proposal is to continue work on #957, and then merge ERC721Minter only as an example (i.e. in the examples/ directory).

@shrugs
Copy link
Contributor Author

shrugs commented Jun 17, 2018

@frangio Keeping ERC721Minter inside examples is good πŸ‘

This PR is super huge, and it totally is all over the place, yeah. With the removal of ERC721Minter we can split noncetracker, autoincrementing, and signature bouncer changes into separate PRs. Will do that unless you have extra thoughts.

@shrugs
Copy link
Contributor Author

shrugs commented Jun 17, 2018

@frangio thanks for the feedback, I feel a lot better about the PR now. split them into

#1022
#1023
#1024

@shrugs shrugs force-pushed the feat/erc721-mintable-and-bouncer-updates branch from 26339ad to 4e2242c Compare June 26, 2018 22:59
@nventuro
Copy link
Contributor

@shrugs should we close this one then, since work continued on those other 3 PRs?

@shrugs
Copy link
Contributor Author

shrugs commented Jul 20, 2018

@nventuro this PR will have to eventually be rebased on master once those commits are merged

@nventuro nventuro added in progress on hold Put on hold for some reason that must be specified in a comment. labels Jul 20, 2018
@frangio frangio mentioned this pull request Aug 6, 2018
@shrugs
Copy link
Contributor Author

shrugs commented Sep 4, 2018

closing in favor of tracking via #1272

@shrugs shrugs closed this Sep 4, 2018
@shrugs shrugs deleted the feat/erc721-mintable-and-bouncer-updates branch September 4, 2018 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Put on hold for some reason that must be specified in a comment.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RBAC with owner
4 participants