Please visit our website at zondax.ch
A comprehensive web application designed to streamline the migration process to the new Polkadot Universal Ledger App. This platform offers:
- Elegant User Interface: A modern, intuitive landing page that clearly explains the migration benefits
- Step-by-Step Guidance: An interactive assistant that walks users through each phase of the migration
- Secure Transition: Robust protocols ensuring safe transfer from legacy Ledger applications
- Multi-Chain Support: Seamless handling of various Substrate-based chains in one unified experience
- Real-Time Progress Tracking: Visual indicators showing migration status and completion
Built by Zondax to simplify the complex process of adopting the consolidated Universal Ledger App for the Polkadot ecosystem.
-
Modern Stack
- Next.js 15 with App Router
- React 19
- TypeScript
- Tailwind CSS
- Shadcn UI Components
- Vercel Analytics
-
Polkadot Integration
- Ledger Hardware Wallet Support
- Polkadot API Integration
- Substrate Protocol Support
-
Development Tools
- ESLint for code linting
- Prettier for code formatting
- Vitest for testing
- Playwright for E2E testing
The following parachains are currently supported with direct RPC endpoints:
- Acala (ACA)
- Ajuna (AJUN)
- Astar (ASTR)
- Darwinia (RING)
- Enjin (ENJ)
- HydraDX (HDX)
- Karura (KAR)
- Kusama (KSM)
- Kusama Asset Hub (KSM)
- Nodle (NODL)
- Pendulum (PEN)
- Phala (PHA)
- Picasso (PICA)
- Polkadex (PDEX)
- Sora (XOR)
- XXNetwork (XX)
By default, the application synchronizes the first 10 accounts of each app when connecting to a Ledger device. This behavior can be customized by setting the 'NEXT_PUBLIC_MAX_ADDRESSES_TO_FETCH' environment variable to your desired number of accounts.
- Node.js (LTS version)
- pnpm (for package management)
- A Polkadot-compatible Ledger device (optional)
- Clone the repository:
git clone [repository-url]
cd polkadot-web-migration
- Install dependencies:
pnpm install
- Initialize your dev environment:
pnpm env:init
- Start the development server:
# For development with limited transfer amount (100 units)
pnpm dev
# For development with full transfer amount
pnpm dev:full-amount
The application will be available at http://localhost:3000
.
pnpm dev
- Starts the development server with limited native transfer amounts (100 units), useful for testing with controlled amountspnpm dev:full-amount
- Starts the development server without transfer amount limitations, allowing full balance transferspnpm build
- Build for productionpnpm build:docker
- Build Docker image for the applicationpnpm start:docker
- Start the Docker container for the applicationpnpm start
- Start production serverpnpm test
- Run tests with coveragepnpm test:coverage
- Run tests with detailed coverage reportpnpm test:watch
- Run tests in watch modepnpm test:e2e
- Run E2E tests with Playwrightpnpm test:e2e:debug
- Run E2E tests in debug modepnpm test:e2e:ui
- Run E2E tests with UIpnpm test:e2e:install
- Install Playwright browserspnpm test:e2e:report
- Show Playwright test reportpnpm test:e2e:sharding
- Run E2E tests with sharding configurationpnpm lint
- Run ESLintpnpm lint:fix
- Fix ESLint issuespnpm format
- Format code with Prettier and sort package.jsonpnpm format:check
- Check code formattingpnpm deps:update
- Update dependenciespnpm env:init
- Initialize environment variables
app/
- Next.js app router pages and layoutscomponents/
- Reusable React componentsconfig/
- Application configurationlib/
- Utility functions and shared librariespublic/
- Static assetsstate/
- State management logic with legendapp/state
The application follows clean architecture principles:
- Business logic is separated from state management
- Services are agnostic of state management libraries
- Core business logic and interfaces are in separate files
- UI components are modular and composable
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project provides a flexible configuration system for adding custom blockchain networks:
- Add your chain logo to the
public/logos/chains
directory (the image filename must match the chainid
you'll use in the configuration) - Add chain configuration in the
config/appsConfig.json
file with the following structure:{ "id": "your-chain-id", "name": "Your Chain Name", "cla": 123, "bip44Path": "m/44'/123'/0'/0'/0'", "ss58Prefix": 42, "rpcEndpoint": "wss://rpc.yourchain.network", "token": { "symbol": "SYMBOL", "decimals": 12, "logoId": "token-icon-id" } }
Each chain configuration contains these key parameters:
id
: Unique identifier for the chain (must match the logo filename in the chains directory)name
: Display name of the chaincla
: Chain-specific class identifierbip44Path
: The HD derivation path for the chainss58Prefix
: The SS58 address format prefixrpcEndpoint
: WebSocket endpoint for connecting to the chaintoken
: An object containing token information:symbol
: The currency symboldecimals
: Number of decimal places for the currencylogoId
: (Optional) Used when the token's icon is different from the chain's icon (e.g., Asset Hubs)
For detailed examples of how to structure your chain configuration, refer to the existing entries in the appsConfig.json file.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
You can use the provided npm scripts to simplify building and running the Docker container:
pnpm build:docker
This runs docker build -t polkadot-migration .
to create the Docker image.
pnpm start:docker
By default, this will map port 3000 from the container to port 3000 on your local machine. The script uses the PORT
environment variable, so you can specify a custom port if needed:
PORT=4000 pnpm start:docker
This will map port 4000 on your machine to port 3000 in the container. Then access the app at http://localhost:4000