From b43ecf7fcd79e44c719385d2f75e46908fd0a43b Mon Sep 17 00:00:00 2001 From: Gustavo Grieco <31542053+ggrieco-tob@users.noreply.github.com> Date: Wed, 7 Jun 2023 17:19:11 +0200 Subject: [PATCH] Add events into JSON output (#1069) --- lib/Echidna/Output/JSON.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Echidna/Output/JSON.hs b/lib/Echidna/Output/JSON.hs index 54e36a73c..db0cb13cc 100644 --- a/lib/Echidna/Output/JSON.hs +++ b/lib/Echidna/Output/JSON.hs @@ -16,6 +16,7 @@ import Numeric (showHex) import EVM.Types (keccak') import Echidna.ABI (ppAbiValue, GenDict(..)) +import Echidna.Events (Events) import Echidna.Types (Gas) import Echidna.Types.Campaign (WorkerState(..)) import Echidna.Types.Config (Env(..)) @@ -48,6 +49,7 @@ data Test = Test , name :: Text , status :: TestStatus , _error :: Maybe String + , events :: Events , testType :: TestType , transactions :: Maybe [Transaction] } @@ -58,6 +60,7 @@ instance ToJSON Test where , "name" .= name , "status" .= status , "error" .= _error + , "events" .= events , "type" .= testType , "transactions" .= transactions ] @@ -118,6 +121,7 @@ mapTest test = , name = "name" -- TODO add a proper name here , status = status , _error = err + , events = test.events , testType = Property , transactions = transactions }