aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/gnosis
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-06-14 18:28:33 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-06-25 23:17:48 +0800
commite299a0031f6519cecdf88eeeeff59a9eb02b6168 (patch)
treee5f305868d862c259e1d052b218a4b32ff5b39f4 /test/compilationTests/gnosis
parent17493e64ed986c33bb5562eabafca2d52b212f19 (diff)
downloaddexon-solidity-e299a0031f6519cecdf88eeeeff59a9eb02b6168.tar
dexon-solidity-e299a0031f6519cecdf88eeeeff59a9eb02b6168.tar.gz
dexon-solidity-e299a0031f6519cecdf88eeeeff59a9eb02b6168.tar.bz2
dexon-solidity-e299a0031f6519cecdf88eeeeff59a9eb02b6168.tar.lz
dexon-solidity-e299a0031f6519cecdf88eeeeff59a9eb02b6168.tar.xz
dexon-solidity-e299a0031f6519cecdf88eeeeff59a9eb02b6168.tar.zst
dexon-solidity-e299a0031f6519cecdf88eeeeff59a9eb02b6168.zip
Update compilation tests.
Diffstat (limited to 'test/compilationTests/gnosis')
-rw-r--r--test/compilationTests/gnosis/Events/CategoricalEvent.sol2
-rw-r--r--test/compilationTests/gnosis/Events/EventFactory.sol4
-rw-r--r--test/compilationTests/gnosis/Events/ScalarEvent.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol4
4 files changed, 6 insertions, 6 deletions
diff --git a/test/compilationTests/gnosis/Events/CategoricalEvent.sol b/test/compilationTests/gnosis/Events/CategoricalEvent.sol
index fbd1d744..be2c81a7 100644
--- a/test/compilationTests/gnosis/Events/CategoricalEvent.sol
+++ b/test/compilationTests/gnosis/Events/CategoricalEvent.sol
@@ -48,6 +48,6 @@ contract CategoricalEvent is Event {
constant
returns (bytes32)
{
- return keccak256(collateralToken, oracle, outcomeTokens.length);
+ return keccak256(abi.encodePacked(collateralToken, oracle, outcomeTokens.length));
}
}
diff --git a/test/compilationTests/gnosis/Events/EventFactory.sol b/test/compilationTests/gnosis/Events/EventFactory.sol
index 4779c6e4..5ef08544 100644
--- a/test/compilationTests/gnosis/Events/EventFactory.sol
+++ b/test/compilationTests/gnosis/Events/EventFactory.sol
@@ -35,7 +35,7 @@ contract EventFactory {
public
returns (CategoricalEvent eventContract)
{
- bytes32 eventHash = keccak256(collateralToken, oracle, outcomeCount);
+ bytes32 eventHash = keccak256(abi.encodePacked(collateralToken, oracle, outcomeCount));
// Event should not exist yet
require(address(categoricalEvents[eventHash]) == address(0));
// Create event
@@ -63,7 +63,7 @@ contract EventFactory {
public
returns (ScalarEvent eventContract)
{
- bytes32 eventHash = keccak256(collateralToken, oracle, lowerBound, upperBound);
+ bytes32 eventHash = keccak256(abi.encodePacked(collateralToken, oracle, lowerBound, upperBound));
// Event should not exist yet
require(address(scalarEvents[eventHash]) == address(0));
// Create event
diff --git a/test/compilationTests/gnosis/Events/ScalarEvent.sol b/test/compilationTests/gnosis/Events/ScalarEvent.sol
index 2e5718ef..e84bf324 100644
--- a/test/compilationTests/gnosis/Events/ScalarEvent.sol
+++ b/test/compilationTests/gnosis/Events/ScalarEvent.sol
@@ -82,6 +82,6 @@ contract ScalarEvent is Event {
constant
returns (bytes32)
{
- return keccak256(collateralToken, oracle, lowerBound, upperBound);
+ return keccak256(abi.encodePacked(collateralToken, oracle, lowerBound, upperBound));
}
}
diff --git a/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol b/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol
index d541ab46..2bbf312f 100644
--- a/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol
@@ -58,7 +58,7 @@ contract SignedMessageOracle is Oracle {
// Result is not set yet and nonce and signer are valid
require( !isSet
&& _nonce > nonce
- && signer == ecrecover(keccak256(descriptionHash, newSigner, _nonce), v, r, s));
+ && signer == ecrecover(keccak256(abi.encodePacked(descriptionHash, newSigner, _nonce)), v, r, s));
nonce = _nonce;
signer = newSigner;
SignerReplacement(newSigner);
@@ -74,7 +74,7 @@ contract SignedMessageOracle is Oracle {
{
// Result is not set yet and signer is valid
require( !isSet
- && signer == ecrecover(keccak256(descriptionHash, _outcome), v, r, s));
+ && signer == ecrecover(keccak256(abi.encodePacked(descriptionHash, _outcome)), v, r, s));
isSet = true;
outcome = _outcome;
OutcomeAssignment(_outcome);