OpenZeppelin / OpenZeppelin/openzeppelin-contracts

redundent restrictions in ERC721Consecutive

Open
#3,740 8 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.