Skip to content

cmdlineutility

tintin edited this page Oct 11, 2018 · 3 revisions

Commandline Utility

usage

#> python3 -m evmdasm --help

Usage: __main__.py [options]

Options:
  -h, --help            show this help message and exit
  -v VERBOSITY, --verbosity=VERBOSITY
                        available loglevels:
                        critical,fatal,error,warning,warn,info,debug,notset
                        [default: critical]
  -l, --list            list instructions
  -d, --disassemble     disassemble input

disassemble

#> echo 60406040ff | python3 -m evmdasm --disassemble
#> python3 -m evmdasm --disassemble 0x60406040ff
PUSH1 40
PUSH1 40
SELFDESTRUCT

list available instructions

#> python3 -m evmdasm --list [<filter>]
0xop | instruction          category             gas
============================================================
0x0  | STOP                 terminate            0
0x1  | ADD                  arithmetic           3
0x2  | MUL                  arithmetic           5
0x3  | SUB                  arithmetic           3
...
0xf0 | CREATE               system               32000
0xf1 | CALL                 system               40
0xf2 | CALLCODE             system               40
0xf3 | RETURN               terminate            0
0xf4 | DELEGATECALL         system               40
0xf5 | CREATE2              system               32000
0xfa | STATICCALL           system               40
0xfd | REVERT               terminate            0
0xff | SELFDESTRUCT         terminate            0

Clone this wiki locally