Ethereum's Secret Code: Cracking Function Selectors Like a Pro! [Advanced Topic: Yul Included]
Dive deep into Ethereum function selectors with this comprehensive guide! We cover: - High-level overview of function selectors - Computing selectors in Solidity (two methods) - Calculating selectors in web browsers and Python - Understanding msg.sig - Function selectors at the EVM bytecode level - Linear vs. binary search for selectors - Function selectors in Yul From basics to advanced concepts, this video equips you with essential knowledge for smart contract development. Perfect for beginners and experienced devs alike. Level up your Ethereum skills now! CHAPTERS 00:00 - 1:04 Introduction 1:04 - 5:32 High level overview of function selectors 5:32 - 11:18 Example 1 - Computing function selector from "foo.selector" 11:18 - 12:10 Selector of an internal function 12:10 - 12:56 Computing the function selector in the browser 12:56 - 13:25 Converting the hash to the selector 13:25 - 17:13 Example 2 - Computing function selector from "keccak256" 17:13 - 19:45 Example 3 - Computing the function selector in Python 19:45 - 20:30 Selector Computation Recap 20:30 - 25:25 Example 4 - Low level function call using the selector 25:25 - 28:55 First part of Explaining "msg.sig" 28:55 - 30:50 Looking up the selector in "4byte directory" 30:50 - 35:12 Continuation of "msg.sig" 35:12 - 37:35 Example 4b - Using Interface instead of low-level selector call 37:35 - 40:20 Example 7 - Collision of Selectors 40:20 - 48:55 The function selector in the EVM for less than 5 functions - Linear Search - The Dispatcher Part 1 48:55 - 01:00:41 The function selector in the EVM for more than 4 functions - Binary Search - The Dispatcher Part 2 01:00:41 - 01:02:59 Example 8 - The Selector in Yul 01:03:00 - 01:03:45 Conclusion EPISODE LINKS: https://github.com/jesperkristensen58/FunctionSelectorEthereum SOCIAL LINKS: Jesper's Twitter: https://x.com/cryptojesperk Jesper's LinkedIn: https://www.linkedin.com/in/jespertoftkristensen/ QUESTIONS AND COMMENTS: Questions and comments are welcome! If you find the content helpful please subscribe and click the like button. #Ethereum #SmartContracts #Solidity #BlockchainDevelopment
Download
0 formatsNo download links available.