EthPixelWar is a decentralized pixel art platform built on Ethereum where users can bid on pixels and create collaborative artwork. Each pixel can be owned by the highest bidder who can then set its color. When outbid, previous owners can withdraw their funds.
- Grid-based pixel art canvas (configurable size)
- Auction mechanism for pixel ownership
- RGB color customization for owned pixels
- Withdrawal system for outbid participants
- Owner-controlled war ending mechanism
The main contract EthPixelWar.sol
implements:
- Pixel ownership through bidding
- Color management for owned pixels
- Fund management for bids and withdrawals
- Access control for pixel modifications
- Event emission for frontend integration
- Clone the repository:
git clone https://github.com/yourusername/EthPixelWar.git
cd EthPixelWar
- Install dependencies:
forge install
- Compile the contract:
forge build
- Run the local node:
anvil
- Deploy the contract:
forge script script/DeployEthPixelWar.s.sol --rpc-url http://localhost:8545 --broadcast
forge test
The web interface for EthPixelWar is available in a separate repository: EthPixelWarUI
Follow the instructions in the UI repository to set up and connect the frontend to your deployed contract.
- Full on-chain color storage
- Higher gas costs for color updates
- Complete decentralization
- Color data stored off-chain
- Lower gas costs
- Relies on event indexing for color state
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.