- Bridge: SOL + SPL bridging between Solana Devnet/Mainnet and Base Sepolia/Mainnet
- Networks: One-click toggle between Solana Devnet β Base Sepolia and Solana Mainnet β Base Mainnet
- Base calls: Attach arbitrary Base contract calls with
--call-*flags and ABI-encoded calldata - Faucet: Get SOL from Coinbase Developer Platform
- Address resolution: Support for ENS names and Basenames
- Balance: Live SOL balance tracking for connected wallet
- Txn status: Complete bridge transaction history and status monitoring
- Node.js 18+
- npm or yarn
- Solana wallet (Phantom, Solflare) to connect in the UI
- clone the repo:
git clone https://github.com/Jnix2007/terminally-onchain.git
cd terminally-onchain- install dependencies:
npm install --legacy-peer-deps- copy env template:
cp env.template .env.local- (optional) Add CDP API credentials to
.env.localfor faucet functionality:
CDP_API_KEY_ID=your_cdp_api_key_id
CDP_API_KEY_SECRET=your_cdp_api_key_secretSet NEXT_PUBLIC_ENABLE_MAINNET=true in .env.local if you want the Solana β Base mainnet option to appear in the UI. Leaving it undefined or any value other than "true" keeps the app on devnet/Base Sepolia only.
- start your dev server:
npm run dev- connect wallet: Connect Solana wallet (Phantom/Solflare)
- get SOL: Use the integrated CDP Faucet to get SOL on Solana Devnet (only when you stay on devnet)
- enter details: Specify amount and destination (Base address, ENS, or Basename on the active network)
- Bridge! Execute the bridge txn
- monitor: Track txn status in real-time
- frontend: Next.js 15 with TypeScript and Tailwind CSS
- Solana integration: Uses
@solana/wallet-adapterand@solana/web3.js - Bridge contracts: Real Base/Solana bridge smart contracts
- address resolution: ENS and Basename support via ethers.js
- faucet: CDP (Coinbase Developer Platform) Faucet integration
I was going for a fun "hacker" aesthetic:
- colors: Bright green (#00ff00) on black background
- font faces: JetBrains Mono and Orbitron fonts
- animations: Matrix rain effects and glowing text
- logo: Pixelated suspension bridge with animated effects
- Faucet section: Get SOL from CDP with rate limiting info, and backup link to SF faucet in case I've exceeded CDP Faucet limits
- Bridge form: Input validation & address resolution
- Balance display: SOL balance tracking
- Transaction history: Status tracking
- Wallet integration: Wallet connection
- default: Solana Devnet β Base Sepolia (includes CDP SOL faucet integration)
- mainnet: Solana Mainnet β Base Mainnet (no faucet; bring your own SOL)
- Faucet: CDP Solana Devnet SOL Faucet
- Backup Faucet: faucet.solana.com
terminally-onchain/
βββ src/
β βββ app/ # Next.js app router
β βββ components/ # React components
β βββ lib/ # Utilities and services
β βββ styles/ # Global styles
βββ bridge-contracts/ # Base bridge contracts
βββ bridge-solana/ # Solana bridge programs
βββ public/ # Static assets
src/lib/bridge.ts- Main bridge servicesrc/lib/realBridgeImplementation.ts- Bridge txn logicsrc/lib/cdpFaucet.ts- CDP faucet integrationsrc/lib/addressResolver.ts- ENS/Basename resolutionsrc/components/MainContent.tsx- Main app interface
- no private keys: Uses wallet adapter for secure signing
- address validation: Validates all addresses before transactions
- error handling: Comprehensive error handling and user feedback
- rate limiting: Respects faucet rate limits
Feel free to fork & whatever, building in the open here
- fork the repo
- create a 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 PR
This project is licensed under the MIT License - see LICENSE file for details.
The Base team that put this together is cracked and it was dope to be at Basecamp in-person when this was announced.
- Base for the bridge infra
- Coinbase Developer Platform for faucet services & general badassery
- Solana for the blockchain infra
- The open-source community for the amazing tools and libraries used along the way
- Live Demo: https://terminallyonchain.xyz/
- Base Bridge docs: github.com/base/bridge
- Solana docs: docs.solana.com
- CDP docs: docs.cdp.coinbase.com
- Bridge program on Solana Devnet: 7c6mteAcTXaQ1MFBCrnuzoZVTTAEfZwa6wgy4bqX3KXC
- Base Relayer program on Solana Devnet: 56MBBEYAtQAdjT4e1NzHD8XaoyRSTvfgbSVVcEcHj51H
- Gas fee receiver (devnet): AFs1LCbodhvwpgX3u3URLsud6R1XMSaMiQ5LtXw4GKYT
- Bridge contract on Base Sepolia: 0x01824a90d32A69022DdAEcC6C5C14Ed08dB4EB9B
- Bridge Validator on Base Sepolia: 0xa80C07DF38fB1A5b3E6a4f4FAAB71E7a056a4EC7
- Wrapped SOL token CA on Base Sepolia: 0xCace0c896714DaF7098FFD8CC54aFCFe0338b4BC
- Bridge program on Solana Mainnet: HNCne2FkVaNghhjKXapxJzPaBvAKDG1Ge3gqhZyfVWLM
- Base Relayer program on Solana Mainnet: g1et5VenhfJHJwsdJsDbxWZuotD5H4iELNG61kS4fb9
- Bridge contract on Base Mainnet: 0x3eff766C76a1be2Ce1aCF2B69c78bCae257D5188
- Bridge Validator on Base Mainnet: 0xAF24c1c24Ff3BF1e6D882518120fC25442d6794B
- CrossChain ERC20 Factory on Base Mainnet: 0xDD56781d0509650f8C2981231B6C917f2d5d7dF2
- Relayer Orchestrator on Base Mainnet: 0x8Cfa6F29930E6310B6074baB0052c14a709B4741
- Wrapped SOL token CA on Base Mainnet: 0x311935Cd80B76769bF2ecC9D8Ab7635b2139cf82
"Base is a bridge, not an island." π Play positive-sum games, win positive-sum prizes.
