Need to get the “current” tokenId to use it in other functions.
How would a contract implementing ERC721PresetMinterPauserAutoIdUpgradeable acces the current counter, before the minting process (ar after it)
Environment
“@openzeppelin/contracts-upgradeable”: “^4.0.0”,
“truffle”: “^5.3.1”
Details
Example solution that does not work because of private _tokenIdTracker
TestContract is ERC721PresetMinterPauserAutoIdUpgradeable {
...
//would not work private varibale _tokenIdTracker
function getCurrentCounter() public view returns (uint256){
return _tokenIdTracker.current();
}
}