✅Puzzle 2
CODESIZE, SUB
Puzzle
Solution
CALLVALUE
pushes msg.value onto the stack. CODESIZE
pushes the size of this opcode sequence (which is 10) onto the stack. SUB
pops two elements from the stack, subtracts them, and pushes the result back to the stack. At this moment the stack contains only one element 10-msg.value
. JUMP
will jump to 10-msg.value
.
The objective is to jump to address 0x06
, so we want 10-msg.value = 0x06
, therefore the correct input is 4.
Last updated