When A contract inherits B contract, base contract’s code (B code) is copied on A, deploying only one contract.
The point is, what happens with the storage? All the storage variables of base contract will be on A at the same slot positions? What is the preference, A’s variables or B’s variables?
These questions arise from this proxy article. Inheriting is a way to preserve storage slot structure? I read somewhere in the article that while upgrading contracts it is a good idea to make the new contract inherits the old one, to preserve the same storage slot structure and not overwrite slots… how can be this possible? If the new contract has any variable, will change the whole storage structure right?