Thanks for sharing, very helpful tutorial.
I was wondering if there was some resource available to better understand how to implement the __gap variable you are using in all your upgradeable abstract contracts (i.e. on
OwnableUpgradeable.sol where line 77 is
uint256 private __gap;.
Does that mean that we're reserving 49 uint256 storage slots?
Will we then be able to declare new single variables pulling from that storage space? Something like
// V1 uint256 private __gap; // V2 uint256 private __gap; uint256 private myNewVar;
Also, will it then be necessary to provide a number of similar solutions for each possible type (i.e
address) we might have to implement?
uint256 private __gapUint256; address private __gapAddress; // V2 uint256 private __gapUint256; uint256 private myNewUintVar; address private __gapAddress; address private myNewAddressVar;
Thanks for your insight, the docs only barely mention this practice (https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable at the very end of the document).