project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

512 Karat

A fully on-chain generative art ERC-721 made with Dojo and Origami

512 Karat

Created At

StarkHack

Winner of

Cartridge - Onboard with Controller

ETHGlobal - 🏆 StarkHack Finalist

Project Description

This project uses Dojo as a platform for fully on-chain generative art. Combined with Origami's ERC-721 components, Dojo turned out to be a very powerful and versatile tool for delivering NFTs.

The project is deployed to Sepolia, and minting is open at https://karat.collect-code.com/ or https://512karat.vercel.app/

Mints are free and limited to a supply of 512 tokens.

It was my goal to deploy to mainnet before submission, but this Origami ERC721 module is brand new, and looks like Voyager and Starkscan are not identifying the tokens, so I will keep it on Sepolia until I can confirm with the Dojo team if all the required events are being fired.

Contracts on Sepolia: Token: 0x02ec22a653460527eacb3b74c07eeb0606a9c47db5f450d140a14f0a0a117e76 Minter: 0x03bac2791460aec9d2ce62787c07c4d8c728fbc01ccd48f120f47380bd4ea65a

How it's Made

From the dojo starter template, I built two systems/contracts:

  • The actual ERC-721 token, based on an Origami template.
  • A Minter, for managing minting supply and delivery.

The Minter contract is the only authorized caller on the Token contract, by a shared Config model between the two contracts.

When a user calls mint(), it will check the supply and create a Seed for the token. The actual token is only built when token_uri() is called. It then builds the standard ERC-721 metadata, including traits, and generates the token svg file, encoded to base64.

There is a very simple cool-down system that does not allow a wallet to mint consecutive tokens.

The client was created with Dojo's starknet-react-app example as starting point. It uses starknet-react and StarknetKit connectors, and can support multiple chains (local, Sepolia, Slot and soon Mainnet)

The art was created with p5js and later ported to Cairo, 100% during the hackathon.

There is a detailed process history and links to all resources used in the GitHub repository: https://github.com/rsodre/512karat

background image mobile

Join the mailing list

Get the latest news and updates