Skip to content

chore: gate keep tokens for SINGAPORE and MENA trust #6255

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

Merged
merged 1 commit into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
/modules/sdk-rpc-wrapper @BitGo/ethalt-team
/modules/sdk-test/ @BitGo/web-experience @BitGo/wallet-platform
/modules/sjcl/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
/modules/statics/ @BitGo/web-experience @BitGo/wallet-platform @BitGo/ethalt-team
/modules/statics/ @BitGo/web-experience @BitGo/ethalt-team
/modules/statics/src/utxo.ts @BitGo/btc-team
/modules/web-demo/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
/scripts/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
Expand Down
3 changes: 2 additions & 1 deletion modules/statics/src/coins/avaxTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ export const avaxTokens = [
'Staked AVAX',
18,
'0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be',
UnderlyingAsset['avaxc:savax']
UnderlyingAsset['avaxc:savax'],
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
avaxErc20(
'772a2498-2bef-4da8-9bce-f1a89e6f4536',
Expand Down
18 changes: 13 additions & 5 deletions modules/statics/src/coins/bscTokens.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bscToken, tbscToken } from '../account';
import { UnderlyingAsset } from '../base';
import { bscToken, tbscToken, AccountCoin } from '../account';
import { UnderlyingAsset, CoinFeature } from '../base';
import { BSC_TOKEN_FEATURES, BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE } from '../coinFeatures';

export const bscTokens = [
Expand Down Expand Up @@ -343,7 +343,11 @@ export const bscTokens = [
18,
'0x2a459dd33f05ed8ea9584505cf04698be5654e6d',
UnderlyingAsset['bsc:wrx'],
BSC_TOKEN_FEATURES
AccountCoin.getFeaturesExcluding([
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
])
),
bscToken(
'1a26f668-9cde-4768-be8c-1fdcdf8e39e9',
Expand Down Expand Up @@ -622,7 +626,7 @@ export const bscTokens = [
18,
'0x5d5c5c1d14faf8ff704295b2f502daa9d06799a0',
UnderlyingAsset['bsc:nnn'],
BSC_TOKEN_FEATURES
BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE
),
bscToken(
'9b2925ed-7e66-4f60-b1bb-edae3931e9cd',
Expand Down Expand Up @@ -1116,7 +1120,11 @@ export const bscTokens = [
18,
'0x9fb9a33956351cf4fa040f65a13b835a3c8764e3',
UnderlyingAsset['bsc:multi'],
BSC_TOKEN_FEATURES
AccountCoin.getFeaturesExcluding([
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
])
),
bscToken(
'ec186a0f-8e7c-4844-92b0-630d4bce7eef',
Expand Down
23 changes: 18 additions & 5 deletions modules/statics/src/coins/erc20Coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,12 @@ export const erc20Coins = [
'Beam',
18,
'0x62d0a8458ed7719fdaf978fe5929c6d342b0bfce',
UnderlyingAsset.BEAM
UnderlyingAsset.BEAM,
AccountCoin.getFeaturesExcluding([
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
])
),
erc20(
'04c44584-c417-4fce-883f-8f316854c63e',
Expand Down Expand Up @@ -1110,7 +1115,8 @@ export const erc20Coins = [
'Backed NVIDIA Corp',
18,
'0xa34c5e0abe843e10461e2c9586ea03e55dbcc495',
UnderlyingAsset.BNVDA
UnderlyingAsset.BNVDA,
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
erc20(
'44fefbae-d835-4fb2-931a-22167f9f4894',
Expand Down Expand Up @@ -3292,7 +3298,8 @@ export const erc20Coins = [
'Kroma',
18,
'0x25500000d700bbe27104577cccce8eabcc96c8ad',
UnderlyingAsset.KRO
UnderlyingAsset.KRO,
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
erc20(
'cbcebae0-e2a8-4ebe-8da7-89983f04f917',
Expand Down Expand Up @@ -5318,7 +5325,12 @@ export const erc20Coins = [
'Serum',
6,
'0x476c5e26a75bd202a9683ffd34359c0cc15be0ff',
UnderlyingAsset.SRM
UnderlyingAsset.SRM,
AccountCoin.getFeaturesExcluding([
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
])
),
erc20(
'7c786a41-3527-4e87-8b7a-addfe4f4e02a',
Expand Down Expand Up @@ -9862,7 +9874,8 @@ export const erc20Coins = [
'USCC',
8,
'0x7b13abb88eb01aa0cd9739b91d4d4f273262eacf',
UnderlyingAsset.USCC
UnderlyingAsset.USCC,
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
erc20(
'efae2e71-10b8-4461-8e84-51390f6e77df',
Expand Down
11 changes: 9 additions & 2 deletions modules/statics/src/coins/polygonTokens.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { polygonErc20, tpolygonErc20 } from '../account';
import { UnderlyingAsset } from '../base';
import { UnderlyingAsset, CoinFeature } from '../base';
import { POLYGON_TOKEN_FEATURES, POLYGON_TOKEN_FEATURES_WITH_FRANKFURT } from '../coinFeatures';

export const polygonTokens = [
Expand Down Expand Up @@ -874,7 +874,14 @@ export const polygonTokens = [
8,
'0x72d6066f486bd0052eefb9114b66ae40e0a6031a',
UnderlyingAsset['polygon:wrx'],
POLYGON_TOKEN_FEATURES
POLYGON_TOKEN_FEATURES.filter(
(feature) =>
![
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
].includes(feature)
)
),
polygonErc20(
'8c61bb88-f103-4d42-bf5e-26826d4b7712',
Expand Down
65 changes: 65 additions & 0 deletions modules/statics/test/unit/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,32 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_FRANKFURT,
],
},
beam: {
features: [
CoinFeature.ACCOUNT_MODEL,
CoinFeature.REQUIRES_BIG_NUMBER,
CoinFeature.VALUELESS_TRANSFER,
CoinFeature.TRANSACTION_DATA,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY_BITGO_KOREA,
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY,
],
},
srm: {
features: [
CoinFeature.ACCOUNT_MODEL,
CoinFeature.REQUIRES_BIG_NUMBER,
CoinFeature.VALUELESS_TRANSFER,
CoinFeature.TRANSACTION_DATA,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY_BITGO_KOREA,
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY,
],
},
'eth:usdf': {
features: [
CoinFeature.ACCOUNT_MODEL,
Expand Down Expand Up @@ -653,6 +679,45 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_FRANKFURT,
],
},
'polygon:wrx': {
features: [
CoinFeature.ACCOUNT_MODEL,
CoinFeature.REQUIRES_BIG_NUMBER,
CoinFeature.VALUELESS_TRANSFER,
CoinFeature.TRANSACTION_DATA,
CoinFeature.CUSTODY,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY_BITGO_KOREA,
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
],
},
'bsc:wrx': {
features: [
CoinFeature.ACCOUNT_MODEL,
CoinFeature.REQUIRES_BIG_NUMBER,
CoinFeature.VALUELESS_TRANSFER,
CoinFeature.TRANSACTION_DATA,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY,
CoinFeature.CUSTODY_BITGO_KOREA,
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
],
},
'bsc:multi': {
features: [
CoinFeature.ACCOUNT_MODEL,
CoinFeature.REQUIRES_BIG_NUMBER,
CoinFeature.VALUELESS_TRANSFER,
CoinFeature.TRANSACTION_DATA,
CoinFeature.CUSTODY,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY_BITGO_KOREA,
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
],
},
};

describe('CoinMap', function () {
Expand Down