Skip to content

Commit f4afcd8

Browse files
committed
feat(statics): add Hemi Ethereum (hemieth) L2 chain support
Add Hemi Ethereum L2 chain with ETH gas token: - Add hemieth/themieth coin entries in allCoinsAndTokens - Add HEMIETH to CoinFamily and UnderlyingAsset enums - Add HemiEth network classes with chain IDs 43111/743111 - Add OFC entries for ofchemieth/ofcthemieth - Add explorer API configuration in environments - Update test fixtures Ticket: WIN-8747 CECHO-115
1 parent d55d5cb commit f4afcd8

6 files changed

Lines changed: 82 additions & 0 deletions

File tree

modules/sdk-core/src/bitgo/environments.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ const mainnetBase: EnvironmentTemplate = {
296296
baseUrl: 'https://mainnet.mirrornode.hedera.com/api/v1',
297297
rpcUrl: 'https://mainnet.hashio.io/api',
298298
},
299+
hemieth: {
300+
baseUrl: 'https://explorer.hemi.xyz/api',
301+
},
299302
fluenteth: {
300303
baseUrl: 'https://testnet.fluentscan.xyz/api/', //TODO: COIN-6478: add mainnet url when available
301304
},
@@ -483,6 +486,9 @@ const testnetBase: EnvironmentTemplate = {
483486
baseUrl: 'https://testnet.mirrornode.hedera.com/api/v1',
484487
rpcUrl: 'https://testnet.hashio.io/api',
485488
},
489+
hemieth: {
490+
baseUrl: 'https://testnet.explorer.hemi.xyz/api',
491+
},
486492
fluenteth: {
487493
baseUrl: 'https://testnet.fluentscan.xyz/api/',
488494
},

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,6 +2285,42 @@ export const allCoinsAndTokens = [
22852285
CoinFeature.EVM_UNSIGNED_SWEEP_RECOVERY,
22862286
]
22872287
),
2288+
account(
2289+
'68d22683-a8f2-47b3-8446-92e02a1963ae',
2290+
'hemieth',
2291+
'Hemi Ethereum',
2292+
Networks.main.hemieth,
2293+
18,
2294+
UnderlyingAsset.HEMIETH,
2295+
BaseUnit.ETH,
2296+
[
2297+
...EVM_FEATURES,
2298+
CoinFeature.SHARED_EVM_SIGNING,
2299+
CoinFeature.SHARED_EVM_SDK,
2300+
CoinFeature.EVM_COMPATIBLE_IMS,
2301+
CoinFeature.EVM_COMPATIBLE_UI,
2302+
CoinFeature.EVM_COMPATIBLE_WP,
2303+
CoinFeature.SUPPORTS_ERC20,
2304+
]
2305+
),
2306+
account(
2307+
'df0007d9-974b-4099-bf37-9dc59399c058',
2308+
'themieth',
2309+
'Testnet Hemi Ethereum',
2310+
Networks.test.hemieth,
2311+
18,
2312+
UnderlyingAsset.HEMIETH,
2313+
BaseUnit.ETH,
2314+
[
2315+
...EVM_FEATURES,
2316+
CoinFeature.SHARED_EVM_SIGNING,
2317+
CoinFeature.SHARED_EVM_SDK,
2318+
CoinFeature.EVM_COMPATIBLE_IMS,
2319+
CoinFeature.EVM_COMPATIBLE_UI,
2320+
CoinFeature.EVM_COMPATIBLE_WP,
2321+
CoinFeature.SUPPORTS_ERC20,
2322+
]
2323+
),
22882324

22892325
erc721Token(
22902326
'a7604e03-7f40-41f0-8efa-2e7673ac2a9f',

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export enum CoinFamily {
6666
HASH = 'hash', // Provenance
6767
HBAR = 'hbar',
6868
HBAREVM = 'hbarevm', // Hedera EVM coin
69+
HEMIETH = 'hemieth', // Hemi Ethereum L2
6970
ICP = 'icp',
7071
INITIA = 'initia',
7172
INJECTIVE = 'injective',
@@ -597,6 +598,7 @@ export enum UnderlyingAsset {
597598
HASH = 'hash', // Provenance
598599
HBAR = 'hbar', // Hedera main coin
599600
HBAREVM = 'hbarevm', // Hedera EVM coin
601+
HEMIETH = 'hemieth', // Hemi Ethereum L2
600602
ICP = 'icp',
601603
IP = 'ip', // Story Chain
602604
INITIA = 'initia',

modules/statics/src/coins/ofcCoins.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,22 @@ export const ofcCoins = [
293293
UnderlyingAsset.LINEAETH,
294294
CoinKind.CRYPTO
295295
),
296+
ofc(
297+
'bdab1ab0-215d-4d59-b698-7cc624e5027a',
298+
'ofchemieth',
299+
'Hemi Ethereum',
300+
18,
301+
UnderlyingAsset.HEMIETH,
302+
CoinKind.CRYPTO
303+
),
304+
tofc(
305+
'bc005b8a-dfb5-42db-92ad-92db5cb5b7d2',
306+
'ofcthemieth',
307+
'Hemi Ethereum Testnet',
308+
18,
309+
UnderlyingAsset.HEMIETH,
310+
CoinKind.CRYPTO
311+
),
296312
ofc(
297313
'f43afacc-0db3-4a8a-a987-ff9d93e08cb4',
298314
'ofcjovayeth',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,6 +2352,24 @@ class HederaEVM extends Mainnet implements EthereumNetwork {
23522352
nativeCoinOperationHashPrefix = '295';
23532353
}
23542354

2355+
class HemiEth extends Mainnet implements EthereumNetwork {
2356+
name = 'Hemi Ethereum';
2357+
family = CoinFamily.HEMIETH;
2358+
explorerUrl = 'https://explorer.hemi.xyz/tx/';
2359+
accountExplorerUrl = 'https://explorer.hemi.xyz/address/';
2360+
chainId = 43111;
2361+
nativeCoinOperationHashPrefix = '43111';
2362+
}
2363+
2364+
class HemiEthTestnet extends Testnet implements EthereumNetwork {
2365+
name = 'Testnet Hemi Ethereum';
2366+
family = CoinFamily.HEMIETH;
2367+
explorerUrl = 'https://testnet.explorer.hemi.xyz/tx/';
2368+
accountExplorerUrl = 'https://testnet.explorer.hemi.xyz/address/';
2369+
chainId = 743111;
2370+
nativeCoinOperationHashPrefix = '743111';
2371+
}
2372+
23552373
class PlumeTestnet extends Testnet implements EthereumNetwork {
23562374
name = 'PlumeTestnet';
23572375
family = CoinFamily.PLUME;
@@ -2478,6 +2496,7 @@ export const Networks = {
24782496
hash: Object.freeze(new Hash()),
24792497
hedera: Object.freeze(new Hedera()),
24802498
hederaEVM: Object.freeze(new HederaEVM()),
2499+
hemieth: Object.freeze(new HemiEth()),
24812500
icp: Object.freeze(new Icp()),
24822501
ip: Object.freeze(new IP()),
24832502
initia: Object.freeze(new Initia()),
@@ -2595,6 +2614,7 @@ export const Networks = {
25952614
hash: Object.freeze(new HashTestnet()),
25962615
hedera: Object.freeze(new HederaTestnet()),
25972616
hederaEVM: Object.freeze(new HederaEVMTestnet()),
2617+
hemieth: Object.freeze(new HemiEthTestnet()),
25982618
icp: Object.freeze(new IcpTestnet()),
25992619
ip: Object.freeze(new IPTestnet()),
26002620
initia: Object.freeze(new InitiaTestnet()),

modules/statics/test/unit/fixtures/expectedColdFeatures.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export const expectedColdFeatures = {
9696
'fluenteth',
9797
'hash',
9898
'hbarevm',
99+
'hemieth',
99100
'icp',
100101
'ip', // Story chain
101102
'initia',
@@ -164,6 +165,7 @@ export const expectedColdFeatures = {
164165
'tflow',
165166
'tfluenteth',
166167
'thbarevm',
168+
'themieth',
167169
'tjovayeth',
168170
'tog',
169171
'tokbxlayer',

0 commit comments

Comments
 (0)