Inspiration

As an artist, I have been working on the interface of digital and physical world for years. However, I always ended up with physical pieces to exhibit, sell and share with the world.

The pandemic somewhat changed my perception. So many things moved from the physical world to the digital realm. During lockdowns, people were not able to consume and enjoy physical art and I was not able to communicate through it. So late in summer 2020, after a short vacation, I realised that I have to bring people and my art back to together, and that would have to be in a digital native way! After some thinking and research I decided to dive into generative art and blockchain.

Almost a year later, I published my first two p5js generative projects as Ethereum-based NFTs on a large marketplace. It felt good, but not 100% right, yet. The whole process of generating the art was a big learning curve, but simply uploading the results to a platform felt like it didn't fit to the quality of the work. The works had no real connection with the blockchain, they where not native to it. Something I did want to change!

So I decided to take everything I learnt and create something closer to the metal, closer to blockchain technology, closer to the hashes - Hash && Dash!

What it does

The generative script does create explosions of colors as still images in 1800x1800px. The imagery tries recreate a spirit of positivity, using a mixture of neon colors with strong 80s/90s references, geometrical structures and overlaps that have the potential to fascinate viewers by there complexity and detail level.

The name is a reference to crypto technology and the style of art it generates.

How I built it

I started with processing sketches I created during my year-long learning path. At some point I stumbled over simple, yet powerful bezier combinations of only 4 vertexes:

 for (xx = 0; xx < 4; xx++)
      bezierVertex(
        randomGaussian(width / 2, width / 4),
        randomGaussian(height / 2, height / 4),
        randomGaussian(width / 2, width / 4),
        randomGaussian(height / 2, height / 4),
        randomGaussian(width / 2, width / 4),
        randomGaussian(height / 2, height / 4)
      );

Once I added some dash-like line style, the core character of the project was fixed. However, I also had to add an option to randomize every drawing based on the token address. That was the connection to the blockchain I'd wanted to create! I decided to leverage the Base58 representation to keep the script even closer to the actual token collectors would see.

const token = "HJ8rE1m6MxbGq14MWN9XUDP6cyMaqWtD4aMzpg63HHWq";

After some research, I found that I could use this string as basis for seed generation:

hashCode = function (s) {
  return s.split("").reduce(function (a, b) {
    a = (a << 5) - a + b.charCodeAt(0);
    return a & a;
  }, 0);
};

...

SEED = hashCode(token);
randomSeed(SEED);

From a process perspective, I decided to generate each token manually using the spl-token client available as part of the Solana Program Library.

I wanted to somehow really couple the script to the token. As I did not really find an easy solution on how to store the code directly with the mint, I decided to at least have a unique fingerprint of the script somehow attached. Based on my process, that was not as easy, as expected (see next section). So for each NFT, the following steps needed to be executed:

  1. Generate token, account and mint using spl-token
  2. Update token in processing script
  3. Generate SHA256 fingerprint of script
  4. Store fingerprint on chain as memo with SetAuthority operation for token
  5. Metaplex compliant upload of content and description file
  6. Remove mint authorization

Challenges I ran into

Based on the process I chose, adding chain-based information on the generating script was not as easy as I had hoped. The spl-token client only offered the memo option during creation. However, that was too early, as I did not have the fingerprint ready at this point. So with the help of a friend, I was able to modify the command line client to add a simple memo function that executes a signed proxy operation (setting the authority to the same as it as) and adds a memo to it. Using this option, I was abled to bundle the fingerprint of the generating script with each NFT.

If you check out the history for the first piece of the collection, Hash && Dash #00 using Solana Explorer, you'll see that transaction 4BY47UHwW9xa9nJWjCufmBriRGVg1GRSGv3JA5esnHccrF8k6S9Y95G1Sb8jxQ8g2LDvmH5BP1shu15dWAEEeN8D comes with the following log:

...
Signed by c1ickMxT4qG8M5xbuo65494knuKkLh7uGG59VAYxW8w
Memo (len 85): "SHA256 hash_dash.js: b6bf710a272259ffac4bacd1422af76e728fb5aab497410781a588ca630c6b82"
...

In retrospect, I now know, that I could have just created the keypair, ran the script and fingerprinted it and only then generate the token with the keypair on-chain. However, somehow the chosen path still feels slightly more authentic, as there is really no way back.

Accomplishments that I am proud of

I am super proud of Hash && Dash, both as an artistic project with it's visual component, and the way I learnt and understood blockchain technology on a level that I can now utilise in my future art endeavours. Solana is such a great and accessible ecosystem!

What I learned

I learnt so much about Solana, I can't even begin to list all the different things. However, I now know, what I can do with this technology and what crazy potential it offers for art projects!

What's next for Hash && Dash

Although Hash && Dash is more connected to the Solana blockchain as any of my works before, it is still at the level I'd like to have it!

I am planning a second iteration, or better, generation of the project. It will be truly on-chain and the first generation will serve as a seed for the second one. So basically all current collectors of Hash && Dash will have the chance to participate on a very early, very low level.

Built With

Share this project:

Updates