From 5cb1c24acce3397b40b141176a1491c99480682a Mon Sep 17 00:00:00 2001 From: vdrg Date: Tue, 6 Mar 2018 15:39:43 -0300 Subject: [PATCH] Add contract name to json output for truffle projects --- mythril/support/truffle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mythril/support/truffle.py b/mythril/support/truffle.py index 2ebb8003..c20f873a 100644 --- a/mythril/support/truffle.py +++ b/mythril/support/truffle.py @@ -85,7 +85,7 @@ def analyze_truffle_project(args): if (args.outform == 'json'): - result = {'success': True, 'error': None, 'issues': list(map(lambda x: x.as_dict(), issues))} + result = { 'contract': name, 'result': {'success': True, 'error': None, 'issues': list(map(lambda x: x.as_dict(), issues))}} print(json.dumps(result)) else: