Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit 5287a3b

Browse files
author
Victor Wiebe
committed
fix: 🐛 securityToken and other wrappers comments
1 parent f691e62 commit 5287a3b

11 files changed

+83
-138
lines changed

src/contract_wrappers/modules/transfer_manager/blacklist_transfer_manager_wrapper.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ export default class BlacklistTransferManagerWrapper extends ModuleWrapper {
324324
}
325325

326326
/**
327-
* unpause the module
327+
* Unpause the module
328328
*/
329329
public unpause = async (params: TxParams) => {
330330
assert.assert(await this.paused(), 'Controller not currently paused');
@@ -333,14 +333,14 @@ export default class BlacklistTransferManagerWrapper extends ModuleWrapper {
333333
};
334334

335335
/**
336-
* check if the module is paused
336+
* Check if the module is paused
337337
*/
338338
public paused = async () => {
339339
return (await this.contract).paused.callAsync();
340340
};
341341

342342
/**
343-
* pause the module
343+
* Pause the module
344344
*/
345345
public pause = async (params: TxParams) => {
346346
assert.assert(!(await this.paused()), 'Controller currently paused');
@@ -669,9 +669,6 @@ export default class BlacklistTransferManagerWrapper extends ModuleWrapper {
669669

670670
/**
671671
* return the amount of tokens for a given user as per the partition
672-
* @param partition Identifier
673-
* @param tokenHolder Whom token amount need to query
674-
* @param additionalBalance It is the `value` that transfers during transfer/transferFrom function call
675672
* @return amount of tokens
676673
*/
677674
public getTokensByPartition = async (params: GetTokensByPartitionParams): Promise<BigNumber> => {
@@ -700,8 +697,7 @@ export default class BlacklistTransferManagerWrapper extends ModuleWrapper {
700697
* Restrict the blacklist address to transfer tokens
701698
* if the current time is between the timeframe define for the
702699
* blacklist type associated with the from address
703-
* @return boolean transfer result
704-
* @return address
700+
* @return boolean transfer result, address
705701
*/
706702
public verifyTransfer = async (params: VerifyTransferParams): Promise<VerifyTransfer> => {
707703
assert.isETHAddressHex('from', params.from);

src/contract_wrappers/modules/transfer_manager/count_transfer_manager_wrapper.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default class CountTransferManagerWrapper extends ModuleWrapper {
111111
}
112112

113113
/**
114-
* unpause the module
114+
* Unpause the module
115115
*/
116116
public unpause = async (params: TxParams) => {
117117
assert.assert(await this.paused(), 'Controller not currently paused');
@@ -120,14 +120,14 @@ export default class CountTransferManagerWrapper extends ModuleWrapper {
120120
};
121121

122122
/**
123-
* check if module paused
123+
* Check if module paused
124124
*/
125125
public paused = async () => {
126126
return (await this.contract).paused.callAsync();
127127
};
128128

129129
/**
130-
* pause the module
130+
* Pause the module
131131
*/
132132
public pause = async (params: TxParams) => {
133133
assert.assert(!(await this.paused()), 'Controller currently paused');
@@ -143,9 +143,8 @@ export default class CountTransferManagerWrapper extends ModuleWrapper {
143143
};
144144

145145
/**
146-
* Used to verify the transfer transaction and prevent a transfer if it passes the allowed amount of token holders
147-
* @return boolean transfer result
148-
* @return address
146+
* Used to verify the transfer transaction and prevent a transfer if it passes the allowed amount of token holders
147+
* @return boolean transfer result, address
149148
*/
150149
public verifyTransfer = async (params: VerifyTransferParams) => {
151150
assert.isETHAddressHex('from', params.from);

src/contract_wrappers/modules/transfer_manager/general_transfer_manager_wrapper.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export default class GeneralTransferManagerWrapper extends ModuleWrapper {
386386
}
387387

388388
/**
389-
* unpause the module
389+
* Unpause the module
390390
*/
391391
public unpause = async (params: TxParams) => {
392392
assert.assert(await this.paused(), 'Controller not currently paused');
@@ -395,14 +395,14 @@ export default class GeneralTransferManagerWrapper extends ModuleWrapper {
395395
};
396396

397397
/**
398-
* check if the module is paused
398+
* Check if the module is paused
399399
*/
400400
public paused = async (): Promise<boolean> => {
401401
return (await this.contract).paused.callAsync();
402402
};
403403

404404
/**
405-
* pause the module
405+
* Pause the module
406406
*/
407407
public pause = async (params: TxParams) => {
408408
assert.assert(!(await this.paused()), 'Controller currently paused');
@@ -428,8 +428,7 @@ export default class GeneralTransferManagerWrapper extends ModuleWrapper {
428428

429429
/**
430430
* Offset to be applied to all timings (except KYC expiry)
431-
* @return canSendAfter
432-
* @return canReceiveAfter
431+
* @return canSendAfter, canReceiveAfter
433432
*/
434433
public defaults = async (): Promise<Defaults> => {
435434
const result = await (await this.contract).defaults.callAsync();
@@ -583,9 +582,7 @@ export default class GeneralTransferManagerWrapper extends ModuleWrapper {
583582

584583
/**
585584
* Returns list of specified investors data
586-
* @returns canSendAfter array
587-
* @returns canReceiveAfter array
588-
* @returns expiryTime array
585+
* @returns canSendAfter array, canReceiveAfter array, expiryTime array
589586
*/
590587
public getKYCData = async (params: GetKYCDataParams): Promise<KYCData[]> => {
591588
const result = await (await this.contract).getKYCData.callAsync(params.investors);

src/contract_wrappers/modules/transfer_manager/lock_up_transfer_manager_wrapper.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export default class LockUpTransferManagerWrapper extends ModuleWrapper {
365365
}
366366

367367
/**
368-
* unpause the module
368+
* Unpause the module
369369
*/
370370
public unpause = async (params: TxParams) => {
371371
assert.assert(await this.paused(), 'Controller not currently paused');
@@ -374,14 +374,14 @@ export default class LockUpTransferManagerWrapper extends ModuleWrapper {
374374
};
375375

376376
/**
377-
* check if the module is paused
377+
* Check if the module is paused
378378
*/
379379
public paused = async () => {
380380
return (await this.contract).paused.callAsync();
381381
};
382382

383383
/**
384-
* pause the module
384+
* Pause the module
385385
*/
386386
public pause = async (params: TxParams) => {
387387
assert.assert(!(await this.paused()), 'Controller currently paused');
@@ -503,8 +503,7 @@ export default class LockUpTransferManagerWrapper extends ModuleWrapper {
503503

504504
/**
505505
* Used to verify the transfer transaction and prevent locked up tokens from being transferred
506-
* @return boolean transfer result
507-
* @return address
506+
* @return boolean transfer result, address
508507
*/
509508
public verifyTransfer = async (params: VerifyTransferParams): Promise<VerifyTransfer> => {
510509
assert.isETHAddressHex('from', params.from);

src/contract_wrappers/modules/transfer_manager/manual_approval_transfer_manager_wrapper.ts

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export default class ManualApprovalTransferManagerWrapper extends ModuleWrapper
271271
}
272272

273273
/**
274-
* unpause the module
274+
* Unpause the module
275275
*/
276276
public unpause = async (params: TxParams) => {
277277
assert.assert(await this.paused(), 'Controller not currently paused');
@@ -280,14 +280,14 @@ export default class ManualApprovalTransferManagerWrapper extends ModuleWrapper
280280
};
281281

282282
/**
283-
* check if the module is paused
283+
* Check if the module is paused
284284
*/
285285
public paused = async () => {
286286
return (await this.contract).paused.callAsync();
287287
};
288288

289289
/**
290-
* pause the module
290+
* Pause the module
291291
*/
292292
public pause = async (params: TxParams) => {
293293
assert.assert(!(await this.paused()), 'Controller currently paused');
@@ -322,8 +322,7 @@ export default class ManualApprovalTransferManagerWrapper extends ModuleWrapper
322322

323323
/**
324324
* Used to verify the transfer transaction (View)
325-
* @return boolean transfer result
326-
* @return address
325+
* @return boolean transfer result, address
327326
*/
328327
public verifyTransfer = async (params: VerifyTransferParams) => {
329328
assert.isETHAddressHex('from', params.from);
@@ -493,11 +492,8 @@ export default class ManualApprovalTransferManagerWrapper extends ModuleWrapper
493492

494493
/**
495494
* Returns the all active approvals corresponds to an address
496-
* @return addresses from
497-
* @return addresses to
498-
* @return allowances provided to the approvals
499-
* @return expiry times provided to the approvals
500-
* @return descriptions provided to the approvals
495+
* @return addresses from, addresses to, allowances provided to the approvals, expiry times provided to the
496+
* approvals, descriptions provided to the approvals
501497
*/
502498
public getActiveApprovalsToUser = async (params: GetActiveApprovalsToUserParams): Promise<Approval[]> => {
503499
assert.isETHAddressHex('user', params.user);
@@ -519,9 +515,7 @@ export default class ManualApprovalTransferManagerWrapper extends ModuleWrapper
519515

520516
/**
521517
* Get the details of the approval corresponds to from & to addresses
522-
* @return expiryTime of the approval
523-
* @return allowance provided to the approval
524-
* @return Description provided to the approval
518+
* @return expiryTime of the approval, allowance provided to the approval, Description provided to the approval
525519
*/
526520
public getApprovalDetails = async (params: GetApprovalDetailsParams): Promise<Approval> => {
527521
assert.isETHAddressHex('from', params.from);
@@ -547,11 +541,8 @@ export default class ManualApprovalTransferManagerWrapper extends ModuleWrapper
547541

548542
/**
549543
* Get the details of all approvals
550-
* @return addresses from
551-
* @return addresses to
552-
* @return allowances provided to the approvals
553-
* @return expiry times provided to the approvals
554-
* @return descriptions provided to the approvals
544+
* @return addresses from, addresses to, allowances provided to the approvals, expiry times provided to the
545+
* approvals, descriptions provided to the approvals
555546
*/
556547
public getAllApprovals = async (): Promise<Approval[]> => {
557548
const result = await (await this.contract).getAllApprovals.callAsync();

src/contract_wrappers/modules/transfer_manager/percentage_transfer_manager_wrapper.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export default class PercentageTransferManagerWrapper extends ModuleWrapper {
191191
};
192192

193193
/**
194-
* unpause the module
194+
* Unpause the module
195195
*/
196196
public unpause = async (params: TxParams) => {
197197
assert.assert(await this.paused(), 'Controller not currently paused');
@@ -200,14 +200,14 @@ export default class PercentageTransferManagerWrapper extends ModuleWrapper {
200200
};
201201

202202
/**
203-
* check if module is paused
203+
* Check if module is paused
204204
*/
205205
public paused = async (): Promise<boolean> => {
206206
return (await this.contract).paused.callAsync();
207207
};
208208

209209
/**
210-
* pause the module
210+
* Pause the module
211211
*/
212212
public pause = async (params: TxParams) => {
213213
assert.assert(!(await this.paused()), 'Controller currently paused');
@@ -226,8 +226,7 @@ export default class PercentageTransferManagerWrapper extends ModuleWrapper {
226226

227227
/**
228228
* Used to verify the transfer transaction (View)
229-
* @return boolean transfer result
230-
* @return address
229+
* @return boolean transfer result, address
231230
*/
232231
public verifyTransfer = async (params: VerifyTransferParams) => {
233232
assert.isETHAddressHex('from', params.from);
@@ -247,7 +246,7 @@ export default class PercentageTransferManagerWrapper extends ModuleWrapper {
247246
};
248247

249248
/**
250-
* sets the maximum percentage that an individual token holder can hold
249+
* Sets the maximum percentage that an individual token holder can hold
251250
*/
252251
public changeHolderPercentage = async (params: ChangeHolderPercentageParams) => {
253252
assert.assert(await this.isCallerAllowed(params.txData, Perm.Admin), 'Caller is not allowed');

src/contract_wrappers/modules/transfer_manager/volume_restriction_transfer_manager_wrapper.ts

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,7 @@ export default class VolumeRestrictionTransferManagerWrapper extends ModuleWrapp
457457

458458
/**
459459
* Used to verify the transfer transaction (View)
460-
* @return boolean transfer result
461-
* @return address
460+
* @return boolean transfer result, address
462461
*/
463462
public verifyTransfer = async (params: VerifyTransferParams) => {
464463
assert.isETHAddressHex('from', params.from);
@@ -479,11 +478,7 @@ export default class VolumeRestrictionTransferManagerWrapper extends ModuleWrapp
479478

480479
/**
481480
* Gets individual restriction for investor
482-
* @return allowedTokens
483-
* @return startTime
484-
* @return rollingPeriodInDays
485-
* @return endTime
486-
* @return restrictionType
481+
* @return allowedTokens, startTime, rollingPeriodInDays, endTime, restrictionType
487482
*/
488483
public getIndividualRestriction = async (
489484
params: HolderIndividualRestrictionParams,
@@ -504,11 +499,7 @@ export default class VolumeRestrictionTransferManagerWrapper extends ModuleWrapp
504499

505500
/**
506501
* Gets default restriction value
507-
* @return allowedTokens
508-
* @return startTime
509-
* @return rollingPeriodInDays
510-
* @return endTime
511-
* @return restrictionType
502+
* @return allowedTokens, startTime, rollingPeriodInDays, endTime, restrictionType
512503
*/
513504
public getDefaultRestriction = async (): Promise<IndividualRestriction> => {
514505
const result = await (await this.contract).getDefaultRestriction.callAsync();
@@ -527,11 +518,7 @@ export default class VolumeRestrictionTransferManagerWrapper extends ModuleWrapp
527518

528519
/**
529520
* Gets default daily restriction value
530-
* @return allowedTokens
531-
* @return startTime
532-
* @return rollingPeriodInDays
533-
* @return endTime
534-
* @return restrictionType
521+
* @return allowedTokens, startTime, rollingPeriodInDays, endTime, restrictionType
535522
*/
536523
public getDefaultDailyRestriction = async (): Promise<IndividualRestriction> => {
537524
const result = await (await this.contract).getDefaultDailyRestriction.callAsync();
@@ -557,11 +544,7 @@ export default class VolumeRestrictionTransferManagerWrapper extends ModuleWrapp
557544

558545
/**
559546
* Gets individual daily restriction value
560-
* @return allowedTokens
561-
* @return startTime
562-
* @return rollingPeriodInDays
563-
* @return endTime
564-
* @return restrictionType
547+
* @return allowedTokens, startTime, rollingPeriodInDays, endTime, restrictionType
565548
*/
566549
public getIndividualDailyRestriction = async (
567550
params: HolderIndividualRestrictionParams,
@@ -1038,11 +1021,7 @@ export default class VolumeRestrictionTransferManagerWrapper extends ModuleWrapp
10381021

10391022
/**
10401023
* Use to get the bucket details for a given address
1041-
* @return lastTradedDayTime
1042-
* @return sumOfLastPeriod
1043-
* @return days covered
1044-
* @return date lastTradedDayTime
1045-
* @return timestamp at which last transaction get executed
1024+
* @return lastTradedDayTime, sumOfLastPeriod, days covered, date lastTradedDayTime, timestamp at which last transaction get executed
10461025
*/
10471026
public getIndividualBucketDetailsToUser = async (
10481027
params: GetIndividualBucketDetailsToUserParams,
@@ -1062,11 +1041,7 @@ export default class VolumeRestrictionTransferManagerWrapper extends ModuleWrapp
10621041

10631042
/**
10641043
* Use to get the bucket details for a given address
1065-
* @return lastTradedDayTime
1066-
* @return sumOfLastPeriod
1067-
* @return days covered
1068-
* @return date lastTradedDayTime
1069-
* @return timestamp at which last transaction get executed
1044+
* @return lastTradedDayTime, sumOfLastPeriod, days covered, date lastTradedDayTime, timestamp at which last transaction get executed
10701045
*/
10711046
public getDefaultBucketDetailsToUser = async (
10721047
params: GetIndividualBucketDetailsToUserParams,
@@ -1104,13 +1079,13 @@ export default class VolumeRestrictionTransferManagerWrapper extends ModuleWrapp
11041079

11051080
/**
11061081
* Provide the restriction details of all the restricted addresses
1107-
* @return List of the restricted addresses
1108-
* @return List of the tokens allowed to the restricted addresses corresponds to restricted address
1109-
* @return List of the start time of the restriction corresponds to restricted address
1110-
* @return List of the rolling period in days for a restriction corresponds to restricted address.
1111-
* @return List of the end time of the restriction corresponds to restricted address.
1112-
* @return List of the type of restriction to validate the value of the `allowedTokens`
1113-
* of the restriction corresponds to restricted address
1082+
* @return List of the restricted addresses,
1083+
* List of the tokens allowed to the restricted addresses corresponds to restricted address,
1084+
* List of the start time of the restriction corresponds to restricted address,
1085+
* List of the rolling period in days for a restriction corresponds to restricted address,
1086+
* List of the end time of the restriction corresponds to restricted address,
1087+
* List of the type of restriction to validate the value of the `allowedTokens`
1088+
* of the restriction corresponds to restricted address,
11141089
*/
11151090
public getRestrictionData = async (): Promise<GetRestrictedData[]> => {
11161091
const result = await (await this.contract).getRestrictionData.callAsync();

0 commit comments

Comments
 (0)