A Chrome browser extension for managing Safe (Gnosis Safe) wallets on Sepolia testnet.
NOTE: THIS IS AN EXPERIMENTAL PROJECT. USE AT YOUR OWN RISK!
This extension provides a simple interface to interact with Safe smart contract wallets, allowing users to:
- Import Safe accounts by address
- Manage owner keys for transaction signing
- Send ETH transactions from Safe wallets
- View Safe account details and balances
- Safe Account Management: Import and manage Safe wallets on Sepolia testnet
- Owner Key Support: Securely import private keys for transaction signing
- Transaction Interface: Send ETH transactions with Safe's multi-signature security
- Modern UI: Built with React, TypeScript, and Tailwind CSS
- Security First: Follows security best practices for wallet extensions
- Frontend: React 19 with TypeScript
- Styling: Tailwind CSS v4 + Shadcn UI components
- Build System: Vite with Chrome extension optimization
- Web3: Viem for blockchain interactions
- Safe Integration: Safe Protocol Kit from Safe{Core} SDK
- Configuration: Cross-environment variables with validation
- Testing: Jest with React Testing Library (279 tests)
- Code Quality: ESLint, Prettier, and pre-commit hooks
- Node.js 18+ (use
nvm usefor exact version) - Chrome browser
- Git
-
Clone and setup
git clone https://github.com/rahulrumalla/safe-extension.git cd safe-extension nvm use # Uses .nvmrc for Node version consistency npm install
-
Configure environment (optional)
# Copy environment template cp .env.example .env.local # Customize as needed (all variables have sensible defaults) # See "Environment Configuration" section below for details
-
Start developing
npm run dev:extension # Builds extension and shows load instructions -
Load in Chrome
- Go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" → select
dist/folder - Pin extension for easy access
- Go to
-
Development workflow
# Make changes to src/ files npm run dev:extension # Rebuild # Go to chrome://extensions/ and hit reload button
Loading & Reloading:
- After building (
npm run dev:extension), load thedist/folder in Chrome extensions - Click the refresh button in
chrome://extensions/after each rebuild - Hot reload was intentionally removed to avoid Chrome extension compatibility issues
Troubleshooting:
- Extension not loading: Ensure
dist/folder contains all files, check Chrome console, verify manifest.json - Development issues: Restart dev server, reload extension, check Chrome's developer console
# 🚀 Development (most used)
npm run dev:extension # Build + instructions for Chrome reload
npm run dev:watch # Auto-rebuild on file changes
# ✅ Quality Assurance
npm run check # Full validation (lint + security + build + test)
npm run fix-conflicts # Fix any formatting conflicts
# 🔒 Security & Performance
npm run security:check # Validate dependencies & lockfile
npm run build:analyze # Bundle size analysis + stats.html
# 🧪 Testing
npm run test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report- F5 → Launch Chrome with extension loaded
- Ctrl+Shift+P → "Tasks: Run Task" → "Extension: Reload"
- Breakpoints work in popup, background, and content scripts
- Bundle analysis: Run
npm run build:analyzeto see what's making bundles large - Auto-format: Files format on save (configured for AI-generated code)
- Security: Pre-commit hooks prevent commits with vulnerabilities
- Performance: Build warns if chunks exceed 1MB (configurable)
src/
├── components/ # React components
│ ├── ui/ # Reusable UI components
│ └── ErrorBoundary.tsx
├── config/ # Configuration files
├── lib/ # Utility functions
├── types/ # TypeScript type definitions
├── __tests__/ # Test files
├── App.tsx # Main application component
├── main.tsx # Entry point
└── index.css # Global styles
The extension uses environment variables for configuration with sensible defaults. All variables are optional and have fallback values.
Copy .env.example to .env.local and customize as needed:
# Network Configuration (Optional)
VITE_NETWORK=sepolia # Target network: sepolia, mainnet, goerli
VITE_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com # Ethereum RPC endpoint
# Safe Configuration (Optional)
VITE_SAFE_TRANSACTION_SERVICE_URL=https://safe-transaction-sepolia.safe.global # Safe API endpoint
# Development Settings (Optional)
VITE_DEV_MODE=true # Enable development features: true, false
VITE_LOG_LEVEL=debug # Logging level: debug, info, warn, errorThe extension is configured for Sepolia testnet by default:
- Network: Sepolia testnet
- RPC URL:
https://ethereum-sepolia-rpc.publicnode.com - Safe Transaction Service:
https://safe-transaction-sepolia.safe.global - Explorer:
https://sepolia.etherscan.io - Log Level:
info(production),debug(development)
The extension automatically validates environment variables at startup:
- URL Validation: Ensures RPC and service URLs are properly formatted
- Enum Validation: Validates network, log level, and dev mode values
- Startup Logging: Displays validation results in development mode
// Environment validation is built-in and automatic
// Check browser console for validation results in development- Private Key Handling: Keys are stored securely using Chrome's storage API
- Input Validation: All user inputs are validated before processing
- Network Security: HTTPS-only connections to RPC endpoints
- Minimal Permissions: Extension requests only necessary Chrome permissions
- Error Boundaries: Robust error handling throughout the application
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Quality check:
npm run check(includes security validation) - Commit your changes (pre-commit hooks will run automatically)
- Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
✅ Complete - All core functionality implemented:
- Safe Account Management: Import Safe wallets and view account details
- Owner Key Management: Secure private key import with validation
- Transaction System: Send ETH transactions with confirmation dialogs
- Security Features: XOR encryption, input validation, error handling
- Professional UI/UX: Responsive design with smooth animations
- Quality Assurance: 279 tests, automated linting, and security checks
Future Enhancements: Multi-network support, transaction history, advanced Safe features
This project is licensed under the MIT License - see the LICENSE file for details.
For questions, issues, or contributions, please visit the GitHub repository.
- Safe Global for the Safe Protocol Kit
- Viem for Web3 functionality
- Shadcn UI for beautiful components
- Tailwind CSS for styling