Open stiefn opened 3 weeks ago
If a value is assigned to a mapping using a constant as key, the compiler optimizes the keccak() opcode out. This means, we cannot find the mapping slot to a given slot the value is assigned to.
keccak()
Minimal testing case:
contract Test1 { mapping(address account => uint256) bla; constructor() { bla[address(1)] = 500; } }
If a value is assigned to a mapping using a constant as key, the compiler optimizes the
keccak()
opcode out. This means, we cannot find the mapping slot to a given slot the value is assigned to.Minimal testing case: