Hey everyone, I recently gave a blockchain developer job interview, and I struggled with two questions about the Ethereum Virtual Machine (EVM). I'd appreciate some help understanding the answers better.
How is gas mapped to major opcodes like SSTORE, SLOAD (and warm SLOAD), MLOAD, etc.? I understand that different opcodes have different gas costs, but I couldn’t explain how gas mapping works in detail.
What is slot packing in the context of the EVM? I’m a bit confused about this concept and how it relates to storage optimization.
If anyone could explain these concepts or point me to some resources, that would be awesome! Thanks in advance.