# EVM Puzzles

## Intro

{% embed url="<https://github.com/fvictorio/evm-puzzles>" %}
EVM Puzzles
{% endembed %}

<mark style="color:red;">**EVM Puzzles**</mark> is a collection of EVM puzzles. Each puzzle consists on sending a successful transaction to a contract. The bytecode of the contract is provided, and you need to fill the transaction data that won't revert the execution.

## Before diving in

Once you understand basic Ethereum and Solidity, I actually recommend you <mark style="color:red;">**learn some EVM immediately**</mark>. This knowledge is going to make you view smart contracts differently. Learning EVM is the first step towards an advanced smart contract auditor role.

The best way is learning EVM through Huff, and before Huff we should have a basic understanding on EVM opcodes. That is why we are doing EVM puzzles.

These puzzles are in fact very straightforward and you can definitely solve all of them within a day. However, solving puzzles does not give you knowledge about the overall architecture of EVM. Make sure you read the following blog post:

{% embed url="<https://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-ii-creation-vs-runtime-6b9d60ecb44c/>" %}
Deconstructing a Solidity Contract — Part II: Creation vs. Runtime
{% endembed %}

Reading Part II is sufficient. You can read other parts after you finish EVM Puzzles.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ret2basic.gitbook.io/ctfwriteup/web3-ctf/evm-puzzles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
