Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions modules/sdk-core/src/bitgo/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ const mainnetBase: EnvironmentTemplate = {
chiliz: {
baseUrl: 'https://api.chiliscan.com',
},
codex: {
baseUrl: 'https://explorer.codex.xyz/api',
},
phrs: {
baseUrl: 'https://testnet.dplabs-internal.com', // TODO: WIN-5787 add mainnet url when its available
},
Expand Down Expand Up @@ -409,6 +412,9 @@ const testnetBase: EnvironmentTemplate = {
chiliz: {
baseUrl: 'https://api.testnet.chiliscan.com',
},
codex: {
baseUrl: 'https://explorer.codex-stg.xyz/api',
},
phrs: {
baseUrl: 'https://testnet.dplabs-internal.com', // Wrong value, Not available yet
},
Expand Down
36 changes: 36 additions & 0 deletions modules/statics/src/allCoinsAndTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2931,6 +2931,42 @@ export const allCoinsAndTokens = [
CoinFeature.SUPPORTS_ERC20,
]
),
account(
'e10b89f6-3d14-4d85-a05a-da53d6e60489',
'codex',
'Codex',
Networks.main.codex,
18,
UnderlyingAsset.CODEX,
BaseUnit.ETH,
[
...EVM_FEATURES,
CoinFeature.SHARED_EVM_SIGNING,
CoinFeature.SHARED_EVM_SDK,
CoinFeature.EVM_COMPATIBLE_IMS,
CoinFeature.EVM_COMPATIBLE_UI,
CoinFeature.EVM_COMPATIBLE_WP,
CoinFeature.SUPPORTS_ERC20,
]
),
account(
'3fe052be-5dc0-42b1-a5a8-63406296d06f',
'tcodex',
'Testnet Codex',
Networks.test.codex,
18,
UnderlyingAsset.CODEX,
BaseUnit.ETH,
[
...EVM_FEATURES,
CoinFeature.SHARED_EVM_SIGNING,
CoinFeature.SHARED_EVM_SDK,
CoinFeature.EVM_COMPATIBLE_IMS,
CoinFeature.EVM_COMPATIBLE_UI,
CoinFeature.EVM_COMPATIBLE_WP,
CoinFeature.SUPPORTS_ERC20,
]
),
erc20Token(
'16c438c1-714a-4ad7-bdb1-fb8d2575c466',
'tbaseeth:usdc',
Expand Down
2 changes: 2 additions & 0 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export enum CoinFamily {
CANTON = 'canton',
CELO = 'celo',
CHILIZ = 'chiliz', // Chiliz Chain
CODEX = 'codex',
COREDAO = 'coredao',
COREUM = 'coreum',
CRONOS = 'cronos',
Expand Down Expand Up @@ -570,6 +571,7 @@ export enum UnderlyingAsset {
DOT = 'dot',
CELO = 'celo', // Celo main coin
CHILIZ = 'chiliz', // Chiliz Chain native coin
CODEX = 'codex',
COREDAO = 'coredao',
COREUM = 'coreum',
CRONOS = 'cronos',
Expand Down
9 changes: 9 additions & 0 deletions modules/statics/src/coins/ofcCoins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ export const ofcCoins = [
UnderlyingAsset.CHILIZ,
CoinKind.CRYPTO
),
ofc('de86d783-852b-4d92-b991-20e7f028cc54', 'ofccodex', 'Codex', 18, UnderlyingAsset.CODEX, CoinKind.CRYPTO),
tofc(
'dd58bac9-b4be-48cd-9113-55ab924d0c7c',
'ofctcodex',
'Codex Testnet',
18,
UnderlyingAsset.CODEX,
CoinKind.CRYPTO
),
ofc('9e2da785-8349-4153-8276-941319575833', 'ofcxtz', 'Tezos', 6, UnderlyingAsset.XTZ, CoinKind.CRYPTO),
ofc(
'283b93b5-741b-4c85-a201-097267d65097',
Expand Down
20 changes: 20 additions & 0 deletions modules/statics/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,24 @@ class ChilizTestnet extends Testnet implements EthereumNetwork {
tokenOperationHashPrefix = '88882-ERC20';
}

class Codex extends Mainnet implements EthereumNetwork {
name = 'Codex';
family = CoinFamily.CODEX;
explorerUrl = 'https://explorer.codex.xyz/tx/';
accountExplorerUrl = 'https://explorer.codex.xyz/address/';
chainId = 81224;
nativeCoinOperationHashPrefix = '81224';
}

class CodexTestnet extends Testnet implements EthereumNetwork {
name = 'Testnet Codex';
family = CoinFamily.CODEX;
explorerUrl = 'https://explorer.codex-stg.xyz/tx/';
accountExplorerUrl = 'https://explorer.codex-stg.xyz/address/';
chainId = 812242;
nativeCoinOperationHashPrefix = '812242';
}

// TODO update explorerUrl STLX-1657
class Casper extends Mainnet implements AccountNetwork {
name = 'Casper';
Expand Down Expand Up @@ -2418,6 +2436,7 @@ export const Networks = {
casper: Object.freeze(new Casper()),
celo: Object.freeze(new Celo()),
chiliz: Object.freeze(new Chiliz()),
codex: Object.freeze(new Codex()),
coredao: Object.freeze(new Coredao()),
coreum: Object.freeze(new Coreum()),
cronos: Object.freeze(new Cronos()),
Expand Down Expand Up @@ -2533,6 +2552,7 @@ export const Networks = {
casper: Object.freeze(new CasperTestnet()),
celo: Object.freeze(new CeloTestnet()),
chiliz: Object.freeze(new ChilizTestnet()),
codex: Object.freeze(new CodexTestnet()),
coredao: Object.freeze(new CoredaoTestnet()),
cronos: Object.freeze(new CronosTestnet()),
dash: Object.freeze(new DashTestnet()),
Expand Down
2 changes: 2 additions & 0 deletions modules/statics/test/unit/fixtures/expectedColdFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const expectedColdFeatures = {
'bsc',
'canton',
'chiliz',
'codex',
'coredao',
'coreum',
'cronos',
Expand Down Expand Up @@ -151,6 +152,7 @@ export const expectedColdFeatures = {
'tbsc',
'tcanton',
'tchiliz',
'tcodex',
'tcoredao',
'tcoreum',
'tcronos',
Expand Down