From following the example we have similar code. However I do not know exactly the need and meaning behidn this.
How I currently understand this, I think that when we add our custom facets to our gateway, subnet actor and subnet registry actor we are also supposed to update this variable. And likewise we would have to update it when we do upgrades if we remove unused facets.
Considering we do not ever use this variables and use the diamondLoupe feature specifically to see what functions are in the diamond I think we should remove any references to the supportedInterfaces variable
chatgpt: ERC-165 is a technical standard used for Ethereum smart contracts. It provides a way for smart contracts to publish and detect what interfaces they implement. This is important for interoperability between contracts in the Ethereum network.
For instance, a smart contract can announce that it adheres to ERC-721 (the standard for non-fungible tokens, or NFTs) by implementing the interface specified in ERC-165. This makes it easier for other contracts and applications to interact with it, knowing what kind of functionality to expect. ERC-165 helps in determining whether a smart contract has certain functions, reducing the likelihood of errors and enabling more complex behaviors in the decentralized finance (DeFi) and wider Ethereum ecosystem.
The diamond standard example is manually setting the supportedInterfaces variable to match how the example is configured.
From following the example we have similar code. However I do not know exactly the need and meaning behidn this. How I currently understand this, I think that when we add our custom facets to our gateway, subnet actor and subnet registry actor we are also supposed to update this variable. And likewise we would have to update it when we do upgrades if we remove unused facets.
Considering we do not ever use this variables and use the diamondLoupe feature specifically to see what functions are in the diamond I think we should remove any references to the supportedInterfaces variable
Personally I haven't used or seen ERC165 before and don't particularly see it helping us in this project. https://eips.ethereum.org/EIPS/eip-165#implementation