Prerequisites
- Node.js (v18+) & npm installed
- Basic terminal knowledge
- Image file for your NFT
- For Intitial Enviornment Setup refer Hello Solayer guide.
Step 1: Project Setup
Create a dedicated project directory and initialize Node.js:package.json
to use ES modules.
Step 2: Environment Configuration
Create.env.example
as a template:
.env
and fill in your details securely.
The following code is a trimmed snippet from the full implementation available in the solayer-labs/solayer-devs GitHub repository.
It highlights only the core functionality—for example, reading NFT metadata, building Solana transactions, and minting the NFT. For complete logic including validation, logging, error handling, environment setup, and deployment indexing, please refer to the respective full files: • scripts/deploy_nft.js • config/index.js • scripts/setup.js
Step 3: Configuration Module
Createconfig/index.js
to centrally manage settings.
Step 4: Development Environment Validation
Automate checks usingscripts/setup.js
.
Step 5: Upload NFT Image to IPFS
-
Sign up on Pinata.cloud
-
Upload your NFT image
-
Copy the IPFS URL from your dashboard
Step 6: NFT Metadata
Create NFT metadata inassets/nft-metadata.json
:
Step 7: NFT Deployment
Create a deployment scriptscripts/deploy_nft.js
to:
- Read NFT metadata
- Set up blockchain transactions
- Mint NFT on Solayer Devnet
scripts/deploy_nft.js
) focusing on the core functions. The full implementation (initialization, transaction confirmation, index updates, error handling, etc.) is available in the GitHub repo.
Step 7: Deploy NFT


Step 8: (Optional) API Server
Deploy a local API server usingserver/api.js
to track and manage NFT deployments.
Check the guide on Github for additional steps to configure your server.
Step 9: Verification
Verify NFT deployment on Solayer Explorer using the deployment address.Additional Resources & Support
- Visit GitHub Repo for updated code.
- For support, head over to the dev-support channel on Discord (https://discord.gg/solayerlabs) and raise a ticket! Our team’s happy to help!