A contract architecture that makes upgradeable contracts flexible, unlimited in size, and transparent.
New terminology from the diamond industry.
Improved design over ERC1538 using ABIEncoderV2 and function selectors.
A diamond is a contract that implements this standard.
A diamond provides the following:
- A way to add, replace and remove multiple functions atomically (in the same transaction).
- An event that shows what functions are added, replaced, removed and one or messages describing changes.
- A way to look at a diamond to show its functions.
- Solves the 24KB maximum contract size limitation. Diamonds can be any size.
- Enables zero, partial or full contract immutablity as desired, and when desired.
- Designed for tooling and user-interface software.
A diamond is a proxy contract that supports using multiple logic/delegate contracts at the same time. In this standard the term for logic/delegate contract is facet. A diamond can have many facets. Which facet is used depends on which function is called. Each facet supplies one or more functions.
This standard supersedes ERC1538: Transparent Contract Standard.
See the full standard here: https://github.com/ethereum/EIPs/issues/2535