August 2019
Intermediate to advanced
486 pages
13h 52m
English
You should not remove any existing state variables present in the old contract version. This should be avoided. For example, in the following code, the string y state variable has been removed:
//Bad Practicecontract SampleContract { uint256 public x; //string public y; //Variable removed / commented}
In any case, if you were to add another variable after removing string y, the new variable would reflect the last value stored in the storage slot.