You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since InitializableStorage is a struct with two fields packed in one storage slot, compiler need to load this slot when writing new value only for one of the fields, like here:
Opening issue as mentioned in #4576 (comment)
📝 Details
Since
InitializableStorage
is a struct with two fields packed in one storage slot, compiler need to load this slot when writing new value only for one of the fields, like here:openzeppelin-contracts/contracts/proxy/utils/Initializable.sol
Lines 127 to 130 in 175b1e9
Since (when) we know values for other fields, explicit usage of known values can let the compiler to prevent excessive SLOADs before SSTORE. Example:
PS: this is applicable not only in this place, but also in some other contracts.
The text was updated successfully, but these errors were encountered: