Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to work with latest foundry imports #11

Open
borislav-itskov opened this issue Aug 7, 2024 · 3 comments
Open

Doesn't seem to work with latest foundry imports #11

borislav-itskov opened this issue Aug 7, 2024 · 3 comments

Comments

@borislav-itskov
Copy link

First, I did: forge install [email protected]:colinnielsen/safe-tools.git.
After, I tried to import the tools by doing the following:

import {SafeTestTools} from "safe-tools/SafeTestTools.sol";

And it doesn't find the library. I guess it doesn't work with foundry's latest imports?

If i try to import it with ../lib/src/..., it finds the file, but in SafeTestTools.sol there are other import problems - import "safe-contracts/Safe.sol"; for example is not found

@colinnielsen
Copy link
Owner

First, I did: forge install [email protected]:colinnielsen/safe-tools.git. After, I tried to import the tools by doing the following:

import {SafeTestTools} from "safe-tools/SafeTestTools.sol";

And it doesn't find the library. I guess it doesn't work with foundry's latest imports?

If i try to import it with ../lib/src/..., it finds the file, but in SafeTestTools.sol there are other import problems - import "safe-contracts/Safe.sol"; for example is not found

Has Foundry changed their import setup?
My guess is that your remappings need to be configured in your foundry.toml

@colinnielsen
Copy link
Owner

First, I did: forge install [email protected]:colinnielsen/safe-tools.git. After, I tried to import the tools by doing the following:

import {SafeTestTools} from "safe-tools/SafeTestTools.sol";

And it doesn't find the library. I guess it doesn't work with foundry's latest imports?

If i try to import it with ../lib/src/..., it finds the file, but in SafeTestTools.sol there are other import problems - import "safe-contracts/Safe.sol"; for example is not found

LMK about this or I will close this issue

@jokrsec
Copy link

jokrsec commented Dec 2, 2024

I think there is some issue with remmapings. The safe-tools/remmapings.txt is not being used for some reason. I had to manually add the remmapings of safe-tools/remmapings.txt to the remmaping.txt in project folder where safe-tools is added as a lib like below

ds-test/=lib/forge-std/lib/ds-test/src/
forge-std/=lib/forge-std/src/
sigp/forge-proxy-deployers=lib/sigp/forge-proxy-deployers
@openzeppelin/=lib/openzeppelin-contracts/
safe-tools/=lib/safe-tools/src/
safe-contracts/=lib/safe-tools/lib/safe-contracts/contracts/
solady/=lib/safe-tools/lib/solady/src/

This worked for me but not sure what's the actual issue. Hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants