Transfer Manager module for manually approving transactions between accounts (ManualApprovalTransfer

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);

Functions

Constructor

Arguments

Name

Type

Description

_securityToken

address

Address of the security token

_polyToken

address

getInitFunction

⤾ overrides IModule.getInitFunction

This function returns the signature of configure function

Arguments

Name

Type

Description

executeTransfer

⤾ overrides ITransferManager.executeTransfer

Used to verify the transfer transaction and allow a manually approved transqaction to bypass other restrictions

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

verifyTransfer

⤾ overrides ITransferManager.verifyTransfer

Used to verify the transfer transaction and allow a manually approved transqaction to bypass other restrictions

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

_verifyTransfer

Arguments

Name

Type

Description

_from

address

_to

address

_amount

uint256

addManualApproval

Adds a pair of addresses to manual approvals

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

_addManualApproval

Arguments

Name

Type

Description

_from

address

_to

address

_allowance

uint256

_expiryTime

uint256

_description

bytes32

addManualApprovalMulti

Adds mutiple manual approvals in batch

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

modifyManualApproval

Modify the existing manual approvals

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 |

_modifyManualApproval

Arguments

Name

Type

Description

_from

address

_to

address

_expiryTime

uint256

_changeInAllowance

uint256

_description

bytes32

_increase

bool

modifyManualApprovalMulti

Adds mutiple manual approvals in batch

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 |

revokeManualApproval

Removes a pairs of addresses from manual approvals

Arguments

Name

Type

Description

_from

address

is the address from which transfers are approved

_to

address

is the address to which transfers are approved

_revokeManualApproval

Arguments

Name

Type

Description

_from

address

_to

address

revokeManualApprovalMulti

Removes mutiple pairs of addresses from manual approvals

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

_checkInputLengthArray

Arguments

Name

Type

Description

_from

address[]

_to

address[]

_expiryTimes

uint256[]

_allowances

uint256[]

_descriptions

bytes32[]

getActiveApprovalsToUser

Returns the all active approvals corresponds to an address

Returns

address[] addresses from

Arguments

Name

Type

Description

_user

address

Address of the holder corresponds to whom list of manual approvals

need to return |

getApprovalDetails

Get the details of the approval corresponds to _from & _to addresses

Returns

uint256 expiryTime of the approval

Arguments

Name

Type

Description

_from

address

Address of the sender

_to

address

Address of the receiver

getTotalApprovalsLength

Returns the current number of active approvals

Arguments

Name

Type

Description

getAllApprovals

Get the details of all approvals

Returns

address[] addresses from

Arguments

Name

Type

Description

getPermissions

⤾ overrides IModule.getPermissions

Returns the permissions flag that are associated with ManualApproval transfer manager

Arguments

Name

Type

Description

Last updated

Was this helpful?