Tests/Docs after stricter explicit conversion.

This commit is contained in:
hrkrshnn
2020-12-03 16:51:05 +01:00
committed by chriseth
parent 92ab32e532
commit 40244c5469
25 changed files with 183 additions and 64 deletions
+2 -2
View File
@@ -260,7 +260,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(uint(keccak256(abi.encodePacked(
address predictedAddress = address(uint160(uint(keccak256(abi.encodePacked(
byte(0xff),
address(this),
salt,
@@ -268,7 +268,7 @@ which only need to be created if there is a dispute.
type(D).creationCode,
arg
))
))));
)))));
D d = new D{salt: salt}(arg);
require(address(d) == predictedAddress);