Solidity is very new and undergoes rapid changes every day. You should expect new best practices and bugs to be suggested/discovered every day, which improves the platform as a whole. There are some best practices and software engineering techniques in solidity that you can follow to write bug-free and optimized smart contracts for Ethereum. This recipe focuses on this topic.
Best practices in solidity
How to do it...
- The first and most important technique is to keep the contract as simple as possible. Complex contracts increase the likelihood of bugs. The contract's logic should be simple and modularized.
- Use already available, well-tested, and popular libraries to achieve common tasks. This can help you in writing...