Squeeth contracts, ported to Forge.
Everything in test
is actually designed to be used with their Hardhat tests, so it is sort of accidental that any of it runs with forge test
.
Several things in v3-core do not have proper pragma, and so you need to make sure you compile with 0.7.6. You can do this by
- Install https://github.com/roynalnaruto/svm-rs
svm use 0.7.6
- ensure
which solc
shows something in.cargo/bin
or elseexport SOLC_PATH="/Users/<user name>/.cargo/bin/solc"
- run build and test commands with
--no-auto-detect
Need to have the right number of optimizer runs for correct compilation, so run build
and test
commands with --optimize --optimize-runs 825
.
Example build forge build --optimize --optimize-runs 825 --force --no-auto-detect
Example test forge test --optimize --optimize-runs 825 --force --no-auto-detect