DEV Community

Cover image for ExoBits NFT
Matthew Wilber
Matthew Wilber

Posted on

ExoBits NFT

This is a submission for the The Pinata Challenge

What I Built

The ExoBits project is an experiment in NFT minting and procedural art. There are 1024 ExoBit keys, each one will generate a unique ExoBit character when plugged into the accompanying web component. The NFT is a combination of a unique key and rendering code stored in an Ethereum contract, with accompanying metadata stored on an IPFS server.

Demo

The Project Website
ExoBits on OpenSea

My Code

GitHub logo mwilber / exobits-public

Contract and mint functionality for exobitsnft.com

Exobits Data Generation Scripts and Contracts

This project contains the scripts and contracts for generating the data for the Exobits NFTs.

Project website: ExoBitsNFT.com

Exobits Hero Layout

contracts/Exobits.sol

The public Exobits contract. Published to the Etherium blockchain at address 0x5bbec211972328487e8859740aade132ba7a1916.

View on Etherscan

server/datagen/mintprep.php

This script is called during the minting process to generate the data for the NFTs. The Exobit json file is updated to include the name given to the Exobit at time of purchase and uploaded to IPFS via the Pinata API.

Other Files

The server/datagen/ directory contains the scripts used to generate the original key values, preview images and placeholder json data for the NFTs. They were run once to generate the 1024 available Exobit keys and are no longer used.

Related Projects




More Details

The Pinata API is used to store the ExoBit data file and preview image on IPFS for viewing in the wallet and third party websites like OpenSea. All 1024 ExoBit keys were generated at the time of the project launch. At that time, preview images were rendered and uploaded with Pinata. When a user purchases an ExoBit, they are required to give it a name. That name is added to the datafile and uploaded via Pinata before minting the key and IPFS address to the Ethereum contract. The pinata upload is done with a curl request to the api from the script server/datagen/mintprep.php seen in the above repo.

ExoBit key generation post on greenzeta.com

A flowchart depicting the interaction between an Ethereum contract, metadata, and a web component. The Ethereum contract contains NFTs and an art generator in JavaScript. The flow shows arrows leading from the contract to both the metadata, which contains a web component URL and an ExoBit key, and to the web component, represented by an ExoBit.

More information on how ExoBits are minted and rendered on the project website at ExoBitsNFT.com as well as my tutorial How To Build An NFT Website

Top comments (0)