View Source: contracts/modules/TransferManager/MATM/ManualApprovalTransferManager.solโ
โ Extends: ManualApprovalTransferManagerStorage, TransferManagerโ
ManualApprovalTransferManager
Events
event AddManualApproval(address indexed _from, address indexed _to, uint256 _allowance, uint256 _expiryTime, bytes32 _description, address indexed _addedBy);event ModifyManualApproval(address indexed _from, address indexed _to, uint256 _expiryTime, uint256 _allowance, bytes32 _description, address indexed _editedBy);event RevokeManualApproval(address indexed _from, address indexed _to, address indexed _addedBy);
โgetInitFunction()โ
โgetAllApprovals()โ
โgetPermissions()โ
Constructor
function (address _securityToken, address _polyToken) public nonpayable Module
Arguments
Name | Type | Description |
_securityToken | address | Address of the security token |
_polyToken | address | โ |
โคพ overrides IModule.getInitFunctionโ
This function returns the signature of configure function
function getInitFunction() public purereturns(bytes4)
Arguments
Name | Type | Description |
โคพ overrides ITransferManager.executeTransferโ
Used to verify the transfer transaction and allow a manually approved transqaction to bypass other restrictions
function executeTransfer(address _from, address _to, uint256 _amount, bytes ) external nonpayable onlySecurityTokenreturns(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 allow a manually approved transqaction to bypass other restrictions
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 | โ |
Adds a pair of addresses to manual approvals
function addManualApproval(address _from, address _to, uint256 _allowance, uint256 _expiryTime, bytes32 _description) external nonpayable withPerm
Arguments
Name | Type | Description |
_from | address | is the address from which transfers are approved |
_to | address | is the address to which transfers are approved |
_allowance | uint256 | is the approved amount of tokens |
_expiryTime | uint256 | is the time until which the transfer is allowed |
_description | bytes32 | Description about the manual approval |
function _addManualApproval(address _from, address _to, uint256 _allowance, uint256 _expiryTime, bytes32 _description) internal nonpayable
Arguments
Name | Type | Description |
_from | address | โ |
_to | address | โ |
_allowance | uint256 | โ |
_expiryTime | uint256 | โ |
_description | bytes32 | โ |
Adds mutiple manual approvals in batch
function addManualApprovalMulti(address[] _from, address[] _to, uint256[] _allowances, uint256[] _expiryTimes, bytes32[] _descriptions) public nonpayable withPerm
Arguments
Name | Type | Description |
_from | address[] | is the address array from which transfers are approved |
_to | address[] | is the address array to which transfers are approved |
_allowances | uint256[] | is the array of approved amounts |
_expiryTimes | uint256[] | is the array of the times until which eath transfer is allowed |
_descriptions | bytes32[] | is the description array for these manual approvals |
Modify the existing manual approvals
function modifyManualApproval(address _from, address _to, uint256 _expiryTime, uint256 _changeInAllowance, bytes32 _description, bool _increase) external nonpayable withPerm
Arguments
Name | Type | Description |
_from | address | is the address from which transfers are approved |
_to | address | is the address to which transfers are approved |
_expiryTime | uint256 | is the time until which the transfer is allowed |
_changeInAllowance | uint256 | is the change in allowance |
_description | bytes32 | Description about the manual approval |
_increase | bool | tells whether the allowances will be increased (true) or decreased (false). |
or any value when there is no change in allowances |
function _modifyManualApproval(address _from, address _to, uint256 _expiryTime, uint256 _changeInAllowance, bytes32 _description, bool _increase) internal nonpayable
Arguments
Name | Type | Description |
_from | address | โ |
_to | address | โ |
_expiryTime | uint256 | โ |
_changeInAllowance | uint256 | โ |
_description | bytes32 | โ |
_increase | bool | โ |
Adds mutiple manual approvals in batch
function modifyManualApprovalMulti(address[] _from, address[] _to, uint256[] _expiryTimes, uint256[] _changeInAllowance, bytes32[] _descriptions, bool[] _increase) public nonpayable withPerm
Arguments
Name | Type | Description |
_from | address[] | is the address array from which transfers are approved |
_to | address[] | is the address array to which transfers are approved |
_expiryTimes | uint256[] | is the array of the times until which eath transfer is allowed |
_changeInAllowance | uint256[] | is the array of change in allowances |
_descriptions | bytes32[] | is the description array for these manual approvals |
_increase | bool[] | Array of bools that tells whether the allowances will be increased (true) or decreased (false). |
or any value when there is no change in allowances |
Removes a pairs of addresses from manual approvals
function revokeManualApproval(address _from, address _to) external nonpayable withPerm
Arguments
Name | Type | Description |
_from | address | is the address from which transfers are approved |
_to | address | is the address to which transfers are approved |
function _revokeManualApproval(address _from, address _to) internal nonpayable
Arguments
Name | Type | Description |
_from | address | โ |
_to | address | โ |
Removes mutiple pairs of addresses from manual approvals
function revokeManualApprovalMulti(address[] _from, address[] _to) external nonpayable withPerm
Arguments
Name | Type | Description |
_from | address[] | is the address array from which transfers are approved |
_to | address[] | is the address array to which transfers are approved |
function _checkInputLengthArray(address[] _from, address[] _to, uint256[] _expiryTimes, uint256[] _allowances, bytes32[] _descriptions) internal pure
Arguments
Name | Type | Description |
_from | address[] | โ |
_to | address[] | โ |
_expiryTimes | uint256[] | โ |
_allowances | uint256[] | โ |
_descriptions | bytes32[] | โ |
Returns the all active approvals corresponds to an address
function getActiveApprovalsToUser(address _user) external viewreturns(address[], address[], uint256[], uint256[], uint256[], bytes32[])
Returns
address[] addresses from
Arguments
Name | Type | Description |
_user | address | Address of the holder corresponds to whom list of manual approvals |
need to return |
Get the details of the approval corresponds to _from & _to addresses
function getApprovalDetails(address _from, address _to) external viewreturns(uint256, uint256, uint256, bytes32)
Returns
uint256 expiryTime of the approval
Arguments
Name | Type | Description |
_from | address | Address of the sender |
_to | address | Address of the receiver |
Returns the current number of active approvals
function getTotalApprovalsLength() external viewreturns(uint256)
Arguments
Name | Type | Description |
Get the details of all approvals
function getAllApprovals() external viewreturns(address[], address[], uint256[], uint256[], uint256[], bytes32[])
Returns
address[] addresses from
Arguments
Name | Type | Description |
โคพ overrides IModule.getPermissionsโ
Returns the permissions flag that are associated with ManualApproval transfer manager
function getPermissions() public viewreturns(bytes32[])
Arguments
Name | Type | Description |