OpenZeppelin / OpenZeppelin/openzeppelin-contracts
redundent restrictions in ERC721Consecutive
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 27.2k
- Forks
- 12.4k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 33
Description
Please remove 2 restrictions from ERC721Consecutive
1 minting with the _mint function
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.0-rc.1/contracts/token/ERC721/extensions/ERC721Consecutive.sol#L98
2 minting in the constructor
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.0-rc.1/contracts/token/ERC721/extensions/ERC721Consecutive.sol#L72
https://eips.ethereum.org/EIPS/eip-2309 says nothing about restrictions, only about event
These restrictions make it easy to mint 10_000 tokens on collection creation as OpenSea does. But it actually does not, it just creates 10_000 rows in DB and then mints on demand (lazy mint). However, this makes it impossible for me to sell items from the store one-by-one and in small batches (of say 10) like I can do with ERC1155
💻 Environment
📝 Details
🔢 Code to reproduce bug
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with contracts/token/ERC721/extensions/ERC721Consecutive.sol at the two linked locations, then compare the restrictions with EIP-2309. Determine whether removing constructor and _mint restrictions preserves the standard's intended safety guarantees; done means the requested minting scenarios work without violating the contract's documented behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100