I have a foundry project with files that have multiple solidity versions(0.7.x and 0.8.x). hardhat can relatively easily be configured to compile all files in the project as follows:
https://hardhat.org/hardhat-runner/docs/advanced/multiple-solidity-versions
Does foundry have built-in support for multiple solidity compiler versions? I came across a hacky way to do this which is non-ideal and I don't want to take this approach.
sol_version
in your configuration file, see heresol_version
that should not be configured in thefoundry.toml
, but thesolc
variable that should be omitted(sol_version
isn't even a valid config variable), also theauto_detect_solc
should be set to true or not set at all since it defaults to true. I'd be fine with giving you the bounty, if you provide a proper answer, but it's not mine to give :)