In blue is already in the lesson. (we could open a side drawer through the text). Open Zeppelin developed a lot of standard contracts that are super powerful, widely used and fully tested and audited. We are going to stand on the shoulder of giants and leverage the power of open source to create our project in a simpler way, while not losing focus on security which is super important in the web3 world
The Zeppelin that Opened Ethereum…or something cheesy like that
In the early days of smart contract development, we developers didn’t have any standard contracts, we just wrote our own, tested them as best we could, and did a lot of hoping for the best that they didn’t get hacked. Since the space was new, there was a real need for developers who would specialise in rigorously auditing contracts, especially since they were holding a lot of value.
Open Zeppelin, slowly but surely, began to fill that gap with a library of contracts that have been rigorously audited and proven to be safe and robust by all the OG protocols of the Ethereum Network.
So what are they and how do they help us?
By (re)using and these Open Zeppelin libraries/contracts, we devs can reduce the amount of code we write. By reducing the ‘surface area for attack vectors’ our contracts are much less likely to be hacked. Since they are often used as an ecosystem standard, they allow for much easier collaboration among humans, and interoperability with the technology they create in their code.
In the beginning the OZ contracts were quite basic, but over time they have gotten much more modular, opening up loads of possibilities. And when we pair this with the evolution of ERC standards and tokens, which we also cover in this lesson, the field of possibilities opens up exponentially. Exciting times to be here!
To make developing even more easy and take advantage of the offering, there is an OpenZeppeilin Wizard which lets you choose your own style of modularity, whether that is to mint, burn, vote, give a range of access permissions, you name it, it’s there! Note the import of ERC721 in the one below…..I’ll stop nattering now! See for yourself:
‘So when we write a new contract, and we need to inherit the tried and tested qualities or characteristics, we simply import those contracts into our own, like inheriting those good qualities of our favourite relatives!.
It’s very rare in the Ethereum smart contract development to see a smart contract that doesn’t include at least one line of code stating import: OpenZeppelin_thingy_ma_jig.sol !!
By the way, it might seem like we’re doing a major shill for one team in the ecosystem. The ecosystem is itself shilling these contracts through their willingness to trust them.