From d39917fd0d80bcb711654cfd82c1dd5f04c4c7be Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 12 Jun 2018 17:25:20 +0100 Subject: Update external contract in compilationTests to not use deprecated sha3 --- test/compilationTests/corion/moduleHandler.sol | 50 +++++++++++----------- test/compilationTests/corion/multiOwner.sol | 6 +-- test/compilationTests/corion/schelling.sol | 2 +- .../milestonetracker/MilestoneTracker.sol | 4 +- 4 files changed, 31 insertions(+), 31 deletions(-) (limited to 'test/compilationTests') diff --git a/test/compilationTests/corion/moduleHandler.sol b/test/compilationTests/corion/moduleHandler.sol index 682f81dd..3aefce30 100644 --- a/test/compilationTests/corion/moduleHandler.sol +++ b/test/compilationTests/corion/moduleHandler.sol @@ -54,11 +54,11 @@ contract moduleHandler is multiOwner, announcementTypes { require( owners[msg.sender] ); require( modules.length == 0 ); foundationAddress = foundation; - addModule( modules_s(Token, sha3('Token'), false, false), ! forReplace); - addModule( modules_s(Premium, sha3('Premium'), false, false), ! forReplace); - addModule( modules_s(Publisher, sha3('Publisher'), false, true), ! forReplace); - addModule( modules_s(Schelling, sha3('Schelling'), false, true), ! forReplace); - addModule( modules_s(Provider, sha3('Provider'), true, true), ! forReplace); + addModule( modules_s(Token, keccak256('Token'), false, false), ! forReplace); + addModule( modules_s(Premium, keccak256('Premium'), false, false), ! forReplace); + addModule( modules_s(Publisher, keccak256('Publisher'), false, true), ! forReplace); + addModule( modules_s(Schelling, keccak256('Schelling'), false, true), ! forReplace); + addModule( modules_s(Provider, keccak256('Provider'), true, true), ! forReplace); } function addModule(modules_s input, bool call) internal { /* @@ -117,7 +117,7 @@ contract moduleHandler is multiOwner, announcementTypes { @id Index of module. @found Was there any result or not. */ - bytes32 _name = sha3(name); + bytes32 _name = keccak256(name); for ( uint256 a=0 ; a 0; diff --git a/test/compilationTests/corion/schelling.sol b/test/compilationTests/corion/schelling.sol index 8c8e093c..b74cfb46 100644 --- a/test/compilationTests/corion/schelling.sol +++ b/test/compilationTests/corion/schelling.sol @@ -335,7 +335,7 @@ contract schelling is module, announcementTypes, schellingVars { require( voter.status == voterStatus.afterPrepareVote ); require( voter.roundID < currentRound ); - if ( sha3(vote) == voter.hash ) { + if ( keccak256(vote) == voter.hash ) { delete voter.hash; if (round.blockHeight+roundBlockDelay/2 >= block.number) { if ( bytes(vote)[0] == aboveChar ) { diff --git a/test/compilationTests/milestonetracker/MilestoneTracker.sol b/test/compilationTests/milestonetracker/MilestoneTracker.sol index 318330df..2f0d58cb 100644 --- a/test/compilationTests/milestonetracker/MilestoneTracker.sol +++ b/test/compilationTests/milestonetracker/MilestoneTracker.sol @@ -196,7 +196,7 @@ contract MilestoneTracker { } /// @notice `onlyDonor` Approves the proposed milestone list - /// @param _hashProposals The sha3() of the proposed milestone list's + /// @param _hashProposals The keccak256() of the proposed milestone list's /// bytecode; this confirms that the `donor` knows the set of milestones /// they are approving function acceptProposedMilestones(bytes32 _hashProposals @@ -205,7 +205,7 @@ contract MilestoneTracker { uint i; if (!changingMilestones) throw; - if (sha3(proposedMilestones) != _hashProposals) throw; + if (keccak256(proposedMilestones) != _hashProposals) throw; // Cancel all the unfinished milestones for (i=0; i