Skip to content

Commit

Permalink
Remove isGlobaSkill function in favour of using getSkill
Browse files Browse the repository at this point in the history
  • Loading branch information
elenadimitrova committed Jul 17, 2018
1 parent 191d06e commit 39b697e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
4 changes: 0 additions & 4 deletions contracts/ColonyNetwork.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ contract ColonyNetwork is ColonyNetworkStorage {
return (skill.nParents, skill.nChildren, skill.globalSkill);
}

function isGlobalSkill(uint256 _skillId) public view returns (bool) {
return skills[_skillId].globalSkill;
}

function getReputationRootHash() public view returns (bytes32) {
return reputationRootHash;
}
Expand Down
4 changes: 3 additions & 1 deletion contracts/ColonyStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ contract ColonyStorage is DSAuth, DSMath {

modifier globalSkill(uint256 _skillId) {
IColonyNetwork colonyNetworkContract = IColonyNetwork(colonyNetworkAddress);
require(colonyNetworkContract.isGlobalSkill(_skillId));
bool isGlobalSkill;
(, , isGlobalSkill) = colonyNetworkContract.getSkill(_skillId);
require(isGlobalSkill);
_;
}

Expand Down
5 changes: 0 additions & 5 deletions contracts/IColonyNetwork.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ contract IColonyNetwork {
/// @return isGlobalSkill true if specified skill is a global skill, otherwise false
function getSkill(uint256 _skillId) public view returns (uint256 nParents, uint256 nChildren, bool isGlobalSkill);

/// @notice Checks if skill with id `_skillId` is a global skill
/// @param _skillId Id of the skill
/// @return isGlobalSkill true if skill with id `_skillId` is a global skill, false otherwise
function isGlobalSkill(uint256 _skillId) public view returns (bool isGlobalSkill);

/// @notice Adds a reputation update entry to log
/// @dev Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or
/// @param _user The address of the user for the reputation update
Expand Down

0 comments on commit 39b697e

Please sign in to comment.