@@ -81,6 +81,7 @@ export interface HederaCoinConstructorOptions extends AccountConstructorOptions
81
81
export interface HederaTokenConstructorOptions extends AccountConstructorOptions {
82
82
nodeAccountId : string ;
83
83
tokenId : string ;
84
+ contractAddress : string ;
84
85
}
85
86
86
87
export interface AlgoCoinConstructorOptions extends AccountConstructorOptions {
@@ -89,10 +90,12 @@ export interface AlgoCoinConstructorOptions extends AccountConstructorOptions {
89
90
90
91
export interface EosCoinConstructorOptions extends AccountConstructorOptions {
91
92
contractName : string ;
93
+ contractAddress : string ;
92
94
}
93
95
94
96
export interface SolCoinConstructorOptions extends AccountConstructorOptions {
95
97
tokenAddress : string ;
98
+ contractAddress : string ;
96
99
}
97
100
98
101
export interface AdaCoinConstructorOptions extends AccountConstructorOptions {
@@ -104,12 +107,14 @@ export interface XrpCoinConstructorOptions extends AccountConstructorOptions {
104
107
issuerAddress : string ;
105
108
currencyCode : string ;
106
109
domain : string ;
110
+ contractAddress : string ;
107
111
}
108
112
109
113
export interface SuiCoinConstructorOptions extends AccountConstructorOptions {
110
114
packageId : string ;
111
115
module : string ;
112
116
symbol : string ;
117
+ contractAddress : string ;
113
118
}
114
119
115
120
export interface AptCoinConstructorOptions extends AccountConstructorOptions {
@@ -271,6 +276,7 @@ export class HederaCoin extends AccountCoinToken {
271
276
export class HederaToken extends AccountCoinToken {
272
277
public nodeAccountId : string ;
273
278
public tokenId : string ;
279
+ public contractAddress : string ;
274
280
275
281
constructor ( options : HederaTokenConstructorOptions ) {
276
282
super ( {
@@ -279,6 +285,7 @@ export class HederaToken extends AccountCoinToken {
279
285
280
286
this . nodeAccountId = options . nodeAccountId ;
281
287
this . tokenId = options . tokenId ;
288
+ this . contractAddress = options . contractAddress ;
282
289
}
283
290
}
284
291
@@ -315,12 +322,14 @@ export class AlgoCoin extends AccountCoinToken {
315
322
*/
316
323
export class EosCoin extends AccountCoinToken {
317
324
public contractName : string ;
325
+ public contractAddress : string ;
318
326
constructor ( options : EosCoinConstructorOptions ) {
319
327
super ( {
320
328
...options ,
321
329
} ) ;
322
330
323
331
this . contractName = options . contractName ;
332
+ this . contractAddress = options . contractAddress ;
324
333
}
325
334
}
326
335
@@ -332,12 +341,14 @@ export class EosCoin extends AccountCoinToken {
332
341
*/
333
342
export class SolCoin extends AccountCoinToken {
334
343
public tokenAddress : string ;
344
+ public contractAddress : string ;
335
345
constructor ( options : SolCoinConstructorOptions ) {
336
346
super ( {
337
347
...options ,
338
348
} ) ;
339
349
340
350
this . tokenAddress = options . tokenAddress ;
351
+ this . contractAddress = options . contractAddress ;
341
352
}
342
353
}
343
354
@@ -429,6 +440,7 @@ export class XrpCoin extends AccountCoinToken {
429
440
public issuerAddress : string ;
430
441
public currencyCode : string ;
431
442
public domain : string ;
443
+ public contractAddress : string ;
432
444
constructor ( options : XrpCoinConstructorOptions ) {
433
445
super ( {
434
446
...options ,
@@ -441,13 +453,15 @@ export class XrpCoin extends AccountCoinToken {
441
453
this . domain = options . domain as string ;
442
454
this . currencyCode = options . currencyCode ;
443
455
this . issuerAddress = options . issuerAddress ;
456
+ this . contractAddress = options . contractAddress ;
444
457
}
445
458
}
446
459
447
460
export class SuiCoin extends AccountCoinToken {
448
461
public packageId : string ;
449
462
public module : string ;
450
463
public symbol : string ;
464
+ public contractAddress : string ;
451
465
452
466
constructor ( options : SuiCoinConstructorOptions ) {
453
467
super ( {
@@ -457,6 +471,7 @@ export class SuiCoin extends AccountCoinToken {
457
471
this . packageId = options . packageId ;
458
472
this . module = options . module ;
459
473
this . symbol = options . symbol ;
474
+ this . contractAddress = options . contractAddress ;
460
475
}
461
476
}
462
477
@@ -1234,6 +1249,7 @@ export function hederaCoin(
1234
1249
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1235
1250
* @param nodeAccountId node account Id from which the transaction will be sent
1236
1251
* @param tokenId The unique identifier of this token
1252
+ * @param contractAddress Contract address of this token, same as tokenId
1237
1253
* @param prefix? Optional token prefix. Defaults to empty string
1238
1254
* @param suffix? Optional token suffix. Defaults to token name.
1239
1255
* @param network? Optional token network. Defaults to Hedera mainnet.
@@ -1249,6 +1265,7 @@ export function hederaToken(
1249
1265
asset : UnderlyingAsset ,
1250
1266
nodeAccountId = '0.0.3' ,
1251
1267
tokenId : string ,
1268
+ contractAddress : string ,
1252
1269
features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
1253
1270
prefix = '' ,
1254
1271
suffix : string = name . toUpperCase ( ) ,
@@ -1263,6 +1280,7 @@ export function hederaToken(
1263
1280
asset,
1264
1281
nodeAccountId,
1265
1282
tokenId,
1283
+ contractAddress,
1266
1284
features,
1267
1285
prefix,
1268
1286
suffix,
@@ -1366,6 +1384,7 @@ export function talgoToken(
1366
1384
* @param fullName Complete human-readable name of the token
1367
1385
* @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
1368
1386
* @param contractName Contract address of this token
1387
+ * @param contractAddress Contract address of this token
1369
1388
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1370
1389
* @param prefix? Optional token prefix. Defaults to empty string
1371
1390
* @param suffix? Optional token suffix. Defaults to token name.
@@ -1379,6 +1398,7 @@ export function eosToken(
1379
1398
fullName : string ,
1380
1399
decimalPlaces : number ,
1381
1400
contractName : string ,
1401
+ contractAddress : string ,
1382
1402
asset : UnderlyingAsset ,
1383
1403
features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
1384
1404
prefix = '' ,
@@ -1393,6 +1413,7 @@ export function eosToken(
1393
1413
fullName,
1394
1414
network,
1395
1415
contractName,
1416
+ contractAddress,
1396
1417
prefix,
1397
1418
suffix,
1398
1419
features,
@@ -1412,6 +1433,7 @@ export function eosToken(
1412
1433
* @param name unique identifier of the token
1413
1434
* @param fullName Complete human-readable name of the token
1414
1435
* @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
1436
+ * @param contractName Contract address of this token
1415
1437
* @param contractAddress Contract address of this token
1416
1438
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1417
1439
* @param prefix? Optional token prefix. Defaults to empty string
@@ -1425,13 +1447,26 @@ export function teosToken(
1425
1447
fullName : string ,
1426
1448
decimalPlaces : number ,
1427
1449
contractName : string ,
1450
+ contractAddress : string ,
1428
1451
asset : UnderlyingAsset ,
1429
1452
features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
1430
1453
prefix = '' ,
1431
1454
suffix : string = name . toUpperCase ( ) ,
1432
1455
network : AccountNetwork = Networks . test . eos
1433
1456
) {
1434
- return eosToken ( id , name , fullName , decimalPlaces , contractName , asset , features , prefix , suffix , network ) ;
1457
+ return eosToken (
1458
+ id ,
1459
+ name ,
1460
+ fullName ,
1461
+ decimalPlaces ,
1462
+ contractName ,
1463
+ contractAddress ,
1464
+ asset ,
1465
+ features ,
1466
+ prefix ,
1467
+ suffix ,
1468
+ network
1469
+ ) ;
1435
1470
}
1436
1471
1437
1472
/**
@@ -1442,6 +1477,7 @@ export function teosToken(
1442
1477
* @param fullName Complete human-readable name of the token
1443
1478
* @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
1444
1479
* @param tokenAddress Token address of this token
1480
+ * @param contractAddress Contract address of this token
1445
1481
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1446
1482
* @param prefix? Optional token prefix. Defaults to empty string
1447
1483
* @param suffix? Optional token suffix. Defaults to token name.
@@ -1455,6 +1491,7 @@ export function solToken(
1455
1491
fullName : string ,
1456
1492
decimalPlaces : number ,
1457
1493
tokenAddress : string ,
1494
+ contractAddress : string ,
1458
1495
asset : UnderlyingAsset ,
1459
1496
features : CoinFeature [ ] = [ ...AccountCoin . DEFAULT_FEATURES , CoinFeature . REQUIRES_RESERVE ] ,
1460
1497
prefix = '' ,
@@ -1469,6 +1506,7 @@ export function solToken(
1469
1506
fullName,
1470
1507
network,
1471
1508
tokenAddress,
1509
+ contractAddress,
1472
1510
prefix,
1473
1511
suffix,
1474
1512
features,
@@ -1501,13 +1539,26 @@ export function tsolToken(
1501
1539
fullName : string ,
1502
1540
decimalPlaces : number ,
1503
1541
tokenAddress : string ,
1542
+ contractAddress : string ,
1504
1543
asset : UnderlyingAsset ,
1505
1544
features : CoinFeature [ ] = [ ...AccountCoin . DEFAULT_FEATURES , CoinFeature . REQUIRES_RESERVE ] ,
1506
1545
prefix = '' ,
1507
1546
suffix : string = name . toUpperCase ( ) ,
1508
1547
network : AccountNetwork = Networks . test . sol
1509
1548
) {
1510
- return solToken ( id , name , fullName , decimalPlaces , tokenAddress , asset , features , prefix , suffix , network ) ;
1549
+ return solToken (
1550
+ id ,
1551
+ name ,
1552
+ fullName ,
1553
+ decimalPlaces ,
1554
+ tokenAddress ,
1555
+ contractAddress ,
1556
+ asset ,
1557
+ features ,
1558
+ prefix ,
1559
+ suffix ,
1560
+ network
1561
+ ) ;
1511
1562
}
1512
1563
1513
1564
/**
@@ -2138,6 +2189,7 @@ export function tberaErc20(
2138
2189
* @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2139
2190
* @param issuerAddress: The address of the issuer of the token,
2140
2191
* @param currencyCode The token symbol. Example: USD, BTC, ETH, etc.
2192
+ * @param contractAddress Contract address of this token formed with `issuerAddress::currencyCode`
2141
2193
* @param domain? the domain of the issuer of the token,
2142
2194
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2143
2195
* @param prefix? Optional token prefix. Defaults to empty string
@@ -2153,6 +2205,7 @@ export function xrpToken(
2153
2205
decimalPlaces : number ,
2154
2206
issuerAddress : string ,
2155
2207
currencyCode : string ,
2208
+ contractAddress : string ,
2156
2209
domain = '' ,
2157
2210
asset : UnderlyingAsset ,
2158
2211
features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
@@ -2169,6 +2222,7 @@ export function xrpToken(
2169
2222
network,
2170
2223
issuerAddress,
2171
2224
currencyCode,
2225
+ contractAddress,
2172
2226
domain,
2173
2227
prefix,
2174
2228
suffix,
@@ -2191,6 +2245,7 @@ export function xrpToken(
2191
2245
* @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2192
2246
* @param issuerAddress: The address of the issuer of the token,
2193
2247
* @param currencyCode The token symbol. Example: USD, BTC, ETH, etc.
2248
+ * @param contractAddress Contract address of this token formed with `issuerAddress::currencyCode`
2194
2249
* @param domain? the domain of the issuer of the token,
2195
2250
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2196
2251
* @param prefix? Optional token prefix. Defaults to empty string
@@ -2205,6 +2260,7 @@ export function txrpToken(
2205
2260
decimalPlaces : number ,
2206
2261
issuerAddress : string ,
2207
2262
currencyCode : string ,
2263
+ contractAddress : string ,
2208
2264
domain = '' ,
2209
2265
asset : UnderlyingAsset ,
2210
2266
features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
@@ -2219,6 +2275,7 @@ export function txrpToken(
2219
2275
decimalPlaces ,
2220
2276
issuerAddress ,
2221
2277
currencyCode ,
2278
+ contractAddress ,
2222
2279
domain ,
2223
2280
asset ,
2224
2281
features ,
@@ -2238,6 +2295,7 @@ export function txrpToken(
2238
2295
* @param packageId PackageId of this token
2239
2296
* @param module The module of the package with id `packageId`
2240
2297
* @param symbol Identifies the coin defined in the module `module` of the package with id `packageId`
2298
+ * @param contractAddress Contract address of this token formed with `packageId::module::symbol`
2241
2299
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2242
2300
* @param features? Features of this coin. Defaults to the DEFAULT_FEATURES
2243
2301
* @param prefix? Optional token prefix. Defaults to empty string
@@ -2253,6 +2311,7 @@ export function suiToken(
2253
2311
packageId : string ,
2254
2312
module : string ,
2255
2313
symbol : string ,
2314
+ contractAddress : string ,
2256
2315
asset : UnderlyingAsset ,
2257
2316
features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
2258
2317
prefix = '' ,
@@ -2269,6 +2328,7 @@ export function suiToken(
2269
2328
packageId,
2270
2329
module,
2271
2330
symbol,
2331
+ contractAddress,
2272
2332
prefix,
2273
2333
suffix,
2274
2334
features,
@@ -2291,6 +2351,7 @@ export function suiToken(
2291
2351
* @param packageId PackageId of this token
2292
2352
* @param module The module of the package with id `packageId`
2293
2353
* @param symbol Identifies the coin defined in the module `module` of the package with id `packageId`
2354
+ * @param contractAddress Contract address of this token formed with `packageId::module::symbol`
2294
2355
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2295
2356
* @param features? Features of this coin. Defaults to the DEFAULT_FEATURES
2296
2357
* @param prefix? Optional token prefix. Defaults to empty string
@@ -2307,6 +2368,7 @@ export function tsuiToken(
2307
2368
packageId : string ,
2308
2369
module : string ,
2309
2370
symbol : string ,
2371
+ contractAddress : string ,
2310
2372
asset : UnderlyingAsset ,
2311
2373
features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
2312
2374
prefix = '' ,
@@ -2322,6 +2384,7 @@ export function tsuiToken(
2322
2384
packageId ,
2323
2385
module ,
2324
2386
symbol ,
2387
+ contractAddress ,
2325
2388
asset ,
2326
2389
features ,
2327
2390
prefix ,
0 commit comments