-
Notifications
You must be signed in to change notification settings - Fork 13
evmdasm
tintin edited this page Oct 11, 2018
·
1 revision
- Create an
EvmBytecode(<str_bytecode>)object from the contract bytecode. - disassemble it by calling
EvmBytecode().disassemble()to receive anEvmInstructions()object
- Take a list of
[evmdasm.Instruction, ...]or the disassembly fromEvmBytecode().disassemble() - manipulate the list
- insert new
evmdasm.Instructions
- insert new
- draw statistics
- get stack balance - positive value means more pushes than pops, negative value means more pops than pushes
- get required gas - to return the sum of gas for every instruction in the sequence. does not take account of branches and terminating instructions
- assemble the list of instractions to an
EvmBytecode()object- modify, transform or print the bytecode