Follow along with this video:
Next up, we see the selectWinner
function come up again with our @Audit
tag. This time, it's pointing to magic numbers
. Definitely an informational
we should write up.
We see the problem here. When reading through a code base, number literals can make things difficult to understand.
Lets add this to our findings.md
report.
We could probably be a little more verbose, but for the purposes of an informational
in a private audit setting, this is sufficient. Mark it as complete and let's move on.
Focus on Magic Numbers & Named Constants. Patrick provides Solidity examples & tips.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Solidity Developer
Smart Contract SecurityDuration: 25min
Duration: 1h 18min
Duration: 35min
Duration: 2h 28min
Duration: 5h 03min
Duration: 5h 22min
Duration: 4h 33min
Duration: 2h 01min
Duration: 1h 40min
Testimonials
Read what our students have to say about this course.
If there’s one resource that Web3 developers point to, it’s Cyfrin’s ultimate tutorials. They’re standout resources that have empowered countless developers to learn blockchains, learn Solidity, and dive deep into Web3 development.
Chainlink
Chainlink
I took Cyfrin course and I’ve been working as a solutions developer at OpenZeppelin for the last few months. It was by far the most comprehensive resource and the one that really teached me the fundamentals and made me want to switch from web2 to web3.
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Cyfrin Updraft videos on smart contract development have been instrumental in my blockchain journey, standing out with their clarity and accessibility. Their readiness to support and engage with learners makes me excited for more of their interactive and insightful content in the Web3 space
Francesco Andreoli
Lead Devrel at Metamask
The Cyfrin courses were a game-changer for me. They provided a well-structured and comprehensive introduction to web3 and blockchain development. The knowledge I gained allowed me to transition into a full-time role as a blockchain developer. I can't recommend these courses enough!
Albert Hu
DeForm Founding Engineer
I took Cyfrin’s courses, and I took them seriously. At least one hour every day, documented the progress, didn’t skip any second. Haven’t found a better web3 course since. Now I’m full-time in web3, working as Senior Developer Advocate at Ceramic Network.
Radek
Senior Developer Advocate at Ceramic
Cyfrin have been an absolute game-changers in my journey into blockchain. Saying their courses were remarkable, would be an understatement. Thanks to their expert guidance, I gained a deep understanding of blockchain to its roots. I'm forever grateful for their role in helping me get started in web3.
Boidushya
WalletConnect
Cyfrin blockchain and Foundry/AI courses were incredible. I've gained valuable knowledge, grown, empowering myself and others. Thank you, Cyfrin!
Idris
Developer Relations Engineer at Axelar