๐จ ไปๆๆฌๆ็คบ็ๆ AI ๅพๅๅนถ้ธ้ ไธบ NFT | Generate AI Images from Text Prompts and Mint as NFTs
๐จ๐ณ ไธญๆ | ๐บ๐ธ English
PromptMint ๆฏไธไธชๅบไบ Web3 ็ AI ๅพๅ็ๆๅ NFT ้ธ้ ๅนณๅฐใ็จๆทๅฏไปฅ้่ฟๆๆฌๆ็คบ็ๆ็ฌ็น็ AI ๅพๅ๏ผๅนถๅฐๅ ถ้ธ้ ไธบ NFT ๅญๅจๅจ Monad ๆต่ฏ็ฝไธใๅนณๅฐ็ปๅไบ AI ๅพๅ็ๆใIPFS ๅๅธๅผๅญๅจๅๆบ่ฝๅ็บฆๅ่ฝ๏ผๆไพไปๅๆๆณๆณๅฐ NFT ๆๆๆ็ๆ ็ผไฝ้ชใ
- ๐จ AI ๅพๅ็ๆ: ไฝฟ็จ OpenAI DALL-E 3 ไปๆๆฌๆ็คบ็ๆ็ฌ็นๅพๅ
- ๐ IPFS ๅๅธๅผๅญๅจ: ไฝฟ็จ Web3.Storage ่ฟ่กๅพๅๅๅ ๆฐๆฎ็ๅปไธญๅฟๅๅญๅจ
- ๐ช NFT ้ธ้ : ๅจ Monad ๆต่ฏ็ฝไธๅฐ็ๆ็ๅพๅ้ธ้ ไธบ ERC721 NFT
- ๐ซ ้ฒ้ๅคๆบๅถ: ๆบ่ฝๅ็บฆ้ฒๆญข็ธๅๆ็คบ่ฏ้ๅค้ธ้
- ๐ฐ Gas ไผๅ: ้ซๆ็ๆบ่ฝๅ็บฆ่ฎพ่ฎก๏ผ้ไฝไบคๆๆๆฌ
- ๐ ้ฑๅ ้ๆ: ๆฏๆไธปๆต Web3 ้ฑๅ ่ฟๆฅ
- ๐ฑ ๅๅบๅผ่ฎพ่ฎก: ๅฎ็พ้้ ็งปๅจ็ซฏๅๆก้ข็ซฏ
- ๐ ๆไฝๅๅฒ: ๅฎๆด็็ๆๅ้ธ้ ๅๅฒ่ฎฐๅฝ
- ๅ็ซฏ: Next.js 15, TypeScript, TailwindCSS
- ๅบๅ้พ: Solidity, Hardhat, OpenZeppelin
- Web3 ้ๆ: Wagmi, Viem
- AI: OpenAI DALL-E 3
- ๅญๅจ: IPFS via Web3.Storage
- ็ฝ็ป: Monad Testnet
- ๆต่ฏ: Jest, Playwright
- Node.js 18+ ๅ npm
- Web3 ้ฑๅ ๏ผMetaMask ็ญ๏ผ
- Monad ๆต่ฏ็ฝ MON ไปฃๅธ
# 1. ๅ
้้กน็ฎ
git clone <repository-url>
cd prompt-mint
# 2. ๅฎ่ฃ
ไพ่ต
npm install
# 3. ้
็ฝฎ็ฏๅขๅ้
cp .env.example .env.local
# ็ผ่พ .env.local ๅกซๅ
ฅๅฟ
่ฆ็ API ๅฏ้ฅ
# 4. ่ทๅๆต่ฏ็ฝไปฃๅธ
# ่ฎฟ้ฎ https://testnet-faucet.monad.xyz
# 5. ้จ็ฝฒๆบ่ฝๅ็บฆ
npm run deploy:testnet
# 6. ๅฏๅจๅผๅๆๅกๅจ
npm run devๆๅผ http://localhost:3000 ๅผๅงไฝ้ช๏ผ
็กฎไฟๆจ็็ณป็ปๅทฒๅฎ่ฃ ๏ผ
- Node.js 18+: ไธ่ฝฝๅฐๅ
- Git: ไธ่ฝฝๅฐๅ
- Web3 ้ฑๅ : ๆจ่ MetaMask
# ๅ
้้กน็ฎ
git clone <repository-url>
cd prompt-mint
# ๅฎ่ฃ
้กน็ฎไพ่ต
npm install
# ็ผ่ฏๆบ่ฝๅ็บฆ
npm run compileๅๅปบ .env.local ๆไปถ๏ผ
cp .env.example .env.local็ผ่พ .env.local ๆไปถ๏ผ้
็ฝฎไปฅไธๅ้๏ผ
# API ๅฏ้ฅ๏ผๅฟ
้๏ผ
OPENAI_API_KEY=your_openai_api_key_here
PINATA_API_KEY=your_pinata_api_key_here
PINATA_SECRET_KEY=your_pinata_secret_key_here
# ๆบ่ฝๅ็บฆ้จ็ฝฒ๏ผๅฆ้้จ็ฝฒ๏ผ
PRIVATE_KEY=your_private_key_without_0x_prefix
# ๅ็ซฏ้
็ฝฎ๏ผๅ
ฌๅผ๏ผ
NEXT_PUBLIC_CONTRACT_ADDRESS=deployed_contract_address
NEXT_PUBLIC_MONAD_RPC_URL=https://testnet-rpc.monad.xyz
NEXT_PUBLIC_CHAIN_ID=10143
NEXT_PUBLIC_APP_NAME=PromptMint
NEXT_PUBLIC_APP_DESCRIPTION=Generate AI images and mint them as NFTs on Monad TestnetOpenAI API ๅฏ้ฅ:
- ่ฎฟ้ฎ OpenAI Platform
- ๅๅปบ่ดฆๆทๅนถ็ปๅฝ
- ่ฟๅ ฅ API Keys ้กต้ข
- ๅๅปบๆฐ็ API ๅฏ้ฅ
- ๅคๅถๅฏ้ฅๅฐ
OPENAI_API_KEY
Pinata IPFS ๆๅกไปค็:
- ่ฎฟ้ฎ Pinata
- ๅๅปบๅ ่ดน่ดฆๆท๏ผๆ 1GB ๅ ่ดนๅญๅจ๏ผ
- ่ฟๅ ฅ API Keys ้กต้ข
- ็นๅป "New Key" ๅๅปบๆฐ็ API ๅฏ้ฅ
- ็กฎไฟๅพ้ "Pinning Services" ๆ้
- ๅคๅถ API Key ๅฐ
PINATA_API_KEY - ๅคๅถ Secret Key ๅฐ
PINATA_SECRET_KEY
ๅค็จๆนๆก - Web3.Storage ไปค็:
- ่ฎฟ้ฎ Web3.Storage
- ๅๅปบๅ ่ดน่ดฆๆท
- ่ฟๅ ฅ API Tokens ้กต้ข
- ๅๅปบๆฐไปค็
- ๅคๅถไปค็ๅฐ
WEB3_STORAGE_TOKEN
- ่ฎฟ้ฎ Monad ๆต่ฏ็ฝๆฐด้พๅคด
- ่ฟๆฅๆจ็้ฑๅ
- ็ณ่ฏท MON ๆต่ฏไปฃๅธ
- ็ญๅพ ไบคๆ็กฎ่ฎค๏ผ้ๅธธ้่ฆๅ ๅ้๏ผ
# ้จ็ฝฒๅฐ Monad ๆต่ฏ็ฝ
npm run deploy:testnet
# ้ช่ฏๅ็บฆ๏ผๅฏ้๏ผ
CONTRACT_ADDRESS=your_contract_address npm run verify:testnet้จ็ฝฒๆๅๅ๏ผๅฐๅ็บฆๅฐๅๆดๆฐๅฐ .env.local:
NEXT_PUBLIC_CONTRACT_ADDRESS=your_deployed_contract_address# ๅผๅๆจกๅผ
npm run dev
# ็ไบงๆๅปบ
npm run build
npm start- ็ฝ็ปๅ็งฐ: Monad Testnet
- RPC URL: https://testnet-rpc.monad.xyz
- ้พ ID: 10143
- ่ดงๅธ็ฌฆๅท: MON
- ๅบๅๆต่งๅจ: https://testnet.monadexplorer.com
- ๆฐด้พๅคด: https://faucet.monad.xyz
ๅฆ้ๆๅจๆทปๅ Monad ๆต่ฏ็ฝๅฐ้ฑๅ ๏ผ
- ๆๅผ MetaMask
- ็นๅป็ฝ็ปไธๆ่ๅ
- ้ๆฉ"ๆทปๅ ็ฝ็ป"
- ๅกซๅ ฅไธ่ฟฐ็ฝ็ปไฟกๆฏ
- ่ฟๆฅ้ฑๅ : ็นๅป"่ฟๆฅ้ฑๅ "้ๆฉๆจ็ Web3 ้ฑๅ
- ๅๆข็ฝ็ป: ็กฎไฟ่ฟๆฅๅฐ Monad ๆต่ฏ็ฝ
- ่พๅ ฅๆ็คบ่ฏ: ่พๅ ฅๆ่ฟฐๆง็ๆๆฌๆ็คบ๏ผๆฏๆไธญ่ฑๆ๏ผ
- ็ๆๅพๅ: ็นๅป"็ๆ"็ญๅพ AI ๅค็๏ผ็บฆ 30-60 ็ง๏ผ
- ้ข่งๅพๅ: ๆฅ็็ๆ็ๅพๅ๏ผๆปกๆๅ็ปง็ปญ
- ้ธ้ NFT: ็นๅป"้ธ้ "ๅๅปบๆจ็ NFT๏ผ้่ฆ Gas ่ดน๏ผ
- ๆฅ็ไบคๆ: ๅจ Monad ๆต่งๅจ ๆฅ็ไบคๆ
ๆ็คบ่ฏๅปบ่ฎฎ:
- ไฝฟ็จๆ่ฟฐๆง่ฏญ่จ๏ผๅ ๅซ้ฃๆ ผใ้ข่ฒใๆๅพ็ญ็ป่
- ไพๅฆ๏ผ"ไธๅชๅจๆ็ฉบไธๆผซๆญฅ็ๅๅ ็ฌ่งๅ ฝ๏ผๆขฆๅนป้ฃๆ ผ๏ผ่็ดซ่ฒ่ฐ"
- ้ฟๅ ไฝฟ็จ่ฟไบ็ฎๅ็ๆ็คบ่ฏ
Gas ่ดนไผๅ:
- ๅจ็ฝ็ปๆฅๅ ต่พๅฐๆถ่ฟ่ก้ธ้
- ้ขไผฐ Gas ่ดน็บฆ 0.001-0.01 MON
็ฐ่ฑก: ๆ ๆณ่ฟๆฅ้ฑๅ ๆ็ฝ็ป้่ฏฏ ่งฃๅณๆนๆก:
# ๆฃๆฅ็ฝ็ป้
็ฝฎ
- ็กฎไฟ้ฑๅ
่ฟๆฅๅฐ Monad ๆต่ฏ็ฝ
- ้ช่ฏ RPC URL: https://testnet-rpc.monad.xyz
- ๆฃๆฅ้พ ID: 10143็ฐ่ฑก: ็ๆๆ้ฎๆ ๅๅบๆๆฅ้ ่งฃๅณๆนๆก:
# ๆฃๆฅ API ้
็ฝฎ
- ้ช่ฏ OPENAI_API_KEY ๆฏๅฆๆญฃ็กฎ
- ็กฎ่ฎค API ้
้ขๆช่ถ
้
- ๆฃๆฅ็ฝ็ป่ฟๆฅ็ฐ่ฑก: ไบคๆๅคฑ่ดฅๆ Gas ไธ่ถณ ่งฃๅณๆนๆก:
# ๆฃๆฅไฝ้ขๅๅ็บฆ
- ็กฎไฟ้ฑๅ
ๆ่ถณๅค็ MON ไปฃๅธ
- ้ช่ฏๅ็บฆๅฐๅๆฏๅฆๆญฃ็กฎ
- ้่ฏไบคๆ๏ผๅฏ่ฝ้่ฆ็ญๅพ
็ฝ็ป็กฎ่ฎค๏ผ็ฐ่ฑก: ๅพๅ็ๆๆๅไฝไธไผ ๅคฑ่ดฅ ่งฃๅณๆนๆก:
# ๆฃๆฅๅญๅจ้
็ฝฎ
- ้ช่ฏ WEB3_STORAGE_TOKEN ๆฏๅฆๆๆ
- ๆฃๆฅๅญๅจ้
้ข
- ้่ฏๆไฝ| ้่ฏฏไปฃ็ | ๅซไน | ่งฃๅณๆนๆก |
|---|---|---|
WALLET_CONNECTION |
้ฑๅ ่ฟๆฅๅคฑ่ดฅ | ๆฃๆฅ้ฑๅ ็ถๆๅ็ฝ็ป |
GENERATION_FAILED |
AI ๅพๅ็ๆๅคฑ่ดฅ | ๆฃๆฅ API ๅฏ้ฅๅ็ฝ็ป |
IPFS_UPLOAD_FAILED |
IPFS ไธไผ ๅคฑ่ดฅ | ๆฃๆฅๅญๅจไปค็ |
MINTING_FAILED |
NFT ้ธ้ ๅคฑ่ดฅ | ๆฃๆฅ Gas ๅๅ็บฆๅฐๅ |
PROMPT_ALREADY_USED |
ๆ็คบ่ฏๅทฒ่ขซไฝฟ็จ | ๅฐ่ฏไธๅ็ๆ็คบ่ฏ |
# ๆฅ็่ฏฆ็ปๆฅๅฟ
npm run dev
# ่ฟ่กๆต่ฏ
npm test
npm run test:contracts
# ๆฃๆฅๆๅปบ
npm run build
# ๆฅ็็ฝ็ป็ถๆ
curl -X POST https://testnet-rpc.monad.xyz \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'# ๅ็ซฏๅๅ
ๆต่ฏ
npm test
# ๆบ่ฝๅ็บฆๆต่ฏ
npm run test:contracts
# ็ซฏๅฐ็ซฏๆต่ฏ
npx playwright test
# ๆต่ฏ่ฆ็็
npm run test:coverage้กน็ฎๅ ๅซๅฎๆด็ๆต่ฏๅฅไปถ๏ผ
- ๅๅ ๆต่ฏ: ็ปไปถๅ้ฉๅญๅฝๆฐๆต่ฏ
- ้ๆๆต่ฏ: API ็ซฏ็นๆต่ฏ
- ๅ็บฆๆต่ฏ: ๆบ่ฝๅ็บฆๅ่ฝๆต่ฏ
- E2E ๆต่ฏ: ๅฎๆด็จๆทๆต็จๆต่ฏ
็ๆ AI ๅพๅๅนถไธไผ ๅฐ IPFS
่ฏทๆฑไฝ:
{
"prompt": "ๆจ็ๅพๅๆ่ฟฐๆ็คบ่ฏ"
}ๅๅบ:
{
"success": true,
"tokenURI": "ipfs://...",
"previewURL": "https://...",
"metadata": {
"name": "AI Generated NFT",
"description": "Generated from prompt: ...",
"image": "ipfs://...",
"attributes": [...]
}
}ๆฃๆฅ API ๆๅก็ถๆ
ๅๅบ:
{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z"
}// ้ธ้ NFT
function mint(bytes32 promptHash, string memory tokenURI) external
// ๆฃๆฅๆ็คบ่ฏๆฏๅฆๅทฒไฝฟ็จ
function isPromptUsed(bytes32 promptHash) external view returns (bool)
// ่ทๅๅฝๅไปฃๅธ่ฎกๆฐ
function tokenCounter() external view returns (uint256)
// ่ทๅๆปไพๅบ้
function totalSupply() external view returns (uint256)
// ๆน้ๆฅ่ฏขไปฃๅธ URI
function tokenURIBatch(uint256[] memory tokenIds) external view returns (string[] memory)- Fork ้กน็ฎๅฐๆจ็ GitHub ่ดฆๆท
- ๅๅปบๅ่ฝๅๆฏ:
git checkout -b feature/your-feature - ๆไบคๆดๆน:
git commit -am 'Add some feature' - ๆจ้ๅๆฏ:
git push origin feature/your-feature - ๅๅปบ Pull Request
# ไปฃ็ ๆฃๆฅ
npm run lint
# ไปฃ็ ๆ ผๅผๅ
npm run format
# ็ฑปๅๆฃๆฅ
npm run type-checkไฝฟ็จ็บฆๅฎๅผๆไบคๆ ผๅผ๏ผ
feat:ๆฐๅ่ฝfix:้่ฏฏไฟฎๅคdocs:ๆๆกฃๆดๆฐstyle:ไปฃ็ ๆ ผๅผrefactor:้ๆtest:ๆต่ฏ็ธๅ ณchore:ๆๅปบ่ฟ็จๆ่พ ๅฉๅทฅๅ ท็ๅๅจ
ๆฌ้กน็ฎ้็จ MIT ่ฎธๅฏ่ฏ - ่ฏฆ่ง LICENSE ๆไปถใ
ๆ่ฐขไปฅไธๅผๆบ้กน็ฎๅๆๅก๏ผ
- OpenZeppelin - ๅฎๅ จ็ๆบ่ฝๅ็บฆๅบ
- Monad - ้ซๆง่ฝๅบๅ้พๅนณๅฐ
- OpenAI - AI ๅพๅ็ๆๆๅก
- Web3.Storage - ๅปไธญๅฟๅๅญๅจๆๅก
PromptMint is a Web3-based AI image generation and NFT minting platform. Users can generate unique AI images from text prompts and mint them as NFTs on the Monad Testnet. The platform combines AI image generation, IPFS distributed storage, and smart contract functionality to provide a seamless experience from creative ideas to NFT ownership.
- ๐จ AI Image Generation: Generate unique images from text prompts using OpenAI DALL-E 3
- ๐ IPFS Distributed Storage: Decentralized storage for images and metadata using Web3.Storage
- ๐ช NFT Minting: Mint generated images as ERC721 NFTs on Monad Testnet
- ๐ซ Duplicate Prevention: Smart contract prevents duplicate prompts from being minted
- ๐ฐ Gas Optimized: Efficient smart contract design with reduced transaction costs
- ๐ Wallet Integration: Support for mainstream Web3 wallets
- ๐ฑ Responsive Design: Perfect adaptation for mobile and desktop
- ๐ Operation History: Complete generation and minting history records
- Frontend: Next.js 15, TypeScript, TailwindCSS
- Blockchain: Solidity, Hardhat, OpenZeppelin
- Web3 Integration: Wagmi, Viem
- AI: OpenAI DALL-E 3
- Storage: IPFS via Web3.Storage
- Network: Monad Testnet
- Testing: Jest, Playwright
- Node.js 18+ and npm
- Web3 wallet (MetaMask, etc.)
- Monad Testnet MON tokens
# 1. Clone the project
git clone <repository-url>
cd prompt-mint
# 2. Install dependencies
npm install
# 3. Configure environment variables
cp .env.example .env.local
# Edit .env.local with your API keys
# 4. Get testnet tokens
# Visit https://testnet-faucet.monad.xyz
# 5. Deploy smart contract
npm run deploy:testnet
# 6. Start development server
npm run devOpen http://localhost:3000 to start experiencing!
Ensure your system has:
# Clone project
git clone <repository-url>
cd prompt-mint
# Install dependencies
npm install
# Compile smart contracts
npm run compileCreate .env.local file:
cp .env.example .env.localEdit .env.local file with the following variables:
# API Keys (Required)
OPENAI_API_KEY=your_openai_api_key_here
PINATA_API_KEY=your_pinata_api_key_here
PINATA_SECRET_KEY=your_pinata_secret_key_here
# Smart Contract Deployment (If deploying)
PRIVATE_KEY=your_private_key_without_0x_prefix
# Frontend Configuration (Public)
NEXT_PUBLIC_CONTRACT_ADDRESS=deployed_contract_address
NEXT_PUBLIC_MONAD_RPC_URL=https://testnet-rpc.monad.xyz
NEXT_PUBLIC_CHAIN_ID=10143
NEXT_PUBLIC_APP_NAME=PromptMint
NEXT_PUBLIC_APP_DESCRIPTION=Generate AI images and mint them as NFTs on Monad TestnetOpenAI API Key:
- Visit OpenAI Platform
- Create account and login
- Go to API Keys page
- Create new API key
- Copy key to
OPENAI_API_KEY
Pinata IPFS Service Tokens:
- Visit Pinata
- Create free account (1GB free storage)
- Go to API Keys page
- Click "New Key" to create new API key
- Ensure "Pinning Services" permission is checked
- Copy API Key to
PINATA_API_KEY - Copy Secret Key to
PINATA_SECRET_KEY
Alternative - Web3.Storage Token:
- Visit Web3.Storage
- Create free account
- Go to API Tokens page
- Create new token
- Copy token to
WEB3_STORAGE_TOKEN
- Visit Monad Testnet Faucet
- Connect your wallet
- Request MON test tokens
- Wait for transaction confirmation (usually takes a few minutes)
# Deploy to Monad Testnet
npm run deploy:testnet
# Verify contract (optional)
CONTRACT_ADDRESS=your_contract_address npm run verify:testnetAfter successful deployment, update the contract address in .env.local:
NEXT_PUBLIC_CONTRACT_ADDRESS=your_deployed_contract_address# Development mode
npm run dev
# Production build
npm run build
npm start- Network Name: Monad Testnet
- RPC URL: https://testnet-rpc.monad.xyz
- Chain ID: 10143
- Currency Symbol: MON
- Block Explorer: https://testnet.monadexplorer.com
- Faucet: https://testnet-faucet.monad.xyz
To manually add Monad Testnet to your wallet:
- Open MetaMask
- Click network dropdown
- Select "Add Network"
- Fill in the network information above
- Connect Wallet: Click "Connect Wallet" to select your Web3 wallet
- Switch Network: Ensure connection to Monad Testnet
- Enter Prompt: Input descriptive text prompt (supports Chinese and English)
- Generate Image: Click "Generate" and wait for AI processing (about 30-60 seconds)
- Preview Image: Review the generated image, continue if satisfied
- Mint NFT: Click "Mint" to create your NFT (requires gas fee)
- View Transaction: Check transaction on Monad Explorer
Prompt Suggestions:
- Use descriptive language including style, colors, composition details
- Example: "A glowing unicorn walking under starry sky, fantasy style, blue-purple tones"
- Avoid overly simple prompts
Gas Fee Optimization:
- Mint during less congested network times
- Estimated gas fee: ~0.001-0.01 MON
Symptoms: Cannot connect wallet or network errors Solutions:
# Check network configuration
- Ensure wallet is connected to Monad Testnet
- Verify RPC URL: https://testnet-rpc.monad.xyz
- Check Chain ID: 10143Symptoms: Generate button unresponsive or errors Solutions:
# Check API configuration
- Verify OPENAI_API_KEY is correct
- Confirm API quota not exceeded
- Check network connectionSymptoms: Transaction fails or insufficient gas Solutions:
# Check balance and contract
- Ensure wallet has sufficient MON tokens
- Verify contract address is correct
- Retry transaction (may need to wait for network confirmation)Symptoms: Image generation succeeds but upload fails Solutions:
# Check storage configuration
- Verify WEB3_STORAGE_TOKEN is valid
- Check storage quota
- Retry operation| Error Code | Meaning | Solution |
|---|---|---|
WALLET_CONNECTION |
Wallet connection failed | Check wallet status and network |
GENERATION_FAILED |
AI image generation failed | Check API key and network |
IPFS_UPLOAD_FAILED |
IPFS upload failed | Check storage token |
MINTING_FAILED |
NFT minting failed | Check gas and contract address |
PROMPT_ALREADY_USED |
Prompt already used | Try different prompt |
# View detailed logs
npm run dev
# Run tests
npm test
npm run test:contracts
# Check build
npm run build
# Check network status
curl -X POST https://testnet-rpc.monad.xyz \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'# Frontend unit tests
npm test
# Smart contract tests
npm run test:contracts
# End-to-end tests
npx playwright test
# Test coverage
npm run test:coverageThe project includes a comprehensive test suite:
- Unit Tests: Component and hook function tests
- Integration Tests: API endpoint tests
- Contract Tests: Smart contract functionality tests
- E2E Tests: Complete user flow tests
Generate AI image and upload to IPFS
Request Body:
{
"prompt": "Your image description prompt"
}Response:
{
"success": true,
"tokenURI": "ipfs://...",
"previewURL": "https://...",
"metadata": {
"name": "AI Generated NFT",
"description": "Generated from prompt: ...",
"image": "ipfs://...",
"attributes": [...]
}
}Check API service status
Response:
{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z"
}// Mint NFT
function mint(bytes32 promptHash, string memory tokenURI) external
// Check if prompt is used
function isPromptUsed(bytes32 promptHash) external view returns (bool)
// Get current token count
function tokenCounter() external view returns (uint256)
// Get total supply
function totalSupply() external view returns (uint256)
// Batch query token URIs
function tokenURIBatch(uint256[] memory tokenIds) external view returns (string[] memory)- Fork the project to your GitHub account
- Create feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -am 'Add some feature' - Push branch:
git push origin feature/your-feature - Create Pull Request
# Code linting
npm run lint
# Code formatting
npm run format
# Type checking
npm run type-checkUse conventional commit format:
feat:New featuresfix:Bug fixesdocs:Documentation updatesstyle:Code formattingrefactor:Refactoringtest:Test relatedchore:Build process or auxiliary tool changes
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to the following open source projects and services:
- OpenZeppelin - Secure smart contract libraries
- Monad - High-performance blockchain platform
- OpenAI - AI image generation service
- Web3.Storage - Decentralized storage service
For questions and support | ๅฆๆ้ฎ้ขๅๆฏๆ้ๆฑ:
- ๐ง Email: [email protected]
- ๐ Issues: GitHub Issues
- ๐ฌ Discord: Join our community
- ๐ Documentation: Full docs
Happy minting! | ็ฅๆจ้ธ้ ๆๅฟซ๏ผ ๐จโจ