Skip to content

Commit

Permalink
Update interfaces to named parameters (#708)
Browse files Browse the repository at this point in the history
* WIP

* Change some values

* Make some mappings public for automatic getters

* Put back truffle version
  • Loading branch information
adamdossa authored Jun 13, 2019
1 parent 4dc6c5c commit 99cf720
Show file tree
Hide file tree
Showing 16 changed files with 94 additions and 94 deletions.
2 changes: 1 addition & 1 deletion contracts/interfaces/ICheckPermission.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion contracts/interfaces/IFeatureRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
4 changes: 2 additions & 2 deletions contracts/interfaces/IModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
22 changes: 11 additions & 11 deletions contracts/interfaces/IModuleFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);

}
16 changes: 8 additions & 8 deletions contracts/interfaces/IModuleRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -62,15 +62,15 @@ 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
* @param _moduleType is the module type
* @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
Expand All @@ -83,15 +83,15 @@ 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.
* @param _moduleType is the module type to look for
* @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
Expand All @@ -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);

}
8 changes: 4 additions & 4 deletions contracts/interfaces/IOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
2 changes: 1 addition & 1 deletion contracts/interfaces/IOwnable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IPolymathRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
6 changes: 3 additions & 3 deletions contracts/interfaces/ISTFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface ISTFactory {
bool _divisible,
address _treasuryWallet,
address _polymathRegistry
)
external
returns(address);
)
external
returns(address tokenAddress);
}
2 changes: 1 addition & 1 deletion contracts/interfaces/ISTO.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
Loading

0 comments on commit 99cf720

Please sign in to comment.