[DOCS] Fix pre-computation of salted address.

This commit is contained in:
chriseth 2020-03-08 19:15:21 +01:00
parent a328e940b5
commit cdfb872389

View File

@ -252,7 +252,7 @@ which only need to be created if there is a dispute.
/// This complicated expression just tells you how the address
/// can be pre-computed. It is just there for illustration.
/// You actually only need ``new D{salt: salt}(arg)``.
address predictedAddress = address(bytes20(keccak256(abi.encodePacked(
address predictedAddress = address(uint(keccak256(abi.encodePacked(
byte(0xff),
address(this),
salt,