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

Use of namespaces for ERC721 & ERC721Enumerable #296

Merged
merged 25 commits into from
Jun 16, 2022

Conversation

Amxx
Copy link
Contributor

@Amxx Amxx commented Apr 29, 2022

No description provided.

Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

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

This looks great! I left a couple of comments :)

src/openzeppelin/token/erc721/library.cairo Outdated Show resolved Hide resolved
@@ -209,17 +192,17 @@ func safeMint{
data: felt*
):
Ownable_only_owner()
ERC721_safeMint(to, tokenId, data_len, data)
ERC721._safe_mint(to, tokenId, data_len, data)
Copy link
Contributor

Choose a reason for hiding this comment

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

This tokenId, data_len bit is the most annoying code in the library. It's the next thing to tackle.

Copy link
Contributor

@martriay martriay left a comment

Choose a reason for hiding this comment

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

Please check the merge conflicts and update the docs with the new scoping!

@Amxx
Copy link
Contributor Author

Amxx commented May 5, 2022

@martriay Is that good ?

Copy link
Contributor

@martriay martriay left a comment

Choose a reason for hiding this comment

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

I think we're still missing the API part of the docs, since the library methods are now snake_case, and probably a comment about the need to camelCase methods when exposing them.

docs/ERC721.md Outdated Show resolved Hide resolved
docs/ERC721.md Outdated Show resolved Hide resolved
docs/ERC721.md Outdated Show resolved Hide resolved
docs/ERC721.md Outdated Show resolved Hide resolved
Co-authored-by: Martín Triay <martriay@gmail.com>
@koloz193 koloz193 mentioned this pull request May 6, 2022
@JulissaDantes JulissaDantes changed the title Using namespaces for ERC721 & ERC721Enumerable Use of namespaces for ERC721 & ERC721Enumerable May 10, 2022
Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

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

Excellent improvements! I left a minor comment; otherwise, I think this is ready to go!

src/openzeppelin/token/erc721/library.cairo Outdated Show resolved Hide resolved
docs/ERC721.md Show resolved Hide resolved
Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

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

Great work! 🎉🎉

Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

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

@Amxx I take it back! 😅 I'm so sorry, I'm just catching this now: I'm thinking we should move the internal library functions (private in Solidity) outside of the namespace to protect them . What do you think?

src/openzeppelin/token/erc721/library.cairo Outdated Show resolved Hide resolved
src/openzeppelin/token/erc721_enumerable/library.cairo Outdated Show resolved Hide resolved
@Amxx
Copy link
Contributor Author

Amxx commented May 25, 2022

@Amxx I take it back! sweat_smile I'm so sorry, I'm just catching this now: I'm thinking we should move the internal library functions (private in Solidity) outside of the namespace to protect them . What do you think?

Yes, that sounds like the right way

Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

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

Great work, sir :)

src/openzeppelin/token/erc721_enumerable/library.cairo Outdated Show resolved Hide resolved
@martriay martriay merged commit b27101e into OpenZeppelin:main Jun 16, 2022
@Amxx Amxx deleted the feature/erc721/namespace branch June 17, 2022 07:46
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.

3 participants