Skip to content

Commit 21f8820

Browse files
chore(statics): config changes for hoodi
TICKET: COIN-4804
1 parent 47bb213 commit 21f8820

File tree

5 files changed

+56
-1
lines changed

5 files changed

+56
-1
lines changed

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,7 @@ export enum UnderlyingAsset {
10881088
HTBULL = 'htbull',
10891089
HTDOOM = 'htdoom',
10901090
'hteth:bgerchv2' = 'hteth:bgerchv2',
1091+
'hteth:bgerchv3' = 'hteth:bgerchv3',
10911092
'hteth:aut' = 'hteth:aut',
10921093
HTHEDGE = 'hthedge',
10931094
HTMOON = 'htmoon',
@@ -1649,6 +1650,7 @@ export enum UnderlyingAsset {
16491650
TERC2DP = 'terc2dp',
16501651
TERC6DP = 'terc6dp',
16511652
TERC18DP = 'terc18DP',
1653+
HDTERC18DP = 'hdterc18DP',
16521654
TERC20 = 'terc20',
16531655
TERC2DP1 = 'terc2dp1',
16541656
TERC2DP2 = 'terc2dp2',

modules/statics/src/coins.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ export const coins = CoinMap.fromCoins([
323323
account(
324324
'68aec0bd-1d9a-40fa-bcef-7fa9538f65d3',
325325
'hteth',
326-
'Holesky Testnet Ethereum',
326+
isRunningInStaging() ? 'Hoodi Testnet Ethereum' : 'Holesky Testnet Ethereum',
327327
Networks.test.holesky,
328328
18,
329329
UnderlyingAsset.ETH,
@@ -4255,3 +4255,15 @@ export function createTokenMapUsingTrimmedConfigDetails(
42554255

42564256
return createTokenMapUsingConfigDetails(amsTokenConfigMap);
42574257
}
4258+
4259+
function isRunningInStaging(): boolean {
4260+
// Check explicit staging environment variables
4261+
const stagingEnvVars = [
4262+
process.env.BITGO_ENV === 'staging' || process.env.BITGO_ENV === 'staging_internal',
4263+
process.env.NODE_ENV === 'staging' || process.env.NODE_ENV === 'staging_internal',
4264+
process.env.APP_ENV === 'staging' || process.env.APP_ENV === 'staging_internal',
4265+
process.env.ENVIRONMENT === 'staging' || process.env.ENVIRONMENT === 'staging_internal',
4266+
];
4267+
console.info('Staging environment variables:', stagingEnvVars);
4268+
return stagingEnvVars.some(Boolean);
4269+
}

modules/statics/src/coins/erc20Coins.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11467,6 +11467,18 @@ export const erc20Coins = [
1146711467
undefined,
1146811468
Networks.test.holesky
1146911469
),
11470+
terc20(
11471+
'6ba7b810-9dad-11d1-80b4-00c04fd430c8',
11472+
'hdterc18dp',
11473+
'TERC18DP',
11474+
18,
11475+
'0x9851cb80a008a0862f9dec41e2f554420cee56f4',
11476+
UnderlyingAsset.HDTERC18DP,
11477+
undefined,
11478+
undefined,
11479+
undefined,
11480+
Networks.test.hoodi
11481+
),
1147011482
terc20(
1147111483
'9d5730cf-a1c2-4d0e-9ee9-922add38a11e',
1147211484
'hteth:bgerchv2',
@@ -11479,6 +11491,18 @@ export const erc20Coins = [
1147911491
undefined,
1148011492
Networks.test.holesky
1148111493
),
11494+
terc20(
11495+
'f47ac10b-58cc-4372-a567-0e02b2c3d479',
11496+
'hteth:bgerchv3',
11497+
'BG Test Token',
11498+
18,
11499+
'0x0d142fd70826d9157c3ea2ea5e4d4b484ba86963',
11500+
UnderlyingAsset['hteth:bgerchv3'],
11501+
HTETH_TOKEN_FEATURES,
11502+
undefined,
11503+
undefined,
11504+
Networks.test.hoodi
11505+
),
1148211506
terc20(
1148311507
'29c9cb44-00a9-4740-8de0-abf0a321b830',
1148411508
'hteth:aut',

modules/statics/src/networks.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,21 @@ class Holesky extends Testnet implements EthereumNetwork {
617617
tokenOperationHashPrefix = 'ERC20';
618618
}
619619

620+
class Hoodi extends Testnet implements EthereumNetwork {
621+
name = 'Hoodi';
622+
family = CoinFamily.ETH;
623+
explorerUrl = 'https://hoodi.etherscan.io/tx/';
624+
accountExplorerUrl = 'https://hoodi.etherscan.io/address/';
625+
blockExplorerUrl = 'https://hoodi.etherscan.io/block/';
626+
// https://chainlist.org/chain/560048
627+
chainId = 560048;
628+
batcherContractAddress = '0xebe27913fcc7510eadf10643a8f86bf5492a9541'; // populate post contract creation
629+
forwarderFactoryAddress = '0xffa397285ce46fb78c588a9e993286aac68c37cd';
630+
forwarderImplementationAddress = '0x059ffafdc6ef594230de44f824e2bd0a51ca5ded';
631+
nativeCoinOperationHashPrefix = 'ETHER';
632+
tokenOperationHashPrefix = 'ERC20';
633+
}
634+
620635
class EthereumClassic extends Mainnet implements EthereumNetwork {
621636
name = 'EthereumClassic';
622637
family = CoinFamily.ETC;
@@ -1802,6 +1817,7 @@ export const Networks = {
18021817
kovan: Object.freeze(new Kovan()),
18031818
goerli: Object.freeze(new Goerli()),
18041819
holesky: Object.freeze(new Holesky()),
1820+
hoodi: Object.freeze(new Hoodi()),
18051821
lnbtc: Object.freeze(new LightningBitcoinTestnet()),
18061822
litecoin: Object.freeze(new LitecoinTestnet()),
18071823
mantra: Object.freeze(new MantraTestnet()),

modules/statics/src/tokenConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ function getErc20TokenConfig(coin: Erc20Coin): Erc20TokenConfig {
355355
baseCoin = 'gteth';
356356
break;
357357
case Networks.test.holesky.name:
358+
case Networks.test.hoodi.name:
358359
baseCoin = 'hteth';
359360
break;
360361
default:

0 commit comments

Comments
 (0)