Skip to content

Commit 2a26b0e

Browse files
committed
fix: update Chiliz symbol from chiliz to chz and remove unnecessary ERC20 classes
- Change CoinFamily and UnderlyingAsset from CHILIZ to CHZ - Rename network classes from Chiliz/ChilizTestnet to Chz/ChzTestnet - Update coin names from chiliz/tchiliz to chz/tchz - Update OFC coins from ofcchiliz/ofctchiliz to ofcchz/ofctchz - Update environment keys from chiliz to chz - Remove ChilizERC20Token class and chilizErc20/tchilizErc20 factory functions (ERC20 automation handles tokens automatically) - Update test fixtures TICKET: WIN-8547
1 parent 8e3d18f commit 2a26b0e

7 files changed

Lines changed: 22 additions & 133 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ const mainnetBase: EnvironmentTemplate = {
218218
apechain: {
219219
baseUrl: 'https://api.etherscan.io/v2',
220220
},
221-
chiliz: {
221+
chz: {
222222
baseUrl: 'https://api.chiliscan.com',
223223
},
224224
phrs: {
@@ -406,7 +406,7 @@ const testnetBase: EnvironmentTemplate = {
406406
apechain: {
407407
baseUrl: 'https://api.etherscan.io/v2',
408408
},
409-
chiliz: {
409+
chz: {
410410
baseUrl: 'https://api.testnet.chiliscan.com',
411411
},
412412
phrs: {

modules/statics/src/account.ts

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -517,16 +517,6 @@ export class CoredaoERC20Token extends ContractAddressDefinedToken {
517517
}
518518
}
519519

520-
/**
521-
* The Chiliz Chain network supports tokens
522-
* Chiliz Chain Tokens are ERC20 tokens
523-
*/
524-
export class ChilizERC20Token extends ContractAddressDefinedToken {
525-
constructor(options: Erc20ConstructorOptions) {
526-
super(options);
527-
}
528-
}
529-
530520
/**
531521
* The World Chain network supports tokens
532522
* World Chain Tokens are ERC20 tokens
@@ -2730,96 +2720,6 @@ export function tcoredaoErc20(
27302720
);
27312721
}
27322722

2733-
/**
2734-
* Factory function for ChilizErc20 token instances.
2735-
*
2736-
* @param id uuid v4
2737-
* @param name unique identifier of the token
2738-
* @param fullName Complete human-readable name of the token
2739-
* @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2740-
* @param contractAddress Contract address of this token
2741-
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2742-
* @param prefix? Optional token prefix. Defaults to empty string
2743-
* @param suffix? Optional token suffix. Defaults to token name.
2744-
* @param network? Optional token network. Defaults to Chiliz Chain mainnet network.
2745-
* @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2746-
* @param primaryKeyCurve The elliptic curve for this chain/token
2747-
*/
2748-
export function chilizErc20(
2749-
id: string,
2750-
name: string,
2751-
fullName: string,
2752-
decimalPlaces: number,
2753-
contractAddress: string,
2754-
asset: UnderlyingAsset,
2755-
features: CoinFeature[] = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.EIP1559],
2756-
prefix = '',
2757-
suffix: string = name.toUpperCase(),
2758-
network: AccountNetwork = Networks.main.chiliz,
2759-
primaryKeyCurve: KeyCurve = KeyCurve.Secp256k1
2760-
) {
2761-
return Object.freeze(
2762-
new ChilizERC20Token({
2763-
id,
2764-
name,
2765-
fullName,
2766-
network,
2767-
contractAddress,
2768-
prefix,
2769-
suffix,
2770-
features,
2771-
decimalPlaces,
2772-
asset,
2773-
isToken: true,
2774-
primaryKeyCurve,
2775-
baseUnit: BaseUnit.ETH,
2776-
})
2777-
);
2778-
}
2779-
2780-
/**
2781-
* Factory function for Chiliz testnet ChilizErc20 token instances.
2782-
*
2783-
* @param id uuid v4
2784-
* @param name unique identifier of the token
2785-
* @param fullName Complete human-readable name of the token
2786-
* @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2787-
* @param contractAddress Contract address of this token
2788-
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2789-
* @param prefix? Optional token prefix. Defaults to empty string
2790-
* @param suffix? Optional token suffix. Defaults to token name.
2791-
* @param network? Optional token network. Defaults to the Chiliz Chain test network.
2792-
* @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2793-
* @param primaryKeyCurve The elliptic curve for this chain/token
2794-
*/
2795-
export function tchilizErc20(
2796-
id: string,
2797-
name: string,
2798-
fullName: string,
2799-
decimalPlaces: number,
2800-
contractAddress: string,
2801-
asset: UnderlyingAsset,
2802-
features: CoinFeature[] = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.EIP1559],
2803-
prefix = '',
2804-
suffix: string = name.toUpperCase(),
2805-
network: AccountNetwork = Networks.test.chiliz,
2806-
primaryKeyCurve: KeyCurve = KeyCurve.Secp256k1
2807-
) {
2808-
return chilizErc20(
2809-
id,
2810-
name,
2811-
fullName,
2812-
decimalPlaces,
2813-
contractAddress,
2814-
asset,
2815-
features,
2816-
prefix,
2817-
suffix,
2818-
network,
2819-
primaryKeyCurve
2820-
);
2821-
}
2822-
28232723
/**
28242724
* Factory function for WorldErc20 token instances.
28252725
*

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77
arbethErc20,
88
beraErc20,
99
celoToken,
10-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
11-
chilizErc20,
1210
coredaoErc20,
1311
eosToken,
1412
erc1155,
@@ -34,8 +32,6 @@ import {
3432
tarbethErc20,
3533
tberaErc20,
3634
tceloToken,
37-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
38-
tchilizErc20,
3935
tcoredaoErc20,
4036
teosToken,
4137
terc1155,
@@ -2818,11 +2814,11 @@ export const allCoinsAndTokens = [
28182814
),
28192815
account(
28202816
'c7e1dc7f-add5-4eed-9931-2c201801e3a2',
2821-
'chiliz',
2817+
'chz',
28222818
'Chiliz',
2823-
Networks.main.chiliz,
2819+
Networks.main.chz,
28242820
18,
2825-
UnderlyingAsset.CHILIZ,
2821+
UnderlyingAsset.CHZ,
28262822
BaseUnit.ETH,
28272823
[
28282824
...EVM_FEATURES,
@@ -2838,11 +2834,11 @@ export const allCoinsAndTokens = [
28382834
),
28392835
account(
28402836
'c014b2ec-02ea-468f-b73f-24442146208e',
2841-
'tchiliz',
2837+
'tchz',
28422838
'Testnet Chiliz',
2843-
Networks.test.chiliz,
2839+
Networks.test.chz,
28442840
18,
2845-
UnderlyingAsset.CHILIZ,
2841+
UnderlyingAsset.CHZ,
28462842
BaseUnit.ETH,
28472843
[
28482844
...EVM_FEATURES,

modules/statics/src/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export enum CoinFamily {
4141
BTG = 'btg',
4242
CANTON = 'canton',
4343
CELO = 'celo',
44-
CHILIZ = 'chiliz', // Chiliz Chain
44+
CHZ = 'chz', // Chiliz Chain
4545
COREDAO = 'coredao',
4646
COREUM = 'coreum',
4747
CRONOS = 'cronos',
@@ -569,7 +569,7 @@ export enum UnderlyingAsset {
569569
DASH = 'dash',
570570
DOT = 'dot',
571571
CELO = 'celo', // Celo main coin
572-
CHILIZ = 'chiliz', // Chiliz Chain native coin
572+
CHZ = 'chz', // Chiliz Chain native coin
573573
COREDAO = 'coredao',
574574
COREUM = 'coreum',
575575
CRONOS = 'cronos',

modules/statics/src/coins/ofcCoins.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,8 @@ export const ofcCoins = [
134134
),
135135
ofc('8b93e788-52fa-4fd6-b499-40f13fe194fc', 'ofccoreum', 'Coreum', 6, UnderlyingAsset.COREUM, CoinKind.CRYPTO),
136136
ofc('a88adc55-c1c8-4a4e-8436-df3868a50daa', 'ofccelo', 'Celo Gold', 18, UnderlyingAsset.CELO, CoinKind.CRYPTO),
137-
ofc('17cf28b5-f958-46c3-be88-53cc42bf0c76', 'ofcchiliz', 'Chiliz', 18, UnderlyingAsset.CHILIZ, CoinKind.CRYPTO),
138-
tofc(
139-
'365ea5b1-71a8-4c57-82ba-a0effb9aae47',
140-
'ofctchiliz',
141-
'Testnet Chiliz',
142-
18,
143-
UnderlyingAsset.CHILIZ,
144-
CoinKind.CRYPTO
145-
),
137+
ofc('17cf28b5-f958-46c3-be88-53cc42bf0c76', 'ofcchz', 'Chiliz', 18, UnderlyingAsset.CHZ, CoinKind.CRYPTO),
138+
tofc('365ea5b1-71a8-4c57-82ba-a0effb9aae47', 'ofctchz', 'Testnet Chiliz', 18, UnderlyingAsset.CHZ, CoinKind.CRYPTO),
146139
ofc('9e2da785-8349-4153-8276-941319575833', 'ofcxtz', 'Tezos', 6, UnderlyingAsset.XTZ, CoinKind.CRYPTO),
147140
ofc(
148141
'283b93b5-741b-4c85-a201-097267d65097',

modules/statics/src/networks.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -613,19 +613,19 @@ class CeloTestnet extends Testnet implements EthereumNetwork {
613613
tokenOperationHashPrefix = 'CELO-ERC20';
614614
}
615615

616-
class Chiliz extends Mainnet implements EthereumNetwork {
617-
name = 'Chiliz';
618-
family = CoinFamily.CHILIZ;
616+
class Chz extends Mainnet implements EthereumNetwork {
617+
name = 'Chz';
618+
family = CoinFamily.CHZ;
619619
explorerUrl = 'https://chiliscan.com/tx/';
620620
accountExplorerUrl = 'https://chiliscan.com/address/';
621621
chainId = 88888;
622622
nativeCoinOperationHashPrefix = '88888';
623623
tokenOperationHashPrefix = '88888-ERC20';
624624
}
625625

626-
class ChilizTestnet extends Testnet implements EthereumNetwork {
627-
name = 'ChilizTestnet';
628-
family = CoinFamily.CHILIZ;
626+
class ChzTestnet extends Testnet implements EthereumNetwork {
627+
name = 'ChzTestnet';
628+
family = CoinFamily.CHZ;
629629
explorerUrl = 'https://testnet.chiliscan.com/tx/';
630630
accountExplorerUrl = 'https://testnet.chiliscan.com/address/';
631631
chainId = 88882;
@@ -2413,7 +2413,7 @@ export const Networks = {
24132413
canton: Object.freeze(new Canton()),
24142414
casper: Object.freeze(new Casper()),
24152415
celo: Object.freeze(new Celo()),
2416-
chiliz: Object.freeze(new Chiliz()),
2416+
chz: Object.freeze(new Chz()),
24172417
coredao: Object.freeze(new Coredao()),
24182418
coreum: Object.freeze(new Coreum()),
24192419
cronos: Object.freeze(new Cronos()),
@@ -2528,7 +2528,7 @@ export const Networks = {
25282528
canton: Object.freeze(new CantonTestnet()),
25292529
casper: Object.freeze(new CasperTestnet()),
25302530
celo: Object.freeze(new CeloTestnet()),
2531-
chiliz: Object.freeze(new ChilizTestnet()),
2531+
chz: Object.freeze(new ChzTestnet()),
25322532
coredao: Object.freeze(new CoredaoTestnet()),
25332533
cronos: Object.freeze(new CronosTestnet()),
25342534
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
@@ -83,7 +83,7 @@ export const expectedColdFeatures = {
8383
'bld',
8484
'bsc',
8585
'canton',
86-
'chiliz',
86+
'chz',
8787
'coredao',
8888
'coreum',
8989
'cronos',
@@ -150,7 +150,7 @@ export const expectedColdFeatures = {
150150
'tbld',
151151
'tbsc',
152152
'tcanton',
153-
'tchiliz',
153+
'tchz',
154154
'tcoredao',
155155
'tcoreum',
156156
'tcronos',

0 commit comments

Comments
 (0)