Closed DamirS09 closed 2 months ago
can you paste import content of C:/Users/user/Desktop/project/script\Project.s.sol
?
can you paste import content of
C:/Users/user/Desktop/project/script\Project.s.sol
?
import {IPoolManager} from "v4-core/interfaces/IPoolManager.sol";
import {Script} from "forge-std/Script.sol"; import {console2} from "forge-std/console2.sol";
import {SimpleProject} from "./../src/SimpleProject.sol"; import {Test} from "./../test/utils/Test.sol"; import {HelperConfig} from "./HelperConfig.sol";
you should have :
import {Script} from "@forge-std-latest/Script.sol";
import {console2} from "@forge-std-latest/console2.sol";
Because @forge-std-latest
in your remappings says that it should point to the dependency
you should have :
import {Script} from "@forge-std-latest/Script.sol"; import {console2} from "@forge-std-latest/console2.sol";
Because
@forge-std-latest
in your remappings says that it should point to the dependency
Thanks for the answer, I also ran into a problem in the dependencies folder that files in lib are not loaded. I have to go to cd/dependencies/v4-core-latest/ and call the forge build command, but there is still an error in the imports.
also, if I call theforge test
or forge build
command, an error appears:
"C:/Users/user/Desktop/project/dependencies/solmate-latest/src\src/auth/Owned.sol": The system cannot find the specified path. (os error 3); check configured remappings
--> C:/Users/user/Desktop/project/dependencies/v4-core-latest/src/ProtocolFees.sol
solmate/src/auth/Owned.sol
Hey, in version 0.3.0 which should be deployed soon, waiting for Foundry team to review, we will retrieve the dependency dependencies as well. https://github.com/foundry-rs/foundry/pull/8648 You can track it here to see when it will be installed, meanwhile you have to go and pull the dependencies manually inside the dependencies
This has been merged, 0.3.0 is live feel free to do foundryup
Problem Description When running forge test, the following error occurs with file resolution:
remappings.txt
foundry.toml
How to install: soldeer install forge-std~latest https://github.com/foundry-rs/forge-std.git
Additional Information Forge Version: forge 0.2.0 (1ddea96f 2024-05-20T10:22:21.490868500Z) Solidity Version: solc = "0.8.26" Operating System: Windows