Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 2.03 KB

File metadata and controls

46 lines (34 loc) · 2.03 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Commands

Build and Development

  • npm install - Install dependencies
  • make compile or npx hardhat compile - Compile Solidity contracts
  • make test or npx hardhat test - Run tests

Deployment

  • make deploy-local - Deploy to localhost network
  • make 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

Single Test Execution

  • npx hardhat test test/ImageGenerator.js - Run specific test file
  • npx hardhat test --grep "pattern" - Run tests matching pattern

Architecture

This is a Hardhat-based Ethereum smart contract project for the PixelChainDecoder - an on-chain SVG decoder for the PixelChain "Classic" NFT collection.

Core Components

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.

Technology Stack

  • 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

Environment Configuration

Create a .env file with:

  • MAINNET_URL - Ethereum mainnet RPC endpoint
  • GOERLI_URL - Goerli testnet RPC endpoint
  • PRIVATE_KEY - Deployment wallet private key
  • ETHERSCAN_API_KEY - For contract verification

Contract Addresses

  • PixelChainDecoder: 0xE2d43Ec2516C2446a6DDc95734c9a0eC21B01dC1 (Mainnet)
  • Original PixelChainCore: 0xbc0E164eE423B7800e355b012c06446e28b1a29d (Mainnet)