View Source: contracts/modules/TransferManager/PTM/PercentageTransferManager.sol
↗ Extends: PercentageTransferManagerStorage, TransferManager
PercentageTransferManager
Events
event ModifyHolderPercentage(uint256 _oldHolderPercentage, uint256 _newHolderPercentage);event ModifyWhitelist(address _investor, address _addedBy, bool _valid);event SetAllowPrimaryIssuance(bool _allowPrimaryIssuance);
Constructor
function (address _securityToken, address _polyToken) public nonpayable Module
Arguments
Name | Type | Description |
_securityToken | address | Address of the security token |
_polyToken | address | |
⤾ overrides ITransferManager.executeTransfer
Used to verify the transfer transaction and prevent a given account to end up with more tokens than allowed
function executeTransfer(address _from, address _to, uint256 _amount, bytes ) external nonpayablereturns(enum ITransferManager.Result)
Arguments
Name | Type | Description |
_from | address | Address of the sender |
_to | address | Address of the receiver |
_amount | uint256 | The amount of tokens to transfer |
| bytes | _from Address of the sender |
⤾ overrides ITransferManager.verifyTransfer
Used to verify the transfer transaction and prevent a given account to end up with more tokens than allowed
function verifyTransfer(address _from, address _to, uint256 _amount, bytes ) public viewreturns(enum ITransferManager.Result, bytes32)
Arguments
Name | Type | Description |
_from | address | Address of the sender |
_to | address | Address of the receiver |
_amount | uint256 | The amount of tokens to transfer |
| bytes | _from Address of the sender |
function _verifyTransfer(address _from, address _to, uint256 _amount) internal viewreturns(enum ITransferManager.Result, bytes32)
Arguments
Name | Type | Description |
_from | address | |
_to | address | |
_amount | uint256 | |
Used to intialize the variables of the contract
function configure(uint256 _maxHolderPercentage, bool _allowPrimaryIssuance) public nonpayable onlyFactory
Arguments
Name | Type | Description |
_maxHolderPercentage | uint256 | Maximum amount of ST20 tokens(in %) can hold by the investor |
_allowPrimaryIssuance | bool | |
⤾ overrides IModule.getInitFunction
This function returns the signature of configure function
function getInitFunction() public purereturns(bytes4)
Arguments
Name | Type | Description |
sets the maximum percentage that an individual token holder can hold
function changeHolderPercentage(uint256 _maxHolderPercentage) public nonpayable withPerm
Arguments
Name | Type | Description |
_maxHolderPercentage | uint256 | is the new maximum percentage (multiplied by 10**16) |
adds or removes addresses from the whitelist.
function modifyWhitelist(address _investor, bool _valid) public nonpayable withPerm
Arguments
Name | Type | Description |
_investor | address | is the address to whitelist |
_valid | bool | whether or not the address it to be added or removed from the whitelist |
adds or removes addresses from the whitelist.
function modifyWhitelistMulti(address[] _investors, bool[] _valids) public nonpayable withPerm
Arguments
Name | Type | Description |
_investors | address[] | Array of the addresses to whitelist |
_valids | bool[] | Array of boolean value to decide whether or not the address it to be added or removed from the whitelist |
sets whether or not to consider primary issuance transfers
function setAllowPrimaryIssuance(bool _allowPrimaryIssuance) public nonpayable withPerm
Arguments
Name | Type | Description |
_allowPrimaryIssuance | bool | whether to allow all primary issuance transfers |
⤾ overrides IModule.getPermissions
Return the permissions flag that are associated with Percentage transfer Manager
function getPermissions() public viewreturns(bytes32[])
Arguments
Name | Type | Description |