ourzora/zora-721-contracts

[Bug] Using editionSize == 0 on ERC721Drop doesn't allow minting

Closed this issue · 3 comments

Deployed Contract on Goerli: https://goerli.etherscan.io/address/0xa063e18781ec993b6070446cce80ea934262b11e

Hi! We're trying to create an Editions contract with unlimited editions. The spec says

/// @param _editionSize Number of editions that can be minted in total. If 0, unlimited editions can be minted.

However, using 0 as _editionSize leads to the contract being unusable. All transactions fail. Looking at the code, I don't see any special case handling for editionSize == 0, so my suspicion is it's actually setting the total volume of the collection to 0.

Lmk if you need anymore info! Thanks for publishing these contracts!

Hi @kdhillon We changed the spec to support MAX_INT for editions size. Can update the code to handle 0 case as well. That comment should be updated at the very least.

if (config.editionSize != type(uint64).max) {
     revert Admin_UnableToFinalizeNotOpenEdition();
 }

Awesome, thanks for the clarification. I'll keep this open if you want to use it to track updating the documentation -- or feel free to close.