Skip to content

Commit

Permalink
Merge pull request #21 from akropolisio/issue-16
Browse files Browse the repository at this point in the history
fix warnings
  • Loading branch information
mazaletskiy authored Jan 8, 2019
2 parents cdfc9cf + 4f3551c commit 28a4153
Show file tree
Hide file tree
Showing 18 changed files with 286 additions and 25 deletions.
2 changes: 1 addition & 1 deletion contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity >=0.4.24;

contract Migrations {
address public owner;
Expand Down
8 changes: 4 additions & 4 deletions contracts/helpers/Lockable.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import './Ownable.sol';

Expand All @@ -19,7 +19,7 @@ contract Lockable is Ownable {
* @dev Modifier that disables functions by default unless they are explicitly enabled
*/
modifier whenUnlocked() {
require(isLocked(), "Contact is locked");
require(!isLocked(), "Contact is locked");
_;
}

Expand All @@ -28,15 +28,15 @@ contract Lockable is Ownable {
* @dev called by the owner to enable method
*/
function unlock() public onlyOwner {
setLock(true);
setLock(false);
emit Unlocked();
}

/**
* @dev called by the owner to disable method, back to normal state
*/
function lock() public onlyOwner {
setLock(false);
setLock(true);
emit Locked();
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/helpers/Ownable.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/helpers/Pausable.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;


import "./Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/helpers/Whitelist.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;


import "./Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/PausableMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;


import "../helpers/Pausable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/AkropolisBaseToken.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import "./dataStorage/TokenStorage.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
Expand Down
4 changes: 2 additions & 2 deletions contracts/token/AkropolisToken.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import "./AkropolisBaseToken.sol";
import "../helpers/Lockable.sol";
Expand Down Expand Up @@ -37,7 +37,7 @@ contract AkropolisToken is AkropolisBaseToken, Pausable, Lockable, Whitelist {
* Upon construction, all calls to approve() will revert unless this contract owner explicitly unlocks approve()
*/
function approve(address _spender, uint256 _value)
public whenNotPaused returns (bool) {
public whenNotPaused whenUnlocked returns (bool) {
return super.approve(_spender, _value);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/token/TokenProxy.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import "./dataStorage/TokenStorage.sol";
import "zos-lib/contracts/upgradeability/UpgradeabilityProxy.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/TokenProxyDelayed.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import "./dataStorage/TokenStorage.sol";
import '../upgradeability/DelayedUpgradeabilityProxy.sol';
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/dataStorage/AllowanceSheet.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import '../../helpers/Ownable.sol';
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/dataStorage/BalanceSheet.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import '../../helpers/Ownable.sol';
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/dataStorage/TokenStorage.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import "./AllowanceSheet.sol";
import "./BalanceSheet.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/upgradeability/DelayedUpgradeabilityProxy.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import "zos-lib/contracts/upgradeability/UpgradeabilityProxy.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

import "../DelayedUpgradeabilityProxy.sol";
import '../../helpers/Ownable.sol';
Expand Down
2 changes: 1 addition & 1 deletion contracts/upgradeability/mocks/DummyContract.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity >=0.4.24;

contract DummyContractV0 {
function hello() public pure returns(string) {
Expand Down
Loading

0 comments on commit 28a4153

Please sign in to comment.