1

currently, I'm using openzeppelin.

I can't find takeOwnership function in lately ERC721 interface.

takeOwnership function deprecated? (I cant' find any document)

so, how can I do that like takeOwnership?

2

takeOwnership was in a draft of the ERC721 standard

function takeOwnership(uint256 _tokenId) Assigns the ownership of the NFT with ID _tokenId to msg.sender if and only if msg.sender currently has approval (via a previous call to approveTransfer). A successful transfer MUST fire the Transfer event (defined below).

takeOwnership is not in the final ERC721 standard

Hence takeOwnership is not in the OpenZeppelin implementation.

For information on ERC721 OpenZeppelin see the OpenZeppelin documentation

The OpenZeppelin tests are a good place to look for how to use and test the contracts https://github.com/OpenZeppelin/openzeppelin-solidity/tree/master/test/token/ERC721

If you have more questions about OpenZeppelin you can always ask in the community forum

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.