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

Fixed confusing require() string #2975

Merged
merged 5 commits into from
Dec 9, 2021
Merged

Conversation

robriks
Copy link
Contributor

@robriks robriks commented Nov 15, 2021

Line 332 require() error string:
"... transfer of token that is not own"
is confusing but easily fixed to:
"... transfer of token that is not owned by 'from' "

Fixes #????

PR Checklist

  • Tests
  • Documentation
  • Changelog entry

Line 332 require() error string:
 "... transfer of token that is not own"
is confusing but easily fixed to:
"... transfer of token that is not owned by 'from' "
@frangio
Copy link
Contributor

frangio commented Dec 9, 2021

Thanks for the suggestion @robriks. I agree the current string is quite confusing...

One of the constraints we have is that we want these strings to be as short as possible because they add to deployment cost.

I also don't think it's a good idea to include the 'from' name in the string as it's not clear it refers to the argument.

I want to propose ERC721: transfer from incorrect owner. What do you think?

@robriks
Copy link
Contributor Author

robriks commented Dec 9, 2021

That sounds perfect! Very clear and concise, fixing the confusion.

Happy holidays!

@frangio frangio enabled auto-merge (squash) December 9, 2021 23:35
@frangio frangio merged commit 0c858e2 into OpenZeppelin:master Dec 9, 2021
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.

2 participants