Skip to content

Commit 0d80ff9

Browse files
committed
fix(statics): rename codex to codexeth following BitGo naming convention
Per BitGo ticker naming: Codex L2 with ETH gas should be 'codexeth' - Rename codex -> codexeth, tcodex -> tcodexeth - Update CoinFamily.CODEX -> CODEXETH - Update UnderlyingAsset.CODEX -> CODEXETH - Update network classes and registrations - Update OFC entries - Update environments config - Update test fixtures Ticket: WIN-8747 CECHO-116
1 parent d55d5cb commit 0d80ff9

6 files changed

Lines changed: 33 additions & 26 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ const mainnetBase: EnvironmentTemplate = {
221221
chiliz: {
222222
baseUrl: 'https://api.chiliscan.com',
223223
},
224-
codex: {
224+
codexeth: {
225225
baseUrl: 'https://explorer.codex.xyz/api',
226226
},
227227
phrs: {
@@ -415,7 +415,7 @@ const testnetBase: EnvironmentTemplate = {
415415
chiliz: {
416416
baseUrl: 'https://api.testnet.chiliscan.com',
417417
},
418-
codex: {
418+
codexeth: {
419419
baseUrl: 'https://explorer.codex-stg.xyz/api',
420420
},
421421
phrs: {

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2969,11 +2969,11 @@ export const allCoinsAndTokens = [
29692969
),
29702970
account(
29712971
'e10b89f6-3d14-4d85-a05a-da53d6e60489',
2972-
'codex',
2973-
'Codex',
2974-
Networks.main.codex,
2972+
'codexeth',
2973+
'Codex Ethereum',
2974+
Networks.main.codexeth,
29752975
18,
2976-
UnderlyingAsset.CODEX,
2976+
UnderlyingAsset.CODEXETH,
29772977
BaseUnit.ETH,
29782978
[
29792979
...EVM_FEATURES,
@@ -2987,11 +2987,11 @@ export const allCoinsAndTokens = [
29872987
),
29882988
account(
29892989
'3fe052be-5dc0-42b1-a5a8-63406296d06f',
2990-
'tcodex',
2991-
'Testnet Codex',
2992-
Networks.test.codex,
2990+
'tcodexeth',
2991+
'Testnet Codex Ethereum',
2992+
Networks.test.codexeth,
29932993
18,
2994-
UnderlyingAsset.CODEX,
2994+
UnderlyingAsset.CODEXETH,
29952995
BaseUnit.ETH,
29962996
[
29972997
...EVM_FEATURES,

modules/statics/src/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export enum CoinFamily {
4242
CANTON = 'canton',
4343
CELO = 'celo',
4444
CHILIZ = 'chiliz', // Chiliz Chain
45-
CODEX = 'codex',
45+
CODEXETH = 'codexeth', // Codex Ethereum L2
4646
COREDAO = 'coredao',
4747
COREUM = 'coreum',
4848
CRONOS = 'cronos',
@@ -572,7 +572,7 @@ export enum UnderlyingAsset {
572572
DOT = 'dot',
573573
CELO = 'celo', // Celo main coin
574574
CHILIZ = 'chiliz', // Chiliz Chain native coin
575-
CODEX = 'codex',
575+
CODEXETH = 'codexeth', // Codex Ethereum L2
576576
COREDAO = 'coredao',
577577
COREUM = 'coreum',
578578
CRONOS = 'cronos',

modules/statics/src/coins/ofcCoins.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,20 @@ export const ofcCoins = [
145145
UnderlyingAsset.CHILIZ,
146146
CoinKind.CRYPTO
147147
),
148-
ofc('de86d783-852b-4d92-b991-20e7f028cc54', 'ofccodex', 'Codex', 18, UnderlyingAsset.CODEX, CoinKind.CRYPTO),
148+
ofc(
149+
'de86d783-852b-4d92-b991-20e7f028cc54',
150+
'ofccodexeth',
151+
'Codex Ethereum',
152+
18,
153+
UnderlyingAsset.CODEXETH,
154+
CoinKind.CRYPTO
155+
),
149156
tofc(
150157
'dd58bac9-b4be-48cd-9113-55ab924d0c7c',
151-
'ofctcodex',
152-
'Codex Testnet',
158+
'ofctcodexeth',
159+
'Codex Ethereum Testnet',
153160
18,
154-
UnderlyingAsset.CODEX,
161+
UnderlyingAsset.CODEXETH,
155162
CoinKind.CRYPTO
156163
),
157164
ofc('9e2da785-8349-4153-8276-941319575833', 'ofcxtz', 'Tezos', 6, UnderlyingAsset.XTZ, CoinKind.CRYPTO),

modules/statics/src/networks.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -635,18 +635,18 @@ class ChilizTestnet extends Testnet implements EthereumNetwork {
635635
tokenOperationHashPrefix = '88882-ERC20';
636636
}
637637

638-
class Codex extends Mainnet implements EthereumNetwork {
639-
name = 'Codex';
640-
family = CoinFamily.CODEX;
638+
class CodexEth extends Mainnet implements EthereumNetwork {
639+
name = 'Codex Ethereum';
640+
family = CoinFamily.CODEXETH;
641641
explorerUrl = 'https://explorer.codex.xyz/tx/';
642642
accountExplorerUrl = 'https://explorer.codex.xyz/address/';
643643
chainId = 81224;
644644
nativeCoinOperationHashPrefix = '81224';
645645
}
646646

647-
class CodexTestnet extends Testnet implements EthereumNetwork {
648-
name = 'Testnet Codex';
649-
family = CoinFamily.CODEX;
647+
class CodexEthTestnet extends Testnet implements EthereumNetwork {
648+
name = 'Testnet Codex Ethereum';
649+
family = CoinFamily.CODEXETH;
650650
explorerUrl = 'https://explorer.codex-stg.xyz/tx/';
651651
accountExplorerUrl = 'https://explorer.codex-stg.xyz/address/';
652652
chainId = 812242;
@@ -2454,7 +2454,7 @@ export const Networks = {
24542454
casper: Object.freeze(new Casper()),
24552455
celo: Object.freeze(new Celo()),
24562456
chiliz: Object.freeze(new Chiliz()),
2457-
codex: Object.freeze(new Codex()),
2457+
codexeth: Object.freeze(new CodexEth()),
24582458
coredao: Object.freeze(new Coredao()),
24592459
coreum: Object.freeze(new Coreum()),
24602460
cronos: Object.freeze(new Cronos()),
@@ -2571,7 +2571,7 @@ export const Networks = {
25712571
casper: Object.freeze(new CasperTestnet()),
25722572
celo: Object.freeze(new CeloTestnet()),
25732573
chiliz: Object.freeze(new ChilizTestnet()),
2574-
codex: Object.freeze(new CodexTestnet()),
2574+
codexeth: Object.freeze(new CodexEthTestnet()),
25752575
coredao: Object.freeze(new CoredaoTestnet()),
25762576
cronos: Object.freeze(new CronosTestnet()),
25772577
dash: Object.freeze(new DashTestnet()),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const expectedColdFeatures = {
8484
'bsc',
8585
'canton',
8686
'chiliz',
87-
'codex',
87+
'codexeth',
8888
'coredao',
8989
'coreum',
9090
'cronos',
@@ -153,7 +153,7 @@ export const expectedColdFeatures = {
153153
'tbsc',
154154
'tcanton',
155155
'tchiliz',
156-
'tcodex',
156+
'tcodexeth',
157157
'tcoredao',
158158
'tcoreum',
159159
'tcronos',

0 commit comments

Comments
 (0)