@@ -24,29 +24,27 @@ interface LaunchTieredStoParams {
24
24
currencies : Currency [ ] ;
25
25
raisedFundsWallet : string ;
26
26
unsoldTokensWallet : string ;
27
- stableCoinAddresses : string [ ] ;
27
+ stableCoinAddresses ? : string [ ] ;
28
28
customCurrency ?: Partial < CustomCurrency > ;
29
29
allowPreIssuance ?: boolean ;
30
30
}
31
31
32
- type OnlyEth =
33
- | [ Currency . ETH ]
34
- | [ Currency . StableCoin , Currency . ETH ]
35
- | [ Currency . ETH , Currency . StableCoin ] ;
36
- type OnlyPoly =
37
- | [ Currency . POLY ]
32
+ type OnlyEth = [ Currency . ETH ] ;
33
+ type EthAndStableCoin = [ Currency . StableCoin , Currency . ETH ] | [ Currency . ETH , Currency . StableCoin ] ;
34
+ type OnlyPoly = [ Currency . POLY ] ;
35
+ type PolyAndStableCoin =
38
36
| [ Currency . StableCoin , Currency . POLY ]
39
37
| [ Currency . POLY , Currency . StableCoin ] ;
40
- type EthAndPoly =
41
- | [ Currency . ETH , Currency . POLY ]
42
- | [ Currency . POLY , Currency . ETH ]
38
+ type EthAndPoly = [ Currency . ETH , Currency . POLY ] | [ Currency . POLY , Currency . ETH ] ;
39
+ type AllCurrencies =
43
40
| [ Currency . StableCoin , Currency . ETH , Currency . POLY ]
44
41
| [ Currency . ETH , Currency . StableCoin , Currency . POLY ]
45
42
| [ Currency . ETH , Currency . POLY , Currency . StableCoin ]
46
43
| [ Currency . StableCoin , Currency . POLY , Currency . ETH ]
47
44
| [ Currency . POLY , Currency . StableCoin , Currency . ETH ]
48
45
| [ Currency . POLY , Currency . ETH , Currency . StableCoin ] ;
49
46
47
+
50
48
/**
51
49
* Params for [[getSto]]
52
50
*/
@@ -60,7 +58,23 @@ interface LaunchTieredStoNoCustomCurrencyParams
60
58
currencies : OnlyEth | OnlyPoly | EthAndPoly ;
61
59
}
62
60
61
+ interface LaunchTieredStoNoCustomCurrencyParams
62
+ extends Omit < LaunchTieredStoParams , 'customCurrency' > {
63
+ currencies : EthAndStableCoin | PolyAndStableCoin | AllCurrencies ;
64
+ stableCoinAddresses : string [ ] ;
65
+ }
66
+
63
67
interface LaunchTieredStoCustomCurrencyEthParams extends LaunchTieredStoParams {
68
+ currencies : OnlyEth | EthAndStableCoin ;
69
+ customCurrency : {
70
+ currencySymbol ?: string ;
71
+ ethOracleAddress : string ;
72
+ } ;
73
+ stableCoinAddresses : string [ ] ;
74
+ }
75
+
76
+ interface LaunchTieredStoCustomCurrencyEthNoStableCoinParams
77
+ extends Omit < LaunchTieredStoParams , 'stableCoinAddresses' > {
64
78
currencies : OnlyEth ;
65
79
customCurrency : {
66
80
currencySymbol ?: string ;
@@ -69,6 +83,16 @@ interface LaunchTieredStoCustomCurrencyEthParams extends LaunchTieredStoParams {
69
83
}
70
84
71
85
interface LaunchTieredStoCustomCurrencyPolyParams extends LaunchTieredStoParams {
86
+ currencies : OnlyPoly | PolyAndStableCoin ;
87
+ customCurrency : {
88
+ currencySymbol ?: string ;
89
+ polyOracleAddress : string ;
90
+ } ;
91
+ stableCoinAddresses : string [ ] ;
92
+ }
93
+
94
+ interface LaunchTieredStoCustomCurrencyPolyNoStableCoinParams
95
+ extends Omit < LaunchTieredStoParams , 'stableCoinAddresses' > {
72
96
currencies : OnlyPoly ;
73
97
customCurrency : {
74
98
currencySymbol ?: string ;
@@ -77,6 +101,17 @@ interface LaunchTieredStoCustomCurrencyPolyParams extends LaunchTieredStoParams
77
101
}
78
102
79
103
interface LaunchTieredStoCustomCurrencyBothParams extends LaunchTieredStoParams {
104
+ currencies : AllCurrencies ;
105
+ customCurrency : {
106
+ currencySymbol ?: string ;
107
+ ethOracleAddress : string ;
108
+ polyOracleAddress : string ;
109
+ } ;
110
+ stableCoinAddresses : string [ ] ;
111
+ }
112
+
113
+ interface LaunchTieredStoCustomCurrencyBothNoStableCoinParams
114
+ extends Omit < LaunchTieredStoParams , 'stableCoinAddresses' > {
80
115
currencies : EthAndPoly ;
81
116
customCurrency : {
82
117
currencySymbol ?: string ;
@@ -87,16 +122,28 @@ interface LaunchTieredStoCustomCurrencyBothParams extends LaunchTieredStoParams
87
122
88
123
interface LaunchTieredStoMethod {
89
124
( args : LaunchTieredStoNoCustomCurrencyParams ) : Promise <
90
- TransactionQueue < LaunchTieredStoProcedureArgs >
125
+ TransactionQueue < LaunchTieredStoProcedureArgs , TieredSto >
126
+ > ;
127
+ ( args : LaunchTieredStoNoCustomCurrencyNoStableCoinParams ) : Promise <
128
+ TransactionQueue < LaunchTieredStoProcedureArgs , TieredSto >
91
129
> ;
92
130
( args : LaunchTieredStoCustomCurrencyEthParams ) : Promise <
93
- TransactionQueue < LaunchTieredStoProcedureArgs >
131
+ TransactionQueue < LaunchTieredStoProcedureArgs , TieredSto >
132
+ > ;
133
+ ( args : LaunchTieredStoCustomCurrencyEthNoStableCoinParams ) : Promise <
134
+ TransactionQueue < LaunchTieredStoProcedureArgs , TieredSto >
94
135
> ;
95
136
( args : LaunchTieredStoCustomCurrencyPolyParams ) : Promise <
96
- TransactionQueue < LaunchTieredStoProcedureArgs >
137
+ TransactionQueue < LaunchTieredStoProcedureArgs , TieredSto >
138
+ > ;
139
+ ( args : LaunchTieredStoCustomCurrencyPolyNoStableCoinParams ) : Promise <
140
+ TransactionQueue < LaunchTieredStoProcedureArgs , TieredSto >
97
141
> ;
98
142
( args : LaunchTieredStoCustomCurrencyBothParams ) : Promise <
99
- TransactionQueue < LaunchTieredStoProcedureArgs >
143
+ TransactionQueue < LaunchTieredStoProcedureArgs , TieredSto >
144
+ > ;
145
+ ( args : LaunchTieredStoCustomCurrencyBothNoStableCoinParams ) : Promise <
146
+ TransactionQueue < LaunchTieredStoProcedureArgs , TieredSto >
100
147
> ;
101
148
}
102
149
0 commit comments