/EVM-Book

A collection of EVM related information.

EVM-Book

A collection of EVM related information. This is a repo that I created for myself to keep track of all the useful links/information I have come across related to the EVM and put it in one place. I made it public in case anyone else wants to use it to explore specific EVM related topics. This document is a work in progess and will continually be updated.


Low Level EVM Info

Every EVM Opcode and cost

Solidity -> Bytecode -> Opcodes

Memory Deep Dive

The EVM chapter in the Ethereum Book

EVM Puzzles: Use calldata, calvalues and opcodes to solve EVM challenges

Huff's EVM Tutorial


Tooling / Testing

Foundry

Hardhat (for when the task is outside of the bounds of Foundry)

Tenderly: Block explorer that provides very detailed transaction info.

DethCode: While browsing smart contract code on Etherscan, change URL from .io to .deth.net. This will open Visual Studio Code instance and fetch the verified code using Etherscan API.


Security

Smart contract security - key principles

Comprehensive list of known attack vectors and common anti-patterns

Smart Contract Programmer's Hack Solidity Playlist

Smartbugs: A curated dataset of vulnerable solidity smart contracts

Use Slither AND Mythril together for automated vunerability testing. This does not replace an audit. This is like scanning a contract at a high level and only picks up ~37% of vunerabilities accurately

List of all up to date Solidity compiler bugs

Damn Vulnerabile Defi: Smart contract offensive security challenges (Or try the Foundry Version)

Solcurity: A security and code quality checklist


Gas Optimizations

Solmate: gas optimized building blocks for smart contract development.

How arithmetic with values less than 32bytes are handled and why it costs more gas

Patterns / Optimizations for gas savings

EVM Gas optimizations with gas benchmarks

Solstat: A static analyzer to find gas optimizations and contract vulnerabilities


Yul

Yul Docs

Yul+ Docs

Yul+ Walkthrough

Inlining Yul In Solidity

Accessing Memory Explanation

Vunerable Yul Patterns


General/Misc

Conventions in Solidity

ControlCPlusControlV's Yul (and Some Solidity) Optimizations and Tricks