Repository navigation
feat(statics): onboard CECHO-2732 mon:usdt0 and eth:stampx #10181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,6 +54,7 @@ import { | |
| SOL_OFC_TOKEN_FEATURES, | ||
| APT_OFC_TOKEN_FEATURES, | ||
| ACCOUNT_COIN_DEFAULT_FEATURES, | ||
| ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY, | ||
| } from '../coinFeatures'; | ||
|
|
||
| export const ofcCoins = [ | ||
|
|
@@ -4997,6 +4998,13 @@ export const ofcCoins = [ | |
| undefined, | ||
| [CoinFeature.STABLECOIN] | ||
| ), | ||
| tofcHederaToken( | ||
| '2341e390-b6a2-4b04-a2ad-ca5d0bd1b10c', // CECHO-2732 | ||
| 'ofcthbar:fly', | ||
| 'Fluency (Testnet)', | ||
| 18, | ||
| UnderlyingAsset['thbar:fly'] | ||
| ), | ||
|
|
||
| ofcStellarToken( | ||
| 'fd90a80b-d615-434e-9821-1ef179a06071', | ||
|
|
@@ -5049,11 +5057,13 @@ export const ofcCoins = [ | |
| ), | ||
|
|
||
| ofcStellarToken( | ||
| 'bebecdfe-0a09-4e43-be91-62afdbe2ce49', | ||
| 'ofcxlm:btgo', | ||
| 'BTGO', | ||
| '8ad91a65-6cc9-443f-8e88-23afc0404b03', // CECHO-2732 | ||
| 'ofcxlm:SPXU-GDJBVX3QA5HJPBSAU5VIX2W6MC37NU4UFXPKEGK42SJCYN6AEQ4Z6COM', | ||
| 'WisdomTree 500 Digital Fund', | ||
| 7, | ||
| UnderlyingAsset['xlm:BTGO-GAXTPUVP2XINTMEN57FPJ34DAPZXDMMGX7TB7ASIBWHWT6ARC3IOGA2W'] | ||
| UnderlyingAsset['xlm:SPXU-GDJBVX3QA5HJPBSAU5VIX2W6MC37NU4UFXPKEGK42SJCYN6AEQ4Z6COM'], | ||
| undefined, | ||
| ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY | ||
| ), | ||
| ofcStellarToken( | ||
| '66c55a71-3352-407b-945a-ceed3fdc7487', | ||
|
|
@@ -6652,6 +6662,34 @@ export const ofcCoins = [ | |
| 10, | ||
| UnderlyingAsset['canton:ibenji'] | ||
| ), | ||
| ofcCantonToken( | ||
| '8b1dcf20-aa1f-4348-a4c0-e0df61e45b42', // CECHO-2732 | ||
| 'ofccanton:beth', | ||
| 'BitSafe Ethereum', | ||
| 10, | ||
| UnderlyingAsset['canton:beth'] | ||
| ), | ||
| ofcCantonToken( | ||
| 'e01c1955-98ae-445e-9858-765dce7a6d20', // CECHO-2732 | ||
| 'ofccanton:usty', | ||
| 'US Treasury Bill', | ||
| 10, | ||
| UnderlyingAsset['canton:usty'] | ||
| ), | ||
| ofcCantonToken( | ||
| '4f1e118b-afc3-4c32-af2a-acc81be89442', // CECHO-2732 | ||
| 'ofccanton:exau', | ||
| 'Ember Gold', | ||
| 10, | ||
| UnderlyingAsset['canton:exau'] | ||
| ), | ||
| ofcCantonToken( | ||
| '154d2cca-4970-4445-aac7-58b995ff4f9e', // CECHO-2732 | ||
| 'ofccanton:exag', | ||
| 'Ember Silver', | ||
| 10, | ||
| UnderlyingAsset['canton:exag'] | ||
| ), | ||
| ofcCantonToken( | ||
| '784c76fb-59c6-4826-b72e-20e996a35739', | ||
| 'ofccanton:ceth', | ||
|
|
@@ -7033,6 +7071,14 @@ export const ofcCoins = [ | |
| ), | ||
| ofcsolToken('7826627c-7358-47ff-ac6f-03a2e9eff95c', 'ofcsol:jlp', 'Jupiter Perps LP', 6, UnderlyingAsset['sol:jlp']), | ||
| ofcsolToken('00f31d2d-6946-43f6-bde1-7fda6887750d', 'ofcsol:grass', 'Grass', 9, UnderlyingAsset['sol:grass']), | ||
| ofcsolToken( | ||
| '99924682-e24d-4e94-8479-0d34ffbe4b90', // CECHO-2732 | ||
| 'ofcsol:cash', | ||
| 'Cash', | ||
| 6, | ||
| UnderlyingAsset.CASH, | ||
| [...SOL_OFC_TOKEN_FEATURES, CoinFeature.STABLECOIN] | ||
| ), | ||
|
Comment on lines
+7074
to
+7081
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 (optional) Two new OFC stablecoins are not flagged as stablecoins, so anything that filters OFC assets by Why this was flaggedThe base token Verification: Base |
||
| ofcBscToken('3a9daeda-7e08-494d-a47c-d2c89dd1c735', 'ofcbsc:godl', 'GODL', 18, UnderlyingAsset['bsc:godl']), | ||
| ofcBscToken('93a459bc-c661-4001-be26-9175046c9a36', 'ofcbsc:gdl', 'GDL', 18, UnderlyingAsset['bsc:gdl']), | ||
| ofcBscToken('9febc919-85af-48eb-9821-e9d18e4cd98e', 'ofcbsc:usgd', 'USGD', 18, UnderlyingAsset['bsc:usgd']), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 The new OFC WisdomTree 500 coin would be listed as custodied in MENA FZE and India, while its base
xlm:SPXU-…token is BitGo Trust only.ofcStellarTokenonly inherits base features throughgetFilteredFeatures(suffix), which looks upsuffix.toLowerCase()with a case-sensitive key. The mixed-case Stellar name never matches, so the coin getsOfcCoin.DEFAULT_FEATURES. Fix: passACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLYexplicitly at ofcCoins.ts:5065-5071 and add the name to the 'WTGXX Trust-only custody' test.Why this was flagged
The base token at allCoinsAndTokens.ts:6447-6457 is declared with
ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY. That set drops every custody feature inBITGO_CUSTODY_JURISDICTIONSexceptCUSTODY_BITGO_TRUST(coinFeatures.ts:52). The new OFC entry passes no features, soofcStellarToken(ofc.ts:497-515) callsgetFilteredFeatures. That function checkscoinsMap.has(input.toLowerCase())(ofc.ts:53).CoinMap.hasis case-sensitive (map.ts:295), and the base is stored under the mixed-case key 'xlm:SPXU-GDJBVX3QA5HJPBSAU5VIX2W6MC37NU4UFXPKEGK42SJCYN6AEQ4Z6COM'. The lookup returns [], and the coin falls back toOfcCoin.DEFAULT_FEATURES(ofc.ts:66-74), which includesCUSTODY_BITGO_MENA_FZE,CUSTODY_BITGO_CUSTODY_MENA_FZEandCUSTODY_BITGO_INDIA. Lowercase-named OFC tokens such asofcarbeth:wtgxxandofcsol:wtgxxdo inherit trust-only gating, and test/unit/coins.ts:1111-1145 enforces it for them. On the base branch this OFC coin does not exist, so after the merge any consumer gating custody by these features would offer it in jurisdictions the base token excludes.Verification: The base token in allCoinsAndTokens.ts:6447-6457 uses
ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY, but the new OFC entry at ofcCoins.ts:5065-5071 passes no features.getFilteredFeaturescheckscoinsMap.has(input.toLowerCase()), andhas()does exact Map lookups (map.ts:295-300), so the mixed-case name never matches. The new coin is not on the 'WTGXX Trust-only custody' test list (test/unit/coins.ts:1111-1145).