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.
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.
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.
Congratulations, that was easy enough. CALLDATASIZE
= the number of bytes of call data, JUMP & JUMPDEST we learned in the last ones.
DAVE