A demonstration of integrating Flow blockchain cross-VM functionality with FCL, RainbowKit, Wagmi, and Next.js, allowing users to connect both EVM and Flow wallets in a single application.
✨ Supercharge Your Apps with Cadence ✨
- 🔗 Seamless Cross-VM Integration – Connect Flow and EVM wallets effortlessly.
- 🔥 Leverage Cadence's Power – Enhance dApps with composable, atomic interactions.
- 🚀 Progressive Adoption – Incrementally integrate Flow’s features without disrupting existing workflows.
- ⚡ Bundled Transactions – Execute multiple operations in a single atomic transaction using FCL and Cadence, reducing gas costs and improving efficiency.
- Connect to Flow and EVM wallets using RainbowKit
- Display connected wallet addresses
- Interactive code evaluation sandbox
- Built with Next.js 15 and React 19
- Node.js >= 20.0.0
- Flow Wallet Browser Extension
- An EVM wallet (like MetaMask)
-
Clone the repository:
git clone <repository-url>
-
Install dependencies:
npm install
-
Install and build FCL-JS at the path
../fcl-js
(this can be configured in thepackage.json
file). -
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
src/app/
- Next.js application routes and componentssrc/wagmi.ts
- Wagmi and Flow wallet configurationsrc/app/code-evaluator.tsx
- Interactive code evaluation componentsrc/app/providers.tsx
- React context providers setup
- Next.js - React framework
- RainbowKit - Wallet connection UI
- Wagmi - React Hooks for Ethereum
- Flow Client Library (FCL) - Flow blockchain interaction
- React - UI library
- TypeScript - Type safety
These packages are currently in alpha and make it possible for a Wagmi/RainbowKit app to integrate with Flow tooling by bridging the gap between EVM and Cadence:
- FCL Ethereum Provider - Acts as an Ethereum provider for FCL to enable Cadence and EVM interactions in a single session.
- FCL Wagmi Adapter - Provides seamless integration of FCL with Wagmi's wallet connectors.
- FCL RainbowKit Adapter - Enables RainbowKit to support FCL-compatible wallets.
This integration facilitates progressive adoption of Cadence in Ethereum applications by unifying wallet session management and reducing tooling fragmentation.
Read more about this proposal in the Cross VM FLIP.
To learn more about building cross-VM apps in Cadence, please read the official guide here.
The project uses TypeScript for type safety and Next.js App Router for routing. The main components are:
CodeEvaluator
: An interactive sandbox for testing Flow and Wagmi functionalityProviders
: Sets up RainbowKit, Wagmi, and query client providersPage
: Main application page with wallet connection buttons and address display
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.