Skip to content

Commit 104014d

Browse files
feat(statics): add creditcoin chain config
Ticket: WIN-5801
1 parent d770da5 commit 104014d

File tree

6 files changed

+51
-0
lines changed

6 files changed

+51
-0
lines changed

modules/bitgo/test/v2/unit/keychains.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ describe('V2 Keychains', function () {
8080
n.asset !== UnderlyingAsset.MON &&
8181
n.asset !== UnderlyingAsset.WORLD &&
8282
n.asset !== UnderlyingAsset.PHRS &&
83+
n.asset !== UnderlyingAsset.CTC &&
8384
n.asset !== UnderlyingAsset.STT &&
8485
n.asset !== UnderlyingAsset.SONEIUM &&
8586
n.asset !== UnderlyingAsset.VET &&

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ const mainnetBase: EnvironmentTemplate = {
203203
phrs: {
204204
baseUrl: 'https://testnet.dplabs-internal.com', // TODO: WIN-5787 add mainnet url when its available
205205
},
206+
ctc: {
207+
baseUrl: 'https://mainnet3.creditcoin.network',
208+
},
206209
},
207210
icpNodeUrl: 'https://ic0.app',
208211
worldExplorerBaseUrl: 'https://worldscan.org/',
@@ -285,6 +288,9 @@ const testnetBase: EnvironmentTemplate = {
285288
phrs: {
286289
baseUrl: 'https://testnet.dplabs-internal.com',
287290
},
291+
ctc: {
292+
baseUrl: 'https://rpc.cc3-testnet.creditcoin.network',
293+
},
288294
},
289295
stxNodeUrl: 'https://api.testnet.hiro.so',
290296
vetNodeUrl: 'https://rpc-testnet.vechain.energy',

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export enum CoinFamily {
6969
POLYGON = 'polygon',
7070
POLYX = 'polyx',
7171
PHRS = 'phrs',
72+
CTC = 'ctc',
7273
NEAR = 'near',
7374
OAS = 'oas',
7475
OFC = 'ofc',
@@ -471,6 +472,7 @@ export enum UnderlyingAsset {
471472
OSMO = 'osmo',
472473
POLYGON = 'polygon',
473474
PHRS = 'phrs',
475+
CTC = 'ctc',
474476
RBTC = 'rbtc', // RSK main coin
475477
SEI = 'sei',
476478
SGB = 'sgb',

modules/statics/src/coins.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,26 @@ export const coins = CoinMap.fromCoins([
13131313
BaseUnit.ETH,
13141314
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SHARED_EVM_SDK]
13151315
),
1316+
account(
1317+
'7255f4f0-afd5-4521-9ae4-198e2e0c516c',
1318+
'ctc',
1319+
'Creditcoin',
1320+
Networks.main.ctc,
1321+
18,
1322+
UnderlyingAsset.CTC,
1323+
BaseUnit.ETH,
1324+
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SHARED_EVM_SDK]
1325+
),
1326+
account(
1327+
'25740604-3bcb-4171-8fbe-e4a20c2c98bb',
1328+
'tctc',
1329+
'Creditcoin Testnet',
1330+
Networks.test.ctc,
1331+
18,
1332+
UnderlyingAsset.CTC,
1333+
BaseUnit.ETH,
1334+
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SHARED_EVM_SDK]
1335+
),
13161336
account(
13171337
'251b78df-90c5-4ff5-b07a-8cc23f27c5ff',
13181338
'soneium',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,24 @@ class PharosTestnet extends Testnet implements EthereumNetwork {
12921292
nativeCoinOperationHashPrefix = '688688';
12931293
}
12941294

1295+
class Creditcoin extends Mainnet implements EthereumNetwork {
1296+
name = 'Creditcoin';
1297+
family = CoinFamily.CTC;
1298+
explorerUrl = 'https://creditcoin.blockscout.com/tx/';
1299+
accountExplorerUrl = 'https://creditcoin.blockscout.com/address/';
1300+
chainId = 102030;
1301+
nativeCoinOperationHashPrefix = '102030';
1302+
}
1303+
1304+
class CreditcoinTestnet extends Testnet implements EthereumNetwork {
1305+
name = 'CreditcoinTestnet';
1306+
family = CoinFamily.CTC;
1307+
explorerUrl = 'https://creditcoin-testnet.blockscout.com/tx/';
1308+
accountExplorerUrl = 'https://creditcoin-testnet.blockscout.com/address/';
1309+
chainId = 102031;
1310+
nativeCoinOperationHashPrefix = '102031';
1311+
}
1312+
12951313
class Xdc extends Mainnet implements EthereumNetwork {
12961314
name = 'XdcChain';
12971315
family = CoinFamily.XDC;
@@ -1602,6 +1620,7 @@ export const Networks = {
16021620
polygon: Object.freeze(new Polygon()),
16031621
polyx: Object.freeze(new Polymesh()),
16041622
phrs: Object.freeze(new Pharos()),
1623+
ctc: Object.freeze(new Creditcoin()),
16051624
oas: Object.freeze(new Oas()),
16061625
ofc: Object.freeze(new Ofc()),
16071626
optimism: Object.freeze(new Optimism()),
@@ -1685,6 +1704,7 @@ export const Networks = {
16851704
polygon: Object.freeze(new PolygonTestnet()),
16861705
polyx: Object.freeze(new PolymeshTestnet()),
16871706
phrs: Object.freeze(new PharosTestnet()),
1707+
ctc: Object.freeze(new CreditcoinTestnet()),
16881708
oas: Object.freeze(new OasTestnet()),
16891709
ofc: Object.freeze(new OfcTestnet()),
16901710
optimism: Object.freeze(new OptimismTestnet()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export const expectedColdFeatures = {
9090
'wemix',
9191
'world',
9292
'phrs',
93+
'ctc',
9394
'xdc',
9495
'zeta',
9596
'tada',
@@ -110,6 +111,7 @@ export const expectedColdFeatures = {
110111
'tmon',
111112
'tworld',
112113
'tphrs',
114+
'tctc',
113115
'thash',
114116
'thorchain:rune',
115117
'tia',

0 commit comments

Comments
 (0)