- Bridge: SOL bridging from Solana Devnet to Base Sepolia
- 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/sol2base.git
cd sol2base
- install dependencies:
npm install --legacy-peer-deps
- copy env template:
cp env.template .env.local
- (optional) Add CDP API credentials to
.env.local
for faucet functionality:
CDP_API_KEY_ID=your_cdp_api_key_id
CDP_API_KEY_SECRET=your_cdp_api_key_secret
- 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 if needed
- enter details: Specify amount and destination (Base Sepolia address, ENS, or Basename)
- 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-adapter
and@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
- source: Solana Devnet
- destination: Base Sepolia Testnet
- Faucet: CDP Solana Devnet SOL Faucet
- Backup Faucet: faucet.solana.com
sol2base/
├── 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 fucking 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://sol2base.xyz/
- Base Bridge docs: github.com/base/bridge
- Solana docs: docs.solana.com
- CDP docs: docs.cdp.coinbase.com
- Bridge program on Solana Devnet: HSvNvzehozUpYhRBuCKq3Fq8udpRocTmGMUYXmCSiCCc
- Base Relayer program on Solana Devnet: ExS1gcALmaA983oiVpvFSVohi1zCtAUTgsLj5xiFPPgL
- Bridge contract on Base Sepolia: 0x3154Cf16ccdb4C6d922629664174b904d80F2C35
- Bridge Validator on Base Sepolia: 0xa80C07DF38fB1A5b3E6a4f4FAAB71E7a056a4EC7
- Wrapped SOL token CA on Base Sepolia: 0xC5b9112382f3c87AFE8e1A28fa52452aF81085AD
- Gas fee receiver address expected by Bridge program & Base Relayer program: BEwzVVw44VLaspWByUML23hbQmo5ndM1NPQAJsvCxC6F
"Base is a bridge, not an island." 🌉 Play positive-sum games, win positive-sum prizes.