This guide explain how to sell a single item using via a Cast which allows your users to pay with crypto via Coinbase Commerce.
- Create a Coinbase Commerce account
Tip
Be sure to set your deposit address in the Coinbase Commerce merchant dashboard to avoid charge creation failures.
- You will need a custom domain. This guide will use a vercel account for easy deployment and testing.
Important
Warpcast requires your Frame to be a https://
URL
- Create a Github [account] (https://github.com/signup)
- An image of your item for sale (
.png
,.jpg
) with 1200 x 630 pixel dimensions
- Fork this repo
- Connect your github account to Vercel. Reference the official Vercel guide for detailed steps
- Upload your Commerce API key credentials to Vercel settings page or your website hosting server. See the official Vercel guide on environment variables for detailed steps !image
Tip
For an app deployed at https://sample-frame.vercel.app/
your settings page will be located at https://vercel.com/your-projects/sample-frame/settings
- Open the forked repo from step 1 in a code editor like Visual Studio
- Using a code editor or the command line, replace the temporary image in the
public/
folder with the image of your product - Navigate to the
utils/
folder (if using the command line runcd utils/
) - Replace the following variables in the
utils.ts
file:
Important
Ensure your NEXT_PUBLIC_URL
does not have a trailing /
. Extra characters in the post_url
will cause the redirect to fail.
NEXT_PUBLIC_URL
- Your website or vercel domain (ex:https://your-site.com
orhttps://sample-frame.vercel.app/
). You may find your vercel domain under your Projects pageITEM_DESCRIPTION
- A description of your productITEM_TITLE
- Title of your productIMAGE_NAME
- The full name of your image including file type. (ex:onchain.png
)- (optional)
REDIRECT_URL
- A URL (string
) to redirect users to upon purchase completion PRODUCT_PRICE_USD
- The price (string
) of your prouct in USD (ex: "5.99")
git init
git add -A
git commit -m "first frame"
git branch -M master
git remote add origin [email protected]:Your-Github-Username/Your-Forked-Repo.git
git push -u origin master
- Log into your Warpcast
- Paste a link to your vercel site or custom domain remember to use
https://
- Click "Cast"
Enjoy!
Tip
Use the Frame validator tool to view your frame and test functionality.
Built using a-frame-in-100-lines by Zizzamia and redirect-frame by Zizzamia and Sanjay
This project is licensed under the MIT License - see the LICENSE.md file for details