I have a contract
MyContract is ERC721.
MyContract needs to concatenate a string with an existing token URI using this function:
Problem is all tokens' URIs are stored in a private variable in the parent ERC721 contract like so
mapping(uint256 => string) private _tokenURIs;
Gas efficiency is a key requirement here.
MyContract should not call the standard ERC721
tokenURI getter function: it needs a direct access to the mapping so as to concatenate the strings in one step (concatenation via
tokenURI function would involved three steps: fetch initial URI string, concatenate appendice string, push concatenated string).
I'd like to use the standard URI functions provided by ERC721. Is this a dead-end? Can I simply change _tokenURIs mapping from
internal and still be ERC721 compliant? Is there a work-around where I could directly overwrite
_tokenURIs mapping from child contract?