-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: add contract version #138
Comments
@cygaar please consider this for next version release, I'm waiting to hear your thoughts before closing this issue. |
Just to add to the argument - It would be nice to have this version stamp as well for contract review. It's really different when you are reviewing someone with v1 instead of v2, would save a lot of time on parsing the contract to try and figure out when did they copy/install the ERC721A contract |
Probably will look into some workflow that can run a script to do this some time after next version. I suggest either a shell script (e.g. For an example, see https://github.com/Vectorized/ERC721A-Upgradeable/ If anyone wants to make the script and/or workflow file, feel free to open a PR. |
@Austinhs Exactly, that was my main intention for raising this issue. |
I'm working on a script to change the I'm using this issue to discuss the implementation of this. you can see the script here at scripts/release/update-version.js ./scripts/release/update-version.js 3.2.0 or even use it as: npm run update-version 3.2.0 And then, the
We can also ignore the mocks, but adding a version comment will not do any harm, IMO. I would like to mention that this script will update all files, apart from whether they have been modified since the last tag version.
I don't like changing source code and committing it to the main branch in the workflow; problems may occur. Using this script manually is okay, IMO. I'm waiting to hear your thoughts on this implementation before opening a PR. |
@ahbanavi Make a PR. My 2 cents: While OZ only updates the version in the updated files, I think having the same version number across all files has the advantage that it is easy to know two files are meant for each other. For example #214 was caused by the files being from different versions. Also, it is simpler to just replace the version number in all the .sol files. |
It would be a good idea to add the release version on top of the contracts/ERC721A.sol file and update it when a new version releases.
Some devs or savvy people would like to know what version of
ERC721A
the implemented contract uses.The text was updated successfully, but these errors were encountered: