Skip to content

Commit

Permalink
solium version 1.1.8 (#492)
Browse files Browse the repository at this point in the history
ganache-cli 6.1.6
  • Loading branch information
orenyodfat authored Jul 12, 2018
1 parent 9b8be62 commit 41c93db
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 2,117 deletions.
3 changes: 3 additions & 0 deletions .soliumrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"arg-overflow": [
"warning",
5
],
"error-reason": [
"off"
]
}
}
16 changes: 8 additions & 8 deletions contracts/controller/Controller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ contract Controller is ControllerInterface {
* @dev unregister the caller's scheme
* @return bool which represents a success
*/
function unregisterSelf(address _avatar) isAvatarValid(_avatar) external returns(bool) {
function unregisterSelf(address _avatar) external isAvatarValid(_avatar) returns(bool) {
if (_isSchemeRegistered(msg.sender,_avatar) == false) {
return false;
}
Expand All @@ -247,15 +247,15 @@ contract Controller is ControllerInterface {
return true;
}

function isSchemeRegistered(address _scheme,address _avatar) isAvatarValid(_avatar) external view returns(bool) {
function isSchemeRegistered(address _scheme,address _avatar) external isAvatarValid(_avatar) view returns(bool) {
return _isSchemeRegistered(_scheme,_avatar);
}

function getSchemeParameters(address _scheme,address _avatar) isAvatarValid(_avatar) external view returns(bytes32) {
function getSchemeParameters(address _scheme,address _avatar) external isAvatarValid(_avatar) view returns(bytes32) {
return schemes[_scheme].paramsHash;
}

function getSchemePermissions(address _scheme,address _avatar) isAvatarValid(_avatar) external view returns(bytes4) {
function getSchemePermissions(address _scheme,address _avatar) external isAvatarValid(_avatar) view returns(bytes4) {
return schemes[_scheme].permissions;
}

Expand All @@ -280,17 +280,17 @@ contract Controller is ControllerInterface {
* @return uint globalConstraintsPost count.
*/
function globalConstraintsCount(address _avatar)
isAvatarValid(_avatar)
external
isAvatarValid(_avatar)
view
returns(uint,uint)
{
return (globalConstraintsPre.length,globalConstraintsPost.length);
}

function isGlobalConstraintRegistered(address _globalConstraint,address _avatar)
isAvatarValid(_avatar)
external
isAvatarValid(_avatar)
view
returns(bool)
{
Expand Down Expand Up @@ -530,11 +530,11 @@ contract Controller is ControllerInterface {
* @param _avatar the organization avatar.
* @return organization native reputation
*/
function getNativeReputation(address _avatar) isAvatarValid(_avatar) external view returns(address) {
function getNativeReputation(address _avatar) external isAvatarValid(_avatar) view returns(address) {
return address(nativeReputation);
}

function _isSchemeRegistered(address _scheme,address _avatar) isAvatarValid(_avatar) private view returns(bool) {
function _isSchemeRegistered(address _scheme,address _avatar) private isAvatarValid(_avatar) view returns(bool) {
return (schemes[_scheme].permissions&bytes4(1) != bytes4(0));
}
}
2 changes: 1 addition & 1 deletion contracts/controller/DAOToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract DAOToken is ERC827Token,MintableToken,BurnableToken {
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
function mint(address _to, uint256 _amount) public onlyOwner canMint returns (bool) {
if (cap > 0)
require(totalSupply_.add(_amount) <= cap);
return super.mint(_to, _amount);
Expand Down
2 changes: 1 addition & 1 deletion contracts/controller/Reputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ contract Reputation is Ownable {
* @return True if the reputation are burned correctly
*/
function burn(address _from, uint _amount)
onlyOwner
public
onlyOwner
returns (bool)
{
uint amountMinted = _amount;
Expand Down
4 changes: 2 additions & 2 deletions contracts/libs/OrderStatisticTree.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ library OrderStatisticTree {
n.height = heightRight+1;
}

function balanceFactor(Tree storage _tree,uint _value) view private returns (int bf) {
function balanceFactor(Tree storage _tree,uint _value) private view returns (int bf) {
Node storage n = _tree.nodes[_value];
return int(_tree.nodes[n.children[false]].height)-int(_tree.nodes[n.children[true]].height);
}
Expand Down Expand Up @@ -204,7 +204,7 @@ library OrderStatisticTree {
}
}

function rightmostLeaf(Tree storage _tree,uint _value) view private returns (uint leaf) {
function rightmostLeaf(Tree storage _tree,uint _value) private view returns (uint leaf) {
uint child = _tree.nodes[_value].children[true];
if (child!=0) {
return rightmostLeaf(_tree,child);
Expand Down
Loading

0 comments on commit 41c93db

Please sign in to comment.