@@ -49,7 +49,9 @@ export default class Compliance extends ContractWrapper {
4949 eventName :
5050 | 'LogTemplateCreated'
5151 | 'LogNewTemplateProposal'
52- | 'LogNewContractProposal' ,
52+ | 'LogCancelTemplateProposal'
53+ | 'LogNewContractProposal'
54+ | 'LogCancelContractProposal' ,
5355 indexedFilterValues : IndexedFilterValues ,
5456 callback : EventCallback < ComplianceEventArgs > ,
5557 ) : string {
@@ -168,21 +170,21 @@ export default class Compliance extends ContractWrapper {
168170
169171 /**
170172 * 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
172174 * @param stoAddress Address of the STO contract deployed over the network
173175 * @param fee Fee to be paid in poly to use that contract
174176 * @param vestingPeriod Number of days investor binded to hold the Security token
175177 * @param quorum Minimum percent of shareholders which need to vote to freeze
176178 */
177179 async setSTO (
178- issuerAddress : string ,
180+ stoDeveloperAddress : string ,
179181 stoAddress : string ,
180182 fee : BigNumber ,
181183 vestingPeriod : BigNumber ,
182184 quorum : BigNumber ,
183185 ) {
184186 await this . _contract . setSTO ( stoAddress , fee , vestingPeriod , quorum , {
185- from : issuerAddress ,
187+ from : stoDeveloperAddress ,
186188 gas : 200000 ,
187189 } ) ;
188190 }
@@ -236,7 +238,7 @@ export default class Compliance extends ContractWrapper {
236238 securityTokenAddress : string ,
237239 proposalIndex : number ,
238240 ) : Promise < string > {
239- return this . _contract . templateProposals . call (
241+ return this . _contract . getTemplateByProposal . call (
240242 securityTokenAddress ,
241243 proposalIndex ,
242244 ) ;
@@ -298,12 +300,36 @@ export default class Compliance extends ContractWrapper {
298300 async getTemplateReputation (
299301 templateAddress : string ,
300302 ) : Promise < TemplateReputation > {
301- const template = await this . _contract . templates ( templateAddress ) ;
303+ const template = await this . _contract . templates . call ( templateAddress ) ;
302304 return {
303305 owner : template [ 0 ] ,
304306 totalRaised : template [ 1 ] ,
305307 timesUsed : template [ 2 ] ,
306308 expires : template [ 3 ] ,
307309 } ;
308310 }
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+ }
309335}
0 commit comments