Skip to content

Commit 20d0eb9

Browse files
MantisCloneclaude
andauthored
fix: Fix token structure documentation (#26)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4a6d1c6 commit 20d0eb9

2 files changed

Lines changed: 48 additions & 13 deletions

File tree

CONTRIBUTING.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,46 @@ To add a token to the list, ensure it meets the following criteria:
3535

3636
```json
3737
{
38-
"name": "Token Name",
39-
"address": "0x...",
40-
"symbol": "TKN",
41-
"decimals": 18,
42-
"chainId": 1,
43-
"logoURI": "https://..."
38+
"id": "USDC-mainnet",
39+
"name": "USD Coin",
40+
"symbol": "USDC",
41+
"decimals": 6,
42+
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
43+
"network": "mainnet",
44+
"type": "ERC20",
45+
"hash": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
46+
"chainId": 1
4447
}
4548
```
4649

50+
#### Field Descriptions
51+
52+
| Field | Description |
53+
|-------|-------------|
54+
| `id` | Unique identifier, typically `SYMBOL-network` (e.g., `USDC-mainnet`) |
55+
| `name` | Human-readable token name |
56+
| `symbol` | Token symbol |
57+
| `decimals` | Number of decimal places |
58+
| `address` | Token contract address |
59+
| `network` | Network name (see supported networks below) |
60+
| `type` | Currency type (see supported types below) |
61+
| `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) |
62+
| `chainId` | Chain ID of the network |
63+
64+
#### Supported Networks
65+
66+
The full list of supported networks can be found in the SDK source code:
67+
https://github.com/RequestNetwork/requestNetwork/blob/master/packages/types/src/currency-types.ts
68+
69+
Common networks: `mainnet`, `sepolia`, `matic`, `bsc`, `xdai`, `avalanche`, `optimism`, `arbitrum-one`, `base`, `zksyncera`
70+
71+
#### Supported Currency Types
72+
73+
The full list of currency types can be found in the SDK source code:
74+
https://github.com/RequestNetwork/requestNetwork/blob/master/packages/types/src/request-logic-types.ts
75+
76+
Common types: `ERC20`, `ETH`, `ISO4217` (fiat currencies)
77+
4778
## Pull Request Process
4879

4980
1. Ensure your PR includes all required token information

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,20 @@ Each token in the list contains the following information:
4646

4747
```json
4848
{
49-
"id": "TKN-mainnet",
50-
"name": "Token Name",
51-
"address": "0x...",
52-
"symbol": "TKN",
53-
"decimals": 18,
54-
"chainId": 1,
55-
"logoURI": "https://..."
49+
"id": "USDC-mainnet",
50+
"name": "USD Coin",
51+
"symbol": "USDC",
52+
"decimals": 6,
53+
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
54+
"network": "mainnet",
55+
"type": "ERC20",
56+
"hash": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
57+
"chainId": 1
5658
}
5759
```
5860

61+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed field descriptions and supported values.
62+
5963
## Adding a New Token
6064

6165
We welcome community contributions! To add a new token to the list:

0 commit comments

Comments
 (0)