Aspyn pfp
Aspyn
@aspyn
I created my first @farcaster frame to allow anybody to mint Based Moon NFTs on Farcaster I open-sourced my frame and below I explain how anybody can create their own NFT mint frame, based off my template, and share it for anyone to mint from 👇 https://based-moon-mint-frame.vercel.app/api
6 replies
3 recasts
8 reactions

Aspyn pfp
Aspyn
@aspyn
Just a quick note, this tutorial assumes you have already deployed your NFT smart contract to a chain and that your smart contract has a mint function that allows the public to mint NFTs via your contract
1 reply
0 recast
0 reaction

Aspyn pfp
Aspyn
@aspyn
First, fork the Farcaster Frames repo I created https://github.com/stuckinaboot/farcaster-frames Then, clone the `farcaster-frames` project locally Open up a terminal, run `cd farcaster-frames/frames/mint-based-moon-nextjs`, `yarn` and then `yarn dev`
1 reply
0 recast
0 reaction

Aspyn pfp
Aspyn
@aspyn
Now go to your web browser and open http://localhost:3000/api/dev You should see the Mint Based Moon frame and can interact with it. Feel free to mint a Based Moon here 😉
1 reply
0 recast
0 reaction

Aspyn pfp
Aspyn
@aspyn
Open the project in your favorite code editor and view the `route.tsx` file (`frames/mint-based-moon-nextjs/app/api/[[...routes]]/route.tsx`) From there, you can modify the contract address or the UI elements by updating the constants at the top: CONTRACT_ADDRESS, TITLE, etc.
1 reply
0 recast
0 reaction

Aspyn pfp
Aspyn
@aspyn
Try modifying the TITLE constant, go back to your browser and refresh the page You should see the updated title
1 reply
0 recast
0 reaction

Aspyn pfp
Aspyn
@aspyn
Now, scroll down in `routes.tsx` to the mint transaction section. You can update `functionName`, `args`, and `value` to the appropriate values for your smart contract Next, open up abi.ts and replace the Based Moon ABI with your smart contract’s abi
1 reply
0 recast
0 reaction

Aspyn pfp
Aspyn
@aspyn
Great! So now our frame is set up for our NFT contract and is working locally. Time to commit and push all changes to GitHub Then, we’ll deploy our frame on Vercel so that it’s accessible to everyone
1 reply
0 recast
0 reaction

Aspyn pfp
Aspyn
@aspyn
Navigate to Vercel and sign in/sign up https://vercel.com Then, import your GitHub repository that you created for this project, set the root directory to `frames/mint-based-moon-nextjs`, and deploy
1 reply
0 recast
0 reaction