@@ -506,6 +506,16 @@ export class WorldERC20Token extends ContractAddressDefinedToken {
506506 }
507507}
508508
509+ /**
510+ * The Flr Chain network supports tokens
511+ * Flr Chain Tokens are ERC20 tokens
512+ */
513+ export class FlrERC20Token extends ContractAddressDefinedToken {
514+ constructor ( options : Erc20ConstructorOptions ) {
515+ super ( options ) ;
516+ }
517+ }
518+
509519/**
510520 * The Xrp network supports tokens
511521 * Xrp tokens are identified by their issuer address
@@ -2686,6 +2696,96 @@ export function tworldErc20(
26862696 ) ;
26872697}
26882698
2699+ /**
2700+ * Factory function for FlrErc20 token instances.
2701+ *
2702+ * @param id uuid v4
2703+ * @param name unique identifier of the token
2704+ * @param fullName Complete human-readable name of the token
2705+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2706+ * @param contractAddress Contract address of this token
2707+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2708+ * @param prefix? Optional token prefix. Defaults to empty string
2709+ * @param suffix? Optional token suffix. Defaults to token name.
2710+ * @param network? Optional token network. Defaults to Flr Chain mainnet network.
2711+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2712+ * @param primaryKeyCurve The elliptic curve for this chain/token
2713+ */
2714+ export function flrErc20 (
2715+ id : string ,
2716+ name : string ,
2717+ fullName : string ,
2718+ decimalPlaces : number ,
2719+ contractAddress : string ,
2720+ asset : UnderlyingAsset ,
2721+ features : CoinFeature [ ] = [ ...AccountCoin . DEFAULT_FEATURES , CoinFeature . EIP1559 ] ,
2722+ prefix = '' ,
2723+ suffix : string = name . toUpperCase ( ) ,
2724+ network : AccountNetwork = Networks . main . flr ,
2725+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
2726+ ) {
2727+ return Object . freeze (
2728+ new FlrERC20Token ( {
2729+ id,
2730+ name,
2731+ fullName,
2732+ network,
2733+ contractAddress,
2734+ prefix,
2735+ suffix,
2736+ features,
2737+ decimalPlaces,
2738+ asset,
2739+ isToken : true ,
2740+ primaryKeyCurve,
2741+ baseUnit : BaseUnit . ETH ,
2742+ } )
2743+ ) ;
2744+ }
2745+
2746+ /**
2747+ * Factory function for Flr testnet FlrErc20 token instances.
2748+ *
2749+ * @param id uuid v4
2750+ * @param name unique identifier of the token
2751+ * @param fullName Complete human-readable name of the token
2752+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2753+ * @param contractAddress Contract address of this token
2754+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2755+ * @param prefix? Optional token prefix. Defaults to empty string
2756+ * @param suffix? Optional token suffix. Defaults to token name.
2757+ * @param network? Optional token network. Defaults to the Flr Chain test network.
2758+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2759+ * @param primaryKeyCurve The elliptic curve for this chain/token
2760+ */
2761+ export function tflrErc20 (
2762+ id : string ,
2763+ name : string ,
2764+ fullName : string ,
2765+ decimalPlaces : number ,
2766+ contractAddress : string ,
2767+ asset : UnderlyingAsset ,
2768+ features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
2769+ prefix = '' ,
2770+ suffix : string = name . toUpperCase ( ) ,
2771+ network : AccountNetwork = Networks . test . flr ,
2772+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
2773+ ) {
2774+ return flrErc20 (
2775+ id ,
2776+ name ,
2777+ fullName ,
2778+ decimalPlaces ,
2779+ contractAddress ,
2780+ asset ,
2781+ features ,
2782+ prefix ,
2783+ suffix ,
2784+ network ,
2785+ primaryKeyCurve
2786+ ) ;
2787+ }
2788+
26892789/**
26902790 * Factory function for xrp token instances.
26912791 *
0 commit comments