This project is a Token Sale dApp that allows one to buy tokens and also displays recently minted tokens on the Solana blockchain using the SPL SDK. It provides a user-friendly interface to view minting transactions, including the receiver's address, the amount of tokens minted, and links to the transaction and address on the Solana explorer.
- Allows users to buy tokens
- Display a list of recently minted tokens
- Show receiver's address and amount of tokens minted
- Provide links to transaction and address on Solana explorer
- React
- Next.js
- TypeScript
- Solana Web3.js
- SPL Token
- React Icons
- Redux Toolkit
- Tailwind CSS
- Solana Wallet Adapter
- Phantom
Warning: Before using this dApp, ensure that you have the Phantom wallet installed on your browser. The dApp requires the Phantom wallet for interacting with the Solana blockchain. You can download and install the Phantom wallet from here.
Before running the project, ensure that your default Solana cluster is set to devnet
. This is crucial for testing and development purposes. If you intend to deploy this project to mainnet
or testnet
, make sure to update your configuration accordingly. You can set the cluster by configuring your Solana CLI or by setting the appropriate environment variables in your project.
To set your default Solana cluster to devnet
, you can use the following command:
solana config set --url https://api.devnet.solana.com
To get started with the project, follow these steps:
-
Clone the repository:
git clone https://github.com/Daltonic/solana_tokenize_project cd solana_tokenize_project
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root directory and add the keypair of the mint authority, that is the deployer of this token.NEXT_PUBLIC_TOKEN_OWNER_KEY_PAIR=<A_STRING_OF_TOKEN_OWNER_KEY_PAIR>
-
Run the following scripts on after the other:
npm run launch
-
Run the development server:
npm run dev
-
Build for production:
npm run build npm start
Once the development server is running, you can access the dApp by navigating to http://localhost:3000
in your web browser. The dashboard will display a list of recently minted tokens, including the receiver's address, the amount of tokens minted, and links to the transaction and address on the Solana explorer.
components/
: Contains React components used in the projectMintHistory.tsx
: Component to display the mint history
services/
: Contains service functions for interacting with the Solana blockchainblockchain.ts
: Functions for fetching mint history, buying tokens, and getting token balance
utils/
: Contains utility types and functionstypes.dt.ts
: Type definitions for the project
Contributions are welcome! If you have any suggestions or improvements, please create an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.