experimental SVM on-chain nft generation on Eclipse inspired by Nouns and Solana's Proof of History
There are 2 primary groups of instructions here:
- An "Epoch" Asset generated and auctioned every epoch in perpetuity. This includes asset generation, auction, and claim.
- ~~A retroactive minting system called "Time Machine" that will create a "candy machine"-like mint experience for users to mint epoch's that have already passed (~600 epochs)~~ (time machine will not be required assuming we launch on Epoch #1)
-
create_groupcreates a collection nft using CPI to OSS program (Note: we enforce royalties/creators here, not at the NFT level) -
create_assetdoes a few things:- generates art based on assets in
constants/traitsand bmp encoder inutils/traits - then inscribes bmp and json of the metadata to a blob
- creates an asset (mints an NFT) using Nifty OSS standard
- initiates an auction for the NFT
- adds reputation points to user
- generates art based on assets in
-
bidcreates a user bit for an active auction. It will refund the previous bid if there is one and give them Reputation points -
claimallows anybody to settle a closed auction. this will transfer the nft to the winner and give reputation points. -
time_machinea few instructions that govern a process for a user to mint an NFT using a time machine. This is a way to mint epoch nfts representing the Solana Epochs that have already passed.
auction- an auction for each epochreputation- effectively a points system for engaging in the programtime_machine- effectively a "candy machine" like system for minting NFTs (called time machine b/c it it to represent historic epochs)time_machine_receipt- a PDA the winners of a time machine get to claim their NFT (we do this to allow custom PDAs using Seed/Bump to match the other NFTs)
client.ts- a TypeScript API for interacting with the program. This includes all the instructions and state types.
- Clone the repo
yarnto install dependenciesanchor buildto build the program- you will need to update your program id in
lib.rs,Anchor.toml, andapi/constants/pubkeys.ts - you will need to create an
AUTHwallet intests/walletand update the program & api constants anchor testto run the tests (note the final test will take a couple of minutes, it's simulating 500 mints and i had to chunk the requests to avoid local ws issues)- in
epoch.test.tsyou can uncommentdeserializedAsset.saveImgAndJson();to save the image and json to your root directory to see the generated art
- Create Collection
anchor run create_collection - Seed the program escrow/authority
BiNb74Q3L2jjyceHTYQFFGXtY69fc2MKCScBbDmorGWR