Content pfp
Content
@
0 reply
0 recast
0 reaction

Samuel pfp
Samuel
@samuellhuber.eth
Why does frog have state in FrameData but not in FrameResponse? I just want to return my own state in Frame Response darn it :( Frames Spec says it should be serialized JSON so JSON.stringify() should be perfect. Then when I get FrameData back I should be able to unwrap that Anyone got a working sample/tutorial?
1 reply
0 recast
4 reactions

bchow pfp
bchow
@bchow
I may be misunderstanding your question, but I think you want to modify the state with the `c.deriveState` function It's a bit confusing because the name `deriveState` suggests read-only behavior, but it also persists the modifications made to the `previousState` reference
2 replies
0 recast
1 reaction

Samuel pfp
Samuel
@samuellhuber.eth
interesting if I have a user Adam going through multiple frames and user Bernd now also starts is the state for adam and bernd different or the same? I'd need it to be different for each user interacting with the frame. The Docs don't make that clear and have it in the app which worries me
1 reply
0 recast
0 reaction

bchow pfp
bchow
@bchow
Yeah sorry, persistence is a loaded term. I think the state is sent via query params in the POST URL for the frame, so the state is user-specific
2 replies
0 recast
0 reaction

jxom  pfp
jxom
@jxom
Yes. State is user-specific.
2 replies
0 recast
0 reaction

Samuel pfp
Samuel
@samuellhuber.eth
Thank you! Can I manipulate it in context of a app.transaction() function? I need context from the transaction json generation (namely which chain will be used) in the frame served once user (Farcaster client) submits the TX and sends me the tx hash
1 reply
0 recast
0 reaction

jxom  pfp
jxom
@jxom
You can't manipulate it in a transaction handler, but you can retrieve it via `context.previousState`.
1 reply
0 recast
0 reaction

Samuel pfp
Samuel
@samuellhuber.eth
Hmm so if I only know in that specific path what I need how could I go about passing it? Don’t really want to use a DB or some other KV store πŸ€” Main hurdle is I only know the wallet of the user in the app.transaction() handler @horsefacts.eth would it be possible to not only get txHash but also chainID from WC?
1 reply
0 recast
0 reaction