Skip to content

Commit

Permalink
Automatically merged updates to draft EIP(s) 2535 (ethereum#2850)
Browse files Browse the repository at this point in the history
Hi, I'm a bot! This change was automatically merged because:

 - It only modifies existing Draft or Last Call EIP(s)
 - The PR was approved or written by at least one author of each modified EIP
 - The build is passing
  • Loading branch information
mudgen authored and Arachnid committed Mar 6, 2021
1 parent c5c0b73 commit e1ec221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EIPS/eip-2535.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ An upgradeable diamond has the `diamondCut` function used to add/replace/remove
A finished diamond was an upgradeable diamond and had a number of upgrades. Then its `diamondCut` function was removed and upgrades are no longer possible. It is no longer possible to add/replace/remove functions. It has become an immutable diamond.

**Single Cut Diamond**
The specification section of the standard is careful not to say that a diamond *has* a `diamondCut` function. Instead it says a diamond *uses* a `diamondCut` function. This careful wording is to make single cut diamonds possible. A single cut diamond uses the `diamondCut` function in the constructor function of the diamond to add all functions to the diamond, but it does not add the `diamondCut` function to the diamond. This means that a single cut diamond is fully created in its constructor and once created can never be upgraded. It has the same immutability and trustless guarantees as a regular vanilla contract. Why would someone do this? There may be a number of reasons. The two use cases below are really good reasons.
The specification section of the standard is careful not to say that a diamond *has* a `diamondCut` function. Instead it says a diamond *uses* a `diamondCut` function. This careful wording is used to make single cut diamonds and other patterns possible. A single cut diamond uses the `diamondCut` function in the constructor function of the diamond to add all functions to the diamond, but it does not add the `diamondCut` function to the diamond. This means that a single cut diamond is fully created in its constructor and once created can never be upgraded. It has the same immutability and trustless guarantees as a regular vanilla contract. Why would someone do this? There may be a number of reasons. The two use cases below are really good reasons.

The two use cases below assume that you want an immutable contract:

Expand Down

0 comments on commit e1ec221

Please sign in to comment.