Skip to content

feat(statics): scope CECHO-1941 batch tokens to BitGo Trust only - #9598

Merged
manojkumar138 merged 1 commit into
masterfrom
manojkumar138/cecho-1941-unsupported-bsc-arb-tokens-falls-under-top-1000-assets
Aug 31, 2026
Merged

manojkumar138 merged 1 commit into
masterfrom
manojkumar138/cecho-1941-unsupported-bsc-arb-tokens-falls-under-top-1000-assets

Conversation

@manojkumar138

Copy link
Copy Markdown
Contributor

Summary

  • Restricts custody support for the 54 tokens onboarded in feat(statics): onboard CECHO-1941 top-1000 unsupported tokens #9536 (42 BSC, 8 Base, 2 Arbitrum, 1 Polygon, 1 Tron) to the BitGo Trust legal entity only.
  • Adds *_TRUST_ONLY feature-set constants in coinFeatures.ts:
    • ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY
    • BSC_TOKEN_FEATURES_TRUST_ONLY
    • EVM_TOKEN_FEATURES_TRUST_ONLY (baseeth/arbeth)
    • POLYGON_TOKEN_FEATURES_TRUST_ONLY
    • These keep CoinFeature.CUSTODY_BITGO_TRUST but drop CUSTODY_BITGO_MENA_FZE, CUSTODY_BITGO_CUSTODY_MENA_FZE, CUSTODY_BITGO_SINGAPORE, CUSTODY_BITGO_EUROPE_APS, CUSTODY_BITGO_FRANKFURT, CUSTODY_BITGO_INDIA — the jurisdictions these tokens previously defaulted to.
  • Reassigns all 54 batch token definitions (bscTokens.ts, allCoinsAndTokens.ts, polygonTokens.ts) to the new trust-only constants.
  • Verified via a built copy of @bitgo/statics that each of the 54 tokens now carries only custody-bitgo-trust among the custody-entity features, with all other (non-custody) features unchanged.

Companion PR: prime-microservices — gatekeeps these tokens for every entity except BitGo Trust.

Ticket

CECHO-1941

Test plan

  • tsc --noEmit passes for modules/statics
  • Built statics confirms custody-bitgo-trust is the only custody-entity feature on all 54 tokens
  • CI passes

CECHO-1941 Restrict custody support for the 54 tokens onboarded in
BitGoJS#9536 (42 BSC, 8 Base, 2 Arbitrum, 1 Polygon, 1 Tron) to the
BitGo Trust legal entity only, per the ticket's instruction to keep
them gated for every other trust while risk assessment is pending.

Adds *_TRUST_ONLY feature-set constants (ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY,
BSC_TOKEN_FEATURES_TRUST_ONLY, EVM_TOKEN_FEATURES_TRUST_ONLY,
POLYGON_TOKEN_FEATURES_TRUST_ONLY) that keep CoinFeature.CUSTODY_BITGO_TRUST
but drop MENA_FZE/CUSTODY_MENA_FZE/SINGAPORE/EUROPE_APS/FRANKFURT/INDIA,
and reassigns all 54 batch token definitions to them.

Ticket: CECHO-1941
@manojkumar138
manojkumar138 requested a review from a team as a code owner August 31, 2026 06:51
@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

CECHO-1941

@manojkumar138
manojkumar138 marked this pull request as draft August 31, 2026 06:52
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Claude finished @manojkumar138's task —— View job


Code Review for CECHO-1941: Scope batch tokens to BitGo Trust only

Todo List:

  • Read repository guidelines from CLAUDE.md
  • Examine the 4 changed files to understand implementation
  • Review git diff to see exact changes
  • Analyze code for correctness and consistency
  • Provide comprehensive review feedback

Review Summary

This PR successfully implements custody restrictions for 54 batch tokens to BitGo Trust only. The implementation is well-structured, consistent, and correctly scoped.

✅ Positive Aspects

1. Clean Architecture & Consistency

  • Follows existing patterns for jurisdiction-specific feature sets
  • New *_TRUST_ONLY constants mirror the structure of existing *_EXCLUDE_* patterns
  • Consistent implementation across all token types (BSC, Base, Arbitrum, Polygon, Tron)

2. Correct Feature Set Logic (coinFeatures.ts:52-58)

export const ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY = ACCOUNT_COIN_DEFAULT_FEATURES.filter(
  (feature) => feature === CoinFeature.CUSTODY_BITGO_TRUST || !BITGO_CUSTODY_JURISDICTIONS.includes(feature)
);
  • Properly retains CUSTODY_BITGO_TRUST while filtering out other custody jurisdictions
  • Preserves all non-custody features (account model, transaction data, etc.)
  • The logic is bulletproof: keeps Trust OR non-custody features

3. Comprehensive Coverage

  • All 54 tokens properly updated across 4 files
  • Each token type gets its appropriate trust-only feature set:
    • BSC tokens: BSC_TOKEN_FEATURES_TRUST_ONLY (includes bulk transactions + TSS features)
    • Base/Arbitrum tokens: EVM_TOKEN_FEATURES_TRUST_ONLY (includes EIP1559)
    • Polygon tokens: POLYGON_TOKEN_FEATURES_TRUST_ONLY (includes bulk transactions)
    • Tron tokens: ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY

4. Maintainable Code

  • Clear, descriptive constant names
  • Good code comments explaining the purpose
  • Follows existing codebase conventions

🔍 Technical Correctness

Feature Set Validation:

  • ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY correctly filters custody jurisdictions
  • EVM_TOKEN_FEATURES_TRUST_ONLY properly adds EIP1559 to the trust-only base
  • BSC_TOKEN_FEATURES_TRUST_ONLY includes BSC-specific features (bulk transactions, TSS)
  • POLYGON_TOKEN_FEATURES_TRUST_ONLY includes Polygon-specific features (bulk transactions)

Implementation Coverage:

  • ✅ All 42 BSC tokens updated in bscTokens.ts
  • ✅ All 8 Base + 2 Arbitrum tokens updated in allCoinsAndTokens.ts
  • ✅ 1 Polygon token updated in polygonTokens.ts
  • ✅ 1 Tron token updated in allCoinsAndTokens.ts

📝 Minor Suggestions

1. Documentation Enhancement
Consider adding a brief comment above each new constant explaining the specific use case:

// Used for tokens onboarded in CECHO-1941 that should only be available via BitGo Trust
export const BSC_TOKEN_FEATURES_TRUST_ONLY = [...]

2. Verification Script Consideration
The manual verification approach is solid, but consider adding a test case to ensure these 54 specific tokens maintain trust-only custody in the future.

🎯 Business Logic Alignment

The implementation perfectly aligns with the stated goals:

  • ✅ Restricts custody to BitGo Trust only for the 54 specified tokens
  • ✅ Maintains all other non-custody features
  • ✅ Follows established patterns for jurisdiction-specific restrictions
  • ✅ Ensures consistency across different blockchain networks

🏆 Overall Assessment

Excellent implementation - this PR demonstrates:

  • Strong understanding of the codebase architecture
  • Careful attention to feature set composition
  • Consistent application across multiple token types
  • Clean, maintainable code that follows established patterns

The code is production-ready and the approach ensures these tokens will be properly restricted to BitGo Trust custody while maintaining all their other operational capabilities.


Branch: manojkumar138/cecho-1941-unsupported-bsc-arb-tokens-falls-under-top-1000-assets
Job: View run details

@manojkumar138
manojkumar138 marked this pull request as ready for review August 31, 2026 07:23
@manojkumar138
manojkumar138 merged commit 0a41e1b into master Aug 31, 2026
25 checks passed
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.

2 participants