Skip to content

Commit ea4d1b0

Browse files
committed
remove assembly block #at(AddressToAddressMap,uint256)
1 parent 4057b14 commit ea4d1b0

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

contracts/data/EnumerableMap.sol

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,10 @@ library EnumerableMap {
3636
{
3737
(bytes32 key, bytes32 value) = _at(map._inner, index);
3838

39-
address addressKey;
40-
address addressValue;
41-
42-
assembly {
43-
addressKey := and(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, key)
44-
addressValue := and(
45-
0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,
46-
value
47-
)
48-
}
49-
50-
return (addressKey, addressValue);
39+
return (
40+
address(uint160(uint256(key))),
41+
address(uint160(uint256(value)))
42+
);
5143
}
5244

5345
function at(UintToAddressMap storage map, uint256 index)

0 commit comments

Comments
 (0)