Wage a decentralized pixel war on Starknet! A Flutter mobile app using Starknet.dart to collaboratively create art on a shared canvas, powered by PIX tokens.
Concept:
starDPix brings the classic collaborative pixel art canvas to the Starknet blockchain, transforming it into a "Pixel War" where users engage to create and control a shared digital art piece. Built as a Flutter mobile application, it leverages Starknet.dart for seamless interaction with the decentralized backend, aiming to onboard users to a fun, engaging, and on-chain mobile experience.
Core Features & Technology:
Collaborative Canvas: Users can place colored pixels on a shared canvas, contributing to an ever-evolving piece of art.
Tokenized Interaction:
PixToken (PIX): An ERC20 token used to place pixels (e.g., 1 PIX per pixel). These tokens are burned upon use.
Dpixou Contract: Facilitates the acquisition of PIX tokens by exchanging them for a primary currency token (STRK), making Dpixou the sole minter of PIX.
PixelWar Contract: The main game contract managing the canvas, pixel placement logic, user cooldowns, and interaction with PixToken for burning tokens.
Mobile First with Flutter & Starknet.dart: A fully functional Flutter application provides the user interface, wallet interactions (via wallet\kit), and calls to Starknet contracts using the starknet.dart SDK.
On-Chain Logic: All critical game logic, pixel data, and tokenomics are managed by Cairo smart contracts deployed on Starknet.
User Experience:
Users manage their Starknet wallets within the app.
They can acquire PIX tokens through the Dpixou exchange contract.
Users select coordinates and colors to place pixels on the canvas, spending PIX tokens.
The canvas updates in real-time reflecting all participants' contributions.
Alignment with "Build Mobile Apps with Starknet.dart":
starDPix is a prime example of a consumer dApp built for mobile using Starknet.dart. It showcases how Starknet can power interactive and engaging experiences on mobile devices, focusing on user acquisition through a familiar and fun game concept. The project demonstrates the capabilities of Starknet.dart for wallet integration, contract interaction, and building responsive mobile UIs for decentralized applications.
Testnet Deployment infos :
Pix ERC20 Token Sepolia: https://sepolia.starkscan.co/contract/0x075086c4c9b380615d4008207aad1089e1ef3d9aaf26fd584540c8fd119ab06c
Dpixou contract Sepolia: https://sepolia.starkscan.co/contract/0x0742ede3d2d4a6099393cbac691aea924d7a7bfc13696f8eac4ad754e88d5c10
PixelWar contract Sepolia: https://sepolia.starkscan.co/contract/0x0244e2ca20fd0ccf427ecaecb8076ce0de92b6b009d28fa88a26b03d9a755bd7
Deliverables:
Cairo smart contracts
Flutter mobile app with configuration for Android and iOS
Documentation (technical and user-oriented)
Deployment scripts for devnet and testnet
The primary objective of the hackathon was first to develop the smart contracts in Cairo, then to implement the service layer in Flutter to interact with these contracts via the provided Starknet.dart SDK. Subsequently, integration and customization of the wallet were carried out using the wallet_kit library. This work enabled comprehensive exploration and use of all layers made available by the Starknet.dart SDK. NB: The video provided is very amateurish, as it is not currently possible to run the application on a simulator. I apologize for this. TODO: - Add help section - Add estimation transaction fees before validate the pixels addition - Improve UX/UI (txn validation waiting process) Issues created in Starknet Dart SDK Github Repo: https://github.com/focustree/starknet.dart/issues/525 https://github.com/focustree/starknet.dart/issues/523 https://github.com/focustree/starknet.dart/issues/522 https://github.com/focustree/starknet.dart/issues/521
Nil