diff options
author | chriseth <chris@ethereum.org> | 2018-06-28 00:29:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-28 00:29:01 +0800 |
commit | 4a842ecc823c2d4152cdf2639eb83f2318499f1c (patch) | |
tree | 7733ac8095862aa2a9b43b93706ba56df7460a16 /test/compilationTests/gnosis | |
parent | ce4b233f8f58f04d564aedc3061e7ecb1bf9737a (diff) | |
parent | 92cb4acd8a748ef2cf6a00a5a9f41975c23127c2 (diff) | |
download | dexon-solidity-4a842ecc823c2d4152cdf2639eb83f2318499f1c.tar.gz dexon-solidity-4a842ecc823c2d4152cdf2639eb83f2318499f1c.tar.zst dexon-solidity-4a842ecc823c2d4152cdf2639eb83f2318499f1c.zip |
Merge pull request #4097 from ethereum/noPackedExceptForPacked
[BREAKING] call only takes a single argument and does not pad
Diffstat (limited to 'test/compilationTests/gnosis')
4 files changed, 6 insertions, 6 deletions
diff --git a/test/compilationTests/gnosis/Events/CategoricalEvent.sol b/test/compilationTests/gnosis/Events/CategoricalEvent.sol index 4433bdfd..0f5196e8 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 acef3330..cfe772ec 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 4f268a38..d5cbef14 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 83990b9b..121824ff 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; emit 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; emit OutcomeAssignment(_outcome); |