The onboarding layer for Soroban dApps. Fund any Soroban smart account (C-address) directly — from a CEX withdrawal, a credit card, or an existing G-address.
- G → C Bridge — Send XLM or USDC from a Stellar G-address to a Soroban C-address via a single transaction.
- Fiat Onramp — Buy USDC with a credit/debit card via Moonpay or Transak and send directly to a C-address.
- CEX Withdrawal Routing — Withdraw from Binance, Coinbase, or Kraken to a bridge address that routes funds to your C-address.
- Next.js 16 (App Router, Turbopack)
- React 19 with Server Components
- Tailwind CSS 4 with dark theme
- Stellar SDK 15 (Horizon + Soroban RPC)
- Freighter API 6 (wallet integration)
- TypeScript 5
- Vitest (testing)
-
Clone and install:
git clone <repo-url> cd c-address-bridge npm install
-
Configure environment:
cp .env.example .env.local
Required env vars (see
.env.examplefor all options):Variable Required Description NEXT_PUBLIC_STELLAR_NETWORKYes TESTNETorPUBLICNEXT_PUBLIC_BRIDGE_CONTRACT_IDNo Soroban bridge contract (omits direct payment) NEXT_PUBLIC_MOONPAY_API_KEYFor onramp From Moonpay dashboard NEXT_PUBLIC_TRANSAK_API_KEYFor onramp From Transak dashboard -
Run:
npm run dev
Open http://localhost:3000.
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Production build |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run typecheck |
Run TypeScript type checking |
npm run test |
Run Vitest test suite |
src/
├── app/
│ ├── page.tsx # Landing page
│ ├── layout.tsx # Root layout with wallet provider + fonts
│ ├── error.tsx # Error boundary
│ ├── loading.tsx # Route loading state
│ ├── not-found.tsx # 404 page
│ ├── bridge/ # G → C bridge flow
│ ├── cex/ # CEX withdrawal routing
│ ├── dashboard/ # Wallet dashboard with live balances
│ └── onramp/ # Fiat onramp (Moonpay/Transak)
├── components/
│ ├── footer.tsx
│ ├── navbar.tsx
│ ├── transaction-history.tsx
│ └── wallet-provider.tsx # Wallet context provider
└── lib/
├── stellar.ts # Stellar SDK + Freighter integration
└── types.ts # TypeScript types and constants
- Connect your Freighter wallet or enter any Stellar address.
- Choose a funding source: G-address, fiat card, or CEX withdrawal.
- Enter the Soroban C-address you want to fund.
- Confirm — sign with Freighter and submit to the Stellar network.
The /contracts admin page lets developers deploy and manage Soroban bridge contracts directly from the browser using Freighter.
# .env.local
NEXT_PUBLIC_CONTRACTS_ADMIN=trueNavigate to http://localhost:3000/contracts. Freighter must be connected.
- Build your Soroban contract:
cargo build --release --target wasm32-unknown-unknown - On the admin page, upload the
.wasmfile and click Deploy. - Freighter will prompt for two signatures: one to upload the WASM, one to create the contract instance.
- Copy the resulting contract ID into
.env.local:NEXT_PUBLIC_BRIDGE_CONTRACT_ID_TESTNET=C… NEXT_PUBLIC_BRIDGE_CONTRACT_ID_MAINNET=C…
The contract must expose a __upgrade(new_wasm_hash: bytes) entrypoint and the signing address must be the contract admin.
- Build and upload the new WASM to get its hash (use the Deploy flow or
stellar contract upload). - On the Upgrade Contract panel, enter the contract ID and new WASM hash, then click Upgrade.
Enter any contract C-address in the Inspect Contract panel to fetch its on-chain WASM hash and latest ledger from Soroban RPC.
MIT