Platform Architecture
React 19 + MUI + wagmi + RainbowKit user-facing application. Built with Vite. Provides wallet connectivity for bridging, minting, redeeming, swapping, and token migration.
Tech Stack
- React 19 with TypeScript
- Material UI (MUI) for components and theming
- wagmi + RainbowKit for wallet connectivity
- Vite bundler
- Google Analytics (
G-M59KE7VL17)
Pages
| Page | Path | Description |
|---|---|---|
| Explore | /explore | Browse available tokenized assets |
| Portfolio | /portfolio | View connected wallet's holdings |
| Assets | /assets | Asset detail pages with market data |
| Swap | /swap | Token swaps via DEX integration |
| Bridge | /bridge | Cross-chain bridging (Base <-> Polygon) |
| Migration | /migration | Legacy token migration (nARS/nBRL/nMEX to ARGt/BRAt/MEXt) |
| Mint | /mint | Mint new tokens (institutional) |
| Redeem | /redeem | Redeem tokens for underlying value |
| Disperse | /disperse | Batch-send tokens to multiple recipients |
| Login | /login | Collaborator authentication |
Supported Chains
| Chain | Chain ID | Usage |
|---|---|---|
| Base | 8453 | Primary chain for all tokens |
| Polygon | 137 | Secondary chain (ARGT bridged) |
Migration State Machine
The /migration page implements a two-step migration flow for converting legacy tokens to their new versions via the TwinMigrationNum contract on Base.
The UI uses a horizontal Stepper showing "Paso N de 2" with contextual hint text. The confirm dialog is irreversible -- migration tokens cannot be converted back.
Migration pairs:
- nARS -> ARGt
- nBRL -> BRAt
- nMEX -> MEXt
Pairs that are not yet enabled on the contract display "aun no esta habilitada" (the contract does not have an activatePair function).
Market Data Flow
Token prices come from the on-chain oracle contract. Fiat conversion rates (ARS, BRL, MXN) come from external APIs. The backend aggregates both and serves them via the platform API.
Responsive Design
- All pages use MUI's
GridandStackfor responsive layout - Mobile breakpoint handling via
useMediaQuery - Bottom navigation on mobile replaces sidebar
- Wallet connect modal is full-screen on small viewports
Environment Variables
| Variable | Description |
|---|---|
VITE_API_URL | Backend platform API URL |
VITE_WALLET_CONNECT_PROJECT_ID | WalletConnect Cloud project ID (build-time) |