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
Add suggested remappings in readme #4440
Add suggested remappings in readme #4440
Conversation
Added directions to remappings while working with foundry in README.md.
|
Add `@openzeppelin/=lib/openzeppelin-contracts/` in `remappings.txt.` Co-authored-by: Francisco <fg@frang.io>
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2023 OpenZeppelin Contracts Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
Just a quick point for discussion: I introduced as part of my PR #4134, the file openzeppelin/=contracts/ In this PR you start sticking to the @openzeppelin/=lib/openzeppelin-contracts/ So my recommendation is to either change - openzeppelin/=contracts/
+ @openzeppelin/=contracts/ and adjust the remappings in the test files where used, or state in the - Add `@openzeppelin/=lib/openzeppelin-contracts/` in `remappings.txt.`
+ Add `openzeppelin/=lib/openzeppelin-contracts/` in `remappings.txt.` It's a consistency question. |
Hey @pcaversaccio Inside the package, I don't think What do you think? |
Actually, I never use utils/=lib/utils/
murky/=lib/murky/src/
solady/=lib/solady/src/
solmate/=lib/solmate/src/
prb/test/=lib/prb-test/src/
forge-std/=lib/forge-std/src/
erc4626-tests/=lib/erc4626-tests/
create-util/=lib/create-util/contracts/
openzeppelin/=lib/openzeppelin-contracts/contracts/
solidity-bytes-utils/=lib/solidity-bytes-utils/contracts/ Also, you might wanna consider |
Sure, I will use
After adding this above line in my remappings.txt without
to make our remappings to work, then we have to update import without
If we update our import statement we don't have to use |
Actually, if you use my remapping (including import {ERC721} from "openzeppelin/token/ERC721/ERC721.sol"; Submodules are not like scoped packages since you can't target tags (branches are possible though). Thus, I don't think |
Our documentation uses (Also note that OpenZeppelin builds things outside the Contracts library and simply |
Added directions to remappings while working with foundry in README.md.
Fixes #4439
Added below lines to give directions about remappings
Note: Only while working with Foundry
Head to foundry.toml and add below line