This project is a wallet eligibility and claim application for users to verify an x42 wallet address, connect their wallet, and claim EPIX tokens. The application guides users through three main steps:
- Checking the eligibility of their wallet address.
- Connecting their wallet.
- Verifying their signature and claiming the EPIX tokens.
The application is built with React, leveraging the Interchain UI, Cosmos Kit, and Axios for API requests.
- Three-Step Process: Guides the user through eligibility checking, wallet connection, and claiming.
- API Integration: Validates wallet address eligibility and claims via HTTP requests to backend services.
- User Feedback: Provides clear messaging to the user for each step, including eligibility status and claim results.
components/
User.js
: Component to display user information.Chain.js
: Component to display blockchain information.Warning.js
: Component to display warning messages.Connect.js
: Various button components for managing wallet connection states.
utils/
getChainLogo.js
: Utility to fetch the chain logo.
config/
CHAIN_NAME.js
: Configuration for the chain name.
-
Clone the repository
git clone <repository-url> cd <repository-directory>
-
Install dependencies Ensure you have
yarn
ornpm
installed, then run:yarn install
or
npm install
-
Start the development server
yarn dev
or
npm run dev
-
Access the Application Open your browser and navigate to
http://localhost:3000
to access the application.
-
Step 1: Eligibility Check
- The user enters their x42 wallet address in the input field and clicks "Check Eligibility."
- An API call checks if the address is valid, whether it is a SegWit address, and whether it has a sufficient balance.
-
Step 2: Connect Wallet
- If eligible, the user proceeds to connect their wallet using the displayed connect button.
- The app utilizes Cosmos Kit to manage wallet connections.
-
Step 3: Verify & Claim
- The user signs a message and inputs the signature.
- The "Validate and Claim your EPIX" button sends the signature and other data to verify and claim tokens.
- Address verification check:
https://snapapi.epix.zone/verify-address?address=<walletAddress>
- Balance check:
https://snapapi.epix.zone/check-balance?address=<walletAddress>
- Claim verification:
https://snapapi.epix.zone/verify-snapshot
- Place the instruction images (
Sign-With-Wallet.png
andCopy-Signature.png
) in the/public/images/
directory. - The app uses Axios for HTTP requests and handles both eligibility and claim verification.
- The application uses the Interchain UI components for a consistent look and feel.
- Color modes (
useColorModeValue
) are used to ensure a good experience for both light and dark themes.
- React: Front-end library for building the UI.
- Cosmos Kit: Wallet integration for Cosmos-based blockchains.
- Axios: HTTP client for API requests.