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 code duplication in _safeMint #318

Merged
merged 4 commits into from
Jun 6, 2022

Conversation

Vectorized
Copy link
Collaborator

@Vectorized Vectorized commented Jun 6, 2022

Actually, this saves 2 gas for EOA recipients (which is the most common use case).

It is ok to do the loop twice. Not much overhead (less than 1%).

Strictly speaking, calling onERC721Received should also be at the very last part of mint / transfer according to the EIP
(after all events, state changes, etc).

@cygaar

@Vectorized Vectorized requested a review from cygaar June 6, 2022 05:45
@Vectorized Vectorized changed the title Remove code duplication in _safeMint Remove code duplication in _safeMint Jun 6, 2022
@Vectorized Vectorized merged commit 5388170 into chiru-labs:main Jun 6, 2022
@Vectorized Vectorized deleted the feature/tidyMint branch June 7, 2022 21:38
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.

None yet

2 participants