diff --git a/modules/bitgo/test/v2/unit/keychains.ts b/modules/bitgo/test/v2/unit/keychains.ts index 61c2a6f37c..39056f9eb2 100644 --- a/modules/bitgo/test/v2/unit/keychains.ts +++ b/modules/bitgo/test/v2/unit/keychains.ts @@ -103,6 +103,7 @@ describe('V2 Keychains', function () { n.asset !== UnderlyingAsset.MANTLE && n.asset !== UnderlyingAsset.JOVAYETH && n.asset !== UnderlyingAsset.OKB && + n.asset !== UnderlyingAsset.MORPH && coinFamilyValues.includes(n.name) ); diff --git a/modules/sdk-core/src/bitgo/environments.ts b/modules/sdk-core/src/bitgo/environments.ts index 58798c9486..4c8154719a 100644 --- a/modules/sdk-core/src/bitgo/environments.ts +++ b/modules/sdk-core/src/bitgo/environments.ts @@ -286,6 +286,9 @@ const mainnetBase: EnvironmentTemplate = { okb: { baseUrl: 'https://www.oklink.com/api/v5/explorer/block/block-list?chainShortName=xlayer', }, + morph: { + baseUrl: 'https://explorer-api-hoodi.morphl2.io', // TODO: WIN-8134 add mainnet url when available + }, }, icpNodeUrl: 'https://ic0.app', worldExplorerBaseUrl: 'https://worldscan.org/', @@ -439,6 +442,9 @@ const testnetBase: EnvironmentTemplate = { okb: { baseUrl: 'https://www.oklink.com/api/v5/explorer/block/block-list?chainShortName=xlayer_testnet', }, + morph: { + baseUrl: 'https://explorer-api-hoodi.morphl2.io', + }, }, stxNodeUrl: 'https://api.testnet.hiro.so', vetNodeUrl: 'https://sync-testnet.vechain.org', diff --git a/modules/statics/src/allCoinsAndTokens.ts b/modules/statics/src/allCoinsAndTokens.ts index d500f8f296..9ad2f7ee4f 100644 --- a/modules/statics/src/allCoinsAndTokens.ts +++ b/modules/statics/src/allCoinsAndTokens.ts @@ -2314,6 +2314,40 @@ export const allCoinsAndTokens = [ CoinFeature.EVM_COMPATIBLE_WP, ] ), + account( + '60203912-6332-4f44-8f83-a88a06ae170b', + 'morph', + 'Morph Mainnet', + Networks.main.morph, + 18, + UnderlyingAsset.MORPH, + BaseUnit.ETH, + [ + ...EVM_FEATURES, + CoinFeature.SHARED_EVM_SIGNING, + CoinFeature.SHARED_EVM_SDK, + CoinFeature.EVM_COMPATIBLE_IMS, + CoinFeature.EVM_COMPATIBLE_UI, + CoinFeature.EVM_COMPATIBLE_WP, + ] + ), + account( + '9352fddb-3b01-40a3-b09a-a047bc1595bd', + 'tmorph', + 'Morph Testnet', + Networks.test.morph, + 18, + UnderlyingAsset.MORPH, + BaseUnit.ETH, + [ + ...EVM_FEATURES, + CoinFeature.SHARED_EVM_SIGNING, + CoinFeature.SHARED_EVM_SDK, + CoinFeature.EVM_COMPATIBLE_IMS, + CoinFeature.EVM_COMPATIBLE_UI, + CoinFeature.EVM_COMPATIBLE_WP, + ] + ), canton( '07385320-5a4f-48e9-97a5-86d4be9f24b0', 'canton', diff --git a/modules/statics/src/base.ts b/modules/statics/src/base.ts index 805231bdf1..970e5d544b 100644 --- a/modules/statics/src/base.ts +++ b/modules/statics/src/base.ts @@ -121,6 +121,7 @@ export enum CoinFamily { IP = 'ip', // Story Chain SOMI = 'somi', // Somnia Chain FLUENTETH = 'fluenteth', + MORPH = 'morph', } /** @@ -586,6 +587,7 @@ export enum UnderlyingAsset { MANTRA = 'mantra', MEGAETH = 'megaeth', MON = 'mon', + MORPH = 'morph', NEAR = 'near', OAS = 'oas', OG = 'og', diff --git a/modules/statics/src/networks.ts b/modules/statics/src/networks.ts index 3b2e53793f..36c5891558 100644 --- a/modules/statics/src/networks.ts +++ b/modules/statics/src/networks.ts @@ -1598,6 +1598,24 @@ class XlayerTestnet extends Testnet implements EthereumNetwork { nativeCoinOperationHashPrefix = '195'; } +class Morph extends Mainnet implements EthereumNetwork { + name = 'Morph Mainnet'; + family = CoinFamily.MORPH; + explorerUrl = 'https://explorer-api-hoodi.morphl2.io/tx/'; // TODO: WIN-8134 add mainnet url when available + accountExplorerUrl = 'https://explorer-api-hoodi.morphl2.io/address/'; // TODO: WIN-8134 add mainnet account explorer url when available + chainId = 2818; + nativeCoinOperationHashPrefix = '2818'; +} + +class MorphTestnet extends Testnet implements EthereumNetwork { + name = 'Morph Testnet'; + family = CoinFamily.MORPH; + explorerUrl = 'https://explorer-api-hoodi.morphl2.io/tx/'; + accountExplorerUrl = 'https://explorer-api-hoodi.morphl2.io/address/'; + chainId = 2710; + nativeCoinOperationHashPrefix = '2710'; +} + class CreditcoinTestnet extends Testnet implements EthereumNetwork { name = 'CreditcoinTestnet'; family = CoinFamily.CTC; @@ -2216,6 +2234,7 @@ export const Networks = { og: Object.freeze(new Og()), ofc: Object.freeze(new Ofc()), okb: Object.freeze(new Xlayer()), + morph: Object.freeze(new Morph()), optimism: Object.freeze(new Optimism()), osmo: Object.freeze(new Osmo()), rbtc: Object.freeze(new Rbtc()), @@ -2321,6 +2340,7 @@ export const Networks = { og: Object.freeze(new OgTestnet()), ofc: Object.freeze(new OfcTestnet()), okb: Object.freeze(new XlayerTestnet()), + morph: Object.freeze(new MorphTestnet()), optimism: Object.freeze(new OptimismTestnet()), osmo: Object.freeze(new OsmoTestnet()), rbtc: Object.freeze(new RbtcTestnet()), diff --git a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts index 74be91693b..03b7b87f79 100644 --- a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts +++ b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts @@ -103,6 +103,7 @@ export const expectedColdFeatures = { 'mantle', 'mantra', 'mon', + 'morph', 'near', 'oas', 'og', @@ -151,6 +152,7 @@ export const expectedColdFeatures = { 'tjovayeth', 'tog', 'tokb', + 'tmorph', 'tmegaeth', 'tmon', 'tworld',