Comments (6)
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. scripts/replace-contract-versions.sh
), or js snippet (e.g. scripts/replace-contract-versions.js
) that can read from package.json
and update the files in contracts
.
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.
from erc721a.
It would be nice to have this version stamp as well for contract review.
@Austinhs Exactly, that was my main intention for raising this issue.
from erc721a.
@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.
from erc721a.
@cygaar please consider this for next version release, I'm waiting to hear your thoughts before closing this issue.
from erc721a.
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
from erc721a.
I suggest either a shell script (e.g.
scripts/replace-contract-versions.sh
), or js snippet (e.g.scripts/replace-contract-versions.js
) that can read frompackage.json
and update the files incontracts
.
I'm working on a script to change the package.json
version and comments simultaneously, so maintainers could just update all files on bump version PR, like #179 #39 …
I'm using this issue to discuss the implementation of this.
you can see the script here at scripts/release/update-version.js
the usage is as simple as:
./scripts/release/update-version.js 3.2.0
or even use it as:
npm run update-version 3.2.0
And then, the package.json
version and all other files will update.
The header of all .sol
files will look like this:
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.2.0
// Creator: Chiru Labs
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.
We can update just modified files using git, like the OZ implementation of this script. See here
Probably will look into some workflow
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.
@cygaar @Vectorized
from erc721a.
Related Issues (20)
- Broken link in about this project section?
- expose internal method for checking whether an address is authorized to act on behalf of an nft
- ERC721A Contracts Classified as ERC-20 Tokens in Etherscan HOT 2
- Batch burning with ERC721ABurnable implementation HOT 1
- I cannot compile my contract with hardhat
- Incorrect Twitter Link (twitter.com/AzukiOfficial > twitter.com/Azuki)
- OK, I'll give it a try. HOT 1
- fail mint in other contract HOT 1
- Please help me ERC721A team. I'm stuck on infinite loading in my current deployment with Hardhat....
- Please support ERC4906
- We were not able to estimate gas. There might be an error in the contract and this transaction may fail
- ERC721A interface id
- Precalculate TokenIds? HOT 1
- add support for ERC165 HOT 1
- Need a way to dynamically set value for `_startTokenId` in constructor HOT 6
- How can i add royaltyInfo? HOT 1
- Why is value of `_tokenApprovals` mapping a struct with one parameter instead simply an address? HOT 2
- How may not be clean upper bits of `from` address in `transferFrom` function? HOT 2
- What is the purpose of this function on L911? HOT 2
- is there an IERC721Enumerable implementation ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erc721a.