Developers
EVM Tools
Open Zeppelin
6min
open zeppelin is one of the most well known evm based exemplar smart contract libraries smart contract libraries such as open zeppelin help you to develop quicker and more efficiently by pulling in pieces of code that have been well tested in a large number of projects since caduceus is evm compatible, developers can benefit greatly from utilizing these libraries in their projects open zeppelin libraries allow you to deploy tokens quickly use standards such as erc 20 (fungible), erc 721(non fungible) within quickly implementable examples to get you deployed quickly and safely while solidity interfaces and example implementations are typically not readily deployable, open zeppelin offers built in functions such as constructors that enable you to deploy quickly upgrade smart contracts fix bugs and security vulnerabilities, and introduce new features to your projects without migrating all your data reuse on chain code reuse on chain solidity code that has been vetted by the community link to on chain smart contract packages (ethereum packages) as building blocks for your project, and publish your packages for others to use openzeppelin is included in the example compile and test smart contracts the starter kit includes the truffle suite with a development environment, a testing framework, and an asset pipeline for blockchains using the ethereum virtual machine (evm) create adaptable and responsive ui components the starter kit includes react and rimble to give you all the components and flexibility you need to build responsive user interfaces use standard evm compatible development tools and processes for minimal development overhead if you have been developing on ethereum for years or are a complete newbie, you will feel at home developing with these pre made resources token standards even though the concept of a token is simple, they have a variety of complexities in the implementation because everything in ethereum is just a smart contract, and there are no rules about what smart contracts have to do, the community has developed a variety of standards (called eips or ercs) for documenting how a contract can interoperate with other contracts open zeppelin resources provide in depth reading on how tokens are built head to these specialized guides to learn more about token types erc20 the most widespread token standard for fungible assets, albeit somewhat limited by its simplicity erc721 https //docs openzeppelin com/contracts/4 x/erc721 the de facto solution for non fungible tokens, often used for collectibles and games erc777 https //docs openzeppelin com/contracts/4 x/erc777 a richer standard for fungible tokens, enabling new use cases and building on past learnings backwards compatible with erc20 erc1155 https //docs openzeppelin com/contracts/4 x/erc1155 a novel standard for multi tokens, allowing for a single contract to represent multiple fungible and non fungible tokens, along with batched operations for increased gas efficiency token contracts are available on github at https //github com/openzeppelin/openzeppelin contracts/tree/master/contracts/token https //github com/openzeppelin/openzeppelin contracts/tree/master/contracts/token getting started use node package manager (npm) to download and install open zeppelin into your local folder \# install through npm $ npm install @openzeppelin/contracts after installation, reference the open zeppelin library in a smart contract in your favourite ide such as remix, truffle or hardhat the following is a simple example of an nft contract that uses the erc 721 standard // contracts/mynft sol // spdx license identifier mit pragma solidity ^0 8 0; import "@openzeppelin/contracts/token/erc721/erc721 sol"; contract mynft is erc721 { constructor() erc721("mynft", "mnft") { } } common open zeppellin libraries include erc 721 non fungible token standard erc 20 token standard open zeppelin can be used directly in the caduceus ide and also in hardhat, remix and brownie import statements in solidity can pull in the code directly from github upon compilation open zeppelin sample contracts include constructors that allow you to define initial parameters such as token name, and maximum token count github resources erc 20 on github erc 721 on github full set of open zeppelin contracts on github advanced concepts and tools upgradable contracts allow once immutable contracts to be partially modified or upgraded by through proxy led upgrades test helpers allow you to test your contracts with variable based assertions this is useful for unit testing before deploying to a live network