We end this chapter with some recommendations and best practices you can adopt while you write your smart contracts:
- There is no size limit to the data sent along your transaction. You will be only limited by how much ether you have and the block gas limit.
- Constants are not stored in contract storage. A constant state such as uint256 constant x = block.timestamp; means that contract will re-evaluate x every time it is used.
- Remember that calls to external functions can fail, therefore always check the return value.
- For transferring funds, it's preferable to use transfer() over send() as transfer() is equivalent to require(send()) and will throw if it doesn't execute successfully.
- Be aware that the block's timestamp ...