Solidity Compiler
Guide to managing Solidity compiler versions with svm-rs.
Last updated
Was this helpful?
Guide to managing Solidity compiler versions with svm-rs.
Last updated
Was this helpful?
Alloy's is the easiest way to manage Solidity compiler versions on your machine. This is the version manager that uses, so if you already have Foundry installed, you can skip the installation steps.
Install Rust (if not already installed):
Install the crate:
List installed and available versions:
Install a version:
Set global version from installed versions:
Remove an installed version:
Knowing the exact compiler version is important for verifying deployed contracts on block explorers, like Etherscan.
To list the exact solc
commit, run the following in your terminal (replace x
and y
with your version numbers):
Alternatively, you can view the exact solc
commit used by your Foundry project by going to out/YourContract.sol/YourContract.json
and looking at metadata.compiler.version
, as shown below: