From 24915ae23b3a618d4e76173d82024918764ee765 Mon Sep 17 00:00:00 2001 From: step21 Date: Fri, 20 Oct 2017 19:28:50 +0200 Subject: [PATCH] actually activating ipc tracing --- mythril/ether/util.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mythril/ether/util.py b/mythril/ether/util.py index 4cdc6cca..467f94c8 100644 --- a/mythril/ether/util.py +++ b/mythril/ether/util.py @@ -21,17 +21,18 @@ def bytecode_from_blockchain(creation_tx_hash, ipc, rpc_host='127.0.0.1', rpc_po creation_tx_hash = ID of transaction that created the contract. """ if ipc: - pass + eth = EthIpc() + else: eth = EthJsonRpc(rpc_host, rpc_port) - trace = eth.traceTransaction(creation_tx_hash) + trace = eth.traceTransaction(creation_tx_hash) - if trace['returnValue']: + if trace['returnValue']: - return trace['returnValue'] + return trace['returnValue'] - raise RuntimeError("Transaction trace didn't return any bytecode") + raise RuntimeError("Transaction trace didn't return any bytecode") def fire_lasers(disassembly):