VolumeRestrictionTM.sol
Last updated
Was this helpful?
Last updated
Was this helpful?
View Source:
↗ Extends: ,
VolumeRestrictionTM
Events
Constructor
Arguments
Name
Type
Description
_securityToken
address
Address of the security token
_polyAddress
address
Address of the polytoken
Used to verify the transfer/transferFrom transaction and prevent tranaction whose volume of tokens will voilate the maximum volume transfer restriction
Arguments
Name
Type
Description
_from
address
Address of the sender
address
_from Address of the sender
_amount
uint256
The amount of tokens to transfer
bytes
_from Address of the sender
Used to verify the transfer/transferFrom transaction and prevent tranaction whose volume of tokens will voilate the maximum volume transfer restriction
Arguments
Name
Type
Description
_from
address
Address of the sender
address
_from Address of the sender
_amount
uint256
The amount of tokens to transfer
bytes
_from Address of the sender
Used to verify the transfer/transferFrom transaction and prevent tranaction whose volume of tokens will voilate the maximum volume transfer restriction
Arguments
Name
Type
Description
_from
address
Address of the sender
_amount
uint256
The amount of tokens to transfer
Add/Remove wallet address from the exempt list
Arguments
Name
Type
Description
_wallet
address
Ethereum wallet/contract address that need to be exempted
_exempted
bool
Boolean value used to add (i.e true) or remove (i.e false) from the list
Use to add the new individual restriction for a given token holder
Arguments
Name
Type
Description
_holder
address
Address of the token holder, whom restriction will be implied
_allowedTokens
uint256
Amount of tokens allowed to be trade for a given address.
_startTime
uint256
Unix timestamp at which restriction get into effect
_rollingPeriodInDays
uint256
Rolling period in days (Minimum value should be 1 day)
_endTime
uint256
Unix timestamp at which restriction effects will gets end.
_restrictionType
enum VolumeRestrictionTMStorage.RestrictionType
Whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to add the new individual daily restriction for all token holder
Arguments
Name
Type
Description
_holder
address
Address of the token holder, whom restriction will be implied
_allowedTokens
uint256
Amount of tokens allowed to be traded for all token holder.
_startTime
uint256
Unix timestamp at which restriction get into effect
_endTime
uint256
Unix timestamp at which restriction effects will gets end.
_restrictionType
enum VolumeRestrictionTMStorage.RestrictionType
Whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to add the new individual daily restriction for multiple token holders
Arguments
Name
Type
Description
_holders
address[]
Array of address of the token holders, whom restriction will be implied
_allowedTokens
uint256[]
Array of amount of tokens allowed to be trade for a given address.
_startTimes
uint256[]
Array of unix timestamps at which restrictions get into effect
_endTimes
uint256[]
Array of unix timestamps at which restriction effects will gets end.
_restrictionTypes
enum VolumeRestrictionTMStorage.RestrictionType[]
Array of restriction types value whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to add the new individual restriction for multiple token holders
Arguments
Name
Type
Description
_holders
address[]
Array of address of the token holders, whom restriction will be implied
_allowedTokens
uint256[]
Array of amount of tokens allowed to be trade for a given address.
_startTimes
uint256[]
Array of unix timestamps at which restrictions get into effect
_rollingPeriodInDays
uint256[]
Array of rolling period in days (Minimum value should be 1 day)
_endTimes
uint256[]
Array of unix timestamps at which restriction effects will gets end.
_restrictionTypes
enum VolumeRestrictionTMStorage.RestrictionType[]
Array of restriction types value whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to add the new default restriction for all token holder
Arguments
Name
Type
Description
_allowedTokens
uint256
Amount of tokens allowed to be traded for all token holder.
_startTime
uint256
Unix timestamp at which restriction get into effect
_rollingPeriodInDays
uint256
Rolling period in days (Minimum value should be 1 day)
_endTime
uint256
Unix timestamp at which restriction effects will gets end.
_restrictionType
enum VolumeRestrictionTMStorage.RestrictionType
Whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to add the new default daily restriction for all token holder
Arguments
Name
Type
Description
_allowedTokens
uint256
Amount of tokens allowed to be traded for all token holder.
_startTime
uint256
Unix timestamp at which restriction get into effect
_endTime
uint256
Unix timestamp at which restriction effects will gets end.
_restrictionType
enum VolumeRestrictionTMStorage.RestrictionType
Whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
use to remove the individual restriction for a given address
Arguments
Name
Type
Description
_holder
address
Address of the user
Arguments
Name
Type
Description
_holder
address
use to remove the individual restriction for a given address
Arguments
Name
Type
Description
_holders
address[]
Array of address of the user
use to remove the individual daily restriction for a given address
Arguments
Name
Type
Description
_holder
address
Address of the user
Arguments
Name
Type
Description
_holder
address
use to remove the individual daily restriction for a given address
Arguments
Name
Type
Description
_holders
address[]
Array of address of the user
Use to remove the default restriction
Arguments
Name
Type
Description
Use to remove the daily default restriction
Arguments
Name
Type
Description
Use to modify the existing individual restriction for a given token holder
Arguments
Name
Type
Description
_holder
address
Address of the token holder, whom restriction will be implied
_allowedTokens
uint256
Amount of tokens allowed to be trade for a given address.
_startTime
uint256
Unix timestamp at which restriction get into effect
_rollingPeriodInDays
uint256
Rolling period in days (Minimum value should be 1 day)
_endTime
uint256
Unix timestamp at which restriction effects will gets end.
_restrictionType
enum VolumeRestrictionTMStorage.RestrictionType
Whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to modify the existing individual daily restriction for a given token holder
Arguments
Name
Type
Description
_holder
address
Address of the token holder, whom restriction will be implied
_allowedTokens
uint256
Amount of tokens allowed to be trade for a given address.
_startTime
uint256
Unix timestamp at which restriction get into effect
_endTime
uint256
Unix timestamp at which restriction effects will gets end.
_restrictionType
enum VolumeRestrictionTMStorage.RestrictionType
Whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to modify the existing individual daily restriction for multiple token holders
Arguments
Name
Type
Description
_holders
address[]
Array of address of the token holders, whom restriction will be implied
_allowedTokens
uint256[]
Array of amount of tokens allowed to be trade for a given address.
_startTimes
uint256[]
Array of unix timestamps at which restrictions get into effect
_endTimes
uint256[]
Array of unix timestamps at which restriction effects will gets end.
_restrictionTypes
enum VolumeRestrictionTMStorage.RestrictionType[]
Array of restriction types value whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to modify the existing individual restriction for multiple token holders
Arguments
Name
Type
Description
_holders
address[]
Array of address of the token holders, whom restriction will be implied
_allowedTokens
uint256[]
Array of amount of tokens allowed to be trade for a given address.
_startTimes
uint256[]
Array of unix timestamps at which restrictions get into effect
_rollingPeriodInDays
uint256[]
Array of rolling period in days (Minimum value should be 1 day)
_endTimes
uint256[]
Array of unix timestamps at which restriction effects will gets end.
_restrictionTypes
enum VolumeRestrictionTMStorage.RestrictionType[]
Array of restriction types value whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to modify the global restriction for all token holder
Arguments
Name
Type
Description
_allowedTokens
uint256
Amount of tokens allowed to be traded for all token holder.
_startTime
uint256
Unix timestamp at which restriction get into effect
_rollingPeriodInDays
uint256
Rolling period in days (Minimum value should be 1 day)
_endTime
uint256
Unix timestamp at which restriction effects will gets end.
_restrictionType
enum VolumeRestrictionTMStorage.RestrictionType
Whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Use to modify the daily default restriction for all token holder
Arguments
Name
Type
Description
_allowedTokens
uint256
Amount of tokens allowed to be traded for all token holder.
_startTime
uint256
Unix timestamp at which restriction get into effect
_endTime
uint256
Unix timestamp at which restriction effects will gets end.
_restrictionType
enum VolumeRestrictionTMStorage.RestrictionType
Whether it will be Fixed
(fixed no. of tokens allowed to transact)
or Percentage
(tokens are calculated as per the totalSupply in the fly). |
Internal function used to validate the transaction for a given address If it validates then it also update the storage corressponds to the default restriction
Arguments
Name
Type
Description
_amount
uint256
_from
address
_isDefault
bool
_restriction
struct VolumeRestrictionTMStorage.VolumeRestriction
Arguments
Name
Type
Description
dailyRestriction
struct VolumeRestrictionTMStorage.VolumeRestriction
restriction
struct VolumeRestrictionTMStorage.VolumeRestriction
allowedAmount
uint256
allowedDailyAmount
uint256
The function is used to check specific edge case where the user restriction type change from default to individual or vice versa. It will return true when last transaction traded by the user and the current txn timestamp lies in the same day. NB - Instead of comparing the current day transaction amount, we are comparing the total amount traded on the lastTradedDayTime that makes the restriction strict. The reason is not availability of amount that transacted on the current day (because of bucket desgin).
Arguments
Name
Type
Description
_isDefault
bool
_from
address
_amount
uint256
_sumOfLastPeriod
uint256
_allowedAmount
uint256
Arguments
Name
Type
Description
_amount
uint256
_from
address
_isDefault
bool
_dailyLastTradedDayTime
uint256
_restriction
struct VolumeRestrictionTMStorage.VolumeRestriction
Arguments
Name
Type
Description
_from
address
isDefault
bool
_fromTime
uint256
_diffDays
uint256
_rollingPeriodInDays
uint256
_bucketDetails
struct VolumeRestrictionTMStorage.BucketDetails
Arguments
Name
Type
Description
_amountToTransact
uint256
_from
address
_isDefault
bool
_restriction
struct VolumeRestrictionTMStorage.VolumeRestriction
_sumOfLastPeriod
uint256
Arguments
Name
Type
Description
_sumOfLastPeriod
uint256
_restriction
struct VolumeRestrictionTMStorage.VolumeRestriction
Arguments
Name
Type
Description
_from
address
_amount
uint256
_lastTradedDayTime
uint256
_sumOfLastPeriod
uint256
_daysCovered
uint256
_dailyLastTradedDayTime
uint256
_endTime
uint256
isDefault
bool
Arguments
Name
Type
Description
_from
address
_amount
uint256
_lastTradedDayTime
uint256
_sumOfLastPeriod
uint256
_daysCovered
uint256
_dailyLastTradedDayTime
uint256
_endTime
uint256
isDefault
bool
details
struct VolumeRestrictionTMStorage.BucketDetails
Arguments
Name
Type
Description
_allowedTokens
uint256
_startTime
uint256
_rollingPeriodDays
uint256
_endTime
uint256
_restrictionType
enum VolumeRestrictionTMStorage.RestrictionType
_earliestStartTime
uint256
isModifyDaily
bool
Arguments
Name
Type
Description
_startTime
uint256
Arguments
Name
Type
Description
_startTime
uint256
return the amount of tokens for a given user as per the partition
Arguments
Name
Type
Description
_partition
bytes32
Identifier
_tokenHolder
address
Whom token amount need to query
_additionalBalance
uint256
It is the _value
that transfer during transfer/transferFrom function call
Use to get the bucket details for a given address
Returns
uint256 lastTradedDayTime
Arguments
Name
Type
Description
_user
address
Address of the token holder for whom the bucket details has queried
Use to get the bucket details for a given address
Returns
uint256 lastTradedDayTime
Arguments
Name
Type
Description
_user
address
Address of the token holder for whom the bucket details has queried
Arguments
Name
Type
Description
_bucket
struct VolumeRestrictionTMStorage.BucketDetails
Use to get the volume of token that being traded at a particular day (_at
+ 24 hours) for a given user
Arguments
Name
Type
Description
_user
address
Address of the token holder
_at
uint256
Timestamp
This function returns the signature of configure function
Arguments
Name
Type
Description
Use to return the list of exempted addresses
Arguments
Name
Type
Description
Arguments
Name
Type
Description
_investor
address
Arguments
Name
Type
Description
_investor
address
Arguments
Name
Type
Description
Arguments
Name
Type
Description
Arguments
Name
Type
Description
_volumeRestriction
struct VolumeRestrictionTMStorage.VolumeRestriction
Provide the restriction details of all the restricted addresses
Returns
address List of the restricted addresses
Arguments
Name
Type
Description
Arguments
Name
Type
Description
_holders
address[]
_allowedTokens
uint256[]
_startTimes
uint256[]
_rollingPeriodInDays
uint256[]
_endTimes
uint256[]
_restrictionTypes
enum VolumeRestrictionTMStorage.RestrictionType[]
Returns the permissions flag that are associated with Percentage transfer Manager
Arguments
Name
Type
Description
⤾ overrides
⤾ overrides
⤾ overrides
⤾ overrides
⤾ overrides