@@ -483,6 +483,16 @@ export class CoredaoERC20Token extends ContractAddressDefinedToken {
483483 }
484484}
485485
486+ /**
487+ * The World Chain network supports tokens
488+ * World Chain Tokens are ERC20 tokens
489+ */
490+ export class WorldERC20Token extends ContractAddressDefinedToken {
491+ constructor ( options : Erc20ConstructorOptions ) {
492+ super ( options ) ;
493+ }
494+ }
495+
486496/**
487497 * The Xrp network supports tokens
488498 * Xrp tokens are identified by their issuer address
@@ -2426,6 +2436,96 @@ export function tcoredaoErc20(
24262436 ) ;
24272437}
24282438
2439+ /**
2440+ * Factory function for WorldErc20 token instances.
2441+ *
2442+ * @param id uuid v4
2443+ * @param name unique identifier of the token
2444+ * @param fullName Complete human-readable name of the token
2445+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2446+ * @param contractAddress Contract address of this token
2447+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2448+ * @param prefix? Optional token prefix. Defaults to empty string
2449+ * @param suffix? Optional token suffix. Defaults to token name.
2450+ * @param network? Optional token network. Defaults to World Chain mainnet network.
2451+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2452+ * @param primaryKeyCurve The elliptic curve for this chain/token
2453+ */
2454+ export function worldErc20 (
2455+ id : string ,
2456+ name : string ,
2457+ fullName : string ,
2458+ decimalPlaces : number ,
2459+ contractAddress : string ,
2460+ asset : UnderlyingAsset ,
2461+ features : CoinFeature [ ] = [ ...AccountCoin . DEFAULT_FEATURES , CoinFeature . EIP1559 ] ,
2462+ prefix = '' ,
2463+ suffix : string = name . toUpperCase ( ) ,
2464+ network : AccountNetwork = Networks . main . world ,
2465+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
2466+ ) {
2467+ return Object . freeze (
2468+ new WorldERC20Token ( {
2469+ id,
2470+ name,
2471+ fullName,
2472+ network,
2473+ contractAddress,
2474+ prefix,
2475+ suffix,
2476+ features,
2477+ decimalPlaces,
2478+ asset,
2479+ isToken : true ,
2480+ primaryKeyCurve,
2481+ baseUnit : BaseUnit . ETH ,
2482+ } )
2483+ ) ;
2484+ }
2485+
2486+ /**
2487+ * Factory function for world testnet worldErc20 token instances.
2488+ *
2489+ * @param id uuid v4
2490+ * @param name unique identifier of the token
2491+ * @param fullName Complete human-readable name of the token
2492+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2493+ * @param contractAddress Contract address of this token
2494+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2495+ * @param prefix? Optional token prefix. Defaults to empty string
2496+ * @param suffix? Optional token suffix. Defaults to token name.
2497+ * @param network? Optional token network. Defaults to the World Chain test network.
2498+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2499+ * @param primaryKeyCurve The elliptic curve for this chain/token
2500+ */
2501+ export function tworldErc20 (
2502+ id : string ,
2503+ name : string ,
2504+ fullName : string ,
2505+ decimalPlaces : number ,
2506+ contractAddress : string ,
2507+ asset : UnderlyingAsset ,
2508+ features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
2509+ prefix = '' ,
2510+ suffix : string = name . toUpperCase ( ) ,
2511+ network : AccountNetwork = Networks . test . coredao ,
2512+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
2513+ ) {
2514+ return worldErc20 (
2515+ id ,
2516+ name ,
2517+ fullName ,
2518+ decimalPlaces ,
2519+ contractAddress ,
2520+ asset ,
2521+ features ,
2522+ prefix ,
2523+ suffix ,
2524+ network ,
2525+ primaryKeyCurve
2526+ ) ;
2527+ }
2528+
24292529/**
24302530 * Factory function for xrp token instances.
24312531 *
0 commit comments