A Solidity smart contract for an NFT LaunchPad platform, designed to deploy and manage ERC721A-based NFT collections.
- OwnableUpgradeable: Provides ownership and administrative permissions.
- EnumerableSet: Manages unique collections by each creator for efficient lookup.
- SafeERC20: Facilitates safe interactions with ERC20 tokens.
-
Deploy Collection
deployCollection
: Allows a creator to deploy an NFT collection with specified parameters (e.g., max supply, mint price, start/end times, metadata).- Deployed collections are stored and associated with the creator.
-
Retrieve Deployed Collections
getDeployedCollections
: Fetches all collections deployed by a specific creator and their mint availability status.
-
Modify Collection Settings
- Functions to update collection settings, including:
setCollectionBaseUri
: Update base URI.changeStartTime
,changeEndTime
: Modify minting schedule.changeMaxTotalSupply
: Update the maximum total supply.enableWhitelistMode
,setWhitelistAddrs
: Manage whitelisting settings.setPriceForWhitelist
: Set mint price for whitelisted users.
- Functions to update collection settings, including:
-
Minting and Whitelist Management
mintCollection
: Allows users to mint NFTs by transferring ether as payment.- Whitelist functions for access control of specific NFT collections.
-
Collection Withdrawals
withdraw
: Enables the contract owner to withdraw native or ERC20 tokens held in the contract to their address.
-
Fallback Function
receive
: Allows the contract to accept native token transfers (e.g., ETH).
- Events like
CollectionDeployed
,WhitelistModeEnabled
, andFinishMintingForced
are emitted to track on-chain actions for transparency.
The contract serves as a platform for deploying and managing NFT collections on Ethereum, featuring customizable parameters, whitelist management, fee settings, and fund distribution.