Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Farcaster Frames are now web apps. That means if you have an existing web app that connects to a wallet, you can turn it into a frame that will:
Let's make Uniswap a frame.
1. Install Frame SDK and Wagmi connector packages
2. Load SDK and call
ready()Load the Frame SDK and call
ready()when your app loads.apps/web/src/index.tsx:Add to your provider stack:
3. Set up Wagmi connector
Add the
farcasterFrameconnector to your Wagmi config.apps/web/src/components/Web3Provider/wagmiConfig.ts4. Add frame
<meta>tagsAdd a frame
<meta>tag to any page URL you want to frame-ify. This one adds an embed to the homepage that launches into the "swap" page.apps/web/public/index.html5. OPTIONAL: Add a
farcaster.jsonfileOptional but recommended: generate a
farcaster.jsonmanifest file from the Warpcast dev tools and serve it at/.well-known/farcaster.json.This associates your Farcaster account with the frame app, allows users to save it to their Farcaster client, and gives you access to in-app notifications.
apps/web/public/.well-known/farcaster.json{ "accountAssociation": { "header": "eyJmaWQiOjM2MjEsInR5cGUiOiJjdXN0b2R5Iiwia2V5IjoiMHgyY2Q4NWEwOTMyNjFmNTkyNzA4MDRBNkVBNjk3Q2VBNENlQkVjYWZFIn0", "payload": "eyJkb21haW4iOiJ1bmlmcmFtZS5vcmcifQ", "signature": "MHgxZTZlZTkyNmRiZjU5ZDljZjM4MGI1YTU0ZTI2YzUxYjEyN2MyZjM2NTM3ZDJhYWI5ZGZjOTBiMDVlMjRjY2U4MzYxZDk5YmRhOGZmYWU0NjliZTY0ZWNlZTVhZTA5MjYzNWM5NjVlYzFmZmRjNDEwOGZiNjJlNmRmYmRiM2VkNDFi" }, "frame": { "name": "Uniframe", "version": "0.0.1", "iconUrl": "https://uniframe.org/favicon.png", "homeUrl": "https://uniframe.org/#/swap", "splashImageUrl": "https://uniframe.org/favicon.png", "splashBackgroundColor": "#131313" } }