There are a number of ways to share or reuse functions between facets of an Ethereum diamond. The best way I have found is to write internal functions in Solidity libraries and import and use them in facets. It is a common misunderstanding to think that all Solidity libraries are independently deployed. Only Solidity libraries with external functions must be deployed. Solidity libraries with only internal functions are not deployed -- they are added to the bytecode of contracts/facets that use them.
Hey Nick, in your gas efficient external call example you have "(bool success, uint result)". I think that might want it to be "(bool success, bytes memory result)". Thanks for the great article!
How to Share Functions Between Facets of a Diamond
Hey Nick, in your gas efficient external call example you have "(bool success, uint result)". I think that might want it to be "(bool success, bytes memory result)". Thanks for the great article!