Add the Solidity version you want in foundry.toml:
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.
pragma solidity 0.8.17
In foundry.toml you can also toggle optimizer on and off:
There are a lot more configurations:
Last updated 2 years ago
optimizer = true optimizer_runs = 200