Skip to content

Commit 2795faf

Browse files
committed
remove _ prefix from public functions
1 parent 3aedc88 commit 2795faf

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

contracts/libraries/VolumeRestrictionLib.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ library VolumeRestrictionLib {
3030
);
3131
}
3232

33-
function _deleteHolderFromList(VolumeRestrictionTMStorage.RestrictedData storage data, address _holder, uint8 _typeOfPeriod) public {
33+
function deleteHolderFromList(VolumeRestrictionTMStorage.RestrictedData storage data, address _holder, uint8 _typeOfPeriod) public {
3434
// Deleting the holder if holder's type of Period is `Both` type otherwise
3535
// it will assign the given type `_typeOfPeriod` to the _holder typeOfPeriod
3636
// `_typeOfPeriod` it always be contrary to the removing restriction
@@ -51,7 +51,7 @@ library VolumeRestrictionLib {
5151
}
5252
}
5353

54-
function _addRestrictionData(VolumeRestrictionTMStorage.RestrictedData storage data, address _holder, uint8 _callFrom, uint256 _endTime) public {
54+
function addRestrictionData(VolumeRestrictionTMStorage.RestrictedData storage data, address _holder, uint8 _callFrom, uint256 _endTime) public {
5555
uint128 index = data.restrictedHolders[_holder].index;
5656
if (data.restrictedHolders[_holder].seen == 0) {
5757
data.restrictedAddresses.push(_holder);

contracts/modules/TransferManager/VolumeRestrictionTM.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, ITransferManager {
212212
_endTime,
213213
RestrictionType(_restrictionType)
214214
);
215-
VolumeRestrictionLib._addRestrictionData(holderData, _holder, uint8(TypeOfPeriod.MultipleDays), individualRestriction[_holder].endTime);
215+
VolumeRestrictionLib.addRestrictionData(holderData, _holder, uint8(TypeOfPeriod.MultipleDays), individualRestriction[_holder].endTime);
216216
emit AddIndividualRestriction(
217217
_holder,
218218
_allowedTokens,
@@ -275,7 +275,7 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, ITransferManager {
275275
_endTime,
276276
RestrictionType(_restrictionType)
277277
);
278-
VolumeRestrictionLib._addRestrictionData(holderData, _holder, uint8(TypeOfPeriod.OneDay), individualRestriction[_holder].endTime);
278+
VolumeRestrictionLib.addRestrictionData(holderData, _holder, uint8(TypeOfPeriod.OneDay), individualRestriction[_holder].endTime);
279279
emit AddIndividualDailyRestriction(
280280
_holder,
281281
_allowedTokens,
@@ -447,7 +447,7 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, ITransferManager {
447447
require(_holder != address(0));
448448
require(individualRestriction[_holder].endTime != 0);
449449
individualRestriction[_holder] = VolumeRestriction(0, 0, 0, 0, RestrictionType(0));
450-
VolumeRestrictionLib._deleteHolderFromList(holderData, _holder, uint8(TypeOfPeriod.OneDay));
450+
VolumeRestrictionLib.deleteHolderFromList(holderData, _holder, uint8(TypeOfPeriod.OneDay));
451451
userToBucket[_holder].lastTradedDayTime = 0;
452452
userToBucket[_holder].sumOfLastPeriod = 0;
453453
userToBucket[_holder].daysCovered = 0;
@@ -477,7 +477,7 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, ITransferManager {
477477
require(_holder != address(0));
478478
require(individualDailyRestriction[_holder].endTime != 0);
479479
individualDailyRestriction[_holder] = VolumeRestriction(0, 0, 0, 0, RestrictionType(0));
480-
VolumeRestrictionLib._deleteHolderFromList(holderData, _holder, uint8(TypeOfPeriod.MultipleDays));
480+
VolumeRestrictionLib.deleteHolderFromList(holderData, _holder, uint8(TypeOfPeriod.MultipleDays));
481481
userToBucket[_holder].dailyLastTradedDayTime = 0;
482482
emit IndividualDailyRestrictionRemoved(_holder);
483483
}

test/y_volume_restriction_tm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ contract('VolumeRestrictionTransferManager', accounts => {
543543
await I_VolumeRestrictionTM.addIndividualRestrictionMulti(
544544
[account_investor2, account_delegate3, account_investor4],
545545
[web3.utils.toWei("12"), web3.utils.toWei("10"), web3.utils.toWei("15")],
546-
[latestTime() + duration.seconds(2), latestTime() + duration.seconds(2), latestTime() + duration.seconds(2)],
546+
[0, 0, 0],
547547
[3, 4, 5],
548548
[latestTime() + duration.days(5), latestTime() + duration.days(6), latestTime() + duration.days(7)],
549549
[0,0,0],

0 commit comments

Comments
 (0)