Thank you for your interest in contributing to OpenScan! This guide will help you get started.
- Bun v1.1.0 or later
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/openscan.git cd openscan - Install dependencies:
bun install
- Start the development server:
The app will be available at http://localhost:3030
npm start
Create feature branches from dev using descriptive names:
feature/add-new-network- New featuresfix/transaction-display- Bug fixesdocs/update-readme- Documentation changesrefactor/data-service- Code refactoring
git checkout dev
git pull origin dev
git checkout -b feature/your-feature-nameBefore submitting a pull request, you must run these commands and ensure they pass:
# Fix formatting issues
npm run format:fix
# Fix linting issues
npm run lint:fix
# Verify type safety
npm run typecheck
# Run tests
npm run test:runAll code must:
- Pass Biome formatting and linting checks
- Pass TypeScript type checking with zero errors
- Follow the 100-character line width limit
- Use 2-space indentation consistently
We follow Conventional Commits v1.0.0.
<type>: <description>
[optional body]
[optional footer(s)]
feat: A new featurefix: A bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic change)refactor: Code refactoring (no feature or bug fix)test: Adding or updating testschore: Maintenance tasks
feat: add support for Polygon zkEVM network
fix: correct gas estimation for L2 transactions
docs: update network configuration instructions
refactor: extract common adapter logic to base class
- Target Branch: All PRs should target the
devbranch - Title: Use a clear, descriptive title following commit conventions
- Description: Explain what changed and why
- Link Issues: Reference any related issues (e.g., "Closes #123")
- CI Checks: Ensure all CI checks pass before requesting review
When you open a PR, a template will be provided automatically. Please fill it out completely.
OpenScan follows a layered architecture. For detailed information, see CLAUDE.md.
- Fetcher Layer: Makes raw RPC calls to blockchain nodes
- Adapter Layer: Transforms RPC responses into typed domain objects
- Service Layer: Orchestrates data fetching with caching
When modifying data fetching:
- Maintain the adapter pattern
- Test both
fallbackandparallelRPC strategies - Update TypeScript types in
src/types/index.tsif adding new fields
- Add chain ID to
src/types/index.tsif creating new domain types - Add default RPC endpoints to
src/config/rpcConfig.ts - Determine if network needs custom fetchers/adapters
- If custom: create
src/services/EVM/[Network]/fetchers/andadapters/ - Update
DataServiceconstructor to detect chain ID - Add network config to
ALL_NETWORKSinsrc/config/networks.ts - Add network logo to
public/and updatelogoTypein network config
- Formatter/Linter: Biome (see
biome.json) - Line Width: 100 characters
- Indentation: 2 spaces
- TypeScript: Strict mode enabled
- CSS: Place styles in
src/styles/, avoid inline styles
For development with local blockchain networks:
npm run devThis starts a Hardhat node with sample contracts and OpenScan pointing to it.
If you have questions or need help, feel free to open an issue on GitHub.