matthias pfp
matthias
@iammatthias
Anyone have good notes or docs on using v2 frames with Vite?
1 reply
0 recast
2 reactions

Steve pfp
Steve
@stevedylandev.eth
Anything specific? Or just a general guide? Still got this which uses React Vite: https://orbiter.host/blog/how-to-deploy-a-v2-frame-on-orbiter
1 reply
0 recast
1 reaction

matthias pfp
matthias
@iammatthias
I think this should get me most of the way there! Thanks! Looks like this skips the wallet provider stuff?
1 reply
0 recast
1 reaction

Steve pfp
Steve
@stevedylandev.eth
Np! Yeah I purposely went a minimal route to cover just the basics. There is an SDK method for retrieving accounts that can get you started, I’d need to look into some other examples they have using wagmi to see how it would work out. https://docs.farcaster.xyz/developers/frames/v2/spec#wallet-ethprovider
1 reply
0 recast
1 reaction

Steve pfp
Steve
@stevedylandev.eth
https://github.com/orbiterhost/v2frame/tree/wallet-demo Did a little experimenting and got wagmi working with our existing v2 frame template (check out the wallet-demo branch)! Lets a user connect a wallet and write to a contract. Definitely a few things to know: - In order for wagmi to work with V2 frames you need a connector interface with the frames SDK. I copied the code used in the frame docs and added it here: https://github.com/orbiterhost/v2frame/blob/wallet-demo/src/utils/connector.ts - That connector goes into the wagmi config: https://github.com/orbiterhost/v2frame/blob/d4505ae3d634964a4f73e178a1ef41be6c7b05cf/src/utils/config.ts#L10 - Lastly the config goes into the wagmi provider, which wraps the app: https://github.com/orbiterhost/v2frame/blob/wallet-demo/src/main.tsx - Once all of this is setup you can start using wagmi! Check out the example in App.tsx
1 reply
0 recast
1 reaction