Skip to content

Using Nextjs and Etherjs to mint ERC721 NFTs with payment options of BNB & BUSD

Notifications You must be signed in to change notification settings

nullwriter/nextjs-mint-nft

Repository files navigation

This is a Next.js project using Ether.js to mint ERC721 NFTs. It features the ability to pay with different ERC20 tokens.

Getting Started

Set up configs

In src/utils/contract.ts you will need to set the following:

  • ERC721_CONTRACT_ADDRESS: the main contract
  • BUSD_CONTRACT_ADDRESS: ERC20 contract to use (currently set as BUSD)
  • URI_BASE: url base where NFT assets are hosted
  • ERC721ABI: contract ABI
  • ERC20ABI: contract ABI
  • MINT_PRICE: mint price for accepted tokens
  • CRYPTO: accepted tokens

Update site metadata

Change src/utils/seo.ts to fit your site information

Build project

Run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

Build project:

npm run build

Extra

In the contract/DeCTB.txt file you'll find an example contract to be used with this app. To deploy, use Ethereum Remix IDE and update src/utils/contract.ts addresses to interact with the contract.

About

Using Nextjs and Etherjs to mint ERC721 NFTs with payment options of BNB & BUSD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published