Skip to content

Commit b425931

Browse files
authored
Update hevm to 0.48.0 (#691)
1 parent 16834a1 commit b425931

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed

default.nix

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ pkgs ? import (builtins.fetchTarball {
2-
name = "nixpkgs-unstable-2021-08-11";
3-
url = "https://github.com/nixos/nixpkgs/archive/0ac49d7c7b5625a2554f393ddfba72128c8f0f5d.tar.gz";
4-
sha256 = "sha256:03s2k619fvsxv28gk574pphhf4k3y8dxm8ir3d3vvp04i7n4z6wj";
2+
name = "nixpkgs-unstable-2021-10-15";
3+
url = "https://github.com/nixos/nixpkgs/archive/ee084c02040e864eeeb4cf4f8538d92f7c675671.tar.gz";
4+
sha256 = "sha256:1x8amcixdaw3ryyia32pb706vzhvn5whq9n8jin0qcha5qnm1fnh";
55
}) {}
66
}:
77

@@ -32,15 +32,13 @@ let
3232

3333
v = "1.7.2";
3434

35-
f = { mkDerivation, aeson, ansi-terminal, base, base16-bytestring
36-
, binary, brick, bytestring, cborg, containers, data-dword, data-has
37-
, deepseq, directory, exceptions, filepath, hashable, hevm, hpack
38-
, lens, lens-aeson, megaparsec, MonadRandom, mtl
39-
, optparse-applicative, process, random, stm, tasty
40-
, tasty-hunit, tasty-quickcheck, temporary, text, transformers
41-
, unix, unliftio, unliftio-core, unordered-containers, vector
42-
, vector-instances, vty, wl-pprint-annotated, word8, yaml
43-
, cabal-install, extra, ListLike, hlint, semver, haskell-language-server
35+
f = { mkDerivation, aeson, ansi-terminal, base, base16-bytestring, binary
36+
, brick, bytestring, cborg, containers, data-dword, data-has, deepseq
37+
, directory, exceptions, filepath, hashable, hevm, hpack, lens, lens-aeson
38+
, megaparsec, MonadRandom, mtl, optparse-applicative, process, random
39+
, semver, stm, tasty, tasty-hunit, tasty-quickcheck, temporary, text
40+
, transformers, unix, unliftio, unliftio-core, unordered-containers, vector
41+
, vector-instances, vty, wl-pprint-annotated, word8, yaml, extra, ListLike
4442
}:
4543
mkDerivation rec {
4644
pname = "echidna";
@@ -50,21 +48,17 @@ let
5048
isExecutable = true;
5149
libraryHaskellDepends = [
5250
aeson ansi-terminal base base16-bytestring binary brick bytestring
53-
cborg containers data-dword data-has deepseq directory exceptions filepath
54-
hashable hevm lens lens-aeson megaparsec MonadRandom mtl
51+
cborg containers data-dword data-has deepseq directory exceptions
52+
filepath hashable hevm lens lens-aeson megaparsec MonadRandom mtl
5553
optparse-applicative process random stm temporary text transformers
5654
unix unliftio unliftio-core unordered-containers vector
5755
vector-instances vty wl-pprint-annotated word8 yaml extra ListLike
5856
semver
5957
] ++ (if pkgs.lib.inNixShell then testHaskellDepends else []);
60-
libraryToolDepends = [
61-
hpack cabal-install hlint slither-analyzer solc
62-
haskell-language-server
63-
];
6458
executableHaskellDepends = libraryHaskellDepends;
65-
testHaskellDepends = [
66-
tasty tasty-hunit tasty-quickcheck
67-
];
59+
testHaskellDepends = [ tasty tasty-hunit tasty-quickcheck ];
60+
libraryToolDepends = [ hpack ];
61+
testToolDepends = [ slither-analyzer solc ];
6862
preConfigure = ''
6963
hpack
7064
# re-enable dynamic build for Linux
@@ -76,8 +70,16 @@ let
7670
doCheck = true;
7771
};
7872

79-
drv = pkgs.haskellPackages.callPackage f { };
73+
echidna = pkgs.haskellPackages.callPackage f { };
74+
echidnaShell = pkgs.haskellPackages.shellFor {
75+
packages = p: [ echidna ];
76+
buildInputs = with pkgs.haskellPackages; [
77+
hlint
78+
cabal-install
79+
haskell-language-server
80+
];
81+
};
8082
in
8183
if pkgs.lib.inNixShell
82-
then drv.env
83-
else pkgs.haskell.lib.justStaticExecutables drv
84+
then echidnaShell
85+
else pkgs.haskell.lib.justStaticExecutables echidna

lib/Echidna/Types/Tx.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ data TxResult = Success
9999
| ErrorStackUnderrun
100100
| ErrorBadJumpDestination
101101
| ErrorRevert
102-
| ErrorNoSuchContract
103102
| ErrorOutOfGas
104103
| ErrorBadCheatCode
105104
| ErrorStackLimitExceeded
106105
| ErrorIllegalOverflow
107106
| ErrorQuery
108107
| ErrorStateChangeWhileStatic
108+
| ErrorInvalidFormat
109109
| ErrorInvalidMemoryAccess
110110
| ErrorCallDepthLimitReached
111111
| ErrorMaxCodeSizeExceeded
@@ -142,13 +142,13 @@ getResult (VMFailure SelfDestruction ) = ErrorSelfDestruction
142142
getResult (VMFailure StackUnderrun ) = ErrorStackUnderrun
143143
getResult (VMFailure BadJumpDestination ) = ErrorBadJumpDestination
144144
getResult (VMFailure (Revert _)) = ErrorRevert
145-
getResult (VMFailure (NoSuchContract _)) = ErrorNoSuchContract
146145
getResult (VMFailure (OutOfGas _ _)) = ErrorOutOfGas
147146
getResult (VMFailure (BadCheatCode _)) = ErrorBadCheatCode
148147
getResult (VMFailure StackLimitExceeded) = ErrorStackLimitExceeded
149148
getResult (VMFailure IllegalOverflow) = ErrorIllegalOverflow
150149
getResult (VMFailure (Query _)) = ErrorQuery
151150
getResult (VMFailure StateChangeWhileStatic) = ErrorStateChangeWhileStatic
151+
getResult (VMFailure InvalidFormat) = ErrorInvalidFormat
152152
getResult (VMFailure InvalidMemoryAccess) = ErrorInvalidMemoryAccess
153153
getResult (VMFailure CallDepthLimitReached) = ErrorCallDepthLimitReached
154154
getResult (VMFailure (MaxCodeSizeExceeded _ _)) = ErrorMaxCodeSizeExceeded

stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ packages:
55

66
extra-deps:
77
- git: https://github.com/dapphub/dapptools.git
8-
commit: 4fe19a0ff493f09de58c13c54cb69d962dd10b82
8+
commit: a2b96cc2dbc28508c9fe699d6438bf6eccafc2ad
99
subdirs:
1010
- src/hevm
1111

0 commit comments

Comments
 (0)