diff options
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r-- | docs/solidity-by-example.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index 7e3d7737..07cb76c9 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -428,8 +428,8 @@ high or low invalid bids. revealEnd = biddingEnd + _revealTime; } - /// Place a blinded bid with `_blindedBid` = keccak256(value, - /// fake, secret). + /// Place a blinded bid with `_blindedBid` = + /// keccak256(abi.encodePacked(value, fake, secret)). /// The sent ether is only refunded if the bid is correctly /// revealed in the revealing phase. The bid is valid if the /// ether sent together with the bid is at least "value" and @@ -470,7 +470,7 @@ high or low invalid bids. Bid storage bid = bids[msg.sender][i]; (uint value, bool fake, bytes32 secret) = (_values[i], _fake[i], _secret[i]); - if (bid.blindedBid != keccak256(value, fake, secret)) { + if (bid.blindedBid != keccak256(abi.encodePacked(value, fake, secret))) { // Bid was not actually revealed. // Do not refund deposit. continue; @@ -496,7 +496,7 @@ high or low invalid bids. if (value <= highestBid) { return false; } - if (highestBidder != 0) { + if (highestBidder != address(0)) { // Refund the previously highest bidder. pendingReturns[highestBidder] += highestBid; } |