1/5
_Follow along the course with this video._ --- ### Advanced EVM - Encoding Recap Before looking at how we can apply all our new encoding knowledge to call our own functions, let's recap some of the things we've gone over so far, there's been a lot. ### Concatenation At a high-level, we learnt that abi.encodePacked can be used to concatenate strings. ```js string memory someString = string(abi.encodePacked("Hi Mom! ", "Miss you!")) ``` > ❗ **PROTIP** > Remember: In newer versions of Solidity, you can use `string.concat("Hi Mom! ", "Miss you!")` ### Binary and Opcodes We learnt that when a contract is compiled, it's actually compiled into an ABI (application binary interface) and a binary or bytecode format. ::image{src='/foundry-nfts/21-evm-recap/evm-recap1.png' style='width: 100%; height: auto;'} Any transaction we send to the blockchain is ultimately compiled down to this bytecode. For contract creation transactions, the data field of the transaction _is_ this bytecode. Any system capable of reading the operations contained within this bytecode is said to be `EVM Compatible`. ### Encoding We also learnt that we can use the encoding functionality of the EVM to encode basically anything. Basic encoding is accomplished with `abi.encode`, but we've a few options available to us. ::image{src='/foundry-nfts/21-evm-recap/evm-recap2.png' style='width: 100%; height: auto;'} `abi.encode` will result in a padded return value, however the EVM offers a way to save space/gas by packing our encodings through `abi.encodePacked`. ::image{src='/foundry-nfts/21-evm-recap/evm-recap3.png' style='width: 100%; height: auto;'} The EVM also affords us the ability to decode and multi-encode, really giving us flexibility to work with our data. ### Low-level Calls Lastly we touched on a couple of Solidity's available low-level calls such as `call`, `staticcall`. The data passed to these functions allows us to make _any_ arbitrary call to an address we want - this is what we'll cover in more detail next. ### Wrap Up Alright, great work so far. Now's a great time to take a break before we make the final push to the end of this section. In the next lesson we'll see how these concepts work in practice as we dive into function selector encoding and sending encoded function calls. Let's go!
A recap of the advanced EVM concepts covered in the course. It revisits topics like string combination, low-level concepts, binary encoding, and the use of the 'call' function in Solidity, summarizing the key takeaways from the advanced sections of the course.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Advanced smart contract development
How to develop a stablecoin
How to develop a DeFi protocol
How to develop a DAO
Advanced smart contracts testing
Fuzz testing
Manual verification
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on November 29, 2024
Solidity Developer
Advanced FoundryDuration: 36min
Duration: 3h 06min
Duration: 5h 02min
Duration: 2h 47min
Duration: 1h 23min
Duration: 4h 28min
Duration: 1h 19min
Duration: 58min
Course Overview
About the course
Advanced smart contract development
How to develop a stablecoin
How to develop a DeFi protocol
How to develop a DAO
Advanced smart contracts testing
Fuzz testing
Manual verification
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on November 29, 2024
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