- Free-for-all
- Canvas consisting of 32x32 chunk (3072 bytes)
- RGB bitmap
- Each transaction sets one pixel
The pixelstrom program maintains the virtual canvas.
Sets a single pixel in the canvas.
Will only execute when it is the only instruction in a transaction.
Account inputs:
- Chunk account (writable)
- Instructions sysvar
Instruction data (big-endian)
x: i32y: i32r: u8g: u8b: u8
Chunk accounts are PDAs.
The PDA seeds list looks like this:
- ASCII string
Chunk - Big-endian i32 chunk coordinates (y, x).
def chunk_seed(y, x):
return [b'Chunk', struct.pack(">i", y), struct.pack(">i", x)]>>> list([b.hex() for b in chunk_seed(-4, 3)])
['4368756e6b', 'fffffffc', '00000003']