kleros-v2
kleros-v2 copied to clipboard
Migrate to OZ Contracts v5
https://blog.openzeppelin.com/introducing-openzeppelin-contracts-5.0 https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.0.0
Relevant change for Proxies
Immutable variables
Version 5.0 saves gas by avoiding duplicate SLOADs where possible. More immutable variables are used across the library to avoid such unnecessary storage reads. Some examples of how this pattern was applied can be seen in TransparentUpgradeableProxy and BeaconProxy where the admin or beacon is now stored in an immutable variable, saving reads on every call to such proxies.
Namespaced storage
This is an alternative to the previous recommendation of using a __gap variable in storage between inherited contracts.