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

Convert string of human readable opcodes in string format to internal format #5

Open
fubuloubu opened this issue Mar 7, 2021 · 0 comments

Comments

@fubuloubu
Copy link
Member

Convert string of human readable opcodes in string format to internal format (and to bytecode)

example:

>>> asm = evm_asm.from_string("""
... PUSH1 0x4 CALLDATASIZE LT ISZERO PUSH2 0x0D JUMPI PUSH2 0x03A JUMP JUMPDEST PUSH1 0x0
... CALLDATALOAD PUSH1 0x1C MSTORE PUSH1 0x0 MLOAD CALLVALUE ISZERO PUSH2 0x021 JUMPI
... PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH4 0xC2985578 DUP2 EQ ISZERO PUSH2 0x038 JUMPI PUSH1
... 0x1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 RETURN JUMPDEST POP JUMPDEST PUSH1 0x0 PUSH1
... 0x0 REVERT""")
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

1 participant