I intend to modify the data in slot 0 using assembly, but the output is not as anticipated. Could someone help me identify where the mistakes are, please?
function changeSlot0()public returns(bytes32) onlyOwner{
bytes32 re;
assembly{
let slot0 := sload(0)
let ans := shl(slot0,16)
sstore(0,ans)
re := sload(0)
}
return re;
}