Overriding ERC721 functions that update private state variables

All the state variables in the OpenZeppelin ERC721 contracts have private visibility. That means, if one is trying to override functions like: ownerOf(), isApprovedForAll(), it is simply not a matter of overriding the functionality. You have to redefine and manage state variables like _owners and _operatorApprovals etc.

Isn't it better to just re-write the entire contract by yourself? Please provide some clarity if you think I am missing something.

Thanks in advance for your help.

Hi, welcome! :wave:

Please have a look at this topic: Why are state variables private rather than public in OpenZeppelin Contracts? - Support / Contracts - OpenZeppelin Community

Thank you very much for the hint.