Likelihood of an error increases when the complexity of the code increases. To reduce this, it is always recommended to keep the contract code to a minimum and stick to the core functionality.
Ensure that the contract's logic is simple and easy to understand. It is important to keep the contract very readable.
While comparing with traditional software engineering practices, the code has to be reusable, modular, and upgradable. This may not always be the case when it comes to smart contracts in a blockchain system. Write the contracts in a balanced manner to follow best practices and yet consider trust and immutability factors.
An upgradable contract can look very usable and ideal when considering general software engineering ...
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.