@@ -49,7 +49,9 @@ export default class Compliance extends ContractWrapper {
49
49
eventName :
50
50
| 'LogTemplateCreated'
51
51
| 'LogNewTemplateProposal'
52
- | 'LogNewContractProposal' ,
52
+ | 'LogCancelTemplateProposal'
53
+ | 'LogNewContractProposal'
54
+ | 'LogCancelContractProposal' ,
53
55
indexedFilterValues : IndexedFilterValues ,
54
56
callback : EventCallback < ComplianceEventArgs > ,
55
57
) : string {
@@ -168,21 +170,21 @@ export default class Compliance extends ContractWrapper {
168
170
169
171
/**
170
172
* Set an STO contract to be stored in the offerings mapping in Compliance.sol
171
- * @param issuerAddress Address of the offering contract owner or auditor
173
+ * @param stoDeveloperAddress Address of the creator of the STO
172
174
* @param stoAddress Address of the STO contract deployed over the network
173
175
* @param fee Fee to be paid in poly to use that contract
174
176
* @param vestingPeriod Number of days investor binded to hold the Security token
175
177
* @param quorum Minimum percent of shareholders which need to vote to freeze
176
178
*/
177
179
async setSTO (
178
- issuerAddress : string ,
180
+ stoDeveloperAddress : string ,
179
181
stoAddress : string ,
180
182
fee : BigNumber ,
181
183
vestingPeriod : BigNumber ,
182
184
quorum : BigNumber ,
183
185
) {
184
186
await this . _contract . setSTO ( stoAddress , fee , vestingPeriod , quorum , {
185
- from : issuerAddress ,
187
+ from : stoDeveloperAddress ,
186
188
gas : 200000 ,
187
189
} ) ;
188
190
}
@@ -236,7 +238,7 @@ export default class Compliance extends ContractWrapper {
236
238
securityTokenAddress : string ,
237
239
proposalIndex : number ,
238
240
) : Promise < string > {
239
- return this . _contract . templateProposals . call (
241
+ return this . _contract . getTemplateByProposal . call (
240
242
securityTokenAddress ,
241
243
proposalIndex ,
242
244
) ;
@@ -298,12 +300,36 @@ export default class Compliance extends ContractWrapper {
298
300
async getTemplateReputation (
299
301
templateAddress : string ,
300
302
) : Promise < TemplateReputation > {
301
- const template = await this . _contract . templates ( templateAddress ) ;
303
+ const template = await this . _contract . templates . call ( templateAddress ) ;
302
304
return {
303
305
owner : template [ 0 ] ,
304
306
totalRaised : template [ 1 ] ,
305
307
timesUsed : template [ 2 ] ,
306
308
expires : template [ 3 ] ,
307
309
} ;
308
310
}
311
+
312
+ /**
313
+ * Returns all Template proposals
314
+ * @return An array of addresses
315
+ */
316
+ async getAllTemplateProposals (
317
+ securityTokenAddress : string ,
318
+ ) : Promise < Array < string >> {
319
+ return await this . _contract . getAllTemplateProposals . call (
320
+ securityTokenAddress ,
321
+ ) ;
322
+ }
323
+
324
+ /**
325
+ * Returns all STO proposal addresses
326
+ * @return An array of addresses
327
+ */
328
+ async getAllOfferingProposals (
329
+ securityTokenAddress : string ,
330
+ ) : Promise < Array < string >> {
331
+ return await this . _contract . getAllOfferingProposals . call (
332
+ securityTokenAddress ,
333
+ ) ;
334
+ }
309
335
}
0 commit comments