From 99cf720d5ba6e322bd149ae347d299a2c255ec44 Mon Sep 17 00:00:00 2001 From: Adam Dossa Date: Wed, 12 Jun 2019 21:15:01 -0400 Subject: [PATCH] Update interfaces to named parameters (#708) * WIP * Change some values * Make some mappings public for automatic getters * Put back truffle version --- contracts/interfaces/ICheckPermission.sol | 2 +- contracts/interfaces/IFeatureRegistry.sol | 2 +- contracts/interfaces/IModule.sol | 4 +- contracts/interfaces/IModuleFactory.sol | 22 +++--- contracts/interfaces/IModuleRegistry.sol | 16 ++--- contracts/interfaces/IOracle.sol | 8 +-- contracts/interfaces/IOwnable.sol | 2 +- contracts/interfaces/IPolymathRegistry.sol | 2 +- contracts/interfaces/ISTFactory.sol | 6 +- contracts/interfaces/ISTO.sol | 2 +- contracts/interfaces/ISecurityToken.sol | 70 +++++++++---------- .../interfaces/ISecurityTokenRegistry.sol | 30 ++++---- contracts/interfaces/ITransferManager.sol | 6 +- contracts/interfaces/IUSDTieredSTOProxy.sol | 4 +- contracts/interfaces/IVoting.sol | 6 +- contracts/modules/UpgradableModuleFactory.sol | 6 +- 16 files changed, 94 insertions(+), 94 deletions(-) diff --git a/contracts/interfaces/ICheckPermission.sol b/contracts/interfaces/ICheckPermission.sol index 2e14fa5b9..cf9448801 100644 --- a/contracts/interfaces/ICheckPermission.sol +++ b/contracts/interfaces/ICheckPermission.sol @@ -10,5 +10,5 @@ interface ICheckPermission { * @param _perm the permissions * @return success */ - function checkPermission(address _delegate, address _module, bytes32 _perm) external view returns(bool); + function checkPermission(address _delegate, address _module, bytes32 _perm) external view returns(bool hasPerm); } diff --git a/contracts/interfaces/IFeatureRegistry.sol b/contracts/interfaces/IFeatureRegistry.sol index 563a1a9b8..afbb9f223 100644 --- a/contracts/interfaces/IFeatureRegistry.sol +++ b/contracts/interfaces/IFeatureRegistry.sol @@ -9,6 +9,6 @@ interface IFeatureRegistry { * @param _nameKey is the key for the feature status mapping * @return bool */ - function getFeatureStatus(string calldata _nameKey) external view returns(bool); + function getFeatureStatus(string calldata _nameKey) external view returns(bool hasFeature); } diff --git a/contracts/interfaces/IModule.sol b/contracts/interfaces/IModule.sol index 3a1716cb0..cc263c4f7 100644 --- a/contracts/interfaces/IModule.sol +++ b/contracts/interfaces/IModule.sol @@ -7,11 +7,11 @@ interface IModule { /** * @notice This function returns the signature of configure function */ - function getInitFunction() external pure returns(bytes4); + function getInitFunction() external pure returns(bytes4 initFunction); /** * @notice Return the permission flags that are associated with a module */ - function getPermissions() external view returns(bytes32[] memory); + function getPermissions() external view returns(bytes32[] memory permissions); } diff --git a/contracts/interfaces/IModuleFactory.sol b/contracts/interfaces/IModuleFactory.sol index 95ec87545..99810470e 100644 --- a/contracts/interfaces/IModuleFactory.sol +++ b/contracts/interfaces/IModuleFactory.sol @@ -17,42 +17,42 @@ interface IModuleFactory { event ChangeSTVersionBound(string _boundType, uint8 _major, uint8 _minor, uint8 _patch); //Should create an instance of the Module, or throw - function deploy(bytes calldata _data) external returns(address); + function deploy(bytes calldata _data) external returns(address moduleAddress); /** * @notice Get the tags related to the module factory */ - function version() external view returns(string memory); + function version() external view returns(string memory moduleVersion); /** * @notice Get the tags related to the module factory */ - function name() external view returns(bytes32); + function name() external view returns(bytes32 moduleName); /** * @notice Returns the title associated with the module */ - function title() external view returns(string memory); + function title() external view returns(string memory moduleTitle); /** * @notice Returns the description associated with the module */ - function description() external view returns(string memory); + function description() external view returns(string memory moduleDescription); /** * @notice Get the setup cost of the module in USD */ - function setupCost() external returns(uint256); + function setupCost() external returns(uint256 usdSetupCost); /** * @notice Type of the Module factory */ - function types() external view returns(uint8[] memory); + function types() external view returns(uint8[] memory moduleTypes); /** * @notice Get the tags related to the module factory */ - function tags() external view returns(bytes32[] memory); + function tags() external view returns(bytes32[] memory moduleTags); /** * @notice Used to change the setup fee @@ -77,18 +77,18 @@ interface IModuleFactory { /** * @notice Get the setup cost of the module */ - function setupCostInPoly() external returns (uint256); + function setupCostInPoly() external returns (uint256 polySetupCost); /** * @notice Used to get the lower bound * @return Lower bound */ - function lowerSTVersionBounds() external view returns(uint8[] memory); + function lowerSTVersionBounds() external view returns(uint8[] memory lowerBounds); /** * @notice Used to get the upper bound * @return Upper bound */ - function upperSTVersionBounds() external view returns(uint8[] memory); + function upperSTVersionBounds() external view returns(uint8[] memory upperBounds); } diff --git a/contracts/interfaces/IModuleRegistry.sol b/contracts/interfaces/IModuleRegistry.sol index c2bff56ce..3c7b7cc0d 100644 --- a/contracts/interfaces/IModuleRegistry.sol +++ b/contracts/interfaces/IModuleRegistry.sol @@ -29,7 +29,7 @@ interface IModuleRegistry { * @param _securityToken is the address of the relevant security token * @return bool whether module and token are compatible */ - function isCompatibleModule(address _moduleFactory, address _securityToken) external view returns(bool); + function isCompatibleModule(address _moduleFactory, address _securityToken) external view returns(bool isCompatible); /** * @notice Called by Polymath to verify modules for SecurityToken to use. @@ -53,7 +53,7 @@ interface IModuleRegistry { * @return bool indicating whether module factory is verified * @return address array which contains the list of securityTokens that use that module factory */ - function getFactoryDetails(address _factoryAddress) external view returns(bool, address, address[] memory); + function getFactoryDetails(address _factoryAddress) external view returns(bool isVerified, address[] memory usingTokens); /** * @notice Returns all the tags related to the a module type which are valid for the given token @@ -62,7 +62,7 @@ interface IModuleRegistry { * @return list of tags * @return corresponding list of module factories */ - function getTagsByTypeAndToken(uint8 _moduleType, address _securityToken) external view returns(bytes32[] memory, address[] memory); + function getTagsByTypeAndToken(uint8 _moduleType, address _securityToken) external view returns(bytes32[] memory tags, address[] memory factories); /** * @notice Returns all the tags related to the a module type which are valid for the given token @@ -70,7 +70,7 @@ interface IModuleRegistry { * @return list of tags * @return corresponding list of module factories */ - function getTagsByType(uint8 _moduleType) external view returns(bytes32[] memory, address[] memory); + function getTagsByType(uint8 _moduleType) external view returns(bytes32[] memory tags, address[] memory factories); /** * @notice Returns the list of addresses of all Module Factory of a particular type @@ -83,7 +83,7 @@ interface IModuleRegistry { * @param _moduleType Type of Module * @return address array that contains the list of addresses of module factory contracts. */ - function getModulesByType(uint8 _moduleType) external view returns(address[] memory); + function getModulesByType(uint8 _moduleType) external view returns(address[] memory factories); /** * @notice Returns the list of available Module factory addresses of a particular type for a given token. @@ -91,7 +91,7 @@ interface IModuleRegistry { * @param _securityToken is the address of SecurityToken * @return address array that contains the list of available addresses of module factory contracts. */ - function getModulesByTypeAndToken(uint8 _moduleType, address _securityToken) external view returns(address[] memory); + function getModulesByTypeAndToken(uint8 _moduleType, address _securityToken) external view returns(address[] memory factories); /** * @notice Use to get the latest contract address of the regstries @@ -102,12 +102,12 @@ interface IModuleRegistry { * @notice Get the owner of the contract * @return address owner */ - function owner() external view returns(address); + function owner() external view returns(address ownerAddress); /** * @notice Check whether the contract operations is paused or not * @return bool */ - function isPaused() external view returns(bool); + function isPaused() external view returns(bool paused); } diff --git a/contracts/interfaces/IOracle.sol b/contracts/interfaces/IOracle.sol index 704814a5a..89bcc8856 100644 --- a/contracts/interfaces/IOracle.sol +++ b/contracts/interfaces/IOracle.sol @@ -4,21 +4,21 @@ interface IOracle { /** * @notice Returns address of oracle currency (0x0 for ETH) */ - function getCurrencyAddress() external view returns(address); + function getCurrencyAddress() external view returns(address currency); /** * @notice Returns symbol of oracle currency (0x0 for ETH) */ - function getCurrencySymbol() external view returns(bytes32); + function getCurrencySymbol() external view returns(bytes32 symbol); /** * @notice Returns denomination of price */ - function getCurrencyDenominated() external view returns(bytes32); + function getCurrencyDenominated() external view returns(bytes32 denominatedCurrency); /** * @notice Returns price - should throw if not valid */ - function getPrice() external returns(uint256); + function getPrice() external returns(uint256 price); } diff --git a/contracts/interfaces/IOwnable.sol b/contracts/interfaces/IOwnable.sol index 9f36abea6..8680cfd41 100644 --- a/contracts/interfaces/IOwnable.sol +++ b/contracts/interfaces/IOwnable.sol @@ -9,7 +9,7 @@ interface IOwnable { /** * @dev Returns owner */ - function owner() external view returns(address); + function owner() external view returns(address ownerAddress); /** * @dev Allows the current owner to relinquish control of the contract. diff --git a/contracts/interfaces/IPolymathRegistry.sol b/contracts/interfaces/IPolymathRegistry.sol index 91a057d54..bc89d5081 100644 --- a/contracts/interfaces/IPolymathRegistry.sol +++ b/contracts/interfaces/IPolymathRegistry.sol @@ -6,6 +6,6 @@ interface IPolymathRegistry { * @param _nameKey is the key for the contract address mapping * @return address */ - function getAddress(string calldata _nameKey) external view returns(address); + function getAddress(string calldata _nameKey) external view returns(address registryAddress); } diff --git a/contracts/interfaces/ISTFactory.sol b/contracts/interfaces/ISTFactory.sol index d5d01f79c..f88a7cdb9 100644 --- a/contracts/interfaces/ISTFactory.sol +++ b/contracts/interfaces/ISTFactory.sol @@ -25,7 +25,7 @@ interface ISTFactory { bool _divisible, address _treasuryWallet, address _polymathRegistry - ) - external - returns(address); + ) + external + returns(address tokenAddress); } diff --git a/contracts/interfaces/ISTO.sol b/contracts/interfaces/ISTO.sol index 248274e39..504df3c8f 100644 --- a/contracts/interfaces/ISTO.sol +++ b/contracts/interfaces/ISTO.sol @@ -7,6 +7,6 @@ interface ISTO { /** * @notice Returns the total no. of tokens sold */ - function getTokensSold() external view returns(uint256); + function getTokensSold() external view returns(uint256 soldTokens); } diff --git a/contracts/interfaces/ISecurityToken.sol b/contracts/interfaces/ISecurityToken.sol index 437996171..ccd996535 100644 --- a/contracts/interfaces/ISecurityToken.sol +++ b/contracts/interfaces/ISecurityToken.sol @@ -30,7 +30,7 @@ interface ISecurityToken { * @return byte Ethereum status code (ESC) * @return bytes32 Application specific reason code */ - function canTransfer(address _to, uint256 _value, bytes calldata _data) external view returns (bool, byte, bytes32); + function canTransfer(address _to, uint256 _value, bytes calldata _data) external view returns (bool isExecuted, byte statusCode, bytes32 reasonCode); /** * @notice Initialization function @@ -51,7 +51,7 @@ interface ISecurityToken { * @return byte Ethereum status code (ESC) * @return bytes32 Application specific reason code */ - function canTransferFrom(address _from, address _to, uint256 _value, bytes calldata _data) external view returns (bool, byte, bytes32); + function canTransferFrom(address _from, address _to, uint256 _value, bytes calldata _data) external view returns (bool isExecuted, byte statusCode, bytes32 reasonCode); /** * @notice The standard provides an on-chain function to determine whether a transfer will succeed, @@ -65,7 +65,7 @@ interface ISecurityToken { * @return Application specific reason codes with additional details * @return The partition to which the transferred tokens were allocated for the _to address */ - function canTransferByPartition(address _from, address _to, bytes32 _partition, uint256 _value, bytes calldata _data) external view returns (byte, bytes32, bytes32); + function canTransferByPartition(address _from, address _to, bytes32 _partition, uint256 _value, bytes calldata _data) external view returns (byte isExecuted, bytes32 statusCode, bytes32 reasonCode); /** * @notice Used to attach a new document to the contract, or update the URI or hash of an existing attached document @@ -90,13 +90,13 @@ interface ISecurityToken { * @return bytes32 The hash (of the contents) of the document. * @return uint256 the timestamp at which the document was last modified. */ - function getDocument(bytes32 _name) external view returns (string memory, bytes32, uint256); + function getDocument(bytes32 _name) external view returns (string memory documentUri, bytes32 documentHash, uint256 documentTime); /** * @notice Used to retrieve a full list of documents attached to the smart contract. * @return bytes32 List of all documents names present in the contract. */ - function getAllDocuments() external view returns (bytes32[] memory); + function getAllDocuments() external view returns (bytes32[] memory documentNames); /** * @notice In order to provide transparency over whether `controllerTransfer` / `controllerRedeem` are useable @@ -105,14 +105,14 @@ interface ISecurityToken { * `controllerTransfer` / `controllerRedeem` will always revert. * @return bool `true` when controller address is non-zero otherwise return `false`. */ - function isControllable() external view returns (bool); + function isControllable() external view returns (bool controlled); /** * @notice Checks if an address is a module of certain type * @param _module Address to check * @param _type type to check against */ - function isModule(address _module, uint8 _type) external view returns(bool); + function isModule(address _module, uint8 _type) external view returns(bool isValid); /** * @notice This function must be called to increase the total supply (Corresponds to mint function of ERC20). @@ -201,7 +201,7 @@ interface ISecurityToken { * @param _perm the permissions * @return success */ - function checkPermission(address _delegate, address _module, bytes32 _perm) external view returns(bool); + function checkPermission(address _delegate, address _module, bytes32 _perm) external view returns(bool hasPermission); /** * @notice Returns module list for a module type @@ -213,57 +213,57 @@ interface ISecurityToken { * @return uint8 Array of module types * @return bytes32 Module label */ - function getModule(address _module) external view returns (bytes32, address, address, bool, uint8[] memory, bytes32); + function getModule(address _module) external view returns (bytes32 moduleName, address moduleAddress, address factoryAddress, bool isArchived, uint8[] memory moduleTypes, bytes32 moduleLabel); /** * @notice Returns module list for a module name * @param _name Name of the module * @return address[] List of modules with this name */ - function getModulesByName(bytes32 _name) external view returns(address[] memory); + function getModulesByName(bytes32 _name) external view returns(address[] memory modules); /** * @notice Returns module list for a module type * @param _type Type of the module * @return address[] List of modules with this type */ - function getModulesByType(uint8 _type) external view returns(address[] memory); + function getModulesByType(uint8 _type) external view returns(address[] memory modules); /** * @notice use to return the global treasury wallet */ - function getTreasuryWallet() external view returns(address); + function getTreasuryWallet() external view returns(address treasuryWallet); /** * @notice Queries totalSupply at a specified checkpoint * @param _checkpointId Checkpoint ID to query as of */ - function totalSupplyAt(uint256 _checkpointId) external view returns(uint256); + function totalSupplyAt(uint256 _checkpointId) external view returns(uint256 supply); /** * @notice Queries balance at a specified checkpoint * @param _investor Investor to query balance for * @param _checkpointId Checkpoint ID to query as of */ - function balanceOfAt(address _investor, uint256 _checkpointId) external view returns(uint256); + function balanceOfAt(address _investor, uint256 _checkpointId) external view returns(uint256 balance); /** * @notice Creates a checkpoint that can be used to query historical balances / totalSuppy */ - function createCheckpoint() external returns(uint256); + function createCheckpoint() external returns(uint256 checkpointId); /** * @notice Gets list of times that checkpoints were created * @return List of checkpoint times */ - function getCheckpointTimes() external view returns(uint256[] memory); + function getCheckpointTimes() external view returns(uint256[] memory checkpointTimes); /** * @notice Gets length of investors array * NB - this length may differ from investorCount if the list has not been pruned of zero-balance investors * @return Length */ - function getInvestors() external view returns(address[] memory); + function getInvestors() external view returns(address[] memory investors); /** * @notice returns an array of investors at a given checkpoint @@ -271,7 +271,7 @@ interface ISecurityToken { * @param _checkpointId Checkpoint id at which investor list is to be populated * @return list of investors */ - function getInvestorsAt(uint256 _checkpointId) external view returns(address[] memory); + function getInvestorsAt(uint256 _checkpointId) external view returns(address[] memory investors); /** * @notice returns an array of investors with non zero balance at a given checkpoint @@ -280,7 +280,7 @@ interface ISecurityToken { * @param _end Position of investor to stop iteration at * @return list of investors */ - function getInvestorsSubsetAt(uint256 _checkpointId, uint256 _start, uint256 _end) external view returns(address[] memory); + function getInvestorsSubsetAt(uint256 _checkpointId, uint256 _start, uint256 _end) external view returns(address[] memory investors); /** * @notice generates subset of investors @@ -289,13 +289,13 @@ interface ISecurityToken { * @param _end Position of investor to stop iteration at * @return list of investors */ - function iterateInvestors(uint256 _start, uint256 _end) external view returns(address[] memory); + function iterateInvestors(uint256 _start, uint256 _end) external view returns(address[] memory investors); /** * @notice Gets current checkpoint ID * @return Id */ - function currentCheckpointId() external view returns(uint256); + function currentCheckpointId() external view returns(uint256 checkpointId); /** * @notice Determines whether `_operator` is an operator for all partitions of `_tokenHolder` @@ -303,7 +303,7 @@ interface ISecurityToken { * @param _tokenHolder The token holder to check * @return Whether the `_operator` is an operator for all partitions of `_tokenHolder` */ - function isOperator(address _operator, address _tokenHolder) external view returns (bool); + function isOperator(address _operator, address _tokenHolder) external view returns (bool isValid); /** * @notice Determines whether `_operator` is an operator for a specified partition of `_tokenHolder` @@ -312,20 +312,20 @@ interface ISecurityToken { * @param _tokenHolder The token holder to check * @return Whether the `_operator` is an operator for a specified partition of `_tokenHolder` */ - function isOperatorForPartition(bytes32 _partition, address _operator, address _tokenHolder) external view returns (bool); + function isOperatorForPartition(bytes32 _partition, address _operator, address _tokenHolder) external view returns (bool isValid); /** * @notice Return all partitions * @param _tokenHolder Whom balance need to queried * @return List of partitions */ - function partitionsOf(address _tokenHolder) external view returns (bytes32[] memory); + function partitionsOf(address _tokenHolder) external view returns (bytes32[] memory partitions); /** * @notice Gets data store address * @return data store address */ - function dataStore() external view returns (address); + function dataStore() external view returns (address dataStoreAddress); /** * @notice Allows owner to change data store @@ -486,17 +486,17 @@ interface ISecurityToken { /** * @notice Used to get the version of the securityToken */ - function getVersion() external view returns(uint8[] memory); + function getVersion() external view returns(uint8[] memory version); /** * @notice Gets the investor count */ - function getInvestorCount() external view returns(uint256); + function getInvestorCount() external view returns(uint256 investorCount); /** * @notice Gets the holder count (investors with non zero balance) */ - function holderCount() external view returns(uint256); + function holderCount() external view returns(uint256 count); /** * @notice Overloaded version of the transfer function @@ -525,7 +525,7 @@ interface ISecurityToken { * @param _data Additional data attached to the transfer of tokens * @return The partition to which the transferred tokens were allocated for the _to address */ - function transferByPartition(bytes32 _partition, address _to, uint256 _value, bytes calldata _data) external returns (bytes32); + function transferByPartition(bytes32 _partition, address _to, uint256 _value, bytes calldata _data) external returns (bytes32 partition); /** * @notice Get the balance according to the provided partitions @@ -533,19 +533,19 @@ interface ISecurityToken { * @param _tokenHolder Whom balance need to queried * @return Amount of tokens as per the given partitions */ - function balanceOfByPartition(bytes32 _partition, address _tokenHolder) external view returns(uint256); + function balanceOfByPartition(bytes32 _partition, address _tokenHolder) external view returns(uint256 balance); /** * @notice Provides the granularity of the token * @return uint256 */ - function granularity() external view returns(uint256); + function granularity() external view returns(uint256 granularityAmount); /** * @notice Provides the address of the polymathRegistry * @return address */ - function polymathRegistry() external view returns(address); + function polymathRegistry() external view returns(address registryAddress); /** * @notice Upgrades a module attached to the SecurityToken @@ -565,7 +565,7 @@ interface ISecurityToken { * If a token returns FALSE for `isIssuable()` then it MUST never allow additional tokens to be issued. * @return bool `true` signifies the minting is allowed. While `false` denotes the end of minting */ - function isIssuable() external view returns (bool); + function isIssuable() external view returns (bool issuable); /** * @notice Authorises an operator for all partitions of `msg.sender`. @@ -618,10 +618,10 @@ interface ISecurityToken { bytes calldata _operatorData ) external - returns (bytes32); + returns (bytes32 partition); /* * @notice Returns if transfers are currently frozen or not */ - function transfersFrozen() external view returns (bool); + function transfersFrozen() external view returns (bool isFrozen); } diff --git a/contracts/interfaces/ISecurityTokenRegistry.sol b/contracts/interfaces/ISecurityTokenRegistry.sol index 3f8acf8ed..1a3fb2a74 100644 --- a/contracts/interfaces/ISecurityTokenRegistry.sol +++ b/contracts/interfaces/ISecurityTokenRegistry.sol @@ -70,7 +70,7 @@ interface ISecurityTokenRegistry { * @param _securityToken Address of the Scurity token * @return bool */ - function isSecurityToken(address _securityToken) external view returns(bool); + function isSecurityToken(address _securityToken) external view returns(bool isValid); /** * @dev Allows the current owner to transfer control of the contract to a newOwner. @@ -83,7 +83,7 @@ interface ISecurityTokenRegistry { * @param _ticker Symbol of the Scurity token * @return address */ - function getSecurityTokenAddress(string calldata _ticker) external view returns(address); + function getSecurityTokenAddress(string calldata _ticker) external view returns(address tokenAddress); /** * @notice Get security token data by its address @@ -94,36 +94,36 @@ interface ISecurityTokenRegistry { * @return uint256 Timestamp at which Security Token get launched on Polymath platform * @return version of the securityToken */ - function getSecurityTokenData(address _securityToken) external view returns(string memory, address, string memory, uint256, uint8[] memory); + function getSecurityTokenData(address _securityToken) external view returns(string memory tokenSymbol, address tokenAddress, string memory tokenDetails, uint256 tokenTime, uint8[] memory tokenVersion); /** * @notice Get the current STFactory Address */ - function getSTFactoryAddress() external view returns(address); + function getSTFactoryAddress() external view returns(address stFactoryAddress); /** * @notice Get Protocol version */ - function getProtocolVersion() external view returns(uint8[] memory); + function getProtocolVersion() external view returns(uint8[] memory protocolVersion); /** * @notice Used to get the ticker list as per the owner * @param _owner Address which owns the list of tickers */ - function getTickersByOwner(address _owner) external view returns(bytes32[] memory); + function getTickersByOwner(address _owner) external view returns(bytes32[] memory tickers); /** * @notice Returns the list of tokens owned by the selected address * @param _owner is the address which owns the list of tickers * @dev Intention is that this is called off-chain so block gas limit is not relevant */ - function getTokensByOwner(address _owner) external view returns(address[] memory); + function getTokensByOwner(address _owner) external view returns(address[] memory tokens); /** * @notice Returns the list of all tokens * @dev Intention is that this is called off-chain so block gas limit is not relevant */ - function getTokens() external view returns(address[] memory); + function getTokens() external view returns(address[] memory tokens); /** * @notice Returns the owner and timestamp for a given ticker @@ -134,7 +134,7 @@ interface ISecurityTokenRegistry { * @return string * @return bool */ - function getTickerDetails(string calldata _ticker) external view returns(address, uint256, uint256, string memory, bool); + function getTickerDetails(string calldata _ticker) external view returns(address tickerOwner, uint256 tickerRegistration, uint256 tickerExpiry, string memory tokenName, bool tickerStatus); /** * @notice Modifies the ticker details. Only polymath account has the ability @@ -199,37 +199,37 @@ interface ISecurityTokenRegistry { * @notice Gets the security token launch fee * @return Fee amount */ - function getSecurityTokenLaunchFee() external view returns(uint256); + function getSecurityTokenLaunchFee() external view returns(uint256 fee); /** * @notice Gets the ticker registration fee * @return Fee amount */ - function getTickerRegistrationFee() external view returns(uint256); + function getTickerRegistrationFee() external view returns(uint256 fee); /** * @notice Returns the list of tokens to which the delegate has some access * @param _delegate is the address for the delegate * @dev Intention is that this is called off-chain so block gas limit is not relevant */ - function getTokensByDelegate(address _delegate) external view returns(address[] memory); + function getTokensByDelegate(address _delegate) external view returns(address[] memory tokens); /** * @notice Gets the expiry limit * @return Expiry limit */ - function getExpiryLimit() external view returns(uint256); + function getExpiryLimit() external view returns(uint256 expiry); /** * @notice Checks whether the registry is paused or not * @return bool */ - function isPaused() external view returns(bool); + function isPaused() external view returns(bool paused); /** * @notice Gets the owner of the contract * @return address owner */ - function owner() external view returns(address); + function owner() external view returns(address ownerAddress); } diff --git a/contracts/interfaces/ITransferManager.sol b/contracts/interfaces/ITransferManager.sol index b5c0e1691..3f66c3774 100644 --- a/contracts/interfaces/ITransferManager.sol +++ b/contracts/interfaces/ITransferManager.sol @@ -14,9 +14,9 @@ interface ITransferManager { /** * @notice Determines if the transfer between these two accounts can happen */ - function executeTransfer(address _from, address _to, uint256 _amount, bytes calldata _data) external returns(Result); + function executeTransfer(address _from, address _to, uint256 _amount, bytes calldata _data) external returns(Result result); - function verifyTransfer(address _from, address _to, uint256 _amount, bytes calldata _data) external view returns(Result, bytes32); + function verifyTransfer(address _from, address _to, uint256 _amount, bytes calldata _data) external view returns(Result result, bytes32 partition); /** * @notice return the amount of tokens for a given user as per the partition @@ -24,6 +24,6 @@ interface ITransferManager { * @param _tokenHolder Whom token amount need to query * @param _additionalBalance It is the `_value` that transfer during transfer/transferFrom function call */ - function getTokensByPartition(bytes32 _partition, address _tokenHolder, uint256 _additionalBalance) external view returns(uint256); + function getTokensByPartition(bytes32 _partition, address _tokenHolder, uint256 _additionalBalance) external view returns(uint256 amount); } diff --git a/contracts/interfaces/IUSDTieredSTOProxy.sol b/contracts/interfaces/IUSDTieredSTOProxy.sol index bcbf2b2d9..fef8d49e5 100644 --- a/contracts/interfaces/IUSDTieredSTOProxy.sol +++ b/contracts/interfaces/IUSDTieredSTOProxy.sol @@ -10,13 +10,13 @@ interface IUSDTieredSTOProxy { * @param _factoryAddress Contract address of the factory * @return address Address of the deployed STO */ - function deploySTO(address _securityToken, address _factoryAddress) external returns(address); + function deploySTO(address _securityToken, address _factoryAddress) external returns(address STOAddress); /** * @notice Used to get the init function signature * @param _contractAddress Address of the STO contract * @return bytes4 */ - function getInitFunction(address _contractAddress) external returns(bytes4); + function getInitFunction(address _contractAddress) external returns(bytes4 initFunction); } diff --git a/contracts/interfaces/IVoting.sol b/contracts/interfaces/IVoting.sol index 915f1bd89..d30e34fce 100644 --- a/contracts/interfaces/IVoting.sol +++ b/contracts/interfaces/IVoting.sol @@ -44,7 +44,7 @@ interface IVoting { * @return uint256 endTime * @return uint256 totalProposals * @return uint256 totalVoters - * @return bool isActive + * @return bool isActive */ - function getBallotDetails(uint256 _ballotId) external view returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool); -} \ No newline at end of file + function getBallotDetails(uint256 _ballotId) external view returns(uint256 quorum, uint256 totalSupplyAtCheckpoint, uint256 checkpointId, uint256 startTime, uint256 endTime, uint256 totalProposals, uint256 totalVoters, bool isActive); +} diff --git a/contracts/modules/UpgradableModuleFactory.sol b/contracts/modules/UpgradableModuleFactory.sol index b36da7853..a7defccdd 100644 --- a/contracts/modules/UpgradableModuleFactory.sol +++ b/contracts/modules/UpgradableModuleFactory.sol @@ -25,13 +25,13 @@ contract UpgradableModuleFactory is ModuleFactory { } // Mapping from version to logic contract - mapping (uint256 => LogicContract) logicContracts; + mapping (uint256 => LogicContract) public logicContracts; // Mapping from Security Token address, to deployed proxy module address, to module version - mapping (address => mapping (address => uint256)) modules; + mapping (address => mapping (address => uint256)) public modules; // Mapping of which security token owns a given module - mapping (address => address) moduleToSecurityToken; + mapping (address => address) public moduleToSecurityToken; // Current version uint256 public latestUpgrade;