Case 2: Fetch user's Moxie earning
guide on how to create the desired frame using frog.fm
Last updated
guide on how to create the desired frame using frog.fm
Last updated
** The full code for this example can be found here.
** You can check the operation of the completed sample here. ** This example demonstrates creating a frame via frog.fm. For more details about frog, please refer to the official documentation below.
This example creates a frame to view a specific user's moxie earning stat.
How to get data with Lum0x SDK 1) The farcasterMoxie.getEarningStat function gets the moxie earning stat for a specific fid.
2) Lookup for each timeframe.
State Management 1) Setting initialState. (Set the initial targetFid to -1)
2) Update the state value with the value received as textInput (deriveState,previousState)
How to bind data with image 1) call getMoxieImage and pass return value to image field.
2) getMoxieImage is return <Box>
4. Add postLum0xTestFrameValidation
call postLum0xTestFrameValidation when every frame page loads.
This makes track frame usage and generate dashboard page.
Please deploy the completed project code on Vercel. For instructions on how to deploy via Vercel, refer to this guide here.