https://portal.thirdweb.com/guides/early-access-nft-with-typescript

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/84332e1a-eded-404a-9d6b-c000ef4c0b7b/image

Easily create an early access NFT and a frontend for users to claim the NFT

Introduction

In this guide, we are going to make our own early access NFTs using TypeScript. We are going to create an NFT using an edition drop and then we are going to set the price and the number of claimable NFTs. The edition drop allows us to create ERC1155 tokens which means that you can set up a collection of NFTs with a customizable number of each NFT. Once we create the NFT and the claim condition, we will display the NFT with connect wallet and claim buttons in a React project.

All the code for this guide is gonna be available on this GitHub repository.

Let's begin

1. Create Edition Drop

Our first step is to create an edition drop. This can be done in the dashboard and if you aren't sure how to create the contract please check this guide.

2. Project Set-Up

Create a new React project with TypeScript and then install the dependencies:

npx create-react-app my-app --template typescript
npm install @thirdweb-dev/sdk ethers dotenv
npm install --save-dev ts-node tslib

3. Instantiate the SDK

To create, configure and interact with our NFTs we will need to use the thirdweb SDK. Instead of initializing it each time we use it, let's make a function that initializes it and then can be called as needed.

Start by making a new folder called scripts in the root of your project and then make a file in that folder called getContract.ts.