@@ -517,6 +517,16 @@ 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+
520530/**
521531 * The World Chain network supports tokens
522532 * World Chain Tokens are ERC20 tokens
@@ -2720,6 +2730,96 @@ export function tcoredaoErc20(
27202730 ) ;
27212731}
27222732
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+
27232823/**
27242824 * Factory function for WorldErc20 token instances.
27252825 *
0 commit comments