diff --git a/contracts/facets/DiamondCutFacet.sol b/contracts/facets/DiamondCutFacet.sol index c26772e..826287e 100644 --- a/contracts/facets/DiamondCutFacet.sol +++ b/contracts/facets/DiamondCutFacet.sol @@ -25,6 +25,8 @@ contract DiamondCutFacet is IDiamondCut { address _init, bytes calldata _calldata ) external override { + LibDiamondStorage.DiamondStorage storage ds = LibDiamondStorage.diamondStorage(); + require(msg.sender == ds.contractOwner, "DiamondCutFacet: Must own the contract"); for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) { LibDiamondCut.addReplaceRemoveFacetSelectors(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); } diff --git a/contracts/facets/DiamondLoupeFacet.sol b/contracts/facets/DiamondLoupeFacet.sol index efa41f7..660d702 100644 --- a/contracts/facets/DiamondLoupeFacet.sol +++ b/contracts/facets/DiamondLoupeFacet.sol @@ -16,10 +16,8 @@ import "../interfaces/IERC165.sol"; contract DiamondLoupeFacet is IDiamondLoupe, IERC165 { // Diamond Loupe Functions //////////////////////////////////////////////////////////////////// - /// These functions are expected to be called frequently - /// by tools. Therefore the return values are tightly - /// packed for efficiency. That means no padding with zeros. - + /// These functions are expected to be called frequently by tools. + // // struct Facet { // address facetAddress; // bytes4[] functionSelectors;