Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion error when using bytecode button. #252

Open
byeonggoon opened this issue Jun 24, 2023 · 1 comment
Open

Conversion error when using bytecode button. #252

byeonggoon opened this issue Jun 24, 2023 · 1 comment

Comments

@byeonggoon
Copy link

스크린샷 2023-06-24 오후 2 02 54

I was solving problem 9 of the evm puzzle.
(The puzzle is on GitHub below.)
https://github.com/fvictorio/evm-puzzles

스크린샷 2023-06-24 오후 2 04 20

I did the same in the evmcodes playground but failed.
I looked into why, and found that there was an error when converting to bytecode.

스크린샷 2023-06-24 오후 2 10 17

hex 0x0e is equivalent to decimal 14.
Why do I get this error?

@jonahcui
Copy link
Contributor

hello, guys, I think you write run code, the correct code is bellow:

CALLDATASIZE
PUSH1 0x03
LT
PUSH1 0x09
JUMPI
REVERT
REVERT
JUMPDEST
CALLVALUE
CALLDATASIZE
MUL
PUSH1 0x08
EQ
PUSH1 0x14
JUMPI
REVERT
JUMPDEST
STOP

In the 14th line, the parameter of PUSH1 is not 14. it should be 0x14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants