@@ -1133,6 +1133,116 @@ export function tofcPolygonErc20(
11331133 ) ;
11341134}
11351135
1136+ /**
1137+ * Factory function for ofc megaethErc20 token instances.
1138+ *
1139+ * @param id uuid v4
1140+ * @param name unique identifier of the coin
1141+ * @param fullName Complete human-readable name of the coin
1142+ * @param network Network object for this coin
1143+ * @param decimalPlaces Number of decimal places this coin supports (divisibility exponent)
1144+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1145+ * @param kind Differentiates coins which represent fiat assets from those which represent crypto assets
1146+ * @param prefix? Optional coin prefix. Defaults to empty string
1147+ * @param suffix? Optional coin suffix. Defaults to coin name.
1148+ * @param isToken? Whether or not this account coin is a token of another coin
1149+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `OfcCoin`
1150+ * @param primaryKeyCurve The elliptic curve for this chain/token
1151+ */
1152+ export function ofcMegaethErc20 (
1153+ id : string ,
1154+ name : string ,
1155+ fullName : string ,
1156+ decimalPlaces : number ,
1157+ asset : UnderlyingAsset ,
1158+ kind : CoinKind = CoinKind . CRYPTO ,
1159+ features : CoinFeature [ ] = OfcCoin . DEFAULT_FEATURES ,
1160+ prefix = '' ,
1161+ suffix : string = name . replace ( / ^ o f c / , '' ) . toUpperCase ( ) ,
1162+ network : OfcNetwork = Networks . main . ofc ,
1163+ isToken = true ,
1164+ addressCoin = 'megaeth' ,
1165+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
1166+ ) {
1167+ const filteredFeatures = getFilteredFeatures ( suffix ) ;
1168+ if ( filteredFeatures . length > 0 ) {
1169+ features = filteredFeatures ;
1170+ }
1171+ return Object . freeze (
1172+ new OfcCoin ( {
1173+ id,
1174+ name,
1175+ fullName,
1176+ network,
1177+ prefix,
1178+ suffix,
1179+ features,
1180+ decimalPlaces,
1181+ isToken,
1182+ asset,
1183+ kind,
1184+ addressCoin,
1185+ primaryKeyCurve,
1186+ baseUnit : BaseUnit . ETH ,
1187+ } )
1188+ ) ;
1189+ }
1190+
1191+ /**
1192+ * Factory function for testnet ofc megaethErc20 token instances.
1193+ *
1194+ * @param id uuid v4
1195+ * @param name unique identifier of the coin
1196+ * @param fullName Complete human-readable name of the coin
1197+ * @param network Network object for this coin
1198+ * @param decimalPlaces Number of decimal places this coin supports (divisibility exponent)
1199+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1200+ * @param kind Differentiates coins which represent fiat assets from those which represent crypto assets
1201+ * @param prefix? Optional coin prefix. Defaults to empty string
1202+ * @param suffix? Optional coin suffix. Defaults to coin name.
1203+ * @param isToken? Whether or not this account coin is a token of another coin
1204+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `OfcCoin`
1205+ * @param primaryKeyCurve The elliptic curve for this chain/token
1206+ */
1207+ export function tofcMegaethErc20 (
1208+ id : string ,
1209+ name : string ,
1210+ fullName : string ,
1211+ decimalPlaces : number ,
1212+ asset : UnderlyingAsset ,
1213+ kind : CoinKind = CoinKind . CRYPTO ,
1214+ features : CoinFeature [ ] = OfcCoin . DEFAULT_FEATURES ,
1215+ prefix = '' ,
1216+ suffix : string = name . replace ( / ^ o f c / , '' ) . toUpperCase ( ) ,
1217+ network : OfcNetwork = Networks . test . ofc ,
1218+ isToken = true ,
1219+ addressCoin = 'tmegaeth' ,
1220+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
1221+ ) {
1222+ const filteredFeatures = getFilteredFeatures ( suffix ) ;
1223+ if ( filteredFeatures . length > 0 ) {
1224+ features = filteredFeatures ;
1225+ }
1226+ return Object . freeze (
1227+ new OfcCoin ( {
1228+ id,
1229+ name,
1230+ fullName,
1231+ network,
1232+ prefix,
1233+ suffix,
1234+ features,
1235+ decimalPlaces,
1236+ isToken,
1237+ asset,
1238+ kind,
1239+ addressCoin,
1240+ primaryKeyCurve,
1241+ baseUnit : BaseUnit . ETH ,
1242+ } )
1243+ ) ;
1244+ }
1245+
11361246/**
11371247 * Factory function for ofc bsc token instances.
11381248 *
0 commit comments