Last active
September 25, 2019 16:20
-
-
Save jacqueswww/a0f36ec0b10757198afa1e6154891a94 to your computer and use it in GitHub Desktop.
Pretty Damn awful, PyEVM Virtual Machine debugger. Using a custom opdcode set in Vyper ;)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def debug_opcode(computation): | |
print('YOUR ARE HERE!') | |
import ipdb; ipdb.set_trace() | |
import evm | |
from evm.vm.opcode import as_opcode | |
from vyper.opcodes import opcodes as vyper_opcodes | |
from evm.vm.forks.byzantium.computation import ByzantiumComputation | |
opcodes = ByzantiumComputation.opcodes.copy() | |
opcodes[vyper_opcodes['DEBUG'][0]] = as_opcode( | |
logic_fn=debug_opcode, | |
mnemonic="DEBUG", | |
gas_cost=0 | |
) | |
setattr(evm.vm.forks.byzantium.computation.ByzantiumComputation, 'opcodes', opcodes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for replies. I will check it out.