foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.25k stars 1.73k forks source link

Error in plugin hardhat-foundry: User-configured sources path (./contracts) doesn't match path configured in foundry (contracts) #4448

Open 0xKarl98 opened 1 year ago

0xKarl98 commented 1 year ago

Component

Other (please describe)

Have you ensured that all of these are up to date?

What version of Foundry are you on?

forge 0.2.0 (e4a2915 2022-06-19T02:24:29.337547Z)

What command(s) is the bug in?

No response

Operating System

macOS (Intel)

Describe the bug

I have checked the corresponding files according to this error , i.e. hardhat.config.ts & foundry.toml

here is hardhat.config.ts : '''paths: { sources: "./contracts", tests: "./test", artifacts: "./artifacts", cache: "./cache", }, '''

here is foundry.toml : ''' default = { libs = ["node_modules", "lib"] } [profile.default] src = './contracts' out = 'out' libs = ['node_modules', 'lib'] test = 'test/foundry' cache_path = './cache_forge' '''

i have ensured both of them are using './contracts ' , but the error still persists .

matYang commented 1 year ago

I was seeing this error as well with the VS Code Solidity (by Nomic) plugin, uninstalling, reloading, and then reinstalling the plugin worked for me.