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
🧐 Motivation
The current implementation for ERC721Consecutive implements ERC-2309, enabling batch mints during the construction of the token; however, there are many use cases that require batch minting after construction. ERC721Consecutive falls back to a single mint function.
if (address(this).code.length>0&&!NON_COMPLIANT_ALLOW_BATCH_MINT_AFTER_CONSTRUCTION()) {
revertERC721ForbiddenBatchMint();
}
...
/// @dev <some comment explaining devs can turn this on, but it would make the constract non ERC721 compliantfunction NON_COMPLIANT_ALLOW_BATCH_MINT_AFTER_CONSTRUCTION() internalpurevirtualreturns (bool) { returnfalse; }
So that developers can customize with:
function ALLOW_BATCH_MINT_AFTER_CONSTRUCTION() internalpureoverridereturns (bool) { returntrue; }
One of the risks that has to be considered/documented is that the range of batch mint done after construction may overlap with tokenIds minted using the "tranditional" _mint function. In that case we need to understand and document the behavior.
🧐 Motivation
The current implementation for
ERC721Consecutive
implements ERC-2309, enabling batch mints during the construction of the token; however, there are many use cases that require batch minting after construction.ERC721Consecutive
falls back to a single mint function.📝 Details
openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Consecutive.sol
Lines 109 to 111 in 450b833
The text was updated successfully, but these errors were encountered: