Polymath
master
master
  • README
  • api
    • Proxy (Proxy.sol)
    • Base abstract contract to be extended by all STO modules (STO.sol)
    • OwnedUpgradeabilityProxy (OwnedUpgradeabilityProxy.sol)
    • Transfer Manager module for core transfer validation functionality (GeneralTransferManager.sol)
    • VotingCheckpointStorage.sol
    • PLCRVotingCheckpoint.sol
    • Factory for deploying VestingEscrowWallet module (VestingEscrowWalletFactory.sol)
    • Helper library use to compare or validate the semantic versions (VersionUtils.sol)
    • Interface to be implemented by all Wallet modules (Wallet.sol)
    • Factory for deploying CappedSTO module (CappedSTOFactory.sol)
    • Checkpoint module for issuing ERC20 dividends (ERC20DividendCheckpoint.sol)
    • Interface to be implemented by all Transfer Manager modules (ITransferManager.sol)
    • StableOracle.sol
    • VolumeRestrictionTM.sol
    • SecurityTokenRegistryProxy (SecurityTokenRegistryProxy.sol)
    • PreSaleSTO module Proxy (PreSaleSTOProxy.sol)
    • DataStoreProxy Proxy (DataStoreProxy.sol)
    • Proxy for deploying SecurityToken instances (STFactory.sol)
    • Ownable (IOwnable.sol)
    • Checkpoint module for issuing ether dividends (DividendCheckpoint.sol)
    • CountTransferManager module Proxy (BlacklistTransferManagerProxy.sol)
    • Security Token contract (mock) (MockSTGetter.sol)
    • Permission Manager module for core permissioning functionality (GeneralPermissionManager.sol)
    • Contract used to store layout for the CountTransferManager storage (CountTransferManagerStorage.sol)
    • DummySTO module Proxy (DummySTOProxy.sol)
    • Transfer Manager module for limiting percentage of token supply a single address can hold (Percentag
    • Helps contracts guard against reentrancy attacks. (ReentrancyGuard.sol)
    • Factory for deploying EtherDividendCheckpoint module (ScheduledCheckpointFactory.sol)
    • Interface that every module factory contract should implement (IModuleFactory.sol)
    • Factory for deploying GeneralTransferManager module (TrackedRedemptionFactory.sol)
    • SafeMath (SafeMath.sol)
    • USDTiered STO module Proxy (SecurityTokenProxy.sol)
    • USDTiered STO module Proxy (USDTieredSTOProxy.sol)
    • IOracle.sol
    • ManualApprovalTransferManager module Proxy (ManualApprovalTransferManagerProxy.sol)
    • Interface to be implemented by all permission manager modules (IPermissionManager.sol)
    • Factory for deploying PreSaleSTO module (PreSaleSTOFactory.sol)
    • MockPolyOracle.sol
    • Transfer Manager module for verifing transations with a signed message (SignedTransferManager.sol)
    • DataStoreFactory.sol
    • OraclizeAddrResolverI.sol
    • PolyTokenFaucet.sol
    • Registry contract for issuers to register their security tokens (MockModuleRegistry.sol)
    • VolumeRestrictionLib.sol
    • Contract used to store layout for the PercentageTransferManager storage (PercentageTransferManagerSt
    • Transfer Manager for limiting maximum number of token holders (CountTransferManager.sol)
    • ModuleRegistryProxy (ModuleRegistryProxy.sol)
    • Voting module for governance (WeightedVoteCheckpointProxy.sol)
    • Factory for deploying BlacklistTransferManager module (BlacklistTransferManagerFactory.sol)
    • Contract used to store layout for the GeneralPermissionManager storage (GeneralPermissionManagerStor
    • CountTransferManager module Proxy (LockUpTransferManagerProxy.sol)
    • Holds the storage variable for the DividendCheckpoint modules (i.e ERC20, Ether) (DividendCheckpoint
    • Factory for deploying DummySTO module (DummySTOFactory.sol)
    • IERC1644.sol
    • Core functionality for registry upgradability (PolymathRegistry.sol)
    • Utility contract to allow owner to retreive any ERC20 sent to the contract (ReclaimTokens.sol)
    • SecurityTokenMock.sol
    • Factory for deploying CappedSTO module (USDTieredSTOFactory.sol)
    • Factory for deploying ManualApprovalTransferManager module (ManualApprovalTransferManagerFactory.sol
    • IERC1643.sol
    • Transfer Manager module for core transfer validation functionality (EtherDividendCheckpointProxy.sol
    • solcChecker.sol
    • It holds the storage variables related to ERC20DividendCheckpoint module (ERC20DividendCheckpointSto
    • Interface for all security tokens (ISecurityToken.sol)
    • Base abstract contract to be implemented by all Transfer Manager modules (TransferManager.sol)
    • Storage layout for VolumeRestrictionTM (VolumeRestrictionTMStorage.sol)
    • Security Token contract (mock) (MockSecurityTokenLogic.sol)
    • Transfer Manager module for core transfer validation functionality (GeneralTransferManagerStorage.so
    • IERC1410.sol
    • VotingCheckpoint.sol
    • Factory for deploying WeightedVoteCheckpoint module (WeightedVoteCheckpointFactory.sol)
    • PLCRVotingCheckpointStorage.sol
    • IDataStore.sol
    • TestSTOFactory.sol
    • Ownable (Ownable.sol)
    • UpgradeabilityProxy (UpgradeabilityProxy.sol)
    • Mock Contract Not fit for production environment (MockFactory.sol)
    • Registry contract for issuers to register their security tokens (SecurityTokenRegistryMock.sol)
    • ICheckPermission.sol
    • Factory for deploying LockUpTransferManager module (LockUpTransferManagerFactory.sol)
    • Storage layout for the STO contract (STOStorage.sol)
    • Interface for the Polymath Security Token Registry contract (ISecurityTokenRegistry.sol)
    • Mock Contract Not fit for production environment (MockWrongTypeFactory.sol)
    • Transfer Manager module for core transfer validation functionality (KYCTransferManager.sol)
    • Factory for deploying EtherDividendCheckpoint module (EtherDividendCheckpointFactory.sol)
    • functionSigClash2.sol
    • Standard Interface of ERC1594 (IERC1594.sol)
    • TokenLib.sol
    • MakerDAOOracle.sol
    • Interface that any module contract should implement (Module.sol)
    • Interface that any module factory contract should implement (ModuleFactory.sol)
    • STGetter.sol
    • Interface to be implemented by upgradable token factories (IUpgradableTokenFactory.sol)
    • ERC20 interface (IERC20.sol)
    • KYCTransferManagerFactory.sol
    • Checkpoint module for issuing ether dividends (EtherDividendCheckpoint.sol)
    • functionSigClash1.sol
    • Wallet for core vesting escrow functionality (VestingEscrowWalletStorage.sol)
    • Interface for managing polymath feature switches (IFeatureRegistry.sol)
    • Encoder.sol
    • STRGetter.sol
    • OraclizeI.sol
    • Contract used to store layout for the CappedSTO storage (CappedSTOStorage.sol)
    • LockUpTransferManager.sol
    • Checkpoint module for token weighted vote (WeightedVoteCheckpoint.sol)
    • Registry contract to store registered modules (ModuleRegistry.sol)
    • Factory for deploying upgradable modules (UpgradableModuleFactory.sol)
    • Utility contract to allow pausing and unpausing of certain functions (Pausable.sol)
    • CountTransferManager module Proxy (CountTransferManagerProxy.sol)
    • Math (Math.sol)
    • IPolymathRegistry.sol
    • MockOracle.sol
    • Transfer Manager module for manually approving transactions between accounts (ManualApprovalTransfer
    • DecimalMath.sol
    • STO module for standard capped crowdsale (USDTieredSTO.sol)
    • Security Token contract (SecurityToken.sol)
    • PercentageTransferManager module Proxy (PercentageTransferManagerProxy.sol)
    • Interface to be implemented by all checkpoint modules (IBurn.sol)
    • Burn module for burning tokens and keeping track of burnt amounts (MockRedemptionManager.sol)
    • GeneralPermissionManager module Proxy (GeneralPermissionManagerProxy.sol)
    • STO module for sample implementation of a different crowdsale module (DummySTO.sol)
    • Factory for deploying CountTransferManager module (CountTransferManagerFactory.sol)
    • Interface to be implemented by all STO modules (ISTO.sol)
    • Data store contract that stores data for all the modules in a central contract. (DataStore.sol)
    • Transfer Manager module to automate blacklist and restrict transfers (BlacklistTransferManager.sol)
    • Contract used to store layout for the PreSaleSTO storage (PreSaleSTOStorage.sol)
    • Migrations.sol
    • Contract used to store layout for the CountTransferManager storage (BlacklistTransferManagerStorage.
    • STO module for private presales (PreSaleSTO.sol)
    • DataStoreStorage.sol
    • Storage layout for the ISTO contract (ISTOStorage.sol)
    • Registry contract for issuers to register their tickers and security tokens (SecurityTokenRegistry.s
    • Factory for deploying SignedTransferManager module (SignedTransferManagerFactory.sol)
    • Transfer Manager module for core transfer validation functionality (ERC20DividendCheckpointProxy.sol
    • Burn module for burning tokens and keeping track of burnt amounts (ScheduledCheckpoint.sol)
    • ERC20 interface (IPoly.sol)
    • Transfer Manager module for core transfer validation functionality (VolumeRestrictionTMProxy.sol)
    • Contract used to store layout for the DummySTO storage (DummySTOStorage.sol)
    • Burn module for burning tokens and keeping track of burnt amounts (TrackedRedemption.sol)
    • Interface that every module contract should implement (IModule.sol)
    • Contract used to store layout for the ManualApprovalTransferManager storage (ManualApprovalTransferM
    • Elliptic curve signature operations (ECDSA.sol)
    • Factory for deploying PercentageTransferManager module (PercentageTransferManagerFactory.sol)
    • Transfer Manager module for core transfer validation functionality (GeneralTransferManagerProxy.sol)
    • Utility contract for reusable code (Util.sol)
    • SecurityTokenStorage.sol
    • Contract used to store layout for the USDTieredSTO storage (USDTieredSTOStorage.sol)
    • Factory for deploying GeneralPermissionManager module (GeneralPermissionManagerFactory.sol)
    • Address.sol
    • StatusCodes.sol
    • Standard ERC20 token
    • Voting module for governance (PLCRVotingCheckpointProxy.sol)
    • CBOR.sol
    • Registry for managing polymath feature switches (FeatureRegistry.sol)
    • WeightedVoteCheckpointStorage.sol
    • Interface for the Polymath Module Registry contract (IModuleRegistry.sol)
    • Interface for security token proxy deployment (ISTFactory.sol)
    • Registry contract for issuers to register their security tokens (MockSTRGetter.sol)
    • Buffer.sol
    • BokkyPooBahsDateTimeLibrary.sol
    • Mock Contract Not fit for production environment (MockBurnFactory.sol)
    • Wallet for core vesting escrow functionality (LockUpTransferManagerStorage.sol)
    • Factory for deploying VolumeRestrictionTM module (VolumeRestrictionTMFactory.sol)
    • usingOraclize.sol
    • STO module for standard capped crowdsale (CappedSTO.sol)
    • Interface to MakerDAO Medianizer contract (IMedianizer.sol)
    • Interface to be implemented by all checkpoint modules (ICheckpoint.sol)
    • Factory for deploying ERC20DividendCheckpoint module (ERC20DividendCheckpointFactory.sol)
    • Factory for deploying GeneralTransferManager module (GeneralTransferManagerFactory.sol)
    • Escrow wallet module for vesting functionality (VestingEscrowWalletProxy.sol)
    • OZStorage.sol
    • Wallet for core vesting escrow functionality (VestingEscrowWallet.sol)
    • EternalStorage.sol
    • Factory for deploying PLCRVotingCheckpoint module (PLCRVotingCheckpointFactory.sol)
    • IVoting.sol
    • Transfer Manager for limiting maximum number of token holders (MockCountTransferManager.sol)
    • CappedSTO module Proxy (CappedSTOProxy.sol)
    • Storage for Module contract (ModuleStorage.sol)
  • wiki
    • Dividend-Module
    • Transfer-manager-results
    • General Permission Manager
    • Transfer-Feature
    • Voting-Checkpoint-Modules
    • USDTieredSTO
    • Contract-Manager
    • Vesting-Escrow-Wallet
    • General Transfer Manager
    • Permission-Manager
    • Dividends-Manager
    • Manual Approval Transfer Manager
    • Transfer-Ownership
    • Transfer-Manager
    • How-to-Use-the-Investor-Portal
    • Count Transfer Manager
    • VolumeRestrictionTransferManager
    • Time-Travel-(Contract-Testing)
    • Percentage Transfer Manager
    • Prerequisite-Instructions-for-Deploying-and-Setting-Up-the-Polymath-Contracts
    • How to Create and Launch an STO
    • Token-Manager
    • How to set up and use the POLY Faucet
    • Advanced PLCR Voting Checkpoint
    • Welcome to the Polymath Core Wiki
    • Capped STO
    • _Sidebar
    • CLI for Polymath-core
    • Lockup Transfer Manager
    • The-STO-Manager
    • Blacklist Transfer Manager (BTM)
  • misc
    • Multiple Transfer Managers
    • PolyOracle Encrypted URL
    • ethereum_status_codes
    • Flags List
    • Permissions List
Powered by GitBook
On this page
  • Functions
  • executeTransfer
  • verifyTransfer
  • _verifyTransfer
  • changeExemptWalletList
  • addIndividualRestriction
  • addIndividualDailyRestriction
  • addIndividualDailyRestrictionMulti
  • addIndividualRestrictionMulti
  • addDefaultRestriction
  • addDefaultDailyRestriction
  • removeIndividualRestriction
  • _removeIndividualRestriction
  • removeIndividualRestrictionMulti
  • removeIndividualDailyRestriction
  • _removeIndividualDailyRestriction
  • removeIndividualDailyRestrictionMulti
  • removeDefaultRestriction
  • removeDefaultDailyRestriction
  • modifyIndividualRestriction
  • modifyIndividualDailyRestriction
  • modifyIndividualDailyRestrictionMulti
  • modifyIndividualRestrictionMulti
  • modifyDefaultRestriction
  • modifyDefaultDailyRestriction
  • _restrictionCheck
  • _validAllowedAmount
  • _isValidAmountAfterRestrictionChanges
  • _dailyTxCheck
  • _bucketCheck
  • _checkValidAmountToTransact
  • _allowedAmountToTransact
  • _updateStorage
  • _updateStorageActual
  • _checkInputParams
  • _isAllowedToModify
  • _getValidStartTime
  • getTokensByPartition
  • getIndividualBucketDetailsToUser
  • getDefaultBucketDetailsToUser
  • _getBucketDetails
  • getTotalTradedByUser
  • getInitFunction
  • getExemptAddress
  • getIndividualRestriction
  • getIndividualDailyRestriction
  • getDefaultRestriction
  • getDefaultDailyRestriction
  • _volumeRestrictionSplay
  • getRestrictionData
  • _checkLengthOfArray
  • getPermissions

Was this helpful?

  1. api

VolumeRestrictionTM.sol

PreviousStableOracle.solNextSecurityTokenRegistryProxy (SecurityTokenRegistryProxy.sol)

Last updated 5 years ago

Was this helpful?

View Source:

↗ Extends: ,

VolumeRestrictionTM

Events

event ChangedExemptWalletList(address indexed _wallet, bool  _exempted);
event AddIndividualRestriction(address indexed _holder, uint256  _allowedTokens, uint256  _startTime, uint256  _rollingPeriodInDays, uint256  _endTime, enum VolumeRestrictionTMStorage.RestrictionType  _typeOfRestriction);
event AddIndividualDailyRestriction(address indexed _holder, uint256  _allowedTokens, uint256  _startTime, uint256  _rollingPeriodInDays, uint256  _endTime, enum VolumeRestrictionTMStorage.RestrictionType  _typeOfRestriction);
event ModifyIndividualRestriction(address indexed _holder, uint256  _allowedTokens, uint256  _startTime, uint256  _rollingPeriodInDays, uint256  _endTime, enum VolumeRestrictionTMStorage.RestrictionType  _typeOfRestriction);
event ModifyIndividualDailyRestriction(address indexed _holder, uint256  _allowedTokens, uint256  _startTime, uint256  _rollingPeriodInDays, uint256  _endTime, enum VolumeRestrictionTMStorage.RestrictionType  _typeOfRestriction);
event AddDefaultRestriction(uint256  _allowedTokens, uint256  _startTime, uint256  _rollingPeriodInDays, uint256  _endTime, enum VolumeRestrictionTMStorage.RestrictionType  _typeOfRestriction);
event AddDefaultDailyRestriction(uint256  _allowedTokens, uint256  _startTime, uint256  _rollingPeriodInDays, uint256  _endTime, enum VolumeRestrictionTMStorage.RestrictionType  _typeOfRestriction);
event ModifyDefaultRestriction(uint256  _allowedTokens, uint256  _startTime, uint256  _rollingPeriodInDays, uint256  _endTime, enum VolumeRestrictionTMStorage.RestrictionType  _typeOfRestriction);
event ModifyDefaultDailyRestriction(uint256  _allowedTokens, uint256  _startTime, uint256  _rollingPeriodInDays, uint256  _endTime, enum VolumeRestrictionTMStorage.RestrictionType  _typeOfRestriction);
event IndividualRestrictionRemoved(address indexed _holder);
event IndividualDailyRestrictionRemoved(address indexed _holder);
event DefaultRestrictionRemoved();
event DefaultDailyRestrictionRemoved();

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

executeTransfer

Used to verify the transfer/transferFrom transaction and prevent tranaction whose volume of tokens will voilate the maximum volume transfer restriction

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

Arguments

Name

Type

Description

_from

address

Address of the sender

address

_from Address of the sender

_amount

uint256

The amount of tokens to transfer

bytes

_from Address of the sender

verifyTransfer

Used to verify the transfer/transferFrom transaction and prevent tranaction whose volume of tokens will voilate the maximum volume transfer restriction

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

Arguments

Name

Type

Description

_from

address

Address of the sender

address

_from Address of the sender

_amount

uint256

The amount of tokens to transfer

bytes

_from Address of the sender

_verifyTransfer

Used to verify the transfer/transferFrom transaction and prevent tranaction whose volume of tokens will voilate the maximum volume transfer restriction

function _verifyTransfer(address _from, uint256 _amount) internal view
returns(enum ITransferManager.Result, uint256, uint256, uint256, uint256, uint256, uint256, bool)

Arguments

Name

Type

Description

_from

address

Address of the sender

_amount

uint256

The amount of tokens to transfer

changeExemptWalletList

Add/Remove wallet address from the exempt list

function changeExemptWalletList(address _wallet, bool _exempted) public nonpayable withPerm

Arguments

Name

Type

Description

_wallet

address

Ethereum wallet/contract address that need to be exempted

_exempted

bool

Boolean value used to add (i.e true) or remove (i.e false) from the list

addIndividualRestriction

Use to add the new individual restriction for a given token holder

function addIndividualRestriction(address _holder, uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodInDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType) public nonpayable withPerm

Arguments

Name

Type

Description

_holder

address

Address of the token holder, whom restriction will be implied

_allowedTokens

uint256

Amount of tokens allowed to be trade for a given address.

_startTime

uint256

Unix timestamp at which restriction get into effect

_rollingPeriodInDays

uint256

Rolling period in days (Minimum value should be 1 day)

_endTime

uint256

Unix timestamp at which restriction effects will gets end.

_restrictionType

enum VolumeRestrictionTMStorage.RestrictionType

Whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

addIndividualDailyRestriction

Use to add the new individual daily restriction for all token holder

function addIndividualDailyRestriction(address _holder, uint256 _allowedTokens, uint256 _startTime, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType) public nonpayable withPerm

Arguments

Name

Type

Description

_holder

address

Address of the token holder, whom restriction will be implied

_allowedTokens

uint256

Amount of tokens allowed to be traded for all token holder.

_startTime

uint256

Unix timestamp at which restriction get into effect

_endTime

uint256

Unix timestamp at which restriction effects will gets end.

_restrictionType

enum VolumeRestrictionTMStorage.RestrictionType

Whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

addIndividualDailyRestrictionMulti

Use to add the new individual daily restriction for multiple token holders

function addIndividualDailyRestrictionMulti(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes) public nonpayable

Arguments

Name

Type

Description

_holders

address[]

Array of address of the token holders, whom restriction will be implied

_allowedTokens

uint256[]

Array of amount of tokens allowed to be trade for a given address.

_startTimes

uint256[]

Array of unix timestamps at which restrictions get into effect

_endTimes

uint256[]

Array of unix timestamps at which restriction effects will gets end.

_restrictionTypes

enum VolumeRestrictionTMStorage.RestrictionType[]

Array of restriction types value whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

addIndividualRestrictionMulti

Use to add the new individual restriction for multiple token holders

function addIndividualRestrictionMulti(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _rollingPeriodInDays, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes) public nonpayable

Arguments

Name

Type

Description

_holders

address[]

Array of address of the token holders, whom restriction will be implied

_allowedTokens

uint256[]

Array of amount of tokens allowed to be trade for a given address.

_startTimes

uint256[]

Array of unix timestamps at which restrictions get into effect

_rollingPeriodInDays

uint256[]

Array of rolling period in days (Minimum value should be 1 day)

_endTimes

uint256[]

Array of unix timestamps at which restriction effects will gets end.

_restrictionTypes

enum VolumeRestrictionTMStorage.RestrictionType[]

Array of restriction types value whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

addDefaultRestriction

Use to add the new default restriction for all token holder

function addDefaultRestriction(uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodInDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType) external nonpayable withPerm

Arguments

Name

Type

Description

_allowedTokens

uint256

Amount of tokens allowed to be traded for all token holder.

_startTime

uint256

Unix timestamp at which restriction get into effect

_rollingPeriodInDays

uint256

Rolling period in days (Minimum value should be 1 day)

_endTime

uint256

Unix timestamp at which restriction effects will gets end.

_restrictionType

enum VolumeRestrictionTMStorage.RestrictionType

Whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

addDefaultDailyRestriction

Use to add the new default daily restriction for all token holder

function addDefaultDailyRestriction(uint256 _allowedTokens, uint256 _startTime, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType) external nonpayable withPerm

Arguments

Name

Type

Description

_allowedTokens

uint256

Amount of tokens allowed to be traded for all token holder.

_startTime

uint256

Unix timestamp at which restriction get into effect

_endTime

uint256

Unix timestamp at which restriction effects will gets end.

_restrictionType

enum VolumeRestrictionTMStorage.RestrictionType

Whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

removeIndividualRestriction

use to remove the individual restriction for a given address

function removeIndividualRestriction(address _holder) public nonpayable withPerm

Arguments

Name

Type

Description

_holder

address

Address of the user

_removeIndividualRestriction

function _removeIndividualRestriction(address _holder) internal nonpayable

Arguments

Name

Type

Description

_holder

address

removeIndividualRestrictionMulti

use to remove the individual restriction for a given address

function removeIndividualRestrictionMulti(address[] _holders) public nonpayable withPerm

Arguments

Name

Type

Description

_holders

address[]

Array of address of the user

removeIndividualDailyRestriction

use to remove the individual daily restriction for a given address

function removeIndividualDailyRestriction(address _holder) public nonpayable withPerm

Arguments

Name

Type

Description

_holder

address

Address of the user

_removeIndividualDailyRestriction

function _removeIndividualDailyRestriction(address _holder) internal nonpayable

Arguments

Name

Type

Description

_holder

address

removeIndividualDailyRestrictionMulti

use to remove the individual daily restriction for a given address

function removeIndividualDailyRestrictionMulti(address[] _holders) public nonpayable withPerm

Arguments

Name

Type

Description

_holders

address[]

Array of address of the user

removeDefaultRestriction

Use to remove the default restriction

function removeDefaultRestriction() public nonpayable withPerm

Arguments

Name

Type

Description

removeDefaultDailyRestriction

Use to remove the daily default restriction

function removeDefaultDailyRestriction() external nonpayable withPerm

Arguments

Name

Type

Description

modifyIndividualRestriction

Use to modify the existing individual restriction for a given token holder

function modifyIndividualRestriction(address _holder, uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodInDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType) public nonpayable withPerm

Arguments

Name

Type

Description

_holder

address

Address of the token holder, whom restriction will be implied

_allowedTokens

uint256

Amount of tokens allowed to be trade for a given address.

_startTime

uint256

Unix timestamp at which restriction get into effect

_rollingPeriodInDays

uint256

Rolling period in days (Minimum value should be 1 day)

_endTime

uint256

Unix timestamp at which restriction effects will gets end.

_restrictionType

enum VolumeRestrictionTMStorage.RestrictionType

Whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

modifyIndividualDailyRestriction

Use to modify the existing individual daily restriction for a given token holder

function modifyIndividualDailyRestriction(address _holder, uint256 _allowedTokens, uint256 _startTime, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType) public nonpayable withPerm

Arguments

Name

Type

Description

_holder

address

Address of the token holder, whom restriction will be implied

_allowedTokens

uint256

Amount of tokens allowed to be trade for a given address.

_startTime

uint256

Unix timestamp at which restriction get into effect

_endTime

uint256

Unix timestamp at which restriction effects will gets end.

_restrictionType

enum VolumeRestrictionTMStorage.RestrictionType

Whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

modifyIndividualDailyRestrictionMulti

Use to modify the existing individual daily restriction for multiple token holders

function modifyIndividualDailyRestrictionMulti(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes) public nonpayable

Arguments

Name

Type

Description

_holders

address[]

Array of address of the token holders, whom restriction will be implied

_allowedTokens

uint256[]

Array of amount of tokens allowed to be trade for a given address.

_startTimes

uint256[]

Array of unix timestamps at which restrictions get into effect

_endTimes

uint256[]

Array of unix timestamps at which restriction effects will gets end.

_restrictionTypes

enum VolumeRestrictionTMStorage.RestrictionType[]

Array of restriction types value whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

modifyIndividualRestrictionMulti

Use to modify the existing individual restriction for multiple token holders

function modifyIndividualRestrictionMulti(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _rollingPeriodInDays, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes) public nonpayable

Arguments

Name

Type

Description

_holders

address[]

Array of address of the token holders, whom restriction will be implied

_allowedTokens

uint256[]

Array of amount of tokens allowed to be trade for a given address.

_startTimes

uint256[]

Array of unix timestamps at which restrictions get into effect

_rollingPeriodInDays

uint256[]

Array of rolling period in days (Minimum value should be 1 day)

_endTimes

uint256[]

Array of unix timestamps at which restriction effects will gets end.

_restrictionTypes

enum VolumeRestrictionTMStorage.RestrictionType[]

Array of restriction types value whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

modifyDefaultRestriction

Use to modify the global restriction for all token holder

function modifyDefaultRestriction(uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodInDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType) external nonpayable withPerm

Arguments

Name

Type

Description

_allowedTokens

uint256

Amount of tokens allowed to be traded for all token holder.

_startTime

uint256

Unix timestamp at which restriction get into effect

_rollingPeriodInDays

uint256

Rolling period in days (Minimum value should be 1 day)

_endTime

uint256

Unix timestamp at which restriction effects will gets end.

_restrictionType

enum VolumeRestrictionTMStorage.RestrictionType

Whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

modifyDefaultDailyRestriction

Use to modify the daily default restriction for all token holder

function modifyDefaultDailyRestriction(uint256 _allowedTokens, uint256 _startTime, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType) external nonpayable withPerm

Arguments

Name

Type

Description

_allowedTokens

uint256

Amount of tokens allowed to be traded for all token holder.

_startTime

uint256

Unix timestamp at which restriction get into effect

_endTime

uint256

Unix timestamp at which restriction effects will gets end.

_restrictionType

enum VolumeRestrictionTMStorage.RestrictionType

Whether it will be Fixed (fixed no. of tokens allowed to transact)

or Percentage (tokens are calculated as per the totalSupply in the fly). |

_restrictionCheck

Internal function used to validate the transaction for a given address If it validates then it also update the storage corressponds to the default restriction

function _restrictionCheck(uint256 _amount, address _from, bool _isDefault, struct VolumeRestrictionTMStorage.VolumeRestriction _restriction) internal view
returns(success enum ITransferManager.Result, fromTimestamp uint256, sumOfLastPeriod uint256, daysCovered uint256, dailyTime uint256, endTime uint256, allowedAmountToTransact uint256, allowedDaily bool)

Arguments

Name

Type

Description

_amount

uint256

_from

address

_isDefault

bool

_restriction

struct VolumeRestrictionTMStorage.VolumeRestriction

_validAllowedAmount

function _validAllowedAmount(struct VolumeRestrictionTMStorage.VolumeRestriction dailyRestriction, struct VolumeRestrictionTMStorage.VolumeRestriction restriction, uint256 allowedAmount, uint256 allowedDailyAmount) internal view
returns(uint256)

Arguments

Name

Type

Description

dailyRestriction

struct VolumeRestrictionTMStorage.VolumeRestriction

restriction

struct VolumeRestrictionTMStorage.VolumeRestriction

allowedAmount

uint256

allowedDailyAmount

uint256

_isValidAmountAfterRestrictionChanges

The function is used to check specific edge case where the user restriction type change from default to individual or vice versa. It will return true when last transaction traded by the user and the current txn timestamp lies in the same day. NB - Instead of comparing the current day transaction amount, we are comparing the total amount traded on the lastTradedDayTime that makes the restriction strict. The reason is not availability of amount that transacted on the current day (because of bucket desgin).

function _isValidAmountAfterRestrictionChanges(bool _isDefault, address _from, uint256 _amount, uint256 _sumOfLastPeriod, uint256 _allowedAmount) internal view
returns(bool)

Arguments

Name

Type

Description

_isDefault

bool

_from

address

_amount

uint256

_sumOfLastPeriod

uint256

_allowedAmount

uint256

_dailyTxCheck

function _dailyTxCheck(uint256 _amount, address _from, bool _isDefault, uint256 _dailyLastTradedDayTime, struct VolumeRestrictionTMStorage.VolumeRestriction _restriction) internal view
returns(bool, uint256, uint256)

Arguments

Name

Type

Description

_amount

uint256

_from

address

_isDefault

bool

_dailyLastTradedDayTime

uint256

_restriction

struct VolumeRestrictionTMStorage.VolumeRestriction

_bucketCheck

function _bucketCheck(address _from, bool isDefault, uint256 _fromTime, uint256 _diffDays, uint256 _rollingPeriodInDays, struct VolumeRestrictionTMStorage.BucketDetails _bucketDetails) internal view
returns(uint256, uint256, uint256)

Arguments

Name

Type

Description

_from

address

isDefault

bool

_fromTime

uint256

_diffDays

uint256

_rollingPeriodInDays

uint256

_bucketDetails

struct VolumeRestrictionTMStorage.BucketDetails

_checkValidAmountToTransact

function _checkValidAmountToTransact(uint256 _amountToTransact, address _from, bool _isDefault, struct VolumeRestrictionTMStorage.VolumeRestriction _restriction, uint256 _sumOfLastPeriod) internal view
returns(bool, uint256)

Arguments

Name

Type

Description

_amountToTransact

uint256

_from

address

_isDefault

bool

_restriction

struct VolumeRestrictionTMStorage.VolumeRestriction

_sumOfLastPeriod

uint256

_allowedAmountToTransact

function _allowedAmountToTransact(uint256 _sumOfLastPeriod, struct VolumeRestrictionTMStorage.VolumeRestriction _restriction) internal view
returns(uint256)

Arguments

Name

Type

Description

_sumOfLastPeriod

uint256

_restriction

struct VolumeRestrictionTMStorage.VolumeRestriction

_updateStorage

function _updateStorage(address _from, uint256 _amount, uint256 _lastTradedDayTime, uint256 _sumOfLastPeriod, uint256 _daysCovered, uint256 _dailyLastTradedDayTime, uint256 _endTime, bool isDefault) internal nonpayable

Arguments

Name

Type

Description

_from

address

_amount

uint256

_lastTradedDayTime

uint256

_sumOfLastPeriod

uint256

_daysCovered

uint256

_dailyLastTradedDayTime

uint256

_endTime

uint256

isDefault

bool

_updateStorageActual

function _updateStorageActual(address _from, uint256 _amount, uint256 _lastTradedDayTime, uint256 _sumOfLastPeriod, uint256 _daysCovered, uint256 _dailyLastTradedDayTime, uint256 _endTime, bool isDefault, struct VolumeRestrictionTMStorage.BucketDetails details) internal nonpayable

Arguments

Name

Type

Description

_from

address

_amount

uint256

_lastTradedDayTime

uint256

_sumOfLastPeriod

uint256

_daysCovered

uint256

_dailyLastTradedDayTime

uint256

_endTime

uint256

isDefault

bool

details

struct VolumeRestrictionTMStorage.BucketDetails

_checkInputParams

function _checkInputParams(uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType, uint256 _earliestStartTime, bool isModifyDaily) internal pure

Arguments

Name

Type

Description

_allowedTokens

uint256

_startTime

uint256

_rollingPeriodDays

uint256

_endTime

uint256

_restrictionType

enum VolumeRestrictionTMStorage.RestrictionType

_earliestStartTime

uint256

isModifyDaily

bool

_isAllowedToModify

function _isAllowedToModify(uint256 _startTime) internal view

Arguments

Name

Type

Description

_startTime

uint256

_getValidStartTime

function _getValidStartTime(uint256 _startTime) internal view
returns(uint256)

Arguments

Name

Type

Description

_startTime

uint256

getTokensByPartition

return the amount of tokens for a given user as per the partition

function getTokensByPartition(bytes32 _partition, address _tokenHolder, uint256 _additionalBalance) external view
returns(uint256)

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

getIndividualBucketDetailsToUser

Use to get the bucket details for a given address

function getIndividualBucketDetailsToUser(address _user) public view
returns(uint256, uint256, uint256, uint256, uint256)

Returns

uint256 lastTradedDayTime

Arguments

Name

Type

Description

_user

address

Address of the token holder for whom the bucket details has queried

getDefaultBucketDetailsToUser

Use to get the bucket details for a given address

function getDefaultBucketDetailsToUser(address _user) public view
returns(uint256, uint256, uint256, uint256, uint256)

Returns

uint256 lastTradedDayTime

Arguments

Name

Type

Description

_user

address

Address of the token holder for whom the bucket details has queried

_getBucketDetails

function _getBucketDetails(struct VolumeRestrictionTMStorage.BucketDetails _bucket) internal view
returns(uint256, uint256, uint256, uint256, uint256)

Arguments

Name

Type

Description

_bucket

struct VolumeRestrictionTMStorage.BucketDetails

getTotalTradedByUser

Use to get the volume of token that being traded at a particular day (_at + 24 hours) for a given user

function getTotalTradedByUser(address _user, uint256 _at) external view
returns(uint256)

Arguments

Name

Type

Description

_user

address

Address of the token holder

_at

uint256

Timestamp

getInitFunction

This function returns the signature of configure function

function getInitFunction() public pure
returns(bytes4)

Arguments

Name

Type

Description

getExemptAddress

Use to return the list of exempted addresses

function getExemptAddress() external view
returns(address[])

Arguments

Name

Type

Description

getIndividualRestriction

function getIndividualRestriction(address _investor) external view
returns(uint256, uint256, uint256, uint256, enum VolumeRestrictionTMStorage.RestrictionType)

Arguments

Name

Type

Description

_investor

address

getIndividualDailyRestriction

function getIndividualDailyRestriction(address _investor) external view
returns(uint256, uint256, uint256, uint256, enum VolumeRestrictionTMStorage.RestrictionType)

Arguments

Name

Type

Description

_investor

address

getDefaultRestriction

function getDefaultRestriction() external view
returns(uint256, uint256, uint256, uint256, enum VolumeRestrictionTMStorage.RestrictionType)

Arguments

Name

Type

Description

getDefaultDailyRestriction

function getDefaultDailyRestriction() external view
returns(uint256, uint256, uint256, uint256, enum VolumeRestrictionTMStorage.RestrictionType)

Arguments

Name

Type

Description

_volumeRestrictionSplay

function _volumeRestrictionSplay(struct VolumeRestrictionTMStorage.VolumeRestriction _volumeRestriction) internal pure
returns(uint256, uint256, uint256, uint256, enum VolumeRestrictionTMStorage.RestrictionType)

Arguments

Name

Type

Description

_volumeRestriction

struct VolumeRestrictionTMStorage.VolumeRestriction

getRestrictionData

Provide the restriction details of all the restricted addresses

function getRestrictionData() external view
returns(allAddresses address[], allowedTokens uint256[], startTime uint256[], rollingPeriodInDays uint256[], endTime uint256[], typeOfRestriction enum VolumeRestrictionTMStorage.RestrictionType[])

Returns

address List of the restricted addresses

Arguments

Name

Type

Description

_checkLengthOfArray

function _checkLengthOfArray(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _rollingPeriodInDays, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes) internal pure

Arguments

Name

Type

Description

_holders

address[]

_allowedTokens

uint256[]

_startTimes

uint256[]

_rollingPeriodInDays

uint256[]

_endTimes

uint256[]

_restrictionTypes

enum VolumeRestrictionTMStorage.RestrictionType[]

getPermissions

Returns the permissions flag that are associated with Percentage transfer Manager

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

Arguments

Name

Type

Description

⤾ overrides

⤾ overrides

⤾ overrides

⤾ overrides

⤾ overrides

contracts/modules/TransferManager/VRTM/VolumeRestrictionTM.sol
VolumeRestrictionTMStorage
TransferManager
(address _securityToken, address _polyAddress)
ITransferManager.executeTransfer
ITransferManager.verifyTransfer
TransferManager.getTokensByPartition
IModule.getInitFunction
IModule.getPermissions
executeTransfer(address _from, address , uint256 _amount, bytes )
verifyTransfer(address _from, address , uint256 _amount, bytes )
_verifyTransfer(address _from, uint256 _amount)
changeExemptWalletList(address _wallet, bool _exempted)
addIndividualRestriction(address _holder, uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodInDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType)
addIndividualDailyRestriction(address _holder, uint256 _allowedTokens, uint256 _startTime, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType)
addIndividualDailyRestrictionMulti(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes)
addIndividualRestrictionMulti(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _rollingPeriodInDays, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes)
addDefaultRestriction(uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodInDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType)
addDefaultDailyRestriction(uint256 _allowedTokens, uint256 _startTime, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType)
removeIndividualRestriction(address _holder)
_removeIndividualRestriction(address _holder)
removeIndividualRestrictionMulti(address[] _holders)
removeIndividualDailyRestriction(address _holder)
_removeIndividualDailyRestriction(address _holder)
removeIndividualDailyRestrictionMulti(address[] _holders)
removeDefaultRestriction()
removeDefaultDailyRestriction()
modifyIndividualRestriction(address _holder, uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodInDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType)
modifyIndividualDailyRestriction(address _holder, uint256 _allowedTokens, uint256 _startTime, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType)
modifyIndividualDailyRestrictionMulti(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes)
modifyIndividualRestrictionMulti(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _rollingPeriodInDays, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes)
modifyDefaultRestriction(uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodInDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType)
modifyDefaultDailyRestriction(uint256 _allowedTokens, uint256 _startTime, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType)
_restrictionCheck(uint256 _amount, address _from, bool _isDefault, struct VolumeRestrictionTMStorage.VolumeRestriction _restriction)
_validAllowedAmount(struct VolumeRestrictionTMStorage.VolumeRestriction dailyRestriction, struct VolumeRestrictionTMStorage.VolumeRestriction restriction, uint256 allowedAmount, uint256 allowedDailyAmount)
_isValidAmountAfterRestrictionChanges(bool _isDefault, address _from, uint256 _amount, uint256 _sumOfLastPeriod, uint256 _allowedAmount)
_dailyTxCheck(uint256 _amount, address _from, bool _isDefault, uint256 _dailyLastTradedDayTime, struct VolumeRestrictionTMStorage.VolumeRestriction _restriction)
_bucketCheck(address _from, bool isDefault, uint256 _fromTime, uint256 _diffDays, uint256 _rollingPeriodInDays, struct VolumeRestrictionTMStorage.BucketDetails _bucketDetails)
_checkValidAmountToTransact(uint256 _amountToTransact, address _from, bool _isDefault, struct VolumeRestrictionTMStorage.VolumeRestriction _restriction, uint256 _sumOfLastPeriod)
_allowedAmountToTransact(uint256 _sumOfLastPeriod, struct VolumeRestrictionTMStorage.VolumeRestriction _restriction)
_updateStorage(address _from, uint256 _amount, uint256 _lastTradedDayTime, uint256 _sumOfLastPeriod, uint256 _daysCovered, uint256 _dailyLastTradedDayTime, uint256 _endTime, bool isDefault)
_updateStorageActual(address _from, uint256 _amount, uint256 _lastTradedDayTime, uint256 _sumOfLastPeriod, uint256 _daysCovered, uint256 _dailyLastTradedDayTime, uint256 _endTime, bool isDefault, struct VolumeRestrictionTMStorage.BucketDetails details)
_checkInputParams(uint256 _allowedTokens, uint256 _startTime, uint256 _rollingPeriodDays, uint256 _endTime, enum VolumeRestrictionTMStorage.RestrictionType _restrictionType, uint256 _earliestStartTime, bool isModifyDaily)
_isAllowedToModify(uint256 _startTime)
_getValidStartTime(uint256 _startTime)
getTokensByPartition(bytes32 _partition, address _tokenHolder, uint256 _additionalBalance)
getIndividualBucketDetailsToUser(address _user)
getDefaultBucketDetailsToUser(address _user)
_getBucketDetails(struct VolumeRestrictionTMStorage.BucketDetails _bucket)
getTotalTradedByUser(address _user, uint256 _at)
getInitFunction()
getExemptAddress()
getIndividualRestriction(address _investor)
getIndividualDailyRestriction(address _investor)
getDefaultRestriction()
getDefaultDailyRestriction()
_volumeRestrictionSplay(struct VolumeRestrictionTMStorage.VolumeRestriction _volumeRestriction)
getRestrictionData()
_checkLengthOfArray(address[] _holders, uint256[] _allowedTokens, uint256[] _startTimes, uint256[] _rollingPeriodInDays, uint256[] _endTimes, enum VolumeRestrictionTMStorage.RestrictionType[] _restrictionTypes)
getPermissions()