Thank you for your interest in contributing to the Ethereum Validator Cost Calculator! This guide will help you get started.
- Node.js 18+ or Node.js 20+
- npm or yarn
- Git
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/validatorcosts.git
cd validatorcosts- Install dependencies:
npm install- Start development server:
npm run develop- Create a new branch:
git checkout -b feature/your-feature-name- Make your changes
- Test your changes:
npm run type-check # TypeScript validation
npm run build # Production build test- Commit with clear messages:
git commit -m "Add feature: description of changes"- TypeScript: Strict mode enabled, use proper types
- React: Functional components with hooks
- Tailwind: Use utility classes, follow existing patterns
- Formatting: Consistent with existing code style
src/
├── components/ # Reusable React components
├── pages/ # Gatsby pages
├── services/ # Business logic and API calls
├── types/ # TypeScript type definitions
└── styles/ # Global styles (Tailwind)
- Additional staking platforms
- More accurate cost models
- Performance optimizations
- Mobile UX improvements
- Internationalization (i18n)
- Historical data visualization
- Export features (PDF, CSV)
- Accessibility improvements
- Multi-validator calculator
- MEV-Boost revenue estimation
- Geographic cost database
- Cloud hosting cost comparison
- Slashing risk calculator
- Update README.md if you change functionality
- Add your changes to CHANGELOG.md (if exists)
- Ensure all tests pass
- Update documentation as needed
- Submit PR with clear description
- Title: Clear, concise description
- Description: What, why, and how
- Screenshots: For UI changes
- Testing: Describe how you tested
- Breaking Changes: Clearly marked
To add a new platform, edit src/services/calculatorService.ts:
export function getStakingPlatforms(): StakingPlatform[] {
return [
// ... existing platforms
{
name: 'Platform Name',
feePercentage: 5, // Platform fee percentage
minimumStake: 0.01, // Minimum stake in ETH
hasLiquidityToken: true, // Whether they offer LST
liquidityTokenName: 'pETH', // LST token name
description: 'Platform description for users',
},
];
}Edit src/pages/index.tsx:
const [soloParams, setSoloParams] = useState<SoloValidatorParams>({
hardwareCost: 1500,
internetCost: 10,
setupTime: 4,
maintenanceHours: 1,
// ... other params
});- Calculator loads and displays data
- Real-time API calls work
- All input fields update correctly
- Results recalculate properly
- Dark/light mode works
- Responsive on mobile
- No console errors
- Build completes successfully
Test in:
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Mobile browsers
When filing a bug report, include:
- Description: Clear description of the issue
- Steps to Reproduce: Numbered steps
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Screenshots: If applicable
- Environment:
- Browser & version
- OS
- Device (if mobile)
Include:
- Use Case: Why is this needed?
- Proposed Solution: How should it work?
- Alternatives: Other approaches considered
- Additional Context: Any other relevant info
- Be respectful and inclusive
- Accept constructive criticism
- Focus on what's best for the community
- Show empathy towards others
- Harassment or discriminatory language
- Trolling or insulting comments
- Personal or political attacks
- Publishing others' private information
- Open an issue for discussion
- Join the EthStaker community
- Check existing issues and PRs first
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to the Ethereum community! 🚀