Integrating WalletConnect with Your React App on Conflux Chain
This tutorial will guide you how to seamlessly integrate WalletConnect into your React application to enable user interactions with Conflux eSpace, thereby providing your users with a secure and intuitive way to connect their wallets to your dApp on Conflux eSpace.
前提条件
- Node.js installed on your machine
- Basic understanding of React, JavaScript and Typescript
- A Conflux eSpace network-compatible wallet (e.g., MetaMask)
Step 1: Setting Up Your React Project
If you haven't already created a React project, start by setting up one. You can skip this step if you have an existing project.
npx create-react-app web3modal-conflux-react
cd web3modal-conflux-react
Step 2: Installing Necessary Libraries
Web3Modal SDK has support for Wagmi, which will help you interact with wallets and smart contracts.
npm install @web3modal/wagmi wagmi viem @tanstack/react-query