The first Nyzo script, introduced in version 631 of the Java codebase, is the graffiti script. This script supports the graffiti Micropay example.
The graffiti script tracks arrays of colors and amounts for a 288-pixel by 45-pixel canvas. The colors are indexes in a typical CGA 16-color palette. The amounts are the micronyzo amounts of the transaction that specified the color for a position. In order for a pixel to be updated, the amount of the transaction must be at least twice the current amount for the pixel.
Like all Nyzo scripts, the graffiti script receives all transactions sent to its registered account. The graffiti script is registered on account id__8d63gfXfh3p9e._56sgEu_QPsWe54syae0PkELUw~VJDqvn-WALL.
The graffiti Micropay example produces transactions and sends them to the registered account. These transactions are produced with the minimum amounts necessary to update pixels on the canvas, and up to 14 pixels are packed into each transaction.
The script will, of course, work with any transactions sent to the registered account. The graffiti Micropay example could be modified to send different amounts to make pixels more costly to override, or a program could be written to monitor the graffiti script state and automatically send transactions based on changes to the state. For instance, if a person has a strong distaste for the color green, that person could write a program that looks for the number 2 in the colors array of the state. Whenever a color changes to the value 2, the program could automatically send a transaction to set it back to a different color.