Update declaration of memory safe assembly blocks (#5172)

This commit is contained in:
Hadrien Croubois
2024-08-29 23:07:17 +02:00
committed by GitHub
parent 1e7ca3eea6
commit d8bbd34676
32 changed files with 91 additions and 182 deletions

View File

@ -9,8 +9,7 @@ contract Create2Test is Test {
function testSymbolicComputeAddressSpillage(bytes32 salt, bytes32 bytecodeHash, address deployer) public {
address predicted = Create2.computeAddress(salt, bytecodeHash, deployer);
bytes32 spillage;
/// @solidity memory-safe-assembly
assembly {
assembly ("memory-safe") {
spillage := and(predicted, 0xffffffffffffffffffffffff0000000000000000000000000000000000000000)
}
assertEq(spillage, bytes32(0));