-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Thanks you for cool library.
Unfortunately I don't understand how does it work :-)
Can you please explain, e.g.
Why here
/// @dev Returns the max value in an array.
/// @param self Storage array containing uint256 type variables
/// @return maxValue The highest value in the array
function getMax(uint256[] storage self) public view returns(uint256 maxValue) {
assembly {
mstore(0x60,self_slot)
maxValue := sload(sha3(0x60,0x20))
for { let i := 0 } lt(i, sload(self_slot)) { i := add(i, 1) } {
switch gt(sload(add(sha3(0x60,0x20),i)), maxValue)
case 1 {
maxValue := sload(add(sha30x60,0x20),i))
}
}
}
}
you use sha3(0x60,0x20)? What does it mean?
Metadata
Metadata
Assignees
Labels
No labels