Hi @frangio
OZ has a following contract:
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
//// some code here
uint256[45] private __gap;
}
Let's look at the __gap
.
I am wondering if OZ decides to update this, how does the process look like ? Let's say OZ wants to add one more state variable in there.. So what would you do ? My idea is that you would do one more state variable below _symbol
and make __gap
to uint256[44] private __gap
.
Is this the correct assumption ?
and I guess, removing the state variable in that case won't be possible even though we mightn't need _symbol
anymore, it still needs to be there at all times.
WDYT ?