forked from wevm/frog
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
9,121 additions
and
7,068 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"frog": patch | ||
--- | ||
|
||
Added `gas` parameter to transaction response to specify the gas limit. [See more](https://warpcast.com/horsefacts.eth/0xd6390bb3). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"frog": minor | ||
--- | ||
|
||
Deprecated the Cast Actions Deeplink V1 format in favor of V2. [See more](https://warpcast.notion.site/Spec-Farcaster-Actions-84d5a85d479a43139ea883f6823d8caa). | ||
|
||
Breaking changes have affected `Button.AddCastAction` and `.castAction` handler: | ||
- `Button.AddCastAction` now only accepts `action` property; | ||
- `.castAction` handler now requries a third parameter (`options`) to be set. Properties that were removed from `Button.AddCastAction` have migrated here, and `aboutUrl` and `description` were added along. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,49 @@ | ||
import { Frog } from '@airstack/frog' | ||
import { Button, Frog } from '@airstack/frog' | ||
|
||
export const app = new Frog({ | ||
apiKey: process.env.AIRSTACK_API_KEY as string, | ||
}) | ||
|
||
app.frame('/:name?', (c) => { | ||
const name = c.req.param('name') | ||
return c.res({ | ||
image: ( | ||
<div style={{ color: 'white', display: 'flex', fontSize: 60 }}> | ||
gm, {name ?? 'froggie'} | ||
</div> | ||
), | ||
app | ||
.frame('/jump-to-root', (c) => { | ||
return c.res({ | ||
action: '~/', | ||
image: ( | ||
<div style={{ color: 'white', display: 'flex', fontSize: 60 }}> | ||
Press a button to jump back! | ||
</div> | ||
), | ||
intents: [<Button>Jump Back</Button>], | ||
}) | ||
}) | ||
.frame('/jump-to-clock', (c) => { | ||
return c.res({ | ||
action: '~/clock', | ||
image: ( | ||
<div style={{ color: 'white', display: 'flex', fontSize: 60 }}> | ||
Press a button to jump back! | ||
</div> | ||
), | ||
intents: [<Button>Jump to Clock</Button>], | ||
}) | ||
}) | ||
.frame('/jump-to-root-from-button', (c) => { | ||
return c.res({ | ||
image: ( | ||
<div style={{ color: 'white', display: 'flex', fontSize: 60 }}> | ||
Press a button to jump back! | ||
</div> | ||
), | ||
intents: [<Button action="~/">Jump to Root</Button>], | ||
}) | ||
}) | ||
.frame('/:name?', (c) => { | ||
const name = c.req.param('name') | ||
return c.res({ | ||
image: ( | ||
<div style={{ color: 'white', display: 'flex', fontSize: 60 }}> | ||
gm, {name ?? 'froggie'} | ||
</div> | ||
), | ||
}) | ||
}) | ||
}) |
Oops, something went wrong.