From 6ad4eccca5442114c7b306e1f74ce5dd5e51af92 Mon Sep 17 00:00:00 2001 From: MantisClone Date: Thu, 22 Jan 2026 15:03:30 -0500 Subject: [PATCH] docs: Fix token structure documentation - 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 --- CONTRIBUTING.md | 43 +++++++++++++++++++++++++++++++++++++------ README.md | 18 +++++++++++------- 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aaf52ef..99f9471 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,15 +35,46 @@ To add a token to the list, ensure it meets the following criteria: ```json { - "name": "Token Name", - "address": "0x...", - "symbol": "TKN", - "decimals": 18, - "chainId": 1, - "logoURI": "https://..." + "id": "USDC-mainnet", + "name": "USD Coin", + "symbol": "USDC", + "decimals": 6, + "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "network": "mainnet", + "type": "ERC20", + "hash": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "chainId": 1 } ``` +#### Field Descriptions + +| Field | Description | +|-------|-------------| +| `id` | Unique identifier, typically `SYMBOL-network` (e.g., `USDC-mainnet`) | +| `name` | Human-readable token name | +| `symbol` | Token symbol | +| `decimals` | Number of decimal places | +| `address` | Token contract address | +| `network` | Network name (see supported networks below) | +| `type` | Currency type (see supported types below) | +| `hash` | For ERC20 tokens, same as `address`. For native tokens, see [hash calculation](https://github.com/RequestNetwork/requestNetwork/blob/master/packages/currency/src/getHash.ts) | +| `chainId` | Chain ID of the network | + +#### Supported Networks + +The full list of supported networks can be found in the SDK source code: +https://github.com/RequestNetwork/requestNetwork/blob/master/packages/types/src/currency-types.ts + +Common networks: `mainnet`, `sepolia`, `matic`, `bsc`, `xdai`, `avalanche`, `optimism`, `arbitrum-one`, `base`, `zksyncera` + +#### Supported Currency Types + +The full list of currency types can be found in the SDK source code: +https://github.com/RequestNetwork/requestNetwork/blob/master/packages/types/src/request-logic-types.ts + +Common types: `ERC20`, `ETH`, `ISO4217` (fiat currencies) + ## Pull Request Process 1. Ensure your PR includes all required token information diff --git a/README.md b/README.md index e53fd97..22b80dd 100644 --- a/README.md +++ b/README.md @@ -46,16 +46,20 @@ Each token in the list contains the following information: ```json { - "id": "TKN-mainnet", - "name": "Token Name", - "address": "0x...", - "symbol": "TKN", - "decimals": 18, - "chainId": 1, - "logoURI": "https://..." + "id": "USDC-mainnet", + "name": "USD Coin", + "symbol": "USDC", + "decimals": 6, + "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "network": "mainnet", + "type": "ERC20", + "hash": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "chainId": 1 } ``` +See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed field descriptions and supported values. + ## Adding a New Token We welcome community contributions! To add a new token to the list: