LockUpTransferManager.sol
View Source: contracts/modules/TransferManager/LTM/LockUpTransferManager.sol
↗ Extends: LockUpTransferManagerStorage, TransferManager
LockUpTransferManager
Events
event AddLockUpToUser(address indexed _userAddress, bytes32 indexed _lockupName);
event RemoveLockUpFromUser(address indexed _userAddress, bytes32 indexed _lockupName);
event ModifyLockUpType(uint256 _lockupAmount, uint256 _startTime, uint256 _lockUpPeriodSeconds, uint256 _releaseFrequencySeconds, bytes32 indexed _lockupName);
event AddNewLockUpType(bytes32 indexed _lockupName, uint256 _lockupAmount, uint256 _startTime, uint256 _lockUpPeriodSeconds, uint256 _releaseFrequencySeconds);
event RemoveLockUpType(bytes32 indexed _lockupName);Functions
Constructor
Arguments
Name
Type
Description
_securityToken
address
Address of the security token
_polyAddress
address
Address of the polytoken
executeTransfer
⤾ overrides ITransferManager.executeTransfer
Used to verify the transfer transaction and prevent locked up tokens from being transferred
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
⤾ overrides ITransferManager.verifyTransfer
Used to verify the transfer transaction and prevent locked up tokens from being transferred
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 transaction and prevent locked up tokens from being transferred
Arguments
Name
Type
Description
_from
address
Address of the sender
_amount
uint256
The amount of tokens to transfer
addNewLockUpType
Use to add the new lockup type
Arguments
Name
Type
Description
_lockupAmount
uint256
Amount of tokens that need to lock.
_startTime
uint256
When this lockup starts (seconds)
_lockUpPeriodSeconds
uint256
Total period of lockup (seconds)
_releaseFrequencySeconds
uint256
How often to release a tranche of tokens (seconds)
_lockupName
bytes32
Name of the lockup
addNewLockUpTypeMulti
Use to add the new lockup type
Arguments
Name
Type
Description
_lockupAmounts
uint256[]
Array of amount of tokens that need to lock.
_startTimes
uint256[]
Array of startTimes when this lockup starts (seconds)
_lockUpPeriodsSeconds
uint256[]
Array of total period of lockup (seconds)
_releaseFrequenciesSeconds
uint256[]
Array of how often to release a tranche of tokens (seconds)
_lockupNames
bytes32[]
Array of names of the lockup
addLockUpByName
Add the lockup to a user
Arguments
Name
Type
Description
_userAddress
address
Address of the user
_lockupName
bytes32
Name of the lockup
addLockUpByNameMulti
Add lockups to users
Arguments
Name
Type
Description
_userAddresses
address[]
Array of addresses of the users
_lockupNames
bytes32[]
Array of names of the lockups
addNewLockUpToUser
Lets the admin create a volume restriction lockup for a given address.
Arguments
Name
Type
Description
_userAddress
address
Address of the user whose tokens should be locked up
_lockupAmount
uint256
Amount of tokens that need to lock.
_startTime
uint256
When this lockup starts (seconds)
_lockUpPeriodSeconds
uint256
Total period of lockup (seconds)
_releaseFrequencySeconds
uint256
How often to release a tranche of tokens (seconds)
_lockupName
bytes32
Name of the lockup
addNewLockUpToUserMulti
Lets the admin create multiple volume restriction lockups for multiple given addresses.
Arguments
Name
Type
Description
_userAddresses
address[]
Array of address of the user whose tokens should be locked up
_lockupAmounts
uint256[]
Array of the amounts that need to be locked for the different addresses.
_startTimes
uint256[]
Array of When this lockup starts (seconds)
_lockUpPeriodsSeconds
uint256[]
Array of total periods of lockup (seconds)
_releaseFrequenciesSeconds
uint256[]
Array of how often to release a tranche of tokens (seconds)
_lockupNames
bytes32[]
Array of names of the lockup
removeLockUpFromUser
Lets the admin remove a user's lock up
Arguments
Name
Type
Description
_userAddress
address
Address of the user whose tokens are locked up
_lockupName
bytes32
Name of the lockup need to be removed.
removeLockupType
Used to remove the lockup type
Arguments
Name
Type
Description
_lockupName
bytes32
Name of the lockup
removeLockupTypeMulti
Used to remove the multiple lockup type
Arguments
Name
Type
Description
_lockupNames
bytes32[]
Array of the lockup names.
removeLockUpFromUserMulti
Use to remove the lockup for multiple users
Arguments
Name
Type
Description
_userAddresses
address[]
Array of addresses of the user whose tokens are locked up
_lockupNames
bytes32[]
Array of the names of the lockup that needs to be removed.
modifyLockUpType
Lets the admin modify a lockup.
Arguments
Name
Type
Description
_lockupAmount
uint256
Amount of tokens that needs to be locked
_startTime
uint256
When this lockup starts (seconds)
_lockUpPeriodSeconds
uint256
Total period of lockup (seconds)
_releaseFrequencySeconds
uint256
How often to release a tranche of tokens (seconds)
_lockupName
bytes32
name of the lockup that needs to be modified.
modifyLockUpTypeMulti
Lets the admin modify a volume restriction lockup for a multiple address.
Arguments
Name
Type
Description
_lockupAmounts
uint256[]
Array of the amount of tokens that needs to be locked for the respective addresses.
_startTimes
uint256[]
Array of the start time of the lockups (seconds)
_lockUpPeriodsSeconds
uint256[]
Array of unix timestamp for the list of lockups (seconds).
_releaseFrequenciesSeconds
uint256[]
How often to release a tranche of tokens (seconds)
_lockupNames
bytes32[]
Array of the lockup names that needs to be modified
getLockUp
Get a specific element in a user's lockups array given the user's address and the element index
Arguments
Name
Type
Description
_lockupName
bytes32
The name of the lockup
getAllLockupData
Return the data of the lockups
Arguments
Name
Type
Description
getListOfAddresses
get the list of the users of a lockup type
Returns
address List of users associated with the given lockup name
Arguments
Name
Type
Description
_lockupName
bytes32
Name of the lockup type
getAllLockups
get the list of lockups names
Returns
bytes32 Array of lockups names
Arguments
Name
Type
Description
getLockupsNamesToUser
get the list of the lockups for a given user
Returns
bytes32 List of lockups names associated with the given address
Arguments
Name
Type
Description
_user
address
Address of the user
getLockedTokenToUser
Use to get the total locked tokens for a given user
Returns
uint256 Total locked tokens amount
Arguments
Name
Type
Description
_userAddress
address
Address of the user
_checkIfValidTransfer
Checks whether the transfer is allowed
Arguments
Name
Type
Description
_userAddress
address
Address of the user whose lock ups should be checked
_amount
uint256
Amount of tokens that need to transact
_getUnlockedAmountForLockup
Provide the unlock amount for the given lockup for a particular user
Arguments
Name
Type
Description
_lockupName
bytes32
_removeLockupType
Arguments
Name
Type
Description
_lockupName
bytes32
_modifyLockUpType
Arguments
Name
Type
Description
_lockupAmount
uint256
_startTime
uint256
_lockUpPeriodSeconds
uint256
_releaseFrequencySeconds
uint256
_lockupName
bytes32
_removeLockUpFromUser
Arguments
Name
Type
Description
_userAddress
address
_lockupName
bytes32
_addNewLockUpToUser
Arguments
Name
Type
Description
_userAddress
address
_lockupAmount
uint256
_startTime
uint256
_lockUpPeriodSeconds
uint256
_releaseFrequencySeconds
uint256
_lockupName
bytes32
_addLockUpByName
Arguments
Name
Type
Description
_userAddress
address
_lockupName
bytes32
_addNewLockUpType
Arguments
Name
Type
Description
_lockupAmount
uint256
_startTime
uint256
_lockUpPeriodSeconds
uint256
_releaseFrequencySeconds
uint256
_lockupName
bytes32
_checkLockUpParams
Parameter checking function for creating or editing a lockup. This function will cause an exception if any of the parameters are bad.
Arguments
Name
Type
Description
_lockupAmount
uint256
Amount that needs to be locked
_lockUpPeriodSeconds
uint256
Total period of lockup (seconds)
_releaseFrequencySeconds
uint256
How often to release a tranche of tokens (seconds)
_checkValidStartTime
Arguments
Name
Type
Description
_startTime
uint256
_checkZeroAddress
Arguments
Name
Type
Description
_userAddress
address
_validLockUpCheck
Arguments
Name
Type
Description
_lockupName
bytes32
_checkValidName
Arguments
Name
Type
Description
_name
bytes32
_checkLengthOfArray
Arguments
Name
Type
Description
_length1
uint256
_length2
uint256
getTokensByPartition
⤾ overrides TransferManager.getTokensByPartition
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
getInitFunction
⤾ overrides IModule.getInitFunction
This function returns the signature of configure function
Arguments
Name
Type
Description
getPermissions
⤾ overrides IModule.getPermissions
Returns the permissions flag that are associated with Percentage transfer Manager
Arguments
Name
Type
Description
Last updated
Was this helpful?