From d4a1e05ee0d3cece76056d685fb31cee74015518 Mon Sep 17 00:00:00 2001 From: Jacques Wagener Date: Wed, 22 Aug 2018 23:58:38 +0200 Subject: [PATCH] Add memload. --- setup.py | 2 +- vdb/vdb.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 956c9c0..df930a3 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ setup( install_requires=[ "py-evm==0.2.0a26", "eth-tester==0.1.0b28", - "eth-vyper==0.1.0b3" + "vyper>=0.1.0b2" ], setup_requires=['setuptools-markdown'], python_requires='>=3.6, <4', diff --git a/vdb/vdb.py b/vdb/vdb.py index 5677aea..8f9b7c1 100644 --- a/vdb/vdb.py +++ b/vdb/vdb.py @@ -119,6 +119,11 @@ class VyperDebugCmd(cmd.Cmd): _, local_vars = self._get_fn_name_locals() return cmds + [x for x in local_vars.keys() if x.startswith(line)] + def mload(self, line): + """ Read something from memory """ + pos = line.strip() + self.stdout.write(to_hex(to_hex(self.computation.memory_read(pos, 32)))) + def default(self, line): line = line.strip() fn_name, local_variables = self._get_fn_name_locals()