# enter a development shell with all required dependencies
nix develop
# enter a repl
cabal repl
# build the project
cabal build
# run the tests
cabal test
# run the CI pipeline locally
nix build
This project uses nix flakes. If you haven't already you should add the following to
~/.config/nix/nix.conf
(user local) or /etc/nix/nix.conf
(system wide) to disable errors about
experimental-features:
experimental-features = nix-command flakes
Alternatively, the determinate nix installer installs nix with flakes enabled automatically.
The compiler is currented implemented as two binaries:
sol-core
: typechecks, specializes, and lowers to thecore
IRyule
: lowerscore
files toyul
# produces `output1.core`
$ cabal run -- sol-core -f <input>
# produces an output.yul
$ cabal run -- yule output1.core -o output.yul
The runsol.sh
script implements a small pipeline that executes a core solidity contract by
compiling via sol-core
-> yule
-> solc
, and then using hevm
to execute the resulting EVM
code.
It takes the following arguments:
Usage: ./runsol.sh <file.solc> [options]
Options:
--calldata <sig> [args...] Generate calldata using cast calldata
--raw-calldata <hex> Pass raw calldata directly to hevm
--callvalue <value> Pass callvalue to hevm (in wei)