diff --git a/modules/bitgo/test/v2/unit/keychains.ts b/modules/bitgo/test/v2/unit/keychains.ts index d25fe2d695..61c2a6f37c 100644 --- a/modules/bitgo/test/v2/unit/keychains.ts +++ b/modules/bitgo/test/v2/unit/keychains.ts @@ -102,6 +102,7 @@ describe('V2 Keychains', function () { n.asset !== UnderlyingAsset.FLUENTETH && n.asset !== UnderlyingAsset.MANTLE && n.asset !== UnderlyingAsset.JOVAYETH && + n.asset !== UnderlyingAsset.OKB && coinFamilyValues.includes(n.name) ); diff --git a/modules/sdk-core/src/bitgo/environments.ts b/modules/sdk-core/src/bitgo/environments.ts index 614a93efb8..95ea427d32 100644 --- a/modules/sdk-core/src/bitgo/environments.ts +++ b/modules/sdk-core/src/bitgo/environments.ts @@ -283,6 +283,9 @@ const mainnetBase: EnvironmentTemplate = { jovayeth: { baseUrl: 'https://api.zan.top/node/v1/jovay/mainnet/', }, + okb: { + baseUrl: 'https://www.oklink.com/api/v5/explorer/block/block-list?chainShortName=xlayer', + }, }, icpNodeUrl: 'https://ic0.app', worldExplorerBaseUrl: 'https://worldscan.org/', @@ -433,6 +436,9 @@ const testnetBase: EnvironmentTemplate = { jovayeth: { baseUrl: 'https://api.zan.top/node/v1/jovay/testnet/', }, + okb: { + baseUrl: 'https://www.oklink.com/api/v5/explorer/block/block-list?chainShortName=xlayer_testnet', + }, }, 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 39899dee01..4972a8addb 100644 --- a/modules/statics/src/allCoinsAndTokens.ts +++ b/modules/statics/src/allCoinsAndTokens.ts @@ -2278,6 +2278,40 @@ export const allCoinsAndTokens = [ '', 'TJovayETH' ), + account( + '2c59a9f2-9bb0-42ff-b925-6049476b93a0', + 'okb', + 'X Layer', + Networks.main.okb, + 18, + UnderlyingAsset.OKB, + 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( + '6f29e239-1bcd-4d29-b638-e17b5efc3f6c', + 'tokb', + 'Testnet X Layer', + Networks.test.okb, + 18, + UnderlyingAsset.OKB, + 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 6807a540c6..7a83bb9a56 100644 --- a/modules/statics/src/base.ts +++ b/modules/statics/src/base.ts @@ -87,6 +87,7 @@ export enum CoinFamily { OAS = 'oas', OFC = 'ofc', OG = 'og', + OKB = 'okb', OPETH = 'opeth', OSMO = 'osmo', PLUME = 'plume', @@ -583,6 +584,7 @@ export enum UnderlyingAsset { NEAR = 'near', OAS = 'oas', OG = 'og', + OKB = 'okb', OPETH = 'opeth', OSMO = 'osmo', XPL = 'xpl', // Plasma Network diff --git a/modules/statics/src/networks.ts b/modules/statics/src/networks.ts index 5503e1a2c6..6bd0fc9c7e 100644 --- a/modules/statics/src/networks.ts +++ b/modules/statics/src/networks.ts @@ -1545,6 +1545,24 @@ class JovayETHTestnet extends Testnet implements EthereumNetwork { nativeCoinOperationHashPrefix = '2019775'; } +class Xlayer extends Mainnet implements EthereumNetwork { + name = 'X Layer'; + family = CoinFamily.OKB; + explorerUrl = 'https://www.oklink.com/x-layer/tx/'; + accountExplorerUrl = 'https://www.oklink.com/x-layer/address/'; + chainId = 196; + nativeCoinOperationHashPrefix = '196'; +} + +class XlayerTestnet extends Testnet implements EthereumNetwork { + name = 'Testnet X Layer'; + family = CoinFamily.OKB; + explorerUrl = 'https://www.oklink.com/x-layer-testnet/tx/'; + accountExplorerUrl = 'https://www.oklink.com/x-layer-testnet/address/'; + chainId = 195; + nativeCoinOperationHashPrefix = '195'; +} + class CreditcoinTestnet extends Testnet implements EthereumNetwork { name = 'CreditcoinTestnet'; family = CoinFamily.CTC; @@ -2160,6 +2178,7 @@ export const Networks = { oas: Object.freeze(new Oas()), og: Object.freeze(new Og()), ofc: Object.freeze(new Ofc()), + okb: Object.freeze(new Xlayer()), optimism: Object.freeze(new Optimism()), osmo: Object.freeze(new Osmo()), rbtc: Object.freeze(new Rbtc()), @@ -2264,6 +2283,7 @@ export const Networks = { oas: Object.freeze(new OasTestnet()), og: Object.freeze(new OgTestnet()), ofc: Object.freeze(new OfcTestnet()), + okb: Object.freeze(new XlayerTestnet()), 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 79c965b832..74be91693b 100644 --- a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts +++ b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts @@ -106,6 +106,7 @@ export const expectedColdFeatures = { 'near', 'oas', 'og', + 'okb', 'osmo', 'plume', 'polyx', @@ -149,6 +150,7 @@ export const expectedColdFeatures = { 'thbarevm', 'tjovayeth', 'tog', + 'tokb', 'tmegaeth', 'tmon', 'tworld',