Frontend Usage
The front end provides a streamlined workflow for testing and demonstrating the disposable chain airdrop process. This section details how to use the reference implementation to test airdrop claims.
Reference Implementation
This front end serves as a reference implementation example and a starting point for projects aiming to:
- Spin up an ephemeral chain
- Run onboarding campaigns such as airdrops
- Provide a low-friction user experience with wallet connection, proof generation, claim transactions, and cross-chain settlement
The complete source code is available in the Efimero Demo UI repository for reference and customization.
Integration Notes
This frontend serves as the user-facing layer in a three-component ecosystem:
Component Roles:
- Efímero Node: Provides gasless transactions and Merkle proof verification
- Merklize Server: Handles off-chain proof generation and dataset management
- Frontend: Abstracts blockchain complexity into familiar web interactions
Key Integration Points:
- Direct WebSocket connection to disposable parachain which also exposes XCM messaging for cross-chain asset bridging
- HTTP API integration with proof generation service
- Wallet abstraction using Polkadot ecosystem standards
Prerequisites & Setup
Before using the frontend, ensure the infrastructure is running:
- Efímero node: Running with custom pallets (
potClaim
,verifyMerkle
,freeTxn
) - Merklize server: Loaded with your dataset and serving proofs
- Asset funding: Assets transferred to the pot account via XCM from Asset Hub
See Quickstart Guide for complete setup.
User Workflow
1. Connect Your Wallet
Link your Substrate-compatible wallet to the UI.
2. Check Eligibility and Balance
The application queries the Merklize server to verify if your account is included in the dataset. If eligible, it will display the corresponding claimable balance.
3. Generate a Merkle Proof
A proof is generated for your account in the context of the dataset. This proof is required for the claim and will be sent to the disposable chain for verification.
4. Claim the Asset
Submit a free whitelisted transaction that calls the claim extrinsic.
Parameters:
- Asset ID (preconfigured in this example)
- Merkle proof (generated in the previous step)
Once verified, the disposable chain transfers the asset to your connected account.
5. Cross-chain Transfer back to Asset Hub
After claiming, you can permanently secure your tokens by transferring them back to Asset Hub. The application exposes a cross-chain function that sends the necessary XCM message to move the asset back into Asset Hub, where it persists beyond the lifecycle of the disposable chain.
Common Issues
- "Account not found": Your address isn't in the test dataset (
test/data/test.csv
) - "Already claimed": Each account can only claim once
- Transaction fails: Wait for the 10-block cooling period between free transactions