Documentation Index
Fetch the complete documentation index at: https://kleros-mintlify-changelog-2026-05-12-1778458371.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Code Style & Guidelines
Coding conventions for contributing to Kleros repositories.Git
Commit Messages
Follow Conventional Commits:feat, fix, docs, chore, test, refactor, style, perf, ci, build
The kleros-v2 monorepo enforces this with commitlint and Commitizen.
Branch Naming
Use descriptive branch names prefixed with the type:Solidity
Version
Kleros V2 contracts use Solidity0.8.24. Pin the version in the pragma:
Formatting
Kleros repos use Prettier with the Solidity plugin. Configuration is in the repo root.Conventions
- Use NatSpec comments (
///or/** */) for all public and external functions - Group contract sections with comment headers:
- Use
custom:oz-upgrades-unsafe-allow constructorannotation for UUPS proxiable contracts - Use
reinitializer(n)pattern for upgradeable contract initialization - Prefer explicit visibility (
public,external,internal,private) - Use
requirewith error messages or custom errors
Proxy Pattern
V2 contracts use the UUPS proxy pattern. Implementation contracts inherit fromUUPSProxiable and Initializable:
Web Languages (TypeScript/React)
Formatting
- Prettier for formatting (config in repo root)
- ESLint for linting (config in
.eslintrcoreslint-config/package)
Conventions
- TypeScript strict mode
- React functional components with hooks
- File naming:
kebab-casefor files,PascalCasefor components - Use the
kleros-appshared library for common React hooks and utilities - Generated code (e.g., contract type bindings) goes in
src/hooks/contracts/generated.ts