Skip to content

Commit

Permalink
Update EIP-7201: Make Solidity example compile
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
frangio authored Jul 6, 2023
1 parent 451502d commit 2563237
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions EIPS/eip-7201.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ contract Example {
uint256 y;
}
bytes32 private immutable MAIN_STORAGE_LOCATION =
keccak256(bytes.concat(uint256(keccak256("example.main")) - 1));
// keccak256(abi.encode(uint256(keccak256("example.main")) - 1));
bytes32 private constant MAIN_STORAGE_LOCATION =
0x183a6125c38840424c4a85fa12bab2ab606c4b6d0e7cc73c0c06ba5300eab5da;
function _getMainStorage() private pure returns (MainStorage storage $) {
bytes32 location = MAIN_STORAGE_LOCATION;
assembly {
$.slot := MAIN_STORAGE_LOCATION
$.slot := location
}
}
Expand Down

0 comments on commit 2563237

Please sign in to comment.