DEV Community

Cover image for Update: What's New in the Diamond Standard EIP?
Nick Mudge
Nick Mudge

Posted on • Edited on

1

Update: What's New in the Diamond Standard EIP?

The Diamond Standard has just had its largest revision in months published.

See it here: https://eips.ethereum.org/EIPS/eip-2535

So what's new?

The standard tries to do a better job at introducing diamonds and explaining how they work. Did it succeed?

The Diamond Standard was originally written before diamond storage existed. Parts of the standard have been rewritten to introduce and show diamond storage and its use in facets. The standard also explains the flexibility, composability and modularity of facets.

The standard now features three diagrams showing the structure of a diamond and diamond storage, and how facets can be reused.

The standard has been modified to make it clearer that the diamondCut function is optional and just exists for interoperability with tools. People can create their own custom functions or different versions of diamondCut with different parameter types that add/replace/remove functions.

The diamondCut function has two new arguments. These new arguments exist to enable a function to be executed to initialize or setup or tear down things after functions have been added/updated/removed from a diamond.

The example of a diamond in the standard was removed. Look at the reference implementation for an example.

The way a diamond is defined and explained has changed. In the past a diamond was described as a proxy contract that supported multiple logic/delegated contracts. Now the standard describes a diamond as a contract that gets its external functions from other contracts. It is a conceptual difference. The word "proxy" is no longer used anywhere in the standard to describe a diamond.

The standard includes a compiled list of diamond benefits.

A new "Learning & References" sections has been added to the standard that provides links to useful diamond resources.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay