A simple CLI for NFT builders.
NFTs are minted using metadata that includes a link to the NFT image along with details describing the collection. When minting an NFT you (generally) provide a URL to the metadata file.
A smart contract tracks NFT ownership and is permanent and immutable. However, this doesn't mean the NFT itself is immutable. When NFT assets are stored on cloud providers or peer-to-peer networks (like IPFS), there's no guarantee of permanence. To guarantee permanence, you need to store your NFTs on a blockchain like Arweave. When you use Irys to upload your NFTs to Arweave, you can pay for storage in most tokens, and your transaction is guaranteed to be finalized and seeded to multiple reputable miners.
This toolkit is a simple CLI to make uploading NFTs to Irys even easier.
When you use Irys to upload data to Arweave, you pay once and your upload is guaranteed to be retrievable forever. This is made possible because:
- Arweave’s protocol Endowment ensures long-term data retrievability by reserving a portion of your upload fee to fund future storage.
- Arweave’s mining mechanism rewards miners for storing historical data.
The CLI will prompt you to fund an Irys node when uploading. When working with Irys' mainnet, use real tokens, when working with Irys' devnet use free tokens available from faucets.
NFT metadata contains the NFT name, symbol, description, unique attributes and other things.
Define your project's metadata in the .env
file.
-
Rename
.env.example
to.env
and fill in with your private key and NFT metadata. Your private key will be used to pay for uploads to Irys, to sign transactions, and to interact with the contract. -
Place your images in the
images
folder. -
Run
npm install
npm run metadata
- Permanently uploads images to Irys
- Generates metadata files
- Permanently uploads metadata files to Irys
- Exports metadata files
- Exports a JSON file containing URLs for each metadata file
The output of this command can then be used to manually mint NFTs, or as input to:
npm run mint721 [metadata-file]
- Mints NFTs using the metadata URLs in metadata-file
If using this command, you must first deploy a contract that implements the function mint721
and include the contract address in the .env
fie. The ThirdWeb NFT Collection will work.