Skip to content

Commit

Permalink
Explain different solc options (#429)
Browse files Browse the repository at this point in the history
* explain solc options

* Add reference in readme

* random linting issue
  • Loading branch information
hensha256 authored and zhongeric committed Dec 14, 2023
1 parent 3cf69de commit 0d327b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 8 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,21 @@ All contributions must follow the below standards. Maintainers will close out PR

## Setup

Run `source .env` to set FOUNDRY_SOLC to the correct solc binary.
For V4, an unreleased solc binary is used to add support for TLOAD and TSTORE. There are options for using this binary with forge:

`forge build` to get contract artifacts and dependencies for forge
### Using `just`

If after running `source .env`, you continue to get the error `Function "tload" not found.` try running
`just build` to get contract artifacts and dependencies for forge

On MacOS:
`forge build --use ./bin/solc-mac`
`just test` to run forge tests and update snapshots

On Linux:
`forge build --use ./bin/solc-static-linux`
### Using environment variables

## Tests
Run `source .env` to set `FOUNDRY_FUZZ_SEED` and `FOUNDRY_SOLC` environment variables. You can then use forge directly

`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 build` to get contract artifacts and dependencies for forge

`forge test` to run forge tests
`forge test` to run forge tests and update snapshots

## Code of Conduct

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The contracts in this repo are in early stages - we are releasing the draft code

## Contributing

If you’re interested in contributing please see our [contribution guidelines](./CONTRIBUTING.md)!
If you’re interested in contributing please see our [contribution guidelines](./CONTRIBUTING.md)! This includes instructions on how to compile using `TSTORE` and `TLOAD` opcodes in the `Setup` section.

## Whitepaper

Expand Down

0 comments on commit 0d327b8

Please sign in to comment.