diff --git a/flake.nix b/flake.nix index df0d42800..d6862fa51 100644 --- a/flake.nix +++ b/flake.nix @@ -52,8 +52,8 @@ hevm = pkgs: pkgs.lib.pipe ((hsPkgs pkgs).callCabal2nix "hevm" (pkgs.fetchFromGitHub { owner = "ethereum"; repo = "hevm"; - rev = "release/0.54.2"; - sha256 = "sha256-h0e6QeMBIUkyANYdrGjrqZ2M4fnODOB0gNPQtsrAiL8="; + rev = "5f48aaa93e18cf8f42b46109c04a76234b746dc6"; + sha256 = "sha256-RNT6ySisP1mdR0NJ1Yyu12A4duzsFCfya+l4CNXHlgQ="; }) { secp256k1 = pkgs.secp256k1; }) ([ pkgs.haskell.lib.compose.dontCheck diff --git a/lib/Echidna/Events.hs b/lib/Echidna/Events.hs index 645112f9b..3b6807ea4 100644 --- a/lib/Echidna/Events.hs +++ b/lib/Echidna/Events.hs @@ -17,6 +17,7 @@ import Data.Vector (fromList) import EVM (traceForest) import EVM.ABI (Event(..), Indexed(..), decodeAbiValue, AbiType(..), AbiValue(..)) import EVM.Dapp (DappContext(..), DappInfo(..)) +import EVM.Expr (maybeLitWordSimp) import EVM.Format (showValues, showError, contractNamePart) import EVM.Solidity (SolcContract(..)) import EVM.Types @@ -37,7 +38,7 @@ extractEvents decodeErrors dappInfo vm = where showTrace trace = let ?context = DappContext { info = dappInfo, contracts = vm.env.contracts, labels = vm.labels } in - let codehash' = fromJust $ maybeLitWord trace.contract.codehash + let codehash' = fromJust $ maybeLitWordSimp trace.contract.codehash maybeContractName = maybeContractNameFromCodeHash dappInfo codehash' in case trace.tracedata of EventTrace addr bytes (topic:_) -> diff --git a/lib/Echidna/SourceMapping.hs b/lib/Echidna/SourceMapping.hs index e0c476d85..02c9f1253 100644 --- a/lib/Echidna/SourceMapping.hs +++ b/lib/Echidna/SourceMapping.hs @@ -11,8 +11,9 @@ import Data.Maybe (mapMaybe) import Data.Vector qualified as V import Echidna.Symbolic (forceWord) import EVM.Dapp (DappInfo(..), findSrc) +import EVM.Expr (maybeLitByteSimp) import EVM.Solidity (SolcContract(..)) -import EVM.Types (Contract(..), ContractCode(..), RuntimeCode(..), W256, maybeLitByte) +import EVM.Types (Contract(..), ContractCode(..), RuntimeCode(..), W256) -- | Map from contracts' codehashes to their compile-time codehash. -- This is relevant when the immutables solidity feature is used; @@ -80,7 +81,7 @@ findSrcByMetadata contr dapp = find compareMetadata (snd <$> Map.elems dapp.solc (UnknownCode _) -> Nothing (InitCode c _) -> Just c (RuntimeCode (ConcreteRuntimeCode c)) -> Just c - (RuntimeCode (SymbolicRuntimeCode c)) -> Just $ BS.pack $ mapMaybe maybeLitByte $ V.toList c + (RuntimeCode (SymbolicRuntimeCode c)) -> Just $ BS.pack $ mapMaybe maybeLitByteSimp $ V.toList c getBytecodeMetadata :: ByteString -> ByteString getBytecodeMetadata bs = diff --git a/lib/Echidna/SymExec.hs b/lib/Echidna/SymExec.hs index 3fd67f9c4..8ae6567d1 100644 --- a/lib/Echidna/SymExec.hs +++ b/lib/Echidna/SymExec.hs @@ -137,6 +137,7 @@ vmMakeSymbolic vm , currentFork = vm.currentFork , labels = vm.labels , osEnv = vm.osEnv + , freshVar = vm.freshVar } frameStateMakeSymbolic :: FrameState Concrete s -> FrameState Symbolic s diff --git a/stack.yaml b/stack.yaml index 3594dc184..52e5283da 100644 --- a/stack.yaml +++ b/stack.yaml @@ -5,7 +5,7 @@ packages: extra-deps: - git: https://github.com/ethereum/hevm.git - commit: 037ff11779d0089378f01cb103db1171dc642be2 + commit: 5f48aaa93e18cf8f42b46109c04a76234b746dc6 - smt2-parser-0.1.0.1@sha256:1e1a4565915ed851c13d1e6b8bb5185cf5d454da3b43170825d53e221f753d77,1421 - spawn-0.3@sha256:b91e01d8f2b076841410ae284b32046f91471943dc799c1af77d666c72101f02,1162