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

Redundant modifiers in ERC721 safeTransferFrom #1029

Closed
1 of 2 tasks
abandeali1 opened this issue Jun 19, 2018 · 0 comments · Fixed by #1030
Closed
1 of 2 tasks

Redundant modifiers in ERC721 safeTransferFrom #1029

abandeali1 opened this issue Jun 19, 2018 · 0 comments · Fixed by #1030

Comments

@abandeali1
Copy link
Contributor

🎉 Description

  • 🐛 This is a bug report.
  • 📈 This is a feature request.

Both versions of safeTransferFrom have the canTransfer modifier, even though they call transferFrom under the hood (which also includes the canTransfer modifier).

📝 Details

While these extra modifiers may help with readability, they are redundant and highly inefficient. Initial tests show that removing these modifiers saves ~1800 gas for a call of safeTransferFrom with data (likely higher gas savings when calling the version without data, since that adds a third canTransfer check).

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 a pull request may close this issue.

2 participants