8 private is not private storageAt

Gas Optimization

https://twitter.com/tom_eth_dev/status/1547109268943360001

1 slot = 32 bytes = 256 bits

bool = 1 bytes

Notice: slots index at 0 from RIGHT to LEFT. Bytes4Var is initialized after boolVar, so its stored to the left of boolVar, exactly 1 byte from the .

<aside> ⛽ ■ Slot 0

Less Efficient >> 0x0000….11

More Efficient >> 0x000…111111111111

</aside>

Untitled

Untitled

constants are not stored in storage. From Ethereum documentation, that the compiler does not reserve a storage slot for constant variables. This means you won’t find the following in any storage slots:

storage > memory > calldata