// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import {JPEGCurveMarketV2} from "./JPEGCurveMarketV2.sol"; /// @notice Permissionless registry. Creation charges only network gas. contract JPEGCurveFactoryV2 { address[] public collections; mapping(address=>bool) public isCollection; event CollectionCreated(address indexed collection,address indexed creator,string name,string symbol,uint256 maxSupply,uint256 basePrice,uint256 graduationReserve); function createCollection(string memory name,string memory symbol,string memory imageURI,string memory description,uint256 maxSupply,uint256 basePrice,uint256 graduationReserve) external returns(address collection){ collection=address(new JPEGCurveMarketV2(name,symbol,imageURI,description,maxSupply,basePrice,graduationReserve,msg.sender)); collections.push(collection);isCollection[collection]=true; emit CollectionCreated(collection,msg.sender,name,symbol,maxSupply,basePrice,graduationReserve); } function collectionCount() external view returns(uint256){return collections.length;} }