Skip to content

Commit

Permalink
Check if seriesId duplicate with other seriesId
Browse files Browse the repository at this point in the history
  • Loading branch information
lpopo0856 committed Jul 14, 2023
1 parent 862e6c8 commit 74c6a47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contracts/FeralfileArtworkV4.sol
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ contract FeralfileExhibitionV4 is

// initialize max supply map
for (uint256 i = 0; i < seriesIds_.length; i++) {
// Check duplicate with others
for (uint256 j = i + 1; j < seriesIds_.length; j++) {
if (seriesIds_[i] == seriesIds_[j]) {
revert("FeralfileExhibitionV4: duplicate seriesId");
}
}
require(
seriesMaxSupplies_[i] > 0,
"FeralfileExhibitionV4: zero max supply"
Expand Down

0 comments on commit 74c6a47

Please sign in to comment.