New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Watch Our Students Break Down the Diamond Standard in Blockchain || Cohort X

Web3BridgeWed, Oct 9, 2024, 12:00 AM

Ever wondered what the Diamond Standard is and how it's shaping the future of blockchain technology? Tune into our latest video where students from our program tackle this advanced concept. Watch as they break down the intricacies of the Diamond Standard, explaining its importance and how it revolutionizes smart contract development on platforms like Ethereum. This video is perfect for both newcomers and seasoned blockchain enthusiasts looking to deepen their understanding of cutting-edge blockchain architectures. Don't miss out on this opportunity to learn from the fresh perspectives of our knowledgeable students as they simplify complex ideas into understandable insights.

Transcript

[Music] a lot of people have been hearing about Diamond standard here and there look at it like a very complex stuff but I'm going to simplify it down to the beest minimum that I can I will tell you Diamond contract a is a contract of contract now what do I mean by that so Diamond stand a simply upgradeable contract it is a design pattern actually to um modularize our smart contract this was bet by the EIP 2535 which is the multi facet or proxy facet so the idea behind it just like a diamond right you can when you have a diamond you can cut out different faets out of the diamond to create a new diamond right so these faets are just Parts where you cut out of the diamond so talking about let's now relate it to smart TR faets are different um files you have different solity files which Implement functions and also import right they use the state variables which is stored in a live the major part of the diamond start that we have the diamond and the foret the foret act as the um as um the modularized part and the diamond is the main M smart contract foret is just like all functions our logic functions and all but doesn't have any um state variabl so the state variables are being stored in the um app storage so basically Diamond standard is uh where the forets interacts with the diamond that is being deployed and the diamond perform a delegate call to the foret so the two things that we need to keep um that we need to take notice when it comes to d d standard is the fullback function and the delegate goore it works with simple and analogies like um delegate calls for back function and then you have to understand concept of function selectors and the rest of them the DI stand up depend more on the fullback function because why with that already he uses that to delegate C to other forets that he needs it uses the um delegate call which is a lowlevel call to delegate logic to update States in that contract since the blockchain is immutable sometimes when we deploy contracts and want to make changes to it it's a little bit it's impossible virtually but with diamond standard Diamond standards open room for upgradability because when you deploy you can deploy other forets and these forets will be able to be assessed by already deployed contract so the major major purpose of this um D standard is just for efficiency modularity and um upgradability so the EIP 2535 was made to enable us to uh upload multiple um to increase the size of smart contract and since things deployed to the blockchain are mostly immutable that means it cannot be changed the diamond standard makes it possible for us to upgrade it makes it possible for us to upgrade already existing contract so technically what happens is you all know that smart contracts cannot be change once they are deployed on the blockchain so a diamond comprises of two smart contracts which is one a proxy contract and the second is the implementation contract so the proxy contract hold the states of the diamond so it just helps you manage a lot of functions without having these functions the funnest thing is that diamond Contra just have one function and that a fall back function but it can tap into as many functions as it wants yes [Music]

Automatic transcript — names and jargon may be misspelled.