Skip to content

Instantly share code, notes, and snippets.

@PraneshASP
Created May 15, 2023 16:08
Show Gist options
  • Save PraneshASP/777b8604920fd39efca5324b8fe2a592 to your computer and use it in GitHub Desktop.
Save PraneshASP/777b8604920fd39efca5324b8fe2a592 to your computer and use it in GitHub Desktop.
Minimal Foundry project setup
#Credits: https://twitter.com/jtriley_eth/status/1653885929592090625
#make directories (can be anything)
mkdir src out lib
# specify the 'src', 'out', and 'lib directories under
# [profile.default]
vim foundry.toml
# add 'forge-std module to 'lib'
git submodule add https://github.com/foundry-rs/forge-std lib/forge-std
# create your contract
touch src/MyContract.sol
# then just add your `foundry.toml`, replacing the directory names
# ie if you want your contracts in `contracts/`, just replace `"src"` with `"contracts"`
[profile.default]
src = "src"
out = "out"
lib = ["lib"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment