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…
ERC1155 is a powerful and flexible token standard. Its functionality includes the following: Batch transfer functions are part of the ERC1155 standard…
The purpose of this article is to show how to add new state variables to an already deployed diamond and use them.
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…
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.
Simple Summary EIP-2535 Diamonds is a standard for creating modular smart contract systems that can be extended in production. Enables people to write…
I have written about the diamond storage pattern for organizing contract state variables in proxy contracts and diamonds. As a quick refresher, a state…
1. A state variable in AppStorage has the wrong value A state variable in AppStorage has the wrong value or the value 0 when it should not. This is…
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…
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…
Some developers are afraid of ‘delegatecall’ because they have been told it is “dangerous”. Fear and danger come from not understanding how something…