August 2019
Intermediate to advanced
486 pages
13h 52m
English
You should know that if you change the name of an existing variable, then the contract becomes highly error prone as follows:
// Should be done with cautioncontract SampleContract { uint256 public count; // Variable name changed from 'x' string public y;}
In the preceding case, the x variable has now been renamed count. However, when the contract is deployed, the count variable will still get the previous value assigned to the x variable. Hence, only the variable name is changed, but it will still give the old value.