0

The ERC721.sol provided by OpenZeppelin has a variable _holderTokens which is private. If I am writing my smart contract which inherits from ERC721.sol, is there any way to make that variable public so everyone can access it?

0

Just to answer my own question, we could access the owner of an ERC721 token by using the ownerOf function.

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.