Skip to content

Conversation

@MantisClone
Copy link
Member

@MantisClone MantisClone commented Jan 22, 2026

Problem

README and CONTRIBUTING.md have incomplete/incorrect token structure documentation:

  • Missing required fields: id, network, type, hash
  • Included non-existent field: logoURI
  • No explanation of field meanings or valid values

Fixes #7

Proposed Solution

Updated both README.md and CONTRIBUTING.md with:

  • Complete token structure example using real USDC token
  • Field descriptions table explaining each field
  • Links to SDK source code for supported network and type values
  • Documentation for hash field (same as address for ERC20, calculated for native tokens)

Considerations

  • Used USDC as the example token since it's widely recognized
  • Linked to SDK source rather than duplicating the lists (stays in sync automatically)
  • The Gitbook documentation update mentioned in the issue is out of scope for this PR

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Enhanced contribution guidelines with detailed token schema, field descriptions, and supported networks/types references
    • Updated README example with USDC token and clarified token structure requirements

✏️ Tip: You can customize this high-level summary in your review settings.

- Add missing fields: id, network, type, hash
- Remove non-existent logoURI field
- Add field descriptions table
- Link to SDK source for supported networks and types

Fixes #7

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Walkthrough

Documentation updates to clarify token schema requirements and supported configuration options. CONTRIBUTING.md expanded with field descriptions, supported networks, and currency types guidance. README.md updated with realistic USDC token example and link to contribution guidelines.

Changes

Cohort / File(s) Summary
Documentation Enhancements
CONTRIBUTING.md
Replaced minimal token JSON example with comprehensive schema including id, network, type, hash, and address. Added Field Descriptions table documenting all token properties. Introduced Supported Networks and Supported Currency Types sections with references to source files. Expanded Pull Request Process instructions with README update requirement and maintainer sign-off emphasis.
README Example Update
README.md
Replaced TKN-mainnet sample with realistic USDC-mainnet token object. Updated values: name to "USD Coin", symbol to "USDC", decimals to 6, address to actual USDC address. Added network, type, and hash fields. Removed logoURI. Added hyperlink to CONTRIBUTING.md.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: Fix token structure documentation' is related to the changeset but uses 'fix' prefix when documentation changes are typically labeled as 'docs'. The title is partially accurate but not optimally clear.
Linked Issues check ✅ Passed The PR addresses all coding requirements from issue #7: clarifying hash field behavior, documenting network and type fields, and providing links to SDK source code for valid values in both README and CONTRIBUTING.
Out of Scope Changes check ✅ Passed All changes are within scope. The PR updates README.md and CONTRIBUTING.md as required by issue #7, with the Gitbook documentation update correctly noted as out of scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MantisClone MantisClone self-assigned this Jan 22, 2026
@MantisClone MantisClone changed the title docs: Fix token structure documentation fix: Fix token structure documentation Jan 22, 2026
@greptile-apps
Copy link

greptile-apps bot commented Jan 22, 2026

Greptile Summary

This PR fixes incomplete and inaccurate token structure documentation in README.md and CONTRIBUTING.md. The updates add all previously missing required fields (id, network, type, hash) and remove the non-existent logoURI field. The documentation now includes a comprehensive field descriptions table and links to the SDK source code for supported network and currency type values. The example was updated to use real USDC token data for clarity.

Key improvements:

  • Added complete token structure with all 9 required fields
  • Provided field descriptions table explaining each field's purpose
  • Linked to SDK source code for supported network and type values
  • Documented hash field behavior (same as address for ERC20, calculated for native tokens)
  • Used real USDC token as example instead of placeholder data

Confidence Score: 5/5

  • This PR is safe to merge with no risk - it only updates documentation
  • This is a documentation-only PR that fixes inaccuracies and adds missing information. All changes are accurate based on verification against the actual token list structure and existing tokens in the repository. No code changes are involved.
  • No files require special attention

Important Files Changed

Filename Overview
CONTRIBUTING.md Added comprehensive token structure documentation with field descriptions, supported networks, and currency types
README.md Updated token structure example to use real USDC data and reference CONTRIBUTING.md for detailed field descriptions

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Docs as Documentation
    participant Repo as Token List Repo
    participant SDK as Request Network SDK

    Note over Dev,SDK: Documentation Fix Process

    Dev->>Docs: Identifies incomplete token structure
    Note over Docs: Missing: id, network, type, hash<br/>Incorrect: logoURI field

    Dev->>Repo: Reads actual token-list.json
    Repo-->>Dev: Returns real USDC token structure
    Note over Dev: Verifies all 9 required fields

    Dev->>SDK: References currency-types.ts
    SDK-->>Dev: Supported network values
    
    Dev->>SDK: References request-logic-types.ts
    SDK-->>Dev: Supported currency type values

    Dev->>SDK: References getHash.ts
    SDK-->>Dev: Hash calculation for native tokens

    Dev->>Docs: Updates README.md
    Note over Docs: Adds complete USDC example<br/>Links to CONTRIBUTING.md

    Dev->>Docs: Updates CONTRIBUTING.md
    Note over Docs: Adds field descriptions table<br/>Documents supported values<br/>Links to SDK source

    Docs-->>Dev: Complete & accurate documentation
Loading

@MantisClone MantisClone merged commit 20d0eb9 into main Jan 22, 2026
6 of 7 checks passed
@MantisClone MantisClone deleted the chore/fix-token-documentation branch January 22, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix errors in README and Documentation for adding a new token

2 participants