Skip to content

Latest commit

 

History

History

README.md

Blinks NFT Minter for Monad

A Next.js-based starter template demonstrating how to create NFT Blinks on the Monad blockchain. This project showcases an NFT minting interface that allows users to mint NFTs with a simple, shareable link.

Blink Interface

What are Blinks?

Blinks (Blockchain Links) are shareable URLs that bundle on-chain actions into a single, clickable link. They eliminate the need for complex integrations, allowing developers to embed blockchain interactions anywhere URLs are supported.

Prerequisites

  • Node.js and Git installed
  • A wallet (MetaMask or WalletConnect compatible) with testnet MON tokens
  • An ERC-721 compatible NFT contract deployed on Monad testnet
  • Quicknode endpoint for Monad testnet

Getting Started

  1. Clone the repository:
git clone https://github.com/quiknode-labs/qn-guide-examples.git
  1. Install dependencies:
cd ethereum/blink-starter-monad && npm install
  1. Update the .env file with your Quicknode Monad testnet endpoint:
MONAD_ENDPOINT_URL=https://api.quicknode.com/YOUR-KEY
  1. Update the contract address and mint price in src/app/actions/mint-nft/route.ts:
const NFT_CONTRACT_ADDRESS = "YOUR_NFT_ADDRESS"; // Input your NFT contract address
const MINT_PRICE_ETH = "YOUR_NFT_MINT_PRICE"; // Price per NFT in MON (adjust as configured by your smart contract)
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 with your browser to see the application.

Blink NFT

Blink NFT

Key Components

  • GET Endpoint: Defines the UI for the Blink (icon, title, description, available actions)
  • POST Endpoint: Contains the logic for transaction generation based on user input
  • Gas Estimation: Helper function to check network gas fees and recommend appropriate values
  • NFT Contract Interface: ABI definition for interacting with your NFT contract

Register Your Blink

To make your Blink available to others, register it on Dialect.

Additional Resources