Skip to content

Commit 4984045

Browse files
committed
chore: add MegaETH support
TICKET: WIN-7102
1 parent 133771b commit 4984045

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ const mainnetBase: EnvironmentTemplate = {
263263
plume: {
264264
baseUrl: 'https://explorer.plume.org/api',
265265
},
266+
megaeth: {
267+
baseUrl: 'https://carrot.megaeth.com/rpc', //TODO: add mainnet url when available
268+
},
266269
},
267270
icpNodeUrl: 'https://ic0.app',
268271
worldExplorerBaseUrl: 'https://worldscan.org/',

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,6 +2047,24 @@ export const allCoinsAndTokens = [
20472047
CoinFeature.SHARED_EVM_SDK,
20482048
CoinFeature.EVM_COMPATIBLE_IMS,
20492049
CoinFeature.EVM_COMPATIBLE_UI,
2050+
CoinFeature.EVM_COMPATIBLE_WP,
2051+
]
2052+
),
2053+
account(
2054+
'8c9ba7c6-6dfb-4070-b8e2-6225077a0f85',
2055+
'megaeth',
2056+
'MegaETH',
2057+
Networks.main.megaeth,
2058+
18,
2059+
UnderlyingAsset.MEGAETH,
2060+
BaseUnit.ETH,
2061+
[
2062+
...EVM_FEATURES,
2063+
CoinFeature.SHARED_EVM_SIGNING,
2064+
CoinFeature.SHARED_EVM_SDK,
2065+
CoinFeature.EVM_COMPATIBLE_IMS,
2066+
CoinFeature.EVM_COMPATIBLE_UI,
2067+
CoinFeature.EVM_COMPATIBLE_WP,
20502068
]
20512069
),
20522070
gasTankAccount(

modules/statics/src/networks.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,16 @@ class FlowTestnet extends Testnet implements EthereumNetwork {
19391939
nativeCoinOperationHashPrefix = '545';
19401940
}
19411941

1942+
// TODO update MegaETH explorer urls and chainId when available
1943+
class MegaETH extends Mainnet implements EthereumNetwork {
1944+
name = 'MegaETH';
1945+
family = CoinFamily.MEGAETH;
1946+
explorerUrl = 'https://www.megaexplorer.xyz/tx';
1947+
accountExplorerUrl = 'https://www.megaexplorer.xyz/address/';
1948+
chainId = 6342;
1949+
nativeCoinOperationHashPrefix = '6342';
1950+
}
1951+
19421952
class MegaETHTestnet extends Testnet implements EthereumNetwork {
19431953
name = 'MegaETHTestnet';
19441954
family = CoinFamily.MEGAETH;
@@ -2019,6 +2029,7 @@ export const Networks = {
20192029
kavaevm: Object.freeze(new KavaEVM()),
20202030
lnbtc: Object.freeze(new LightningBitcoin()),
20212031
litecoin: Object.freeze(new Litecoin()),
2032+
megaeth: Object.freeze(new MegaETH()),
20222033
mon: Object.freeze(new Monad()),
20232034
mantra: Object.freeze(new Mantra()),
20242035
plume: Object.freeze(new Plume()),

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export const expectedColdFeatures = {
8282
'injective',
8383
'kaia',
8484
'kava',
85+
'megaeth',
8586
'mantra',
8687
'mon',
8788
'near',

0 commit comments

Comments
 (0)