Build large, modular smart contract systems that can be extended after deployment.
Some developers are afraid of ‘delegatecall’ because they have been told it is “dangerous”. Fear and danger come from not understanding how something…
Gas optimization is a matter of doing what is cheap and avoiding what is expensive in terms of gas costs on EVM blockchains
A diamond has a fixed gas cost for any amount of cross contract interaction under its control.
This is a list of projects using EIP-2535 Diamonds. This list is a work in progress. Send me a tweet on Twitter (@mudgen) if you know of a project not…
ERC1155 is a powerful and flexible token standard. Its functionality includes the following: Batch transfer functions are part of the ERC1155 standard…
Each of the security audits applies to one of these diamond implementations: diamond-1-hardhat (Simple implementation) diamond-2-hardhat (Gas-optimized…
The purpose of this article is to show how to add new state variables to an already deployed diamond and use them.
EIP-2535 Diamonds specifies the ‘diamondCut’ function which is used to add/replace/remove any number of facets and functions to a diamond in a single…
Constructor functions are used to set state variables in the contract storage of a contract that is being deploy. But realize that a facet doesn’t read…
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…
A diamond proxy contract is the smart contract with the fallback function that delegates function calls to facets. Here’s a link to a diamond proxy…