⚒️Foundry Notes
What is Foundry good for?
Deploying contracts and interacting with those contracts
Running tests where everything is simulated
What's it bad at?
Listening for events on a live blockchain
Loops and timing scripts
Installation
Initialize New Project
Install Dependencies
The command
forge install
is used to install dependencies, such as libraries or other smart contracts that a project may need.
By default, when you install a dependency using
forge install
, Foundry will automatically create a new Git commit that includes the changes to your project (such as modifications to thefoundry.toml
file and the addition of the OpenZeppelin contract files in your project directory).The
--no-commit
flag modifies this behavior. When you use this flag, Foundry will still install the OpenZeppelin contracts, but it will not automatically create a new Git commit for these changes. This means you have to manually commit the changes to your Git repository if you wish to do so.The use of
--no-commit
gives you more control over your Git history and commit messages, which can be useful in certain workflows or for maintaining a clean project history.
Foundry Template Files
Upgrade Foundry
foundryup
updates foundry, but for some reason the command might not be available on the command line, so run the installation script again, then call it.
Last updated