ArtGridz Documentation
  • Welcome to ArtGridz
  • Getting Started
    • Create a smart wallet
    • Color your first pixel
    • Share anonymously
  • ONCHAIN ART STORAGE
    • Core Concept
  • FEATURES
    • Earn GRIDZ Tokens
    • Eraser
    • CustomGridz
    • Binary
  • LINKS
    • Smart Contracts
    • Socials
Powered by GitBook
On this page
  • Visual Overview
  • Core Functionalities
  1. ONCHAIN ART STORAGE

Core Concept

The ARTGRIDZ smart contract tracks every pixel drawn as a blockchain event. Artworks are displayed by querying these events, ensuring an immutable and decentralized record of artistic contributions.

PreviousShare anonymouslyNextEarn GRIDZ Tokens

Last updated 4 months ago

Visual Overview

Core Functionalities

1. Recording Pixel Changes

Pixels are represented on a 100x100 grid. Each pixel's state is tracked using pixelChanged, a nested mapping:

mapping(uint256 => mapping(uint256 => mapping(uint256 => address))) public pixelChanged;

Workflow:

  • A pixel change emits the PixelChanged event, including details of the sender, coordinates, color, and grid ID.

  • The total pixels colored are tracked per user using totalPixels and totalPixelsId.

Events:

  • PixelChanged: Triggered when a pixel is colored or erased.

  • AmountPixel: Logs the number of pixels a user has contributed.

Event Declaration

PixelChanged(address indexed sender, uint256 x, uint256 y, uint256 color, uint256 id);
AmountPixel(address indexed sender, uint256 PixelAmount);

Purpose

The purpose of the event is to record and broadcast changes to the pixel data in a way that is immutable and queryable on the blockchain.

This allows anyone to reconstruct the grid's state purely by retrieving and processing these events.

The only potential point of failure is the underlying blockchain itself, making the ArtGridz canvas a direct and tangible visualization of the blockchain's core principles.