Transfer Manager module for core transfer validation functionality (GeneralTransferManager.sol)

View Source: contracts/modules/TransferManager/GTM/GeneralTransferManager.sol

↗ Extends: GeneralTransferManagerStorage, TransferManager

GeneralTransferManager

Events

event ChangeIssuanceAddress(address  _issuanceAddress);
event ChangeDefaults(uint64  _defaultCanSendAfter, uint64  _defaultCanReceiveAfter);
event ModifyKYCData(address indexed _investor, address indexed _addedBy, uint64  _canSendAfter, uint64  _canReceiveAfter, uint64  _expiryTime);
event ModifyInvestorFlag(address indexed _investor, uint8 indexed _flag, bool  _value);
event ModifyTransferRequirements(enum GeneralTransferManagerStorage.TransferType indexed _transferType, bool  _fromValidKYC, bool  _toValidKYC, bool  _fromRestricted, bool  _toRestricted);

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

changeDefaults

Used to change the default times used when canSendAfter / canReceiveAfter are zero

Arguments

Name

Type

Description

_defaultCanSendAfter

uint64

default for zero canSendAfter

_defaultCanReceiveAfter

uint64

default for zero canReceiveAfter

changeIssuanceAddress

Used to change the Issuance Address

Arguments

Name

Type

Description

_issuanceAddress

address

new address for the issuance

executeTransfer

⤾ overrides ITransferManager.executeTransfer

Default implementation of verifyTransfer used by SecurityToken If the transfer request comes from the STO, it only checks that the investor is in the whitelist If the transfer request comes from a token holder, it checks that: a) Both are on the whitelist b) Seller's sale lockup period is over c) Buyer's purchase lockup is over

Arguments

Name

Type

Description

_from

address

Address of the sender

_to

address

Address of the receiver

uint256

_from Address of the sender

_data

bytes

_processTransferSignature

Arguments

Name

Type

Description

_nonce

uint256

_validFrom

uint256

_validTo

uint256

_data

bytes

verifyTransfer

⤾ overrides ITransferManager.verifyTransfer

Default implementation of verifyTransfer used by SecurityToken

Arguments

Name

Type

Description

_from

address

Address of the sender

_to

address

Address of the receiver

uint256

_from Address of the sender

bytes

_from Address of the sender

_verifyTransfer

Arguments

Name

Type

Description

_from

address

_to

address

modifyTransferRequirements

Modifies the successful checks required for a transfer to be deemed valid.

Arguments

Name

Type

Description

_transferType

enum GeneralTransferManagerStorage.TransferType

Type of transfer (0 = General, 1 = Issuance, 2 = Redemption)

_fromValidKYC

bool

Defines if KYC is required for the sender

_toValidKYC

bool

Defines if KYC is required for the receiver

_fromRestricted

bool

Defines if transfer time restriction is checked for the sender

_toRestricted

bool

Defines if transfer time restriction is checked for the receiver

modifyTransferRequirementsMulti

Modifies the successful checks required for transfers.

Arguments

Name

Type

Description

_transferTypes

enum GeneralTransferManagerStorage.TransferType[]

Types of transfer (0 = General, 1 = Issuance, 2 = Redemption)

_fromValidKYC

bool[]

Defines if KYC is required for the sender

_toValidKYC

bool[]

Defines if KYC is required for the receiver

_fromRestricted

bool[]

Defines if transfer time restriction is checked for the sender

_toRestricted

bool[]

Defines if transfer time restriction is checked for the receiver

_modifyTransferRequirements

Arguments

Name

Type

Description

_transferType

enum GeneralTransferManagerStorage.TransferType

_fromValidKYC

bool

_toValidKYC

bool

_fromRestricted

bool

_toRestricted

bool

modifyKYCData

Add or remove KYC info of an investor.

Arguments

Name

Type

Description

_investor

address

is the address to whitelist

_canSendAfter

uint64

is the moment when the sale lockup period ends and the investor can freely sell or transfer their tokens

_canReceiveAfter

uint64

is the moment when the purchase lockup period ends and the investor can freely purchase or receive tokens from others

_expiryTime

uint64

is the moment till investors KYC will be validated. After that investor need to do re-KYC

_modifyKYCData

Arguments

Name

Type

Description

_investor

address

_canSendAfter

uint64

_canReceiveAfter

uint64

_expiryTime

uint64

modifyKYCDataMulti

Add or remove KYC info of an investor.

Arguments

Name

Type

Description

_investors

address[]

is the address to whitelist

_canSendAfter

uint64[]

is the moment when the sale lockup period ends and the investor can freely sell his tokens

_canReceiveAfter

uint64[]

is the moment when the purchase lockup period ends and the investor can freely purchase tokens from others

_expiryTime

uint64[]

is the moment till investors KYC will be validated. After that investor need to do re-KYC

modifyInvestorFlag

Used to modify investor Flag.

Arguments

Name

Type

Description

_investor

address

is the address of the investor.

_flag

uint8

index of flag to change. flag is used to know specifics about investor like isAccredited.

_value

bool

value of the flag. a flag can be true or false.

_modifyInvestorFlag

Arguments

Name

Type

Description

_investor

address

_flag

uint8

_value

bool

modifyInvestorFlagMulti

Used to modify investor data.

Arguments

Name

Type

Description

_investors

address[]

List of the addresses to modify data about.

_flag

uint8[]

index of flag to change. flag is used to know specifics about investor like isAccredited.

_value

bool[]

value of the flag. a flag can be true or false.

modifyKYCDataSigned

Adds or removes addresses from the whitelist - can be called by anyone with a valid signature

Arguments

Name

Type

Description

_investor

address

is the address to whitelist

_canSendAfter

uint256

is the moment when the sale lockup period ends and the investor can freely sell his tokens

_canReceiveAfter

uint256

is the moment when the purchase lockup period ends and the investor can freely purchase tokens from others

_expiryTime

uint256

is the moment till investors KYC will be validated. After that investor need to do re-KYC

_validFrom

uint256

is the time that this signature is valid from

_validTo

uint256

is the time that this signature is valid until

_nonce

uint256

nonce of signature (avoid replay attack)

_signature

bytes

issuer signature

_modifyKYCDataSigned

Arguments

Name

Type

Description

_investor

address

_canSendAfter

uint256

_canReceiveAfter

uint256

_expiryTime

uint256

_validFrom

uint256

_validTo

uint256

_nonce

uint256

_signature

bytes

modifyKYCDataSignedMulti

Adds or removes addresses from the whitelist - can be called by anyone with a valid signature

Arguments

Name

Type

Description

_investor

address[]

is the address to whitelist

_canSendAfter

uint256[]

is the moment when the sale lockup period ends and the investor can freely sell his tokens

_canReceiveAfter

uint256[]

is the moment when the purchase lockup period ends and the investor can freely purchase tokens from others

_expiryTime

uint256[]

is the moment till investors KYC will be validated. After that investor need to do re-KYC

_validFrom

uint256

is the time that this signature is valid from

_validTo

uint256

is the time that this signature is valid until

_nonce

uint256

nonce of signature (avoid replay attack)

_signature

bytes

issuer signature

_modifyKYCDataSignedMulti

Arguments

Name

Type

Description

_investor

address[]

_canSendAfter

uint256[]

_canReceiveAfter

uint256[]

_expiryTime

uint256[]

_validFrom

uint256

_validTo

uint256

_nonce

uint256

_signature

bytes

_checkSig

Used to verify the signature

Arguments

Name

Type

Description

_hash

bytes32

_signature

bytes

_nonce

uint256

_validExpiry

Internal function used to check whether the KYC of investor is valid

Arguments

Name

Type

Description

_expiryTime

uint64

Expiry time of the investor

_validLockTime

Internal function used to check whether the lock time of investor is valid

Arguments

Name

Type

Description

_lockTime

uint64

Lock time of the investor

_adjustTimes

Internal function to adjust times using default values

Arguments

Name

Type

Description

_canSendAfter

uint64

_canReceiveAfter

uint64

_getKey

Arguments

Name

Type

Description

_key1

bytes32

_key2

address

_getKYCValues

Arguments

Name

Type

Description

_investor

address

dataStore

IDataStore

_isExistingInvestor

Arguments

Name

Type

Description

_investor

address

dataStore

IDataStore

_getValuesForTransfer

Arguments

Name

Type

Description

_from

address

_to

address

getAllInvestors

Returns list of all investors

Arguments

Name

Type

Description

getInvestors

Returns list of investors in a range

Arguments

Name

Type

Description

_fromIndex

uint256

_toIndex

uint256

getAllInvestorFlags

Arguments

Name

Type

Description

getInvestorFlag

Arguments

Name

Type

Description

_investor

address

_flag

uint8

getInvestorFlags

Arguments

Name

Type

Description

_investor

address

_getInvestorFlags

Arguments

Name

Type

Description

_investor

address

getAllKYCData

Returns list of all investors data

Arguments

Name

Type

Description

getKYCData

Returns list of specified investors data

Arguments

Name

Type

Description

_investors

address[]

_kycData

Arguments

Name

Type

Description

_investors

address[]

getPermissions

⤾ overrides IModule.getPermissions

Return the permissions flag that are associated with general trnasfer manager

Arguments

Name

Type

Description

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

getAddressBytes32

Arguments

Name

Type

Description

Last updated

Was this helpful?