In this guide, learn how to create a Farcaster Frame that users can mint NFTs from directly, on any EVM chain.
Here's the link to the GitHub repo:
Deploying your NFT minting contract
Before getting into the Farcaster Frame setup, you need to have an NFT smart contract that you can add to your frame.
With thirdweb, you can deploy pre-built, audited smart contracts to any EVM chain. For the purpose of this guide, we'll be deploying an NFT Drop (ERC-721) smart contract to Base.
Learn more & deploy your smart contract using this guide:
2. Get a thirdweb Engine API key & create an Engine instance
3. Retrieve your thirdweb Engine URL, wallet, and access token. Set up your
config.ts file as such:
We also have a
.env.example file to get you started faster:
<next_js_image_path> to what you'd like to have in your code.
Each part on the Mint API here:
Just make sure it’s related to your next.js image path, usually it’s in the
Here are different steps:
- Get started
- Like & re-cast to mint (Neynar)
- Mint NFT (thirdweb Engine)
- Congratulations for minting
Here is some back-up HTML as well in case of something fails:
5. Change the public URL that you want the Farcaster Frame to send a response to here:
In this example, we just use Vercel's URL when doing preview and production deployments.
6. After you have everything set up — including your Neynar API key, thirdweb Engine, and the config file — you're ready to go! Please also make sure to test your
7. Go to the Farcaster Frame validator to test how users will interact with your frame: https://warpcast.com/~/developers/frames
You'll be able to see what it will look like once you publish the cast to production.
And that's it — have fun!
The thirdweb Frame API uses thirdweb Engine to send onchain transactions with a simple fetch request.
With thirdweb Engine, you can scale your app to millions of users with backend wallet & nonce management, gas fee optimization, automatic retries, and more!
Get started with thirdweb Engine: