Skip to content

Simple NFT creation script using metaplex and Pinata

Notifications You must be signed in to change notification settings

td-bn/metaplex-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple NFT mint example using Metaplex

Simple script that runs on devnet and:

  1. Uploads image to IPFS using Pinata
  2. Uploads metadata to IPFS using Pinata
  3. Mints NFT using @metaplex/js

Usage

Install dependencies:

yarn

You'll need Pinata secrets to upload to Pinata. Create an account and generate API keys.

Add the following environment variables to your .env file:

API_KEY=<Your API key>
API_SECRET=<Your API secret>

Run:

yarn start

Example output:

Image URL:  https://gateway.pinata.cloud/ipfs/QmZD7yDhMYPYbviUBi1SbxeoqcSpLdhaHbewuAJ7z9xFuj
Metadata URL:  https://gateway.pinata.cloud/ipfs/QmVrRwghWqmUMo3HPQ5rMftS3CuWPjjMbJStHoJx3Zde91
Solscan URL:  https://explorer.solana.com/address/5sgmdQpNr2M1wzkTedGfB3GtbtDL6LFonYFJ2ZjnFfiV?cluster=devnet

Source

  • Handles the uploading of image and metadata
  • image url is hardcoded from the asset folder
  • Handles minting of NFT with given metadata
  • Creates and returns simple metadata for NFT
  • Handles key creation. Orchestrates NFT creation.

Resources and Links

About

Simple NFT creation script using metaplex and Pinata

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published