EVM Puzzles 3 Walk-Through

EVM puzzle number three holds just 6 op codes for us to decipher. Starting with 36 CALLDATASIZE, then 56 JUMP, and our 5B JUMPDEST is 3 slots under at the 04 index.

Heading over to evm.code’s playground, let’s input our opcodes and do a test call with an arbitrary value to view how we step through the stack.

Knowing the first instruction is CALLDATASIZE, I ran our bytecode with “0x00” or 1 byte of call data.

Stack is 1 at JUMP with call data of 0x00

1 is at the top of the stack when we reach JUMP, but we need to jump down to our JUMPDEST at 4.

Let’s add 3 more bytes to the end of our call data.

Success with 4 bytes of calldata

It worked! “0x00000000” gives the CALLDATASIZE = 4 Bytes, JUMP to 4, JUMPDEST reached.

Head back to your terminal to submit your call data to puzzle 3.

Puzzle solved!

Congratulations, that was easy enough.
CALLDATASIZE = the number of bytes of call data, JUMP & JUMPDEST we learned in the last ones.

DAVE

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top