Transfer Manager module for verifing transations with a signed message (SignedTransferManager.sol)

View Source: contracts/modules/Experimental/TransferManager/SignedTransferManager.solโ€‹

โ†— Extends: TransferManagerโ€‹

SignedTransferManager

Contract Members

Constants & Variables

bytes32 public constant INVALID_SIG;

Events

event SignatureUsed(bytes _data);

Functions

Constructor

function (address _securityToken, address _polyAddress) public nonpayable Module

Arguments

Name

Type

Description

_securityToken

address

Address of the security token

_polyAddress

address

Address of the polytoken

getInitFunction

โคพ overrides IModule.getInitFunctionโ€‹

This function returns the signature of configure function

function getInitFunction() external pure
returns(bytes4)

Arguments

Name

Type

Description

checkSignatureValidity

function to check if a signature is still valid

function checkSignatureValidity(bytes _data) external view
returns(bool)

Arguments

Name

Type

Description

_data

bytes

signature

checkSigner

function checkSigner(address _signer) external view
returns(bool)

Arguments

Name

Type

Description

_signer

address

โ€‹

executeTransfer

โคพ overrides ITransferManager.executeTransferโ€‹

allow verify transfer with signature

function executeTransfer(address _from, address _to, uint256 _amount, bytes _data) external nonpayable onlySecurityToken
returns(enum ITransferManager.Result)

Arguments

Name

Type

Description

_from

address

address transfer from

_to

address

address transfer to

_amount

uint256

transfer amount

_data

bytes

signature

Sig needs to be valid (not used or deemed as invalid) Signer needs to be in the signers mapping |

verifyTransfer

โคพ overrides ITransferManager.verifyTransferโ€‹

allow verify transfer with signature

function verifyTransfer(address _from, address _to, uint256 _amount, bytes _data) public view
returns(enum ITransferManager.Result, bytes32)

Arguments

Name

Type

Description

_from

address

address transfer from

_to

address

address transfer to

_amount

uint256

transfer amount

_data

bytes

signature

Sig needs to be valid (not used or deemed as invalid) Signer needs to be in the signers mapping |

invalidateSignature

allow signers to deem a signature invalid

function invalidateSignature(address _from, address _to, uint256 _amount, bytes _data) external nonpayable

Arguments

Name

Type

Description

_from

address

address transfer from

_to

address

address transfer to

_amount

uint256

transfer amount

_data

bytes

signature

Sig needs to be valid (not used or deemed as invalid) Signer needs to be in the signers mapping |

getPermissions

โคพ overrides IModule.getPermissionsโ€‹

Return the permissions flag that are associated with ManualApproval transfer manager

function getPermissions() public view
returns(bytes32[])

Arguments

Name

Type

Description

_checkSignatureIsInvalid

function _checkSignatureIsInvalid(bytes _data) internal view
returns(bool)

Arguments

Name

Type

Description

_data

bytes

โ€‹

_checkSigner

function _checkSigner(address _signer) internal view
returns(bool)

Arguments

Name

Type

Description

_signer

address

โ€‹

_invalidateSignature

function _invalidateSignature(bytes _data) internal nonpayable

Arguments

Name

Type

Description

_data

bytes

โ€‹