Summary

In this chapter, we covered best practices such as avoiding floating pragma, the commit-reveal scheme, using external function calls, and integer rounding errors. Additionally, we discussed attack patterns such as front-running, reentrancy, signature replay attacks, and integer overflow and underflow attacks. These are the most important things to know, as writing contracts in Solidity can be easy, but writing a bulletproof contract is hard.

There have been many hacks, and we have covered some of the most well-known ones, but it's the developer's responsibility to keep checking for newly identified attack patterns, so that they do not make the same mistakes again while writing contracts. Apart from that, always use the latest versions of the libraries. The Solidity compiler does fix the issues in the new versions; keep yourself up to date with the latest changes and ensure that the new bugs found in the compiler are not affecting your contracts.

We started this book by looking at Ethereum and blockchain, as well as discussing Solidity in depth. We also discussed Truffle, Ganache, Remix IDE, MetaMask, and how to use these tools while writing contracts. We learned how to use the ERC20 and ERC721 standards, as well as OpenZeppelin libraries. We looked into contract upgradability and we covered best practices. These topics are the most important to learn for a Solidity contract developer. Keep learning new things, libraries, and tools for the Ethereum blockchain. I would love to see you develop contracts for Ethereum, so keep building and evolving the ecosystem. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.147.20