0x00000002 / rootcore

Apache License 2.0
0 stars 1 forks source link

explicitly mark visibility in function #4

Open gabriel-canaan opened 6 years ago

gabriel-canaan commented 6 years ago

rootcore/blob/master/contracts/helpers/Migrations.sol Line16

  function setCompleted(uint completed) restricted {
        last_completed_migration = completed;
    }

rootcore/blob/master/contracts/helpers/TestCrowdsaleController.sol Line 11

        CrowdsaleController(_startTime, _beneficiary)
    {
        startTime = _startTimeOverride;
        endTime = startTime + DURATION;
    }

rootcore/blob/master/contracts/helpers/TestERC20Token.sol Line 9

  ERC20Token(_name, _symbol, 0)
    {
        totalSupply = _supply;
        balanceOf[msg.sender] = _supply;
    }

rootcore/blob/master/contracts/CrowdsaleController.sol Line 58,253

 function CrowdsaleController(uint256 _startTime, address _beneficiary)
        SmartTokenController(new SmartToken(TOKEN_NAME, TOKEN_SYM, TOKEN_DEC))
        validAddress(_beneficiary)
        earlierThan(_startTime)
    {
        startTime = _startTime;
        endTime = startTime + DURATION;
        beneficiary = _beneficiary;
        token.disableTransfers(true);
    }

 function() payable {
        contributeETH();
    }

rootcore/blob/master/contracts/Pausable.sol line 34,43

function pause() managerOnly whenNotPaused returns (bool) {
    paused = true;
    Pause();
    return true;
  }
  function unpause() managerOnly whenPaused returns (bool) {
    paused = false;
    Unpause();
    return true;
  }

[rootcore/blob/master/contracts/SmartToken.sol] (https://github.com/tikonoff/rootcore/blob/master/contracts/SmartToken.sol) Line 32

 function SmartToken(string _name, string _symbol, uint8 _decimals)
        ERC20Token(_name, _symbol, _decimals)
    {
        NewSmartToken(address(this));
    }

rootcore/blob/master/contracts/SmartTokenController.sol Line 28

function SmartTokenController(ISmartToken _token)
        validAddress(_token)
    {
        token = _token;
    }
gabriel-canaan commented 6 years ago

Labeling the visibility explicitly will make it easier to catch incorrect assumptions about who can call the function or access the variable