I found some contract that looks like this:
// SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
contract IceCream {
address a;
address b;
bool public c = false;
uint256 public d;
constructor(...){...}
}
I would now expect to get the following values when calling the following on my geth console:
await web3.eth.getStorageAt(address, 0) --> a
await web3.eth.getStorageAt(address, 1) --> b
await web3.eth.getStorageAt(address, 2) --> c
await web3.eth.getStorageAt(address, 3) --> d
Position 0: I find a (Which I also suspect to be there).
Position 1: I find b (Which I also suspect to be there).
Position 2: I find some value 0x0000000000000000000000000000000000000000000000000000000000000a36 which i suppose is the value of the uint256 d. WHY?
Position 3: I find: 0x0000000000000000000000000000000000000000000000000000000000000000. WHY?
I thought the variables in storage are stored in order.
What am I missing here?
Probably it is something really easy and stupid but I just can`t make any sense of this.