Overview
TheGenesisNFT contract manages a fixed supply of 100 Genesis NFTs that provide founder rewards for the Proteus platform. Each NFT features on-chain generated SVG art and entitles the holder to 0.002% of platform volume.
Contract Type: ERC721Enumerable
Contract Name: Clockchain Genesis (legacy branding, 60 NFTs already minted)
Symbol: GENESIS
Contract Address: TBD (Deployment pending)
Constants
| Constant | Value | Description |
|---|---|---|
MAX_SUPPLY | 100 | Maximum number of Genesis NFTs |
MINTING_WINDOW | 24 hours | Duration of minting period after deployment |
Minting Functions
mint
Mint Genesis NFTs during the minting window.Address to mint NFTs to. Cannot be zero address.
Number of NFTs to mint. Must be between 1 and 10.
GenesisNFTMinted(address indexed to, uint256 tokenId) for each minted NFT
Auto-finalization: Automatically finalizes minting if max supply is reached.
Requirements:
- Minting must not be finalized
- Current timestamp must be within minting deadline
- Would not exceed max supply of 100
- Quantity must be 1-10
- Recipient address must not be zero
"Minting has been finalized"- Minting period ended"Minting window has expired"- Past 24-hour window"Would exceed max supply"- Not enough NFTs remaining"Cannot mint to zero address"- Invalid recipient"Invalid quantity"- Quantity not between 1-10
finalizeMinting
Finalize minting to prevent any future mints. Can be called by anyone after deadline.MintingFinalized(uint256 totalMinted)
Requirements:
- Minting must not already be finalized
- Either minting deadline passed OR max supply reached
"Already finalized"- Minting already finalized"Cannot finalize yet"- Deadline not reached and max supply not reached
NFT Metadata
tokenURI
Returns the complete on-chain metadata URI for a token.The token ID (1-100)
Base64-encoded data URI containing JSON metadata and SVG image
data:application/json;base64,{base64EncodedJSON}
Metadata Structure:
- Token must exist (already minted)
"Token does not exist"- Token ID not yet minted
generateSVG
Generate on-chain SVG art for a token. Pure function, callable off-chain.The token ID (1-100)
Complete SVG markup as a string
- Unique gradient colors derived from token ID
- Concentric hexagonal patterns with rotation
- Clock-themed central element with unique angles
- Glow filter effects
- Token number display
- “CLOCKCHAIN FOUNDER” text (legacy branding)
- Token ID must be between 1 and 100
"Invalid token ID"- Token ID out of range
View Functions
isMintingActive
Check if minting is currently active.True if minting is active, false otherwise
true only if:
- Minting not finalized
- Current timestamp within minting deadline
remainingSupply
Get remaining mintable supply.Number of NFTs still available to mint (0 if finalized)
totalMinted
Get total number of NFTs minted so far.Total number of Genesis NFTs minted
State Variables
mintingDeadline
mintingFinalized
ERC721 Standard Functions
As an ERC721Enumerable contract, GenesisNFT inherits all standard ERC721 functionality:balanceOf
ownerOf
transferFrom
safeTransferFrom
approve
setApprovalForAll
getApproved
isApprovedForAll
ERC721Enumerable Functions
totalSupply
totalMinted()).
tokenByIndex
tokenOfOwnerByIndex
Internal Art Generation Functions
These functions are used internally for SVG generation but are documented for reference:generateGeometricPattern
Generates unique geometric patterns with concentric hexagons and clock elements.generateHexagonPoints
Generates SVG polygon points for a hexagon.generateColor
Generates RGB color from a seed value.cos / sin
Simple trigonometric approximations for common angles (0°, 60°, 120°, 180°, 240°, 300°).Reward Distribution
While not implemented in the contract itself, Genesis NFT holders are entitled to platform rewards:- Reward per NFT: 0.002% of platform volume
- Total Genesis Rewards: 0.2% of platform volume (100 NFTs × 0.002%)
- Distribution: Handled off-chain or via separate reward contract