NFT
How to create an NFT on Chopin Framework.
Before starting this tutorial, be sure to have a Chopin Framework project set up. If you don't have one, follow the Quickstart guide to get started.
Overview
In Chopin Framework, NFTs are simply defined by your database and backend. There is no need to define an NFT contract. In this guide, we will present an idea for how you could create NFTs using Next.js and a PostgreSQL database.
You could use this method to add collectibles to your app—or to use Chopin Framework for traditional NFT usecases. However, keep in mind this is a technical guide and not legal advice.
Collections and NFTs
You can store NFT collections and individual NFTs in tables.
Or you can omit the collection_id column and the collection table if there is only one collection.
Collection Creation
NFT Operations
Minting
Checking Ownership
Transferring
Usage
Now you can control when this is invoked on the frontend by calling these functions in API routes. For example, here is a Next.js route that would allow a user to transfer an NFT.
Bridging
Bridging is a work in progress. More information will come soon. It will eventually be possible to transfer NFTs from your database to a third-party blockchain—and vice versa.
