@@ -461,6 +461,16 @@ export class BeraERC20Token extends ContractAddressDefinedToken {
461461 }
462462}
463463
464+ /**
465+ * The Coredao Chain network support tokens
466+ * Coredao Chain Tokens are ERC20 tokens
467+ */
468+ export class CoredaoERC20Token extends ContractAddressDefinedToken {
469+ constructor ( options : Erc20ConstructorOptions ) {
470+ super ( options ) ;
471+ }
472+ }
473+
464474/**
465475 * The Xrp network supports tokens
466476 * Xrp tokens are identified by their issuer address
@@ -2280,6 +2290,96 @@ export function tberaErc20(
22802290 ) ;
22812291}
22822292
2293+ /**
2294+ * Factory function for CoredaoErc20 token instances.
2295+ *
2296+ * @param id uuid v4
2297+ * @param name unique identifier of the token
2298+ * @param fullName Complete human-readable name of the token
2299+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2300+ * @param contractAddress Contract address of this token
2301+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2302+ * @param prefix? Optional token prefix. Defaults to empty string
2303+ * @param suffix? Optional token suffix. Defaults to token name.
2304+ * @param network? Optional token network. Defaults to coredao mainnet network.
2305+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2306+ * @param primaryKeyCurve The elliptic curve for this chain/token
2307+ */
2308+ export function coredaoErc20 (
2309+ id : string ,
2310+ name : string ,
2311+ fullName : string ,
2312+ decimalPlaces : number ,
2313+ contractAddress : string ,
2314+ asset : UnderlyingAsset ,
2315+ features : CoinFeature [ ] = [ ...AccountCoin . DEFAULT_FEATURES , CoinFeature . EIP1559 ] ,
2316+ prefix = '' ,
2317+ suffix : string = name . toUpperCase ( ) ,
2318+ network : AccountNetwork = Networks . main . coredao ,
2319+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
2320+ ) {
2321+ return Object . freeze (
2322+ new CoredaoERC20Token ( {
2323+ id,
2324+ name,
2325+ fullName,
2326+ network,
2327+ contractAddress,
2328+ prefix,
2329+ suffix,
2330+ features,
2331+ decimalPlaces,
2332+ asset,
2333+ isToken : true ,
2334+ primaryKeyCurve,
2335+ baseUnit : BaseUnit . ETH ,
2336+ } )
2337+ ) ;
2338+ }
2339+
2340+ /**
2341+ * Factory function for coredao testnet coredaoErc20 token instances.
2342+ *
2343+ * @param id uuid v4
2344+ * @param name unique identifier of the token
2345+ * @param fullName Complete human-readable name of the token
2346+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2347+ * @param contractAddress Contract address of this token
2348+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2349+ * @param prefix? Optional token prefix. Defaults to empty string
2350+ * @param suffix? Optional token suffix. Defaults to token name.
2351+ * @param network? Optional token network. Defaults to the coredao test network.
2352+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2353+ * @param primaryKeyCurve The elliptic curve for this chain/token
2354+ */
2355+ export function tcoredaoErc20 (
2356+ id : string ,
2357+ name : string ,
2358+ fullName : string ,
2359+ decimalPlaces : number ,
2360+ contractAddress : string ,
2361+ asset : UnderlyingAsset ,
2362+ features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
2363+ prefix = '' ,
2364+ suffix : string = name . toUpperCase ( ) ,
2365+ network : AccountNetwork = Networks . test . coredao ,
2366+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
2367+ ) {
2368+ return coredaoErc20 (
2369+ id ,
2370+ name ,
2371+ fullName ,
2372+ decimalPlaces ,
2373+ contractAddress ,
2374+ asset ,
2375+ features ,
2376+ prefix ,
2377+ suffix ,
2378+ network ,
2379+ primaryKeyCurve
2380+ ) ;
2381+ }
2382+
22832383/**
22842384 * Factory function for xrp token instances.
22852385 *
0 commit comments