Skip to content

Commit

Permalink
Updated solc setup and instructions (Uniswap#406)
Browse files Browse the repository at this point in the history
* Added contribution instructions

* missing space

* Updated solc config
  • Loading branch information
hensha256 authored Nov 15, 2023
1 parent a65bdfb commit 78aa23b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FOUNDRY_FUZZ_SEED=0x4444

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
FOUNDRY_SOLC="./bin/solc-static-linux"
export FOUNDRY_SOLC="./bin/solc-static-linux"
elif [[ "$OSTYPE" == "darwin"* ]]; then
FOUNDRY_SOLC="./bin/solc-mac"
export FOUNDRY_SOLC="./bin/solc-mac"
fi
10 changes: 9 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,17 @@ Run `source .env` to set FOUNDRY_SOLC to the correct solc binary.

`forge build` to get contract artifacts and dependencies for forge

If after running `source .env`, you continue to get the error `Function "tload" not found.` try running

On MacOS:
`forge build --use ./bin/solc-mac`

On Linux:
`forge build --use ./bin/solc-static-linux`

## Tests

`forge snapshot`to update the forge gas snapshots. Note these must use a static fuzz seed, so please `source .env`, use `FOUNDRY_FUZZ_SEED=0x4444`, or use `just snapshots` when running forge snapshots.
`forge snapshot` to update the forge gas snapshots. Note these must use a static fuzz seed, so please run `source .env`, use `FOUNDRY_FUZZ_SEED=0x4444`, or use `just snapshots` when running forge snapshots.

`forge test` to run forge tests

Expand Down
1 change: 0 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[profile.default]
solc_version = '0.8.22'
optimizer_runs = 800
via_ir = false
ffi = true
Expand Down

0 comments on commit 78aa23b

Please sign in to comment.