Skip to content

Commit

Permalink
Removed unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Lazovic committed Jul 9, 2018
1 parent d6ce8d6 commit ac95269
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 40 deletions.
4 changes: 0 additions & 4 deletions contracts/Colony.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@
pragma solidity ^0.4.23;
pragma experimental "v0.5.0";

import "./ERC20Extended.sol";
import "./IColonyNetwork.sol";
import "./IColony.sol";
import "./ColonyStorage.sol";
import "./PatriciaTree/PatriciaTreeProofs.sol";
import "./Authority.sol";
import "./EtherRouter.sol";


Expand Down
5 changes: 1 addition & 4 deletions contracts/ColonyFunding.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@
pragma solidity ^0.4.23;
pragma experimental "v0.5.0";

import "../lib/dappsys/math.sol";
import "./ERC20Extended.sol";
import "./IColonyNetwork.sol";
import "./ColonyStorage.sol";
import "./ITokenLocking.sol";


contract ColonyFunding is ColonyStorage, DSMath {
contract ColonyFunding is ColonyStorage {
event RewardPayoutCycleStarted(uint256 indexed id);
event RewardPayoutCycleEnded(uint256 indexed id);
event TaskWorkerPayoutChanged(uint256 indexed id, address token, uint256 amount);
Expand Down
3 changes: 0 additions & 3 deletions contracts/ColonyNetwork.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
pragma solidity ^0.4.23;
pragma experimental "v0.5.0";

import "../lib/dappsys/auth.sol";
import "./Authority.sol";
import "./IColony.sol";
import "./EtherRouter.sol";
import "./Token.sol";
import "./ColonyNetworkStorage.sol";
import "./IReputationMiningCycle.sol";

Expand Down
21 changes: 9 additions & 12 deletions contracts/ColonyNetworkAuction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
pragma solidity ^0.4.23;
pragma experimental "v0.5.0";

import "../lib/dappsys/math.sol";
import "./ColonyNetworkStorage.sol";
import "./ERC20Extended.sol";
import "./IColony.sol";


contract ColonyNetworkAuction is ColonyNetworkStorage {
Expand Down Expand Up @@ -49,7 +46,7 @@ contract DutchAuction is DSMath {
uint public endTime;
uint public minPrice;
uint public constant TOKEN_MULTIPLIER = 10 ** 18;

// Keep track of all CLNY wei received
uint public receivedTotal;
uint public bidCount;
Expand All @@ -58,7 +55,7 @@ contract DutchAuction is DSMath {
// Final price in CLNY per 10**18 Tokens (min 1, max 1e18)
uint public finalPrice;
bool public finalized;

mapping (address => uint256) public bids;

modifier auctionNotStarted {
Expand Down Expand Up @@ -87,7 +84,7 @@ contract DutchAuction is DSMath {
modifier auctionFinalized {
require(finalized);
_;
}
}

modifier allBidsClaimed {
require(claimCount == bidCount);
Expand Down Expand Up @@ -119,7 +116,7 @@ contract DutchAuction is DSMath {
started = true;
}

function totalToEndAuction() public view
function totalToEndAuction() public view
auctionStartedAndOpen
returns (uint)
{
Expand Down Expand Up @@ -156,15 +153,15 @@ contract DutchAuction is DSMath {
amount = remainingToEndAuction;
endTime = now;
}

if (bids[msg.sender] == 0) {
bidCount += 1;
}

clnyToken.transferFrom(msg.sender, this, amount);
bids[msg.sender] = add(bids[msg.sender], amount);
receivedTotal = add(receivedTotal, amount);

emit AuctionBid(msg.sender, amount, sub(remainingToEndAuction, amount));
}

Expand All @@ -180,7 +177,7 @@ contract DutchAuction is DSMath {
emit AuctionFinalized(finalPrice);
}

function claim() public
function claim() public
auctionFinalized
returns (bool)
{
Expand All @@ -189,7 +186,7 @@ contract DutchAuction is DSMath {

uint tokens = mul(amount, TOKEN_MULTIPLIER) / finalPrice;
claimCount += 1;

// Set receiver bid to 0 before transferring the tokens
bids[msg.sender] = 0;
uint beforeClaimBalance = token.balanceOf(msg.sender);
Expand All @@ -213,4 +210,4 @@ contract DutchAuction is DSMath {
assert(token.balanceOf(this) == 0);
selfdestruct(colonyNetwork);
}
}
}
8 changes: 1 addition & 7 deletions contracts/ColonyNetworkStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,11 @@
pragma solidity ^0.4.23;
pragma experimental "v0.5.0";

import "../lib/dappsys/auth.sol";
import "./Authority.sol";
import "./IColony.sol";
import "./EtherRouter.sol";
import "./ERC20Extended.sol";
import "./ColonyNetworkStorage.sol";
import "./IColonyNetwork.sol";
import "./ReputationMiningCycle.sol";


contract ColonyNetworkStaking is ColonyNetworkStorage, DSMath {
contract ColonyNetworkStaking is ColonyNetworkStorage {
// TODO: Can we handle a dispute regarding the very first hash that should be set?

modifier onlyReputationMiningCycle () {
Expand Down
8 changes: 3 additions & 5 deletions contracts/ColonyNetworkStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ pragma solidity ^0.4.23;
pragma experimental "v0.5.0";

import "../lib/dappsys/auth.sol";
import "../lib/dappsys/roles.sol";
import "./Authority.sol";
import "../lib/dappsys/math.sol";
import "./ERC20Extended.sol";
import "./IColony.sol";
import "./EtherRouter.sol";
import "./Token.sol";


contract ColonyNetworkStorage is DSAuth {
contract ColonyNetworkStorage is DSAuth, DSMath {
// Address of the Resolver contract used by EtherRouter for lookups and routing
address resolver;
// Number of colonies in the network
Expand Down
5 changes: 3 additions & 2 deletions contracts/ColonyStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ pragma solidity ^0.4.23;
pragma experimental "v0.5.0";

import "../lib/dappsys/auth.sol";
import "../lib/dappsys/math.sol";
import "./ERC20Extended.sol";
import "./IColonyNetwork.sol";
import "./Authority.sol";


contract ColonyStorage is DSAuth {
contract ColonyStorage is DSAuth, DSMath {
// When adding variables, do not make them public, otherwise all contracts that inherit from
// this one will have the getters. Make custom getters in the contract that seems most appropriate,
// and add it to IColony.sol
Expand All @@ -38,7 +39,7 @@ contract ColonyStorage is DSAuth {

// Mapping function signature to 2 task roles whose approval is needed to execute
mapping (bytes4 => uint8[2]) reviewers;

// Role assignment functions require special type of sign-off.
// This keeps track of which functions are related to role assignment
mapping (bytes4 => bool) roleAssignmentSigs;
Expand Down
4 changes: 1 addition & 3 deletions contracts/ColonyTask.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@
pragma solidity ^0.4.23;
pragma experimental "v0.5.0";

import "../lib/dappsys/math.sol";
import "./ColonyStorage.sol";
import "./IColony.sol";
import "./SafeMath.sol";


contract ColonyTask is ColonyStorage, DSMath {
contract ColonyTask is ColonyStorage {
uint256 constant RATING_COMMIT_TIMEOUT = 432000;
uint256 constant RATING_REVEAL_TIMEOUT = 432000;

Expand Down

0 comments on commit ac95269

Please sign in to comment.