Skip to content

Commit

Permalink
testing abi encode
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Elsasser committed May 21, 2018
1 parent 9842466 commit 4d5efb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/libraries/OrderLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ library OrderLib {
int orderQty
) public pure returns (bytes32)
{
return keccak256(
return keccak256(abi.encodePacked(
contractAddress,
orderAddresses[0],
orderAddresses[1],
Expand All @@ -78,7 +78,7 @@ library OrderLib {
unsignedOrderValues[3],
unsignedOrderValues[4],
orderQty
);
));
}

/// @notice confirms hash originated from signer
Expand Down
1 change: 1 addition & 0 deletions test/OrderLib.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ contract('OrderLib', function(accounts) {
const unsignedOrderValues = [0, 0, 33025, timeStamp, 0];
const orderQty = 5; // user is attempting to buy 5
console.log("22");
console.log(orderLib.address);
const orderHash = await orderLib.createOrderHash.call(
marketContract.address,
orderAddresses,
Expand Down

0 comments on commit 4d5efb0

Please sign in to comment.