Set Soliditiy Compiler Version

Add the Solidity version you want in foundry.toml:

solc_version = "0.8.17"

If any contract does not follow pragma solidity 0.8.17 then the solc compiler is going to throw error.

In foundry.toml you can also toggle optimizer on and off:

optimizer = true
optimizer_runs = 200

There are a lot more configurations:

Last updated