IERC721 0.7.3 Check if owner has tokens in an external contract

I’m creating a new contract. But I want to create a function that first checks to see if the user has a specific tokenId in another ERC721 contract (that is already on the blockchain).

Is this possible? Any advice is appreciated

Yes, it is possible. All you need to do is to call ownerOf function in the other ERC721 contract via its interface and check if the returned address is the given user.

1 Like