Skip to content

Commit b15f82f

Browse files
authored
Merge pull request #7997 from BitGo/WIN-8769
feat(statics): add morpheth config
2 parents 25a6d88 + 6cb8c82 commit b15f82f

8 files changed

Lines changed: 152 additions & 2 deletions

File tree

modules/bitgo/test/v2/unit/keychains.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ describe('V2 Keychains', function () {
105105
n.asset !== UnderlyingAsset.JOVAYETH &&
106106
n.asset !== UnderlyingAsset.OKBXLAYER &&
107107
n.asset !== UnderlyingAsset.MORPH &&
108+
n.asset !== UnderlyingAsset.MORPHETH &&
108109
n.asset !== UnderlyingAsset.DOGEOS &&
109110
n.asset !== UnderlyingAsset.MEGAETH &&
110111
n.asset !== UnderlyingAsset.ARCUSDC &&

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ const mainnetBase: EnvironmentTemplate = {
297297
morph: {
298298
baseUrl: 'https://explorer-api-hoodi.morphl2.io', // TODO: WIN-8134 add mainnet url when available
299299
},
300+
morpheth: {
301+
baseUrl: 'https://explorer.morph.network/',
302+
},
300303
dogeos: {
301304
baseUrl: 'https://blockscout.testnet.dogeos.com', //TODO: WIN-8082 => add mainnet url when available
302305
},
@@ -469,6 +472,9 @@ const testnetBase: EnvironmentTemplate = {
469472
morph: {
470473
baseUrl: 'https://explorer-api-hoodi.morphl2.io',
471474
},
475+
morpheth: {
476+
baseUrl: 'https://explorer-hoodi.morph.network/',
477+
},
472478
dogeos: {
473479
baseUrl: 'https://blockscout.testnet.dogeos.com',
474480
},

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2613,6 +2613,47 @@ export const allCoinsAndTokens = [
26132613
CoinFeature.SUPPORTS_ERC20,
26142614
]
26152615
),
2616+
2617+
account(
2618+
'51de29b1-dd97-4b05-9239-a177522b469f',
2619+
'morpheth',
2620+
'Morph Ethereum Mainnet',
2621+
Networks.main.morpheth,
2622+
18,
2623+
UnderlyingAsset.MORPHETH,
2624+
BaseUnit.ETH,
2625+
[
2626+
...EVM_FEATURES,
2627+
CoinFeature.SHARED_EVM_SIGNING,
2628+
CoinFeature.SHARED_EVM_SDK,
2629+
CoinFeature.EVM_COMPATIBLE_IMS,
2630+
CoinFeature.EVM_COMPATIBLE_UI,
2631+
CoinFeature.EVM_COMPATIBLE_WP,
2632+
CoinFeature.EVM_NON_BITGO_RECOVERY,
2633+
CoinFeature.EVM_UNSIGNED_SWEEP_RECOVERY,
2634+
CoinFeature.SUPPORTS_ERC20,
2635+
]
2636+
),
2637+
account(
2638+
'f99419da-0ee8-46c3-af81-3bd43af29642',
2639+
'tmorpheth',
2640+
'Morph Ethereum Testnet',
2641+
Networks.test.morpheth,
2642+
18,
2643+
UnderlyingAsset.MORPHETH,
2644+
BaseUnit.ETH,
2645+
[
2646+
...EVM_FEATURES,
2647+
CoinFeature.SHARED_EVM_SIGNING,
2648+
CoinFeature.SHARED_EVM_SDK,
2649+
CoinFeature.EVM_COMPATIBLE_IMS,
2650+
CoinFeature.EVM_COMPATIBLE_UI,
2651+
CoinFeature.EVM_COMPATIBLE_WP,
2652+
CoinFeature.EVM_NON_BITGO_RECOVERY,
2653+
CoinFeature.EVM_UNSIGNED_SWEEP_RECOVERY,
2654+
CoinFeature.SUPPORTS_ERC20,
2655+
]
2656+
),
26162657
account(
26172658
'887eebff-5d50-47f7-aea5-905e25c2e846',
26182659
'tdogeos',

modules/statics/src/base.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ export enum CoinFamily {
127127
SOMI = 'somi', // Somnia Chain
128128
FLUENTETH = 'fluenteth',
129129
MORPH = 'morph',
130+
MORPHETH = 'morpheth',
130131
ARCUSDC = 'arcusdc', // ARC network
131132
TEMPO = 'tempo', // Tempo Network
132133
}
@@ -610,6 +611,7 @@ export enum UnderlyingAsset {
610611
MEGAETH = 'megaeth',
611612
MON = 'mon',
612613
MORPH = 'morph',
614+
MORPHETH = 'morpheth',
613615
NEAR = 'near',
614616
OAS = 'oas',
615617
OG = 'og',
@@ -2389,9 +2391,13 @@ export enum UnderlyingAsset {
23892391
'eth:prompt' = 'eth:prompt',
23902392
'eth:yb' = 'eth:yb',
23912393
'morph:usdc' = 'morph:usdc',
2394+
'morpheth:usdc' = 'morpheth:usdc',
23922395
'morph:usdt' = 'morph:usdt',
2396+
'morpheth:usdt' = 'morpheth:usdt',
23932397
'morph:usd1' = 'morph:usd1',
2398+
'morpheth:usd1' = 'morpheth:usd1',
23942399
'tmorph:tmt' = 'tmorph:tmt',
2400+
'tmorpheth:tmt' = 'tmorpheth:tmt',
23952401

23962402
'xlm:BST-GADDFE4R72YUP2AOEL67OHZN3GJQYPC3VE734N2XFMEGRR2L32CZ3XYZ' = 'xlm:BST-GADDFE4R72YUP2AOEL67OHZN3GJQYPC3VE734N2XFMEGRR2L32CZ3XYZ',
23972403
'xlm:VELO-GDM4RQUQQUVSKQA7S6EM7XBZP3FCGH4Q7CL6TABQ7B2BEJ5ERARM2M5M' = 'xlm:VELO-GDM4RQUQQUVSKQA7S6EM7XBZP3FCGH4Q7CL6TABQ7B2BEJ5ERARM2M5M',

modules/statics/src/coins/ofcCoins.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,22 @@ export const ofcCoins = [
297297
UnderlyingAsset.MORPH,
298298
CoinKind.CRYPTO
299299
),
300+
ofc(
301+
'cdf3487e-a365-4319-83ff-ff06f02810a6',
302+
'ofcmorpheth',
303+
'Morph Ethereum',
304+
18,
305+
UnderlyingAsset.MORPHETH,
306+
CoinKind.CRYPTO
307+
),
308+
tofc(
309+
'4113e0ae-41c5-4293-8b7a-5829cbc3ee92',
310+
'ofctmorpheth',
311+
'Morph Ethereum Testnet',
312+
18,
313+
UnderlyingAsset.MORPHETH,
314+
CoinKind.CRYPTO
315+
),
300316
ofc(
301317
'dc733b2f-92bf-49d3-9f5d-9774e1637f0f',
302318
'ofcokbxlayer',

modules/statics/src/coins/ofcErc20Coins.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5359,6 +5359,64 @@ export const tOfcErc20Coins = [
53595359
true,
53605360
'tmorph'
53615361
),
5362+
5363+
// MorphETH tokens
5364+
ofcerc20(
5365+
'9c28b89b-1069-4bad-bf7b-8ecea440cee2',
5366+
'ofcmorpheth:usdc',
5367+
'USD Coin',
5368+
6,
5369+
UnderlyingAsset['morpheth:usdc'],
5370+
undefined,
5371+
undefined,
5372+
'',
5373+
undefined,
5374+
undefined,
5375+
true,
5376+
'morpheth'
5377+
),
5378+
ofcerc20(
5379+
'07010f84-5bc7-4715-9d19-09d694f558fb',
5380+
'ofcmorpheth:usdt',
5381+
'Tether USD',
5382+
6,
5383+
UnderlyingAsset['morpheth:usdt'],
5384+
undefined,
5385+
undefined,
5386+
'',
5387+
undefined,
5388+
undefined,
5389+
true,
5390+
'morpheth'
5391+
),
5392+
ofcerc20(
5393+
'883727b5-49e3-4fb3-99f7-fefb803710e5',
5394+
'ofcmorpheth:usd1',
5395+
'USD1',
5396+
18,
5397+
UnderlyingAsset['morpheth:usd1'],
5398+
undefined,
5399+
undefined,
5400+
'',
5401+
undefined,
5402+
undefined,
5403+
true,
5404+
'morpheth'
5405+
),
5406+
tofcerc20(
5407+
'34e77cee-2885-4a77-911c-b5f2bdd28cd7',
5408+
'ofctmorpheth:tmt',
5409+
'Test Mintable Token',
5410+
6,
5411+
underlyingAssetForSymbol('tmorpheth:tmt'),
5412+
undefined,
5413+
undefined,
5414+
'',
5415+
undefined,
5416+
undefined,
5417+
true,
5418+
'tmorpheth'
5419+
),
53625420
];
53635421

53645422
function underlyingAssetForSymbol(underlyingAssetValue: string): UnderlyingAsset {

modules/statics/src/networks.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,8 +1724,26 @@ class Morph extends Mainnet implements EthereumNetwork {
17241724
class MorphTestnet extends Testnet implements EthereumNetwork {
17251725
name = 'Morph Testnet';
17261726
family = CoinFamily.MORPH;
1727-
explorerUrl = 'https://explorer-api-hoodi.morphl2.io/tx/';
1728-
accountExplorerUrl = 'https://explorer-api-hoodi.morphl2.io/address/';
1727+
explorerUrl = 'https://explorer-hoodi.morph.network/tx/';
1728+
accountExplorerUrl = 'https://explorer-hoodi.morph.network/address/';
1729+
chainId = 2910;
1730+
nativeCoinOperationHashPrefix = '2910';
1731+
}
1732+
1733+
class MorphETH extends Mainnet implements EthereumNetwork {
1734+
name = 'Morph Ethereum Mainnet';
1735+
family = CoinFamily.MORPHETH;
1736+
explorerUrl = 'https://explorer.morph.network/tx/';
1737+
accountExplorerUrl = 'https://explorer.morph.network/address/';
1738+
chainId = 2818;
1739+
nativeCoinOperationHashPrefix = '2818';
1740+
}
1741+
1742+
class MorphETHTestnet extends Testnet implements EthereumNetwork {
1743+
name = 'Morph Ethereum Testnet';
1744+
family = CoinFamily.MORPHETH;
1745+
explorerUrl = 'https://explorer-hoodi.morph.network/tx/';
1746+
accountExplorerUrl = 'https://explorer-hoodi.morph.network/address/';
17291747
chainId = 2910;
17301748
nativeCoinOperationHashPrefix = '2910';
17311749
}
@@ -2429,6 +2447,7 @@ export const Networks = {
24292447
opbnb: Object.freeze(new OpBNB()),
24302448
fantom: Object.freeze(new Fantom()),
24312449
morph: Object.freeze(new Morph()),
2450+
morpheth: Object.freeze(new MorphETH()),
24322451
optimism: Object.freeze(new Optimism()),
24332452
osmo: Object.freeze(new Osmo()),
24342453
rbtc: Object.freeze(new Rbtc()),
@@ -2542,6 +2561,7 @@ export const Networks = {
25422561
opbnb: Object.freeze(new OpBNBTestnet()),
25432562
fantom: Object.freeze(new FantomTestnet()),
25442563
morph: Object.freeze(new MorphTestnet()),
2564+
morpheth: Object.freeze(new MorphETHTestnet()),
25452565
optimism: Object.freeze(new OptimismTestnet()),
25462566
osmo: Object.freeze(new OsmoTestnet()),
25472567
rbtc: Object.freeze(new RbtcTestnet()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export const expectedColdFeatures = {
109109
'mantra',
110110
'mon',
111111
'morph',
112+
'morpheth',
112113
'near',
113114
'oas',
114115
'og',
@@ -162,6 +163,7 @@ export const expectedColdFeatures = {
162163
'tog',
163164
'tokbxlayer',
164165
'tmorph',
166+
'tmorpheth',
165167
'tmegaeth',
166168
'tmon',
167169
'tworld',

0 commit comments

Comments
 (0)