Keeping contracts simple, modular, and up to date
Smart contracts and solidity are relatively new, and the best practices and tools are still under proposal or at an early stage of implementation. A lot of bugs and security vulnerabilities are still being discovered and the platform needs to evolve. To prevent any potential bugs from surfacing, it is always recommended to follow existing guidelines and general software design principles.
In this recipe, you will learn the importance of keeping the contract simple, modular, and updated.
Getting ready
It is recommended to have a basic understanding of writing smart contracts before going through this recipe. It covers various guidelines that you have to consider which will make your smart contracts better. For a better development environment, use the tools and libraries recommended in the first chapter of this book.
How to do it…
- Likelihood of an error increases when the complexity of the code increases. To reduce this, it is always recommended...