This PR is a big ♻️ refactor that aims to help simplifying the overall inheritance of the ERC725 contracts and any contract that inherit them.
⚠️ BREAKING CHANGES
Remove the OwnableUnset contract in favour of using Ownable and OwnableUpgradeable from @openzeppelin contract libraries.
OwnableUnset is a bad architectural choice because it is an inheritance fork of Ownable from OpenZeppelin.
This creates friction when inheriting these contracts with other contracts from OpenZeppelin that also inherit from Ownable or OwnableUpradeable. For instance, compiler errors around which event to pick, etc... (screenshots below)
To create less frictions, use the Ownable and OwnableUpgradeable from OZ in the ERC725 inheritance. This makes the inheritance graph easier and simpler. Other child contracts can then re-derive from the same AST node in the inheritance tree
Also note that OwnableUnset is barely used at all anywhere in eth ecosystem.
Remove the Core contracts in favour of duplicating the core code logic between the Standard (with constructor) and InitAbstract (with _initialize(...)) functions.
📦 Build
Upgrade OpenZeppelin contracts dependencies to latest patch release from 4.9.3 -> 4.9.6
What does this PR introduce?
This PR is a big ♻️ refactor that aims to help simplifying the overall inheritance of the ERC725 contracts and any contract that inherit them.
⚠️ BREAKING CHANGES
OwnableUnset
contract in favour of usingOwnable
andOwnableUpgradeable
from@openzeppelin
contract libraries.OwnableUnset
is a bad architectural choice because it is an inheritance fork ofOwnable
from OpenZeppelin. This creates friction when inheriting these contracts with other contracts from OpenZeppelin that also inherit fromOwnable
orOwnableUpradeable
. For instance, compiler errors around which event to pick, etc... (screenshots below)To create less frictions, use the
Ownable
andOwnableUpgradeable
from OZ in the ERC725 inheritance. This makes the inheritance graph easier and simpler. Other child contracts can then re-derive from the same AST node in the inheritance treeCore
contracts in favour of duplicating the core code logic between the Standard (withconstructor
) and InitAbstract (with_initialize(...)
) functions.📦 Build
4.9.3
->4.9.6
Contract Size Difference
PR Checklist
npm run lint
&&npm run lint:solidity
npm run format
(prettier)npm run build
npm run test