When Storing Dynamic type data , We don’t explicitly store the data in the next immediate slot, instead we only store the address of the slot where the element of that index is , In simpler words we are basically storing the “Pointer” to the actual a...
Let’s first have a look at the Code contract Demo{ uint256 a 1234 // slot 0 uint8 b = 0x12; // slot 1 uint8[6] c = [1,2,3,4,5,6]; // line 4 (slot 2) uint256[2] d = [10,20] // line 5 slot(3 & 4) function getSlotvalue(uint slot) public...
In this article, I examined how arrays, structs and mappings are stored on the EVM, but before we dive into this, lets talk about what storage looks like in the EVM. Understanding how EVM storage works is crucial for efficient smart contract developm...
I promised to write about storage... And here it is. Hi, just in case you have not read my other articles, I am your go-to girl anytime you need a simplification of solidity and blockchain. You would be happy if you dived into my homepage to see what...
Can we say the Ethereum Virtual Machine (EVM) is like a computer that exists on the Ethereum network or a special computer where all the action happens on the Ethereum network?Just as you use your computer to run programs, the EVM is where programs o...