Conversation
WalkthroughVersion bump from 4 to 5 and addition of two TRC20 Tron tokens (USDT-tron, USDC-tron); schema, types, and validation updated to recognize the Tron network and TRC20 token type. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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. Comment |
Greptile OverviewGreptile SummaryThis PR appends two TRON stablecoin entries (USDT and USDC) to However, the repository’s current token-list schema and CI validation logic appear to only support EVM-style networks/tokens (plus ISO4217 fiat). The new tokens introduce Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Contributor
participant TokenList as tokens/token-list.json
participant CI as GitHub Actions (pr.yml)
participant Validator as src/validation/validate.ts
participant Schema as src/schemas/token-list-schema.json
participant Types as src/types/index.ts
Dev->>TokenList: Add USDT-tron + USDC-tron entries
CI->>Validator: Run npm run validate
Validator->>Schema: AJV compile + validate(tokenList)
Schema-->>Validator: Reject (network/type enums)
Validator-->>CI: Exit 1 (schema errors)
CI-->>Dev: Checks fail
note over Validator,Types: Even if schema updated,
Validator->>Types: isValidNetwork / isValidTokenType / CHAIN_IDS lookup
Types-->>Validator: No tron/TRC20/chainId mapping
Validator->>Validator: ethers.isAddress(TRON base58)
Validator-->>CI: Exit 1 (token validation)
|
| "id": "USDT-tron", | ||
| "name": "Tether USD", | ||
| "symbol": "USDT", | ||
| "decimals": 6, |
There was a problem hiding this comment.
Fails existing validation
These new entries won’t pass the repo’s current validation rules: network: "tron" and type: "TRC20" are not in the allowed enums in src/schemas/token-list-schema.json (and also not in NetworkType/TokenType in src/types/index.ts). Additionally, TRON base58 addresses like TR7NH.../TEkx... will fail ethers.isAddress() in src/validation/validate.ts, and chainId: 728126428 won’t match any CHAIN_IDS mapping. As-is, CI validation should fail until TRON/TRC20 support is added to the schema/types/validator (or the entries are adapted to the currently supported networks/types).
Summary by CodeRabbit