CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.Project Overview
This is the documentation repository for Cosmos EVM, built with Mintlify. The repository contains comprehensive documentation for the Cosmos EVM implementation, including API references, integration guides, smart contract documentation, and precompile specifications.Common Development Commands
Local Development
Documentation Generation Scripts
Testing Precompiles
Architecture & Structure
Documentation Organization
The documentation follows a hierarchical structure configured indocs.json:
-
docs/documentation/ - Main documentation content
concepts/- Core concepts (accounts, gas, transactions, IBC)cosmos-sdk/- SDK modules and protocol detailssmart-contracts/- Precompiles and predeployed contractsintegration/- Integration guides and migration docsgetting-started/- Quick start guides and tooling
-
docs/api-reference/ - API documentation
ethereum-json-rpc/- RPC methods, OpenAPI spec, and explorer
- docs/changelog/ - Release notes auto-synced from cosmos/evm
Key Technical Components
-
Mintlify Framework: Documentation uses Mintlify v4.2.7 with custom MDX components and interactive features. Configuration in
docs.jsoncontrols navigation, theming, and search. -
Script Automation: Scripts in
/scriptsand/scripts/versioninghandle:- Unified changelog management for all products (evm, sdk, ibc, hub) with version-specific filtering
- Version freezing and Google Sheets integration for EIP data snapshots
- Creating interactive RPC documentation from methods.mdx
- Generating OpenAPI specifications for API testing
-
Precompile Testing: Comprehensive test suite in
/testsvalidates all precompile contracts against documentation, tracking implementation completeness and gas costs. -
Component Library: Custom JSX components in
/snippetsprovide:- EIP compatibility tables
- RPC method viewers
- Icon libraries
- Reusable UI elements
Documentation Workflow
When updating documentation:- Edit MDX files in appropriate section under
docs/ - Run
npx mint devto preview changes locally - Validate with
npx mint broken-linksbefore committing - For RPC changes: regenerate docs with
node scripts/generate-evm-rpc-docs.js - For release notes: use
cd scripts/versioning && npm run changelogs -- --product <product> --target <version>to update changelogs - For version freezing: use
cd scripts/versioning && npm run freezeto create versioned snapshots
Integration Points
- GitHub Actions: Automated changelog sync workflow triggers
manage-changelogs.json new releases - Multi-Product Changelogs: Release notes pulled from configured repositories (cosmos/evm, cosmos/cosmos-sdk, cosmos/ibc-go, cosmos/gaia)
- Version-Specific Filtering: Automatically filters changelog versions based on target directory (e.g., v0.5.0 directory only shows v0.5.x releases)
- Google Sheets Integration: EIP compatibility data versioned through Google Sheets tabs (EVM only)
- Precompile Addresses: Fixed addresses documented in tests/README.md
- Network Endpoints: Configure in tests/config.js for testing
Important Notes
- All documentation files use MDX format with Mintlify-specific components
- Navigation structure must be updated in
docs.jsonwhen adding new pages - Interactive RPC documentation is generated from the source
methods.mdxfile - Test findings in
tests/README.mdtrack documentation accuracy against implementation - Use relative imports for snippets and components (e.g.,
/snippets/icons.mdx)