1/5
--- ### Hex Code Verification and Error Handling In our exploration of hex codes, it's crucial to verify each component meticulously, as we're doing now. Let's take a closer look at the function selector which is integral to error handling. Surprisingly, even errors are equipped with function selectors, which guide us in identifying and categorizing them accurately. #### Incorrect Function Selector Detected While examining our current setup, I realized that the function selector in use was incorrect. By implementing a tool like `cast sig`, I can easily paste and check the intended selector. Alarmingly, the one we're using doesn't match the required function selector. Here’s what went wrong: - **Initial Discovery:** The function selector I encountered was not the one expected. - **Correct Function Signature:** After further checking, I identified the correct function signature, which differs from the value currently being used. - **Error Analysis:** It appears there is a misunderstanding or misapplication in the selection of the function selector. The error could range from low to informational, depending on its impact on the overall system. Seem a lot is wrong with a small section of the code even though it looks actually correct, so let's see how to address this on the next lessons.
A detailed explanation of the function selectors error code. The lesson covers examining the function signature and how it can lead to incorrect function selectors. The lesson also covers the function selector for revert in Solidity.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Assembly
Writing smart contracts using Huff and Yul
Ethereum Virtual Machine OPCodes
Formal verification testing
Smart contract invariant testing
Halmos, Certora, Kontrol
Security researcher
$49,999 - $120,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Guest lecturers:
Josselin Feist
Head of Blockchain at Trail of Bits
Last updated on January 17, 2025
Solidity Developer
Assembly and Formal VerificationDuration: 30min
Duration: 4h 38min
Duration: 3h 57min
Duration: 1h 56min
Course Overview
About the course
Assembly
Writing smart contracts using Huff and Yul
Ethereum Virtual Machine OPCodes
Formal verification testing
Smart contract invariant testing
Halmos, Certora, Kontrol
Security researcher
$49,999 - $120,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Guest lecturers:
Josselin Feist
Head of Blockchain at Trail of Bits
Last updated on January 17, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar