Use .slot and .offest to access storage items.

This commit is contained in:
chriseth
2020-07-13 14:59:22 +02:00
parent 8eee3ed3a2
commit fc2e9ec2ff
60 changed files with 158 additions and 133 deletions
@@ -2,7 +2,7 @@ contract C {
struct S { uint x; }
S s;
function e() pure public {
assembly { mstore(keccak256(0, 20), mul(s_slot, 2)) }
assembly { mstore(keccak256(0, 20), mul(s.slot, 2)) }
}
function f() pure public {
uint x;