This blog is relevant for anybody who is just getting started in web3 just like me and is wondering what is all this token stuff.
First just install all the dependencies, I am using nextjs,typescript,yarn(npm wasnt working idk why)
@solana/spl-token","@solana/spl-token-metadata","@solana/wallet-adapter-base","@solana/wallet-adapter-react","@solana/wallet-adapter-react-ui","@solana/wallet-adapter-wallets","@solana/web3.js"
So we are building a solana token launchpad using the token22 program.
To make tokens first we need a mint account,
We need few things to make a Mint account:-
- A keypair
- The user's public key
- Rent value
- space
- programId(which is token22)

Now lets get to the token creation part,Obviously the token needs to have a name and a symbol and some other metadata so lets get that sorted.
Create a form

and find the space,rent which would be required

Next step is to add the instructions for setting up the metadata and the mint

Now we need to add the users public key to the transaction and also the recent blockhash(unlike eth where programs can get verfied after a few days, in solana it doesnt work like that) and we partially sign the transaction since we do not have the users private key and only have the mint account keypair, the wallet then asks the user to sign the transaction.

and then finally wrap the function inside the wallet provider,
and Obviously I am talking about devnet here and not real prod
If you liked the blog
Connect on socials:-
Twitter:-https://x.com/Tej_Codes
LinkedIn:-https://linkedin.com/in/TejaswaHinduja
Top comments (0)