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

Fix erc721 transferFrom comment #341

Merged
merged 7 commits into from Jun 15, 2022

Conversation

andrew-fleming
Copy link
Collaborator

Resolves #340.

docs/ERC721.md Outdated
@@ -434,7 +434,7 @@ None.

Transfers `tokenId` token from `from_` to `to`.

> Note that this function should be used instead of `safeTransferFrom` to transfer tokens. Exercise caution as tokens sent to a contract that does not support ERC721 can be lost forever.
> Usage of this method is discouraged, use [`safeTransferFrom`](#safetransferfrom) whenever possible.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it discouraged? They're used in different scenarios and some people even prefer this method to avoid calling arbitrary contracts and thus prevent side effects

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great point! And thank you for the article^

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

just asked Fran, he confirmed it's an old comment and he's not sure about that recommendation. let's not discourage it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you, sir. Sounds good

Copy link
Contributor

Choose a reason for hiding this comment

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

@andrew-fleming andrew-fleming marked this pull request as draft June 14, 2022 23:30
@andrew-fleming andrew-fleming marked this pull request as ready for review June 15, 2022 17:40
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.

looks good!

docs/ERC721.md Outdated
@@ -160,15 +160,15 @@ await signer.send_transaction(

### Token Transfers

EIP721 discourages the use of `transferFrom` and favors `safeTransferFrom` in regard to token transfers. The safe function adds the following conditional logic:
This library includes `transferFrom` and `safeTransferFrom` to transfer NFTs. If using `transferFrom`, note that THE CALLER IS RESPONSIBLE TO CONFIRM THAT THE RECIPIENT IS CAPABLE OF RECEIVING NFTS OR ELSE THEY MAY BE PERMANENTLY LOST.
Copy link
Contributor

Choose a reason for hiding this comment

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

what about bold text instead of uppercase?

docs/ERC721.md Outdated Show resolved Hide resolved
@andrew-fleming andrew-fleming merged commit cdaabf6 into OpenZeppelin:main Jun 15, 2022
@andrew-fleming andrew-fleming deleted the fix-721-docs branch June 15, 2022 19:04
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.

Fix transferFrom recommendation comment
2 participants