You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That way, projects can use the import path `@openzeppelin/contracts` for openzeppelin v5. This is the default when using npm for installing the openzeppelin dependency.
27
+
28
+
**Note:**
29
+
foundry by default auto-detects mappings based on the contents of the lib directory and nested foundry configuration files.
30
+
Because of this, it may automatically add a mapping `openzeppelin/=lib/openzeppelin-contracts-v4/contracts/` .
31
+
In case you're using the import path `openzeppelin/...` in your project, that may not be what you want.
32
+
In this case you can either change the import path to something else, or you can disable mapping auto-detection with `auto_detect_remappings = false` (see [docs](https://book.getfoundry.sh/reference/config/solidity-compiler#auto_detect_remappings)). If you disable it, you may need to explicitly add some mappings, e.g. for forge-std.
33
+
34
+
In order to use this package in a **project with dependencies managed by npm packages**, you don't need to do anything.
35
+
Except: if you relied on the openzeppelin-contracts v4 dependency installed by this package, you now need to either also adjust the import path, or explicity add the dependency with the default path to your project.
0 commit comments