You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From https://wizard.openzeppelin.com/#erc721, enable "Mintable -> Auto Increment Ids" and "Upgradeability". This adds state variable uint256 private _nextTokenId;to the code, and this can be enhanced to use namespaced storage as a best practice for upgradeable contracts.
(This is currently the only state variable added by Wizard, but this should apply for any state variable(s) being added by Wizard when upgradeability is enabled.)
The text was updated successfully, but these errors were encountered:
We should consider what to use as the namespace id here. Since this namespace belongs in the user's contract rather than in a contract library, this id should be somewhat unique for each user and reflect something that they can add variables to. In that case, we might want to allow users to customize this with a prefix like myproject, which results in a namespace id like myproject.MyToken.
However, namespace id conflicts could occur if different users inherit each other's code that uses the same namespace id if they don't change the defaults. The Upgrades Plugins will detect this though, and I'm not sure how likely this conflict scenario would be in the first place.
Ideally, users would just see a namespace in their contract and then use https://github.com/OpenZeppelin/openzeppelin-vscode to edit the namespace id and hash to whatever they want :) So perhaps having a generic default is enough.
From https://wizard.openzeppelin.com/#erc721, enable "Mintable -> Auto Increment Ids" and "Upgradeability". This adds state variable
uint256 private _nextTokenId;
to the code, and this can be enhanced to use namespaced storage as a best practice for upgradeable contracts.(This is currently the only state variable added by Wizard, but this should apply for any state variable(s) being added by Wizard when upgradeability is enabled.)
The text was updated successfully, but these errors were encountered: