From 43b27c0290bfaf15be6c251654dd912b6c411582 Mon Sep 17 00:00:00 2001 From: Konrad Weiss Date: Mon, 2 Jul 2018 15:32:06 +0200 Subject: [PATCH] Modification to mythril to also include abi information in the contract object --- mythril/ether/soliditycontract.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mythril/ether/soliditycontract.py b/mythril/ether/soliditycontract.py index 4ef2f4b6..14fa1057 100644 --- a/mythril/ether/soliditycontract.py +++ b/mythril/ether/soliditycontract.py @@ -51,6 +51,7 @@ class SolidityContract(ETHContract): if filename == input_file and name == _name: name = name code = contract['bin-runtime'] + abi = contract['abi'] creation_code = contract['bin'] srcmap = contract['srcmap-runtime'].split(";") has_contract = True @@ -65,6 +66,7 @@ class SolidityContract(ETHContract): if filename == input_file and len(contract['bin-runtime']): name = name code = contract['bin-runtime'] + abi = contract['abi'] creation_code = contract['bin'] srcmap = contract['srcmap-runtime'].split(";") has_contract = True @@ -89,6 +91,7 @@ class SolidityContract(ETHContract): lineno = self.solidity_files[idx].data[0:offset].count('\n') + 1 self.mappings.append(SourceMapping(idx, offset, length, lineno)) + self.abi = abi super().__init__(code, creation_code, name=name)