@@ -143,6 +143,7 @@ export interface Sip10TokenConstructorOptions extends AccountConstructorOptions
143
143
144
144
export interface Nep141TokenConstructorOptions extends AccountConstructorOptions {
145
145
contractAddress : string ;
146
+ storageDepositAmount : string ;
146
147
}
147
148
148
149
export interface ContractAddress extends String {
@@ -591,12 +592,14 @@ export class Sip10Token extends AccountCoinToken {
591
592
*/
592
593
export class Nep141Token extends AccountCoinToken {
593
594
public contractAddress : string ;
595
+ public storageDepositAmount : string ;
594
596
constructor ( options : Nep141TokenConstructorOptions ) {
595
597
super ( {
596
598
...options ,
597
599
} ) ;
598
600
599
601
this . contractAddress = options . contractAddress ;
602
+ this . storageDepositAmount = options . storageDepositAmount ;
600
603
}
601
604
}
602
605
@@ -2928,6 +2931,7 @@ export function tsip10Token(
2928
2931
* @param fullName Complete human-readable name of the token
2929
2932
* @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2930
2933
* @param contractAddress Contract address of this token
2934
+ * @param storageDepositAmount the deposit amount needed to get registered with this contract
2931
2935
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2932
2936
* @param features Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2933
2937
* @param prefix Optional token prefix. Defaults to empty string
@@ -2941,6 +2945,7 @@ export function nep141Token(
2941
2945
fullName : string ,
2942
2946
decimalPlaces : number ,
2943
2947
contractAddress : string ,
2948
+ storageDepositAmount : string ,
2944
2949
asset : UnderlyingAsset ,
2945
2950
features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
2946
2951
prefix = '' ,
@@ -2956,6 +2961,7 @@ export function nep141Token(
2956
2961
network,
2957
2962
decimalPlaces,
2958
2963
contractAddress,
2964
+ storageDepositAmount,
2959
2965
prefix,
2960
2966
suffix,
2961
2967
features,
@@ -2975,6 +2981,7 @@ export function nep141Token(
2975
2981
* @param fullName Complete human-readable name of the token
2976
2982
* @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2977
2983
* @param contractAddress Contract address of this token
2984
+ * @param storageDepositAmount the deposit amount needed to get registered with this contract
2978
2985
* @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
2979
2986
* @param features Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
2980
2987
* @param prefix Optional token prefix. Defaults to empty string
@@ -2987,11 +2994,24 @@ export function tnep141Token(
2987
2994
fullName : string ,
2988
2995
decimalPlaces : number ,
2989
2996
contractAddress : string ,
2997
+ storageDepositAmount : string ,
2990
2998
asset : UnderlyingAsset ,
2991
2999
features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
2992
3000
prefix = '' ,
2993
3001
suffix : string = name . toUpperCase ( ) ,
2994
3002
network : AccountNetwork = Networks . test . near
2995
3003
) {
2996
- return nep141Token ( id , name , fullName , decimalPlaces , contractAddress , asset , features , prefix , suffix , network ) ;
3004
+ return nep141Token (
3005
+ id ,
3006
+ name ,
3007
+ fullName ,
3008
+ decimalPlaces ,
3009
+ contractAddress ,
3010
+ storageDepositAmount ,
3011
+ asset ,
3012
+ features ,
3013
+ prefix ,
3014
+ suffix ,
3015
+ network
3016
+ ) ;
2997
3017
}
0 commit comments