Used to verify the transfer/transferFrom transaction and prevent tranaction whose volume of tokens will voilate the maximum volume transfer restriction
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
_verifyTransfer
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
changeExemptWalletList
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
addIndividualRestriction
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). |
addIndividualDailyRestriction
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). |
addIndividualDailyRestrictionMulti
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). |
addIndividualRestrictionMulti
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). |
addDefaultRestriction
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). |
addDefaultDailyRestriction
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). |
removeIndividualRestriction
use to remove the individual restriction for a given address
Arguments
Name
Type
Description
_holder
address
Address of the user
_removeIndividualRestriction
Arguments
Name
Type
Description
_holder
address
removeIndividualRestrictionMulti
use to remove the individual restriction for a given address
Arguments
Name
Type
Description
_holders
address[]
Array of address of the user
removeIndividualDailyRestriction
use to remove the individual daily restriction for a given address
Arguments
Name
Type
Description
_holder
address
Address of the user
_removeIndividualDailyRestriction
Arguments
Name
Type
Description
_holder
address
removeIndividualDailyRestrictionMulti
use to remove the individual daily restriction for a given address
Arguments
Name
Type
Description
_holders
address[]
Array of address of the user
removeDefaultRestriction
Use to remove the default restriction
Arguments
Name
Type
Description
removeDefaultDailyRestriction
Use to remove the daily default restriction
Arguments
Name
Type
Description
modifyIndividualRestriction
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). |
modifyIndividualDailyRestriction
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). |
modifyIndividualDailyRestrictionMulti
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). |
modifyIndividualRestrictionMulti
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). |
modifyDefaultRestriction
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). |
modifyDefaultDailyRestriction
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). |
_restrictionCheck
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
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).