OpenZeppelin / openzeppelin-contracts

OpenZeppelin Contracts is a library for secure smart contract development.
https://openzeppelin.com/contracts
MIT License
24.9k stars 11.79k forks source link

EIP-2535 Diamonds Implementation for OpenZeppelin #2793

Open mudgen opened 3 years ago

mudgen commented 3 years ago

What I would like to assist in creating or helping to create an OpenZeppelin implementation of an EIP-2535 diamond.

The EIP-2535 Diamond standard will likely move to Last Call status soon and then become Final after the two week period if there are no major changes.

Introduction EIP-2535 Diamonds is a standard for building modular smart contract systems that can be extended in production. An introduction to it is here: https://eip2535diamonds.substack.com/p/introduction-to-the-diamond-standard

The standard was released in February 2020 but experience with it and feedback on it has accumulated since 2018 when EIP-1538 was released. EIP-2535 is an improvement upon EIP-1538.

The current status of EIP-2535 is Review and soon its status will probably move to Last Call.

More than 20 projects are using EIP-2535 and more are coming.

Several smart contract security audits have been done on the reference implementations.

🧐 Motivation An OpenZeppelin implementation of a diamond would be useful to people who want to use OpenZeppelin software with the diamond architecture.

Questions Are there any questions or concerns I should address?

Is a diamond implementation and my help of interest or wanted by the OpenZeppelin project and community? If so how should I/we proceed?

ghost commented 3 years ago

Are there any updates regarding this implementation?

mudgen commented 2 years ago

Are there any updates regarding this implementation?

A Solidity library was made that supports diamonds: https://github.com/solidstate-network/solidstate-solidity

frangio commented 2 years ago

Our current position on this is that the work required to support diamond proxies is too much for us to take on. It is not only about the initial work to build the Solidity contracts and become confident about their security, but also documentation and other materials, support for the pattern in our Upgrades Plugins and OpenZeppelin Defender, and continued maintenance of all of that going forward. At the moment we're not interested in commiting to all or part of this work.

mikirov commented 2 years ago

I would also like to help develop an OZ implementation for EIP2535 diamonds. I would be happy if there is enough interest to start a discussion and propose a draft implementation

mudgen commented 2 years ago

@mikirov I think that is great. @frangio can @mikirov get started on this and coordinate with you about it? I am also available to look at anything and answer questions etc.

Pandapip1 commented 1 year ago

EIP-2535 was recently finalized. It seems to me that EIP-2535 is a much better design pattern than the existing upgradeable contracts that OZ supports.

It would be a big undertaking. But it would be worth it.

frangio commented 1 year ago

Our position hasn't changed since the previous comment: https://github.com/OpenZeppelin/openzeppelin-contracts/issues/2793#issuecomment-983230289

jewelsonn commented 1 year ago

I understand the labor to maintain a new method, but can you guys not work with solidstate-solidity? They use Diamond structure EIP-2535

icetrust0212 commented 1 year ago

I am a fan of Diamond pattern. It's super amazing!

Taewa commented 3 months ago

@jewelsonn

I understand the labor to maintain a new method, but can you guys not work with solidstate-solidity? They use Diamond structure EIP-2535

What is the reason not to work with solidstate-solidity?