This test project aims to execute swap transaction on the pump.fun.
Input Params:
- Wallet secret Key (Save in the .env file so that it can't be shared with others. I added example.env and you can customize it.)
- Token Mint Address (Token address you want to buy or sell)
Running command:
npm install
npm start
- Check the associated token is existed in my wallet.
- Create associated token account within my wallet if not exist.
- Invoke the buy or sell function on the IDL of pump.fun program.
Here, I would like to show the output of this project.
This is the image of my wallet (phantom)