Skip to content

feat(statics): gate Ondo tokens for Singapore trust - #9527

Merged
manojkumar138 merged 1 commit into
masterfrom
manojkumar138/cecho-1893-gatekeep-ondo-tokens-sg-trust
Aug 19, 2026
Merged

feat(statics): gate Ondo tokens for Singapore trust#9527
manojkumar138 merged 1 commit into
masterfrom
manojkumar138/cecho-1893-gatekeep-ondo-tokens-sg-trust

Conversation

@manojkumar138

Copy link
Copy Markdown
Contributor

Summary

CECHO-1893's follow-up note asks to gate Ondo tokens for SG trust. Excludes CoinFeature.CUSTODY_BITGO_SINGAPORE for exactly the tokens listed in CSHLD-1206 and CSHLD-1241:

  • ETH (105 tokens, e.g. eth:aaplon, eth:qqqon, eth:tslaon): added a new ERC20_TOKEN_FEATURES_EXCLUDE_SINGAPORE constant (matches the erc20() factory's default features + BULK_TRANSACTION, minus Singapore) since these previously passed no explicit features arg at all.
  • BSC (140 tokens across the ungated and gated/test sections, e.g. bsc:aaplon, bsc:tbaiontesting): swapped BSC_TOKEN_FEATURES for the existing BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE constant.
  • SOL (sol:shvon, sol:tshvontesting): swapped SOL_TOKEN_FEATURES for the existing SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE constant.

Other pre-existing Ondo tokens not listed in either ticket are left untouched (verified by cross-referencing the exact symbol/contract-address tables in both tickets against the codebase).

Ticket

CECHO-1893

Test plan

  • tsc --noEmit, eslint, prettier --check all pass
  • CI passes

CECHO-1893's follow-up note asks to gate Ondo tokens for SG trust,
per CSHLD-1206 (Ondo tokens onboarded on BSC) and CSHLD-1241 (Ondo
tokenized-stock tokens on ETH). Excludes CoinFeature.CUSTODY_BITGO_SINGAPORE
for exactly the tokens listed in those two tickets:

- ETH (105 tokens, e.g. eth:aaplon, eth:qqqon, eth:tslaon): added a
  new ERC20_TOKEN_FEATURES_EXCLUDE_SINGAPORE constant (matches the
  erc20() factory's default features + BULK_TRANSACTION, minus
  Singapore) since these previously passed no explicit features arg
  at all.
- BSC (140 tokens across the ungated and gated/test sections, e.g.
  bsc:aaplon, bsc:tbaiontesting): swapped BSC_TOKEN_FEATURES for the
  existing BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE constant.
- SOL (sol:shvon, sol:tshvontesting): swapped SOL_TOKEN_FEATURES for
  the existing SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE constant.

Other pre-existing Ondo tokens not listed in either ticket are left
untouched.

Ticket: CECHO-1893
@manojkumar138
manojkumar138 requested a review from a team as a code owner August 19, 2026 09:35
@linear-code

linear-code Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

CECHO-1893

@manojkumar138
manojkumar138 marked this pull request as draft August 19, 2026 09:41
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Claude finished @manojkumar138's task —— View job


Code Review Complete ✅

  • Analyze PR changes and requirements
  • Review coinFeatures.ts modifications
  • Review erc20Coins.ts changes (108 tokens)
  • Review bscTokens.ts changes (140 tokens)
  • Review solTokens.ts changes (2 tokens)
  • Verify consistency across changes
  • Check for potential issues and improvements
  • Provide comprehensive review feedback

Review Summary

This PR successfully implements Singapore custody gating for Ondo tokens across ETH, BSC, and SOL networks as requested in CECHO-1893. The implementation is clean, consistent, and follows established patterns in the codebase.

Strengths

  1. Consistent Implementation: All changes follow the same pattern using existing *_EXCLUDE_SINGAPORE feature constants
  2. Proper Abstraction: New ERC20_TOKEN_FEATURES_EXCLUDE_SINGAPORE constant matches the established pattern and avoids code duplication
  3. Accurate Token Count:
    • ETH: 108 tokens (slightly more than the stated 105, likely due to recent additions)
    • BSC: 140 tokens (matches description)
    • SOL: 2 tokens (matches description)
  4. Clean Architecture: Leverages existing filter-based approach rather than creating new feature sets
  5. Minimal Scope: Only touches Ondo-specific tokens, leaving other tokens unchanged

🔍 Technical Details

File: modules/statics/src/coinFeatures.ts (+4 lines)

  • Addition: New ERC20_TOKEN_FEATURES_EXCLUDE_SINGAPORE constant
  • Structure: ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_SINGAPORE + BULK_TRANSACTION
  • Consistency: Matches existing pattern used by BSC and SOL equivalents

File: modules/statics/src/coins/erc20Coins.ts (+211/-105 lines)

  • Pattern: Converting from erc20() factory with default features to explicit ERC20_TOKEN_FEATURES_EXCLUDE_SINGAPORE
  • Scope: All Ondo tokens listed in CSHLD-1206 and CSHLD-1241 tickets
  • Approach: Previously these tokens had no explicit features parameter, now they explicitly exclude Singapore

File: modules/statics/src/coins/bscTokens.ts (+140/-140 lines)

  • Pattern: Replacing BSC_TOKEN_FEATURESBSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE
  • Scope: All 140 Ondo tokens across ungated and gated/test sections

File: modules/statics/src/coins/solTokens.ts (+2/-2 lines)

  • Pattern: Replacing SOL_TOKEN_FEATURESSOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE
  • Scope: sol:shvon and sol:tshvontesting tokens

⚠️ Minor Observations

  1. Token Count Discrepancy: ETH shows 108 tokens vs stated 105. This is likely due to recent token additions and is not concerning.

  2. No Breaking Changes: The implementation preserves all existing functionality while only removing Singapore custody support for specified tokens.

🎯 Verification

The changes correctly align with the requirements:

  • ✅ Excludes CoinFeature.CUSTODY_BITGO_SINGAPORE for Ondo tokens
  • ✅ Uses existing feature constants where available
  • ✅ Creates appropriate new constants following established patterns
  • ✅ Maintains all other token functionality
  • ✅ Preserves existing non-Ondo tokens unchanged

📋 Recommendation

APPROVE - This is a well-implemented, targeted change that successfully gates Singapore custody for Ondo tokens while maintaining code quality and consistency. The implementation follows established patterns and contains no apparent issues.

The only remaining item is CI verification, which should pass given the minimal and targeted nature of these changes.


Job Run: Link

@manojkumar138

Copy link
Copy Markdown
Contributor Author

Re: the token-count note in the Claude review — verified directly with grep -c against the source: exactly 105 ERC20 tokens use ERC20_TOKEN_FEATURES_EXCLUDE_SINGAPORE (108 was a miscount), 140 BSC tokens use BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE, and 2 SOL tokens use SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE — matching the CSHLD-1206 and CSHLD-1241 ticket tables exactly, cross-referenced by contract address/symbol before editing. No change needed there.

The unit-test (22.x) CI failure is an unrelated infra flake — a native-module SIGSEGV crash inside @bitgo/sdk-core's test run (a package untouched by this PR). @bitgo/statics itself reports 34637 passing in the same job log. Re-running once the workflow finishes.

@manojkumar138
manojkumar138 marked this pull request as ready for review August 19, 2026 10:06
@manojkumar138
manojkumar138 merged commit c258e56 into master Aug 19, 2026
38 of 40 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.

3 participants