Skip to content

Commit 560f16d

Browse files
Include value into json output and use string instead of integer (#1460)
1 parent b899481 commit 560f16d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/Echidna/Output/JSON.hs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ data Transaction = Transaction
8383
{ contract :: Text
8484
, function :: Text
8585
, arguments :: Maybe [String]
86-
, gas :: Integer
87-
, gasprice :: Integer
86+
, gas :: String
87+
, gasprice :: String
88+
, value :: String
8889
}
8990

9091
instance ToJSON Transaction where
@@ -94,6 +95,7 @@ instance ToJSON Transaction where
9495
, "arguments" .= arguments
9596
, "gas" .= gas
9697
, "gasprice" .= gasprice
98+
, "value" .= value
9799
]
98100

99101
encodeCampaign :: Env -> [WorkerState] -> IO L.ByteString
@@ -138,8 +140,9 @@ mapTest dappInfo test =
138140
{ contract = "" -- TODO add when mapping is available https://github.com/crytic/echidna/issues/415
139141
, function = function
140142
, arguments = args
141-
, gas = toInteger tx.gas
142-
, gasprice = toInteger tx.gasprice
143+
, gas = show tx.gas
144+
, gasprice = show tx.gasprice
145+
, value = show tx.value
143146
}
144147

145148
mapCall = \case

0 commit comments

Comments
 (0)