OpenZeppelin
In a similar vein to the Don't roll your own crypto adage, it's often better to use pre-existing code when writing smart contracts, especially when writing code aimed at mitigating attack vectors. The safeMultiply() function that we wrote in our token sale contract could have contained bugs, rendering it dangerous rather than safe. To mitigate the risk of trying to write code such as this, we can use contracts and libraries that have been widely used and vetted by the community.
OpenZeppelin is an open source framework used to build secure smart contracts. The project provides open source, audited smart contracts and libraries that can be included and imported into other projects. One of their most widely-used libraries is
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access