Skip to content

Commit

Permalink
feat(statics): enabled bulk withdrawal feature
Browse files Browse the repository at this point in the history
Enabled Bulk withdrawal feature for assets mentioned in testnet
Ticket: WIN-3962
  • Loading branch information
krupanand-bitgo committed Dec 12, 2024
1 parent 75019d3 commit fcc2e85
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 27 deletions.
59 changes: 36 additions & 23 deletions modules/statics/src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ const ALGO_FEATURES = [
CoinFeature.MULTISIG_COLD,
CoinFeature.BULK_TRANSACTION,
];
const ADA_FEATURES = [...Ada.DEFAULT_FEATURES, CoinFeature.BULK_TRANSACTION];
const THTETH_TOKEN_FEATURES = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.BULK_TRANSACTION];
const TADA_FEATURES = [...Ada.DEFAULT_FEATURES, CoinFeature.BULK_TRANSACTION];
const DOT_FEATURES = [
...AccountCoin.DEFAULT_FEATURES,
CoinFeature.TSS,
Expand Down Expand Up @@ -194,6 +195,7 @@ const POLYGON_FEATURES = [
CoinFeature.MPCV2,
CoinFeature.STUCK_TRANSACTION_MANAGEMENT_TSS,
];
const TPOLYGON_FEATURES = [...POLYGON_FEATURES, CoinFeature.BULK_TRANSACTION];
const POL_FEATURES = [
...AccountCoin.DEFAULT_FEATURES,
CoinFeature.STAKING,
Expand All @@ -213,8 +215,16 @@ const SOL_FEATURES = [
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
];
const TSOL_FEATURES = [...SOL_FEATURES, CoinFeature.CUSTODY_BITGO_SINGAPORE];
const TSOL_FEATURES = [...SOL_FEATURES, CoinFeature.BULK_TRANSACTION, CoinFeature.CUSTODY_BITGO_SINGAPORE];
const SOL_TOKEN_FEATURES = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.TSS, CoinFeature.TSS_COLD];
const TSOL_TOKEN_FEATURES = [
...AccountCoin.DEFAULT_FEATURES,
CoinFeature.BULK_TRANSACTION,
CoinFeature.TSS,
CoinFeature.TSS_COLD,
];

const TBSC_TOKEN_FEATURES = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.BULK_TRANSACTION];
const STX_FEATURES = [
...AccountCoin.DEFAULT_FEATURES,
CoinFeature.CUSTODY_BITGO_GERMANY,
Expand Down Expand Up @@ -431,7 +441,7 @@ export const coins = CoinMap.fromCoins([
'Testnet Cardano ADA',
Networks.test.ada,
UnderlyingAsset.ADA,
ADA_FEATURES
TADA_FEATURES
),
account(
'ec41e62a-cc57-4aa0-9b9e-217da1226817',
Expand Down Expand Up @@ -596,6 +606,7 @@ export const coins = CoinMap.fromCoins([
CoinFeature.BULK_TRANSACTION,
CoinFeature.STUCK_TRANSACTION_MANAGEMENT_ONCHAIN,
CoinFeature.STUCK_TRANSACTION_MANAGEMENT_TSS,
CoinFeature.BULK_TRANSACTION,
]
),
account(
Expand Down Expand Up @@ -1172,6 +1183,7 @@ export const coins = CoinMap.fromCoins([
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
CoinFeature.STUCK_TRANSACTION_MANAGEMENT_TSS,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.BULK_TRANSACTION,
]
),
account(
Expand All @@ -1192,7 +1204,7 @@ export const coins = CoinMap.fromCoins([
18,
UnderlyingAsset.POLYGON,
BaseUnit.ETH,
POLYGON_FEATURES
TPOLYGON_FEATURES
),
account(
'b5ba2fc6-706b-433f-9bcf-4ea4aaa09281',
Expand Down Expand Up @@ -1677,55 +1689,55 @@ export const coins = CoinMap.fromCoins([
'testnet SOLEND',
9,
UnderlyingAsset['tsol:slnd'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tofcsolToken(
'5610a965-d046-46e2-9077-40f496be3f18',
'ofctsol:orca',
'testnet ORCA',
9,
UnderlyingAsset['tsol:orca'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tofcsolToken(
'6fd31137-ab29-441e-9136-8b4bad4f0477',
'ofctsol:usdc',
'testnet USD Coin',
6,
UnderlyingAsset['tsol:usdc'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tofcsolToken(
'431a593e-0396-4d68-9db6-901d312df47d',
'ofctsol:ray',
'testnet Raydium',
9,
UnderlyingAsset['tsol:ray'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tofcsolToken(
'ff1955c9-988d-4c9e-86e7-cf589bb3d66f',
'ofctsol:gmt',
'testnet GMT',
9,
UnderlyingAsset['tsol:gmt'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tofcsolToken(
'308d63c0-3a74-49c9-98d8-a4fe52e58226',
'ofctsol:usdt',
'testnet USD Tether',
9,
UnderlyingAsset['tsol:usdt'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tofcsolToken(
'73a332da-1abf-4c4b-b5b5-f03fe36738cb',
'ofctsol:srm',
'testnet Serum',
9,
UnderlyingAsset['tsol:srm'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),

tofcsolToken(
Expand All @@ -1734,7 +1746,7 @@ export const coins = CoinMap.fromCoins([
'testnet Gari Token',
9,
UnderlyingAsset['tsol:gari'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tofcsolToken(
'3bca91fa-2c1a-4e7a-b1f1-b9c4402075a2',
Expand Down Expand Up @@ -14416,7 +14428,7 @@ export const coins = CoinMap.fromCoins([
18,
'0xee4d03adfca9a902d09f6e3e09dbd5a8a5122fb6',
UnderlyingAsset['hteth:bgerchv2'],
undefined,
THTETH_TOKEN_FEATURES,
undefined,
undefined,
Networks.test.holesky
Expand Down Expand Up @@ -14779,7 +14791,8 @@ export const coins = CoinMap.fromCoins([
'Test Binance USD Token',
18,
'0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee',
UnderlyingAsset['tbsc:busd']
UnderlyingAsset['tbsc:busd'],
TBSC_TOKEN_FEATURES
),
terc721(
'd92c7b1c-0c54-45cb-9b8a-1326c747bf58',
Expand Down Expand Up @@ -17822,7 +17835,7 @@ export const coins = CoinMap.fromCoins([
9,
'D8YXLiwWQMibWRaxCTs9k6HwaYE6vtsbzK9KrQVMXU1K',
UnderlyingAsset['tsol:srm'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tsolToken(
'ea7eb0ea-161c-4ce3-a448-e651d358b7a0',
Expand All @@ -17831,7 +17844,7 @@ export const coins = CoinMap.fromCoins([
9,
'F4uLeXJoFz3hw13MposuwaQbMcZbCjqvEGPPeRRB1Byf',
UnderlyingAsset['tsol:usdc'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tsolToken(
'6dcb8ff8-be59-471f-9e57-c3b68735d71e',
Expand All @@ -17840,7 +17853,7 @@ export const coins = CoinMap.fromCoins([
6,
'4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU',
UnderlyingAsset['tsol:usdc'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tsolToken(
'476582b6-1b18-471d-bdfd-ff29b8cdfd39',
Expand All @@ -17849,7 +17862,7 @@ export const coins = CoinMap.fromCoins([
9,
'9kLJoGbMgSteptkhKKuh7ken4JEvHrT83157ezEGrZ7R',
UnderlyingAsset['tsol:ray'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tsolToken(
'30367323-8c04-475b-a6a4-df231032af4b',
Expand All @@ -17858,7 +17871,7 @@ export const coins = CoinMap.fromCoins([
9,
'64bco36MjrZ8K26FXZGoSrnDFDSCZhvJGfQ5ywLRFUpF',
UnderlyingAsset['tsol:gmt'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tsolToken(
'12939712-84a2-4c06-bfd0-a58f7b188948',
Expand All @@ -17867,7 +17880,7 @@ export const coins = CoinMap.fromCoins([
9,
'9cgpBeNZ2HnLda7NWaaU1i3NyTstk2c4zCMUcoAGsi9C',
UnderlyingAsset['tsol:usdt'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tsolToken(
'7ad7512f-90ca-44e3-9238-ae78c1a3e57d',
Expand All @@ -17876,7 +17889,7 @@ export const coins = CoinMap.fromCoins([
9,
'Aub3Nun71bD5B98JQAivGtEdwCuFJVvZVXKkcVJkuzgh',
UnderlyingAsset['tsol:gari'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tsolToken(
'6bac3f31-06b0-4a35-80d9-d6fa1346d4d3',
Expand All @@ -17885,7 +17898,7 @@ export const coins = CoinMap.fromCoins([
9,
'4yQY4kNGCCM5rCWiQMWHFe5q3b5o7AqGWbx3XyeTti5h',
UnderlyingAsset['tsol:orca'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),
tsolToken(
'de2477a1-d1db-4b58-a62d-aea4d00d8c0a',
Expand All @@ -17894,7 +17907,7 @@ export const coins = CoinMap.fromCoins([
9,
'Ex6rHLLmvZoP9mpunMFvew424seSjPp5PQb5hDy8KJu6',
UnderlyingAsset['tsol:slnd'],
SOL_TOKEN_FEATURES
TSOL_TOKEN_FEATURES
),

polygonErc20(
Expand Down
27 changes: 23 additions & 4 deletions modules/statics/src/utxo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,31 @@ const LTC_FEATURES = [
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
];
const TLTC_FEATURES = [
...UtxoCoin.DEFAULT_FEATURES,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.BULK_TRANSACTION,
];
const DOGE_FEATURES = [
...UtxoCoin.DEFAULT_FEATURES,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
];
const TDOGE_FEATURES = [
...UtxoCoin.DEFAULT_FEATURES,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.BULK_TRANSACTION,
];
const DASH_FEATURES = [...UtxoCoin.DEFAULT_FEATURES, CoinFeature.CUSTODY_BITGO_FRANKFURT];
const TDASH_FEATURES = [...DASH_FEATURES, CoinFeature.BULK_TRANSACTION];
const TZEC_FEATURES = [...UtxoCoin.DEFAULT_FEATURES, CoinFeature.BULK_TRANSACTION];
export const utxoCoins: Readonly<BaseCoin>[] = [
utxo(
'8d6e08d5-399f-414f-8430-6ceca1798cbf',
Expand Down Expand Up @@ -266,7 +283,7 @@ export const utxoCoins: Readonly<BaseCoin>[] = [
Networks.test.litecoin,
UnderlyingAsset.LTC,
BaseUnit.LTC,
LTC_FEATURES
TLTC_FEATURES
),
utxo(
'0739be6a-c72e-468d-9464-ca5601965708',
Expand All @@ -283,7 +300,8 @@ export const utxoCoins: Readonly<BaseCoin>[] = [
'Testnet Dash',
Networks.test.dash,
UnderlyingAsset.DASH,
BaseUnit.DASH
BaseUnit.DASH,
TDASH_FEATURES
),
utxo('508f6b53-1e6e-41fd-b541-b2498b7c4b61', 'zec', 'ZCash', Networks.main.zCash, UnderlyingAsset.ZEC, BaseUnit.ZEC),
utxo(
Expand All @@ -292,7 +310,8 @@ export const utxoCoins: Readonly<BaseCoin>[] = [
'Testnet ZCash',
Networks.test.zCash,
UnderlyingAsset.ZEC,
BaseUnit.ZEC
BaseUnit.ZEC,
TZEC_FEATURES
),
utxo(
'c93a9160-458f-4a31-bea0-4a93ae8b1d2d',
Expand All @@ -310,6 +329,6 @@ export const utxoCoins: Readonly<BaseCoin>[] = [
Networks.test.dogecoin,
UnderlyingAsset.DOGE,
BaseUnit.BTC,
DOGE_FEATURES
TDOGE_FEATURES
),
];

0 comments on commit fcc2e85

Please sign in to comment.