@@ -181,6 +181,11 @@ export class Erc20CompatibleAccountCoin extends ContractAddressDefinedToken {
181181 */
182182export class CeloCoin extends ContractAddressDefinedToken { }
183183
184+ /**
185+ * The BSC blockchain supports tokens of the ERC20 standard similar to ETH ERC20 tokens.
186+ */
187+ export class BscCoin extends ContractAddressDefinedToken { }
188+
184189/**
185190 * The Stellar network supports tokens (non-native assets)
186191 * XLM is also known as the native asset.
@@ -699,6 +704,76 @@ export function tceloToken(
699704 return celoToken ( name , fullName , decimalPlaces , contractAddress , asset , features , prefix , suffix , network ) ;
700705}
701706
707+ /**
708+ * Factory function for celo token instances.
709+ *
710+ * @param name unique identifier of the token
711+ * @param fullName Complete human-readable name of the token
712+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
713+ * @param contractAddress Contract address of this token
714+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
715+ * @param prefix? Optional token prefix. Defaults to empty string
716+ * @param suffix? Optional token suffix. Defaults to token name.
717+ * @param network? Optional token network. Defaults to BSC main network.
718+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
719+ * @param primaryKeyCurve The elliptic curve for this chain/token
720+ */
721+ export function bscToken (
722+ name : string ,
723+ fullName : string ,
724+ decimalPlaces : number ,
725+ contractAddress : string ,
726+ asset : UnderlyingAsset ,
727+ features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
728+ prefix = '' ,
729+ suffix : string = name . toUpperCase ( ) ,
730+ network : EthereumNetwork = Networks . main . bsc ,
731+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
732+ ) {
733+ return Object . freeze (
734+ new BscCoin ( {
735+ name,
736+ fullName,
737+ network,
738+ contractAddress,
739+ prefix,
740+ suffix,
741+ features,
742+ decimalPlaces,
743+ asset,
744+ isToken : true ,
745+ primaryKeyCurve,
746+ } )
747+ ) ;
748+ }
749+
750+ /**
751+ * Factory function for testnet bsc token instances.
752+ *
753+ * @param name unique identifier of the token
754+ * @param fullName Complete human-readable name of the token
755+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
756+ * @param contractAddress Contract address of this token
757+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
758+ * @param prefix? Optional token prefix. Defaults to empty string
759+ * @param suffix? Optional token suffix. Defaults to token name.
760+ * @param network? Optional token network. Defaults to the testnet BSC network.
761+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
762+ */
763+ export function tbscToken (
764+ name : string ,
765+ fullName : string ,
766+ decimalPlaces : number ,
767+ contractAddress : string ,
768+ asset : UnderlyingAsset ,
769+ features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
770+ prefix = '' ,
771+ suffix : string = name . toUpperCase ( ) ,
772+ network : EthereumNetwork = Networks . test . bsc
773+ ) {
774+ return bscToken ( name , fullName , decimalPlaces , contractAddress , asset , features , prefix , suffix , network ) ;
775+ }
776+
702777/**
703778 * Factory function for Stellar token instances.
704779 *
0 commit comments