This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm install- Install dependenciesmake compileornpx hardhat compile- Compile Solidity contractsmake testornpx hardhat test- Run tests
make deploy-local- Deploy to localhost networkmake deploy-mainnet- Deploy to Ethereum mainnet (requires MAINNET_URL and PRIVATE_KEY in .env)make deploy-goerli- Deploy to Goerli testnet (requires GOERLI_URL and PRIVATE_KEY in .env)make verify-goerli arg=<contract_address>- Verify contract on Goerli Etherscan
npx hardhat test test/ImageGenerator.js- Run specific test filenpx hardhat test --grep "pattern"- Run tests matching pattern
This is a Hardhat-based Ethereum smart contract project for the PixelChainDecoder - an on-chain SVG decoder for the PixelChain "Classic" NFT collection.
PixelChainDecoder.sol - Main contract that interfaces with the original PixelChain contract at 0xbc0E164eE423B7800e355b012c06446e28b1a29d to decode on-chain pixel data and generate full-color SVG images. The decoder reads the compressed pixel data from the original contract and reconstructs it as a viewable SVG.
- Solidity 0.8.18 with optimizations enabled (viaIR: true, runs: 200)
- Hardhat for development, testing, and deployment
- OpenZeppelin for standard contract utilities
- base64-sol for Base64 encoding of SVG data
- Ethers.js v5 for blockchain interactions
Create a .env file with:
MAINNET_URL- Ethereum mainnet RPC endpointGOERLI_URL- Goerli testnet RPC endpointPRIVATE_KEY- Deployment wallet private keyETHERSCAN_API_KEY- For contract verification
- PixelChainDecoder:
0xE2d43Ec2516C2446a6DDc95734c9a0eC21B01dC1(Mainnet) - Original PixelChainCore:
0xbc0E164eE423B7800e355b012c06446e28b1a29d(Mainnet)