@@ -169,9 +169,9 @@ export interface CosmosTokenConstructorOptions extends AccountConstructorOptions
169169}
170170
171171export interface AdaTokenConstructorOptions extends AccountConstructorOptions {
172- uniqueAssetId : string ;
173172 policyId : string ;
174173 assetName : string ;
174+ contractAddress : string ;
175175}
176176export interface ContractAddress extends String {
177177 __contractaddress_phantom__ : never ;
@@ -703,17 +703,17 @@ export class PolyxCoin extends AccountCoinToken {
703703}
704704
705705export class AdaToken extends AccountCoinToken {
706- public uniqueAssetId : string ;
707706 public policyId : string ;
708707 public assetName : string ;
708+ public contractAddress : string ;
709709 constructor ( options : AdaTokenConstructorOptions ) {
710710 super ( {
711711 ...options ,
712712 } ) ;
713713
714- this . uniqueAssetId = options . uniqueAssetId ;
715714 this . policyId = options . policyId ;
716715 this . assetName = options . assetName ;
716+ this . contractAddress = options . contractAddress ;
717717 }
718718}
719719
@@ -1876,6 +1876,7 @@ export function tsolToken(
18761876 * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
18771877 * @param policyId Policy Id
18781878 * @param assetName Asset name -> Policy ID + Asset name is the unique identifier
1879+ * @param contractAddress Fingerprint of this token
18791880 * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
18801881 * @param prefix? Optional token prefix. Defaults to empty string
18811882 * @param suffix? Optional token suffix. Defaults to token name.
@@ -1890,15 +1891,14 @@ export function adaToken(
18901891 decimalPlaces : number ,
18911892 policyId : string ,
18921893 assetName : string ,
1893- encodedAssetName : string ,
1894+ contractAddress : string ,
18941895 asset : UnderlyingAsset ,
18951896 features : CoinFeature [ ] = [ ...AccountCoin . DEFAULT_FEATURES , CoinFeature . REQUIRES_RESERVE ] ,
18961897 prefix = '' ,
18971898 suffix : string = name . toUpperCase ( ) ,
18981899 network : AccountNetwork = Networks . main . ada ,
18991900 primaryKeyCurve : KeyCurve = KeyCurve . Ed25519
19001901) {
1901- const uniqueAssetId = `${ policyId } ${ encodedAssetName } ` ;
19021902 return Object . freeze (
19031903 new AdaToken ( {
19041904 id,
@@ -1911,11 +1911,11 @@ export function adaToken(
19111911 suffix,
19121912 features,
19131913 decimalPlaces,
1914+ contractAddress,
19141915 asset,
19151916 isToken : true ,
19161917 primaryKeyCurve,
19171918 baseUnit : BaseUnit . ADA ,
1918- uniqueAssetId,
19191919 } )
19201920 ) ;
19211921}
@@ -1929,6 +1929,7 @@ export function adaToken(
19291929 * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
19301930 * @param policyId Policy Id
19311931 * @param assetName Asset name -> Policy ID + Asset name is the unique identifier
1932+ * @param contractAddress Fingerprint of this token
19321933 * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
19331934 * @param prefix? Optional token prefix. Defaults to empty string
19341935 * @param suffix? Optional token suffix. Defaults to token name.
@@ -1942,7 +1943,7 @@ export function tadaToken(
19421943 decimalPlaces : number ,
19431944 policyId : string ,
19441945 assetName : string ,
1945- encodedAssetName : string ,
1946+ contractAddress : string ,
19461947 asset : UnderlyingAsset ,
19471948 features : CoinFeature [ ] = [ ...AccountCoin . DEFAULT_FEATURES , CoinFeature . REQUIRES_RESERVE ] ,
19481949 network : AccountNetwork = Networks . test . ada ,
@@ -1956,7 +1957,7 @@ export function tadaToken(
19561957 decimalPlaces ,
19571958 policyId ,
19581959 assetName ,
1959- encodedAssetName ,
1960+ contractAddress ,
19601961 asset ,
19611962 features ,
19621963 prefix ,
0 commit comments