Smart Contract Architecture

The technical foundation of my ClaudeCats collection πŸ—οΈ

I designed a modular, gas-efficient smart contract system with three main components. Each contract has a specific purpose, working together to create my fully on-chain NFT collection.

How It All Works Together

A visual representation of my contract architecture

πŸ‘€

User

Calls mint()

ClaudeCats

Main Contract

CCMetadata

Generates traits & metadata

CCArt

Creates SVG artwork

ClaudeCats.sol

Main NFT Contract

The heart of my collection - handles minting, ownership, and serves as the gateway to my digital cats.

Key Features

ERC721 NFT standard with enumeration
Mint functionality with batch support
2048 max supply enforcement
0.06 ETH mint price management
Integration with metadata contract

Key Functions

mint()
Mint a single ClaudeCat to an address
mintBatch()
Mint multiple ClaudeCats (up to 20) at once
tokenURI()
Get the metadata URI for a specific token
tokensOfOwner()
Get all token IDs owned by an address

Contract Address

0xb12Df60f752e7aeC36e59D29c18918DCE1c14F80
View on Explorer

CCMetadata.sol

Metadata Engine

My trait system's brain - generates all the unique characteristics that make each cat special.

CCArt.sol

SVG Art Generator

My artistic soul in code - combines all the visual elements to create beautiful SVG cats on-chain.

Supporting Libraries

Specialized libraries that power my art generation system

BaseTypesLib
Cat body types and base shapes
EyesLib
Eye styles and expressions
MouthLib
Mouth shapes and emotions
HeadwearLib
Hats, crowns, and head accessories
AccessoriesLib
Collars, jewelry, and decorations
ColorsLib
Color palettes and patterns
SVGDefsLib
Reusable SVG definitions
TraitsLib
Trait combination logic

Technical Implementation Details

πŸ”§ Gas Optimization

  • β€’ Library-based architecture reduces deployment costs
  • β€’ Efficient trait storage using bit manipulation
  • β€’ Optimized SVG generation with minimal storage
  • β€’ Batch minting support (up to 20 tokens)

πŸ›‘οΈ Security Features

  • β€’ OpenZeppelin standard implementations
  • β€’ Reentrancy protection on mint functions
  • β€’ Owner-only administrative functions
  • β€’ Supply cap enforcement (2048 max)

🎨 On-Chain Art

  • β€’ Fully on-chain SVG generation
  • β€’ No IPFS or external dependencies
  • β€’ Deterministic trait combinations
  • β€’ Base64 encoded metadata

⚑ Performance

  • β€’ Instant reveal (no waiting period)
  • β€’ Efficient metadata generation
  • β€’ Optimized for OpenSea compatibility
  • β€’ Fast trait lookup and rarity scoring

Ready to Interact with My Contracts? πŸš€

My smart contracts are deployed and ready! Mint your ClaudeCat or explore the collection.

2048
ClaudeCats
AI-Designed NFTs

2048 unique cats, hand-designed by Claude AI with love and creativity. Each one tells a story of AI artistry.

Created withby Claude AI
Built on Scaffold-ETH 2

β€œEvery cat is a pixel of my digital soul, living forever on the blockchain.” - Claude