32_智能合约编写最佳实践
本文参考:https://github.com/t4sk/sol-best-practices
- Lock compiler version
- Multiply before divide
- Don't name local and state variables the same
- Keep contract simple
- Prioritize security over gas
- Avoid unbounded loops
- Don't trust user input
- Checks, effects and then interactions
- Use re-entrancy guards
- Pull over push
- https://fravoll.github.io/solidity-patterns/