The One Question bounty closes Thursday 10 December.

Join in
We Them Media logo We Them Media Support us

Web3bridge Students (Cohort XI) Share What They’ve Learned: Diamond Standard

The picture loads from YouTube. The player loads only when you press Play. Turn on captions in the player if you need them.

A Web3 Bridge Cohort 11 student explains Diamond storage and app storage under the Diamond Standard for smart contracts. Diamond storage keeps state in shared slots so contracts called facets can be added, removed or replaced. App storage gives every facet one common place to read and write data.

Not by We Them Media Channel: Web3Bridge. Published Wednesday 1 January 2025.

Titles are the owner’s. It plays from their channel.

Transcript

This transcript may contain errors. This video belongs to Web3Bridge. Letters mark each change of speaker.

These are the speakers’ own words. We have not checked their claims.

0:00 A: This video is proudly brought to you by VirtuBridge with LIX, our official sponsors for Cohort 11.

0:08 B: In this video, we'll be talking about Diamond storage and app storage.

0:17 C: The Diamond Standard smart contract conforms to the EIP-2535, and, um, under the Diamond Standard smart contract there are 2 basically forms of storage. We have the daemon storage and the app storage. These are ways of storing modular state and patterns, and these patterns are known, are known as daemon patterns. And of course, the storage actually allows for storing state and functionality of your daemon without breaking the compatibility of your smart contracts.

0:52 D: Diamond Storage is particularly used for modular and upgradable smart contracts, and then it does this by centralizing state variables into a storage slot and also shares this slot with multiple other contracts, and these contracts are called facets. And then this process literally enables for upgradability of the smart contracts. like adding to the smart contract, removing from the smart contract, or even replacing the smart contract. This is like a summary of what Diamond Standard or Diamond Storage is all about.

1:29 B: App storage is used to manage the data so as to be shared across different facets. So having established that the Diamond The Diamond Storage itself, it's a form of modularity, a form of design pattern that is used to organize and create some sort of patterns through which data are being used and different contracts are being used. App Storage is basically used to share data across these different facets. So in the sense that we don't want different facets to have their own data in specific. Instead, every, every of the facets that belong to that upgradeable smart contract talks to a specific storage, which is the app storage. So the app storage is basically the storage section where all facets talk to the specific data across the whole smart contract in general.

More from this hub

Something wrong, or a video you want off this page? Write to wethem.xyz@gmail.com and it is fixed or taken down within 48 hours.