diff --git a/modules/bitgo/test/v2/unit/keychains.ts b/modules/bitgo/test/v2/unit/keychains.ts index e840fd50ac..7412c9a15e 100644 --- a/modules/bitgo/test/v2/unit/keychains.ts +++ b/modules/bitgo/test/v2/unit/keychains.ts @@ -103,7 +103,7 @@ describe('V2 Keychains', function () { n.asset !== UnderlyingAsset.FLUENTETH && n.asset !== UnderlyingAsset.MANTLE && n.asset !== UnderlyingAsset.JOVAYETH && - n.asset !== UnderlyingAsset.OKB && + n.asset !== UnderlyingAsset.OKBXLAYER && n.asset !== UnderlyingAsset.MORPH && n.asset !== UnderlyingAsset.DOGEOS && n.asset !== UnderlyingAsset.MEGAETH && diff --git a/modules/sdk-core/src/bitgo/environments.ts b/modules/sdk-core/src/bitgo/environments.ts index ac50fa48ef..7ad1b3a1f2 100644 --- a/modules/sdk-core/src/bitgo/environments.ts +++ b/modules/sdk-core/src/bitgo/environments.ts @@ -291,7 +291,7 @@ const mainnetBase: EnvironmentTemplate = { jovayeth: { baseUrl: 'https://api.zan.top/node/v1/jovay/mainnet/', }, - okb: { + okbxlayer: { baseUrl: 'https://www.oklink.com/api/v5/explorer/block/block-list?chainShortName=xlayer', }, morph: { @@ -463,7 +463,7 @@ const testnetBase: EnvironmentTemplate = { jovayeth: { baseUrl: 'https://api.zan.top/node/v1/jovay/testnet/', }, - okb: { + okbxlayer: { baseUrl: 'https://www.oklink.com/api/v5/explorer/block/block-list?chainShortName=xlayer_testnet', }, morph: { diff --git a/modules/statics/src/allCoinsAndTokens.ts b/modules/statics/src/allCoinsAndTokens.ts index 8b34145763..a97251aef8 100644 --- a/modules/statics/src/allCoinsAndTokens.ts +++ b/modules/statics/src/allCoinsAndTokens.ts @@ -2464,11 +2464,11 @@ export const allCoinsAndTokens = [ ), account( '2c59a9f2-9bb0-42ff-b925-6049476b93a0', - 'okb', + 'okbxlayer', 'X Layer', - Networks.main.okb, + Networks.main.okbxlayer, 18, - UnderlyingAsset.OKB, + UnderlyingAsset.OKBXLAYER, BaseUnit.ETH, [ ...EVM_FEATURES, @@ -2484,11 +2484,11 @@ export const allCoinsAndTokens = [ ), account( '6f29e239-1bcd-4d29-b638-e17b5efc3f6c', - 'tokb', + 'tokbxlayer', 'Testnet X Layer', - Networks.test.okb, + Networks.test.okbxlayer, 18, - UnderlyingAsset.OKB, + UnderlyingAsset.OKBXLAYER, BaseUnit.ETH, [ ...EVM_FEATURES, @@ -2505,50 +2505,50 @@ export const allCoinsAndTokens = [ // X Layer (OKB) mainnet tokens erc20Token( '636c562a-87a1-4d9b-acbb-211d41b73967', - 'okb:usdg', + 'okbxlayer:usdg', 'Global Dollar', 6, '0x4ae46a509f6b1d9056937ba4500cb143933d2dc8', - UnderlyingAsset['okb:usdg'], - Networks.main.okb + UnderlyingAsset['okbxlayer:usdg'], + Networks.main.okbxlayer ), erc20Token( '34c6e62c-1926-49c0-b31d-72363745fc18', - 'okb:usdt0', + 'okbxlayer:usdt0', 'USDT0', 6, '0x779ded0c9e1022225f8e0630b35a9b54be713736', - UnderlyingAsset['okb:usdt0'], - Networks.main.okb + UnderlyingAsset['okbxlayer:usdt0'], + Networks.main.okbxlayer ), erc20Token( 'd21681a2-1d13-41db-8813-76bfd9b0b23e', - 'okb:usdt', + 'okbxlayer:usdt', 'USDT', 6, '0x1e4a5963abfd975d8c9021ce480b42188849d41d', - UnderlyingAsset['okb:usdt'], - Networks.main.okb + UnderlyingAsset['okbxlayer:usdt'], + Networks.main.okbxlayer ), erc20Token( '68387219-4c67-4ccc-abc5-76a5dd1ca964', - 'okb:usdc', + 'okbxlayer:usdc', 'USDC', 6, '0x74b7f16337b8972027f6196a17a631ac6de26d22', - UnderlyingAsset['okb:usdc'], - Networks.main.okb + UnderlyingAsset['okbxlayer:usdc'], + Networks.main.okbxlayer ), // X Layer (OKB) testnet tokens erc20Token( '2b149c11-d8d6-4d5e-88f6-3d1372592201', - 'tokb:tzeb', + 'tokbxlayer:tzeb', 'Zebra testnet', 18, '0x8ab88ea756a039abe3e2590c1adc90e7d9ee47e9', - UnderlyingAsset['tokb:tzeb'], - Networks.test.okb + UnderlyingAsset['tokbxlayer:tzeb'], + Networks.test.okbxlayer ), account( diff --git a/modules/statics/src/base.ts b/modules/statics/src/base.ts index 1ab06c11c9..1f0c316a0d 100644 --- a/modules/statics/src/base.ts +++ b/modules/statics/src/base.ts @@ -90,7 +90,7 @@ export enum CoinFamily { OFC = 'ofc', OG = 'og', OPBNB = 'opbnb', // opBNB Chain - OKB = 'okb', + OKBXLAYER = 'okbxlayer', OPETH = 'opeth', OSMO = 'osmo', PLUME = 'plume', @@ -612,7 +612,7 @@ export enum UnderlyingAsset { NEAR = 'near', OAS = 'oas', OG = 'og', - OKB = 'okb', + OKBXLAYER = 'okbxlayer', OPBNB = 'opbnb', // opBNB Chain OPETH = 'opeth', OSMO = 'osmo', @@ -1477,6 +1477,7 @@ export enum UnderlyingAsset { OCTAV = 'octav', OGN = 'ogn', OGV = 'ogv', + OKB = 'okb', OKBBEAR = 'okbbear', OKBBULL = 'okbbull', OKBDOOM = 'okbdoom', @@ -2082,7 +2083,6 @@ export enum UnderlyingAsset { 'ZRO-0xE5C' = 'zro-0xe5c', ZRX = 'zrx', ZUSD = 'zusd', - 'eth:okb' = 'eth:okb', 'eth:usdg' = 'eth:usdg', 'eth:spxux' = 'eth:spxux', 'eth:aleo' = 'eth:aleo', @@ -3028,13 +3028,13 @@ export enum UnderlyingAsset { 'tjovayeth:tcmn' = 'tjovayeth:tcmn', // X Layer (OKB) mainnet tokens - 'okb:usdg' = 'okb:usdg', - 'okb:usdt0' = 'okb:usdt0', - 'okb:usdt' = 'okb:usdt', - 'okb:usdc' = 'okb:usdc', + 'okbxlayer:usdg' = 'okbxlayer:usdg', + 'okbxlayer:usdt0' = 'okbxlayer:usdt0', + 'okbxlayer:usdt' = 'okbxlayer:usdt', + 'okbxlayer:usdc' = 'okbxlayer:usdc', // X Layer (OKB) testnet tokens - 'tokb:tzeb' = 'tokb:tzeb', + 'tokbxlayer:tzeb' = 'tokbxlayer:tzeb', // Story testnet tokens 'tip:usdc' = 'tip:usdc', diff --git a/modules/statics/src/coins/erc20Coins.ts b/modules/statics/src/coins/erc20Coins.ts index fa219b1670..a5fdf5ad31 100644 --- a/modules/statics/src/coins/erc20Coins.ts +++ b/modules/statics/src/coins/erc20Coins.ts @@ -4445,11 +4445,11 @@ export const erc20Coins = [ ), erc20( '987fa929-39ff-40a2-9249-d7b3be9dc76d', - 'eth:okb', - 'OKB ETH Token', + 'okb', + 'OKB', 18, '0x75231f58b43240c9718dd58b4967c5114342a86c', - UnderlyingAsset['eth:okb'] + UnderlyingAsset.OKB ), erc20( '68a5e76f-cb79-4016-a35e-f88b5a391d95', diff --git a/modules/statics/src/coins/ofcCoins.ts b/modules/statics/src/coins/ofcCoins.ts index 47ba2d581c..a4f808e191 100644 --- a/modules/statics/src/coins/ofcCoins.ts +++ b/modules/statics/src/coins/ofcCoins.ts @@ -297,8 +297,22 @@ export const ofcCoins = [ UnderlyingAsset.MORPH, CoinKind.CRYPTO ), - ofc('dc733b2f-92bf-49d3-9f5d-9774e1637f0f', 'ofcokb', 'X Layer', 18, UnderlyingAsset.OKB, CoinKind.CRYPTO), - tofc('98460a7d-0677-4dbd-934e-fbb0e9c5f8cc', 'ofctokb', 'X Layer Testnet', 18, UnderlyingAsset.OKB, CoinKind.CRYPTO), + ofc( + 'dc733b2f-92bf-49d3-9f5d-9774e1637f0f', + 'ofcokbxlayer', + 'X Layer', + 18, + UnderlyingAsset.OKBXLAYER, + CoinKind.CRYPTO + ), + tofc( + '98460a7d-0677-4dbd-934e-fbb0e9c5f8cc', + 'ofctokbxlayer', + 'X Layer Testnet', + 18, + UnderlyingAsset.OKBXLAYER, + CoinKind.CRYPTO + ), ofc( '357901a6-9f4f-444c-abfd-c2f32638f0cb', 'ofcmantle', diff --git a/modules/statics/src/coins/ofcErc20Coins.ts b/modules/statics/src/coins/ofcErc20Coins.ts index 0a99d72eab..a5a403e4a3 100644 --- a/modules/statics/src/coins/ofcErc20Coins.ts +++ b/modules/statics/src/coins/ofcErc20Coins.ts @@ -206,7 +206,7 @@ export const ofcErc20Coins = [ CoinFeature.STABLECOIN, ]), ofcerc20('dec90842-ca08-417e-9cb0-89723cc50b77', 'ofcwbtc', 'Wrapped Bitcoin', 8, UnderlyingAsset.WBTC), - ofcerc20('8f01bcec-f576-49f8-b925-274566954017', 'ofceth:okb', 'OKB ETH Token', 18, UnderlyingAsset['eth:okb']), + ofcerc20('8f01bcec-f576-49f8-b925-274566954017', 'ofcokb', 'OKB', 18, UnderlyingAsset.OKB), ofcerc20('37e7d659-c3a4-4761-8f42-76fb7bc5032c', 'ofcmnt', 'Mantle', 18, UnderlyingAsset.MNT), ofcerc20('688725ff-e582-44bc-b42e-0de600426594', 'ofcstrk', 'StarkNet Token', 18, UnderlyingAsset.STRK), ofcerc20('d6d6ee90-05c1-4fdd-8621-bfaefaa703ae', 'ofctkx', 'Tokenize', 8, UnderlyingAsset.TKX), @@ -5106,75 +5106,75 @@ export const tOfcErc20Coins = [ // X Layer (OKB) Mainnet tokens ofcerc20( '74624f51-a9ee-4e08-a3d8-3f59221dd782', - 'ofcokb:usdg', + 'ofcokbxlayer:usdg', 'Global Dollar', 6, - underlyingAssetForSymbol('okb:usdg'), + underlyingAssetForSymbol('okbxlayer:usdg'), undefined, undefined, '', undefined, undefined, true, - 'okb' + 'okbxlayer' ), ofcerc20( '586b6383-f965-4f6a-9d40-e135ad815147', - 'ofcokb:usdt0', + 'ofcokbxlayer:usdt0', 'USDT0', 6, - underlyingAssetForSymbol('okb:usdt0'), + underlyingAssetForSymbol('okbxlayer:usdt0'), undefined, undefined, '', undefined, undefined, true, - 'okb' + 'okbxlayer' ), ofcerc20( '560de5af-59c2-421c-bb60-9086a5745539', - 'ofcokb:usdt', + 'ofcokbxlayer:usdt', 'USDT', 6, - underlyingAssetForSymbol('okb:usdt'), + underlyingAssetForSymbol('okbxlayer:usdt'), undefined, undefined, '', undefined, undefined, true, - 'okb' + 'okbxlayer' ), ofcerc20( 'f22e7b40-8bfb-42b7-a741-44bb36088a50', - 'ofcokb:usdc', + 'ofcokbxlayer:usdc', 'USDC', 6, - underlyingAssetForSymbol('okb:usdc'), + underlyingAssetForSymbol('okbxlayer:usdc'), undefined, undefined, '', undefined, undefined, true, - 'okb' + 'okbxlayer' ), // X Layer (OKB) Testnet tokens tofcerc20( '1be3bd63-04d8-43f5-a772-86292fa5631d', - 'ofctokb:tzeb', + 'ofctokbxlayer:tzeb', 'Zebra testnet', 18, - underlyingAssetForSymbol('tokb:tzeb'), + underlyingAssetForSymbol('tokbxlayer:tzeb'), undefined, undefined, '', undefined, undefined, true, - 'tokb' + 'tokbxlayer' ), // Jovayeth Mainnet tokens diff --git a/modules/statics/src/map.ts b/modules/statics/src/map.ts index fb3cb1e404..ea5c92ff0e 100644 --- a/modules/statics/src/map.ts +++ b/modules/statics/src/map.ts @@ -158,8 +158,8 @@ export class CoinMap { 4326: 'megaeth', 295: 'hbarevm', 296: 'thbarevm', - 196: 'okb', - 1952: 'tokb', + 196: 'okbxlayer', + 1952: 'tokbxlayer', 5734951: 'jovayeth', 2019775: 'tjovayeth', 5042002: 'tarcusdc', diff --git a/modules/statics/src/networks.ts b/modules/statics/src/networks.ts index a1f6866d1a..0b6780cfc6 100644 --- a/modules/statics/src/networks.ts +++ b/modules/statics/src/networks.ts @@ -1672,7 +1672,7 @@ class JovayETHTestnet extends Testnet implements EthereumNetwork { class Xlayer extends Mainnet implements EthereumNetwork { name = 'X Layer'; - family = CoinFamily.OKB; + family = CoinFamily.OKBXLAYER; explorerUrl = 'https://www.oklink.com/x-layer/tx/'; accountExplorerUrl = 'https://www.oklink.com/x-layer/address/'; chainId = 196; @@ -1681,7 +1681,7 @@ class Xlayer extends Mainnet implements EthereumNetwork { class XlayerTestnet extends Testnet implements EthereumNetwork { name = 'Testnet X Layer'; - family = CoinFamily.OKB; + family = CoinFamily.OKBXLAYER; explorerUrl = 'https://www.oklink.com/x-layer-testnet/tx/'; accountExplorerUrl = 'https://www.oklink.com/x-layer-testnet/address/'; chainId = 1952; @@ -2400,7 +2400,7 @@ export const Networks = { oas: Object.freeze(new Oas()), og: Object.freeze(new Og()), ofc: Object.freeze(new Ofc()), - okb: Object.freeze(new Xlayer()), + okbxlayer: Object.freeze(new Xlayer()), opbnb: Object.freeze(new OpBNB()), fantom: Object.freeze(new Fantom()), morph: Object.freeze(new Morph()), @@ -2512,7 +2512,7 @@ export const Networks = { oas: Object.freeze(new OasTestnet()), og: Object.freeze(new OgTestnet()), ofc: Object.freeze(new OfcTestnet()), - okb: Object.freeze(new XlayerTestnet()), + okbxlayer: Object.freeze(new XlayerTestnet()), opbnb: Object.freeze(new OpBNBTestnet()), fantom: Object.freeze(new FantomTestnet()), morph: Object.freeze(new MorphTestnet()), diff --git a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts index febae620d4..583bba8b52 100644 --- a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts +++ b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts @@ -111,7 +111,7 @@ export const expectedColdFeatures = { 'near', 'oas', 'og', - 'okb', + 'okbxlayer', 'osmo', 'plume', 'polyx', @@ -158,7 +158,7 @@ export const expectedColdFeatures = { 'thbarevm', 'tjovayeth', 'tog', - 'tokb', + 'tokbxlayer', 'tmorph', 'tmegaeth', 'tmon',