Quick Installation Guide
To fastest way to start using hevm is to install Foundry, e.g. via
curl -L https://foundry.paradigm.xyz | bash
Next, you need to have either Z3 or cvc5 installed. Often, these can be installed via:
$ sudo apt-get install z3
or similar. If you installed cvc5 instead, you will need to pass the flag "--solver cvc5" to "hevm test" later.
Finally, download the static hevm binary from the GitHub repository for your platform and put it in your path so it can be executed via typing "hevm".
How to Check if it Works
Once you have the above, and you have forge installed and a forge-based project
at hand, re-build it with --ast
and run the tests with hevm:
$ forge clean
$ forge build --ast
[⠒] Compiling...
[⠆] Compiling 34 files with 0.8.19
[⠔] Solc 0.8.19 finished in 2.12s
Compiler run successful.
$ hevm test
Checking 1 function(s) in contract src/contract-pass.sol:MyContract
[RUNNING] prove_pass(address,uint256)
[PASS] prove_pass(address,uint256)
See Forge std-test tutorial for details.
Note that Foundry provides the solidity compiler, hence there is no need to install solidity separately.