OpenZeppelin / openzeppelin-contracts-upgradeable

Upgradeable variant of OpenZeppelin Contracts, meant for use in upgradeable contracts.
https://openzeppelin.com/contracts
MIT License
1k stars 436 forks source link

gap ERC20WrapperUpgradeable is wrong. #188

Closed novaknole closed 1 year ago

novaknole commented 1 year ago

It's pretty easy what I have to report and you might be aware of already.

https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/dd8ca8adc47624c5c5e2f4d412f5f421951dcc25/contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol#L83

Here, gap should be 49.

novaknole commented 1 year ago

we're already using 4.8.1 version, so would appreciate if you could be careful with this.

Amxx commented 1 year ago

Hello @novaknole

you can see in the comments that this contract specifically uses a total size (storage + gap) of 51

This is to achieve compatibility with previous version that had a bug. This layout is going to be kept.