Closed CJ42 closed 1 year ago
We need to keep
super.supportsInterface
, otherwise we will stop the inheritance chain insupportsInterface
of child contracts such as LSP9, and LSP0 for example.
Tested and this actually will break the inheritance call via super.
indeed, if one of the ERC725 contract is in the middle of the inheritance hierarchy. I will close this PR then as we cannot implement this change.
What does this PR introduce?
♻️ Refactor
Remove
IERC165
from the inheritance list ofIERC725X
andIERC725Y
.⚡️ Performance
Reduce deployment cost by an extra -45.814 gas compared to #236 by using directly
IERC165
in the inheritance instead ofERC165
and callingsuper.supportsInterface
.The checks for interface ID ERC165 are directly inlined as a result inside the
supportsInterface(bytes4)
function ofERC725XCore
,ERC725YCore
andERC725
contracts.PR Checklist
npm run lint
&&npm run lint:solidity
npm run format
(prettier)npm run build
npm run test
Previous gas cost (
develop
branch)New Gas costs (this branch)