Thank you for your interest in contributing to Chain Derby! This tool demonstrates relative transaction latency across EVM-compatible blockchain networks.
-
clone the repository
git clone https://github.com/YourUsername/horse-race.git cd horse-race/packages/app -
Install dependencies and start
npm install npm run dev
-
Open
http://localhost:3000
If your chain is already supported by viem/chains, follow these steps:
Step 1: Import the chain in src/chain/networks.ts:
import { newChain } from "viem/chains";Step 2: Create the chain configuration:
export const newChainConfig = {
...newChain,
testnet: true, // or false for mainnet
color: "#FF6B35", // Brand color for UI
logo: "/logos/newchain.png",
faucetUrl: "https://faucet.newchain.testnet", // For testnets only
} as const as ChainConfig;Step 3: Add to raceChains array:
export const raceChains = [
// ... existing chains
newChainConfig,
];Step 4: Add chain logo to public/logos/newchain.png (32x32px recommended)
If your chain isn't in viem yet, define it manually:
Step 1: Define the full chain configuration in src/chain/networks.ts:
export const customChain = {
id: 12345,
name: "Custom Chain",
nativeCurrency: {
name: "Custom Token",
symbol: "CUSTOM",
decimals: 18
},
rpcUrls: {
default: { http: ["https://rpc.customchain.network"] },
public: { http: ["https://rpc.customchain.network"] },
},
blockExplorers: {
default: {
name: "Custom Explorer",
url: "https://explorer.customchain.network"
},
},
// Chain Derby properties:
testnet: true,
color: "#FF6B35",
logo: "/logos/custom.png",
faucetUrl: "https://faucet.customchain.network",
} as const as ChainConfig;Step 2: Add to raceChains array and add the logo as above.
Bonus: Consider contributing the chain definition to viem/chains to help the broader ecosystem!
- Better responsive design
- Improved animations
- Accessibility enhancements
- Dark mode optimizations
- Export race results
- Historical data tracking
- Custom RPC endpoints
- Performance analytics
- Mobile layout issues
- Performance optimizations
- Color compatibility (OKLCH)
- Cross-browser compatibility
- Create a feature branch:
git checkout -b feature/chain-name - Test your changes: Ensure app builds and functions work
- Follow code style: TypeScript strict mode, Tailwind CSS
- Submit PR with clear description and screenshots
- App builds without errors (
npm run build) - Responsive design maintained
- Dark mode compatibility
- Chain logo included (for new chains)
- File structure: Main chain configs in
src/chain/networks.ts - Styling: Tailwind CSS with dark mode support
- Components: React functional components with TypeScript
- Testing: Test locally with different chains and screen sizes
- Testnet first: Prioritize testnet implementations for safety
- No private keys: Never commit sensitive data
- Performance: Test with multiple chains to ensure smooth experience
For questions, open an issue or check existing discussions. Thanks for contributing!