-
Notifications
You must be signed in to change notification settings - Fork 841
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
Remove dependency from @openzeppelin remapping #254
Comments
We have OpenZeppelin dependency on both the main repo and upgradable repo. Changes will need to be made not just in the code, but also possibly the workflow files. Let me ask the team for comments. @cygaar |
Some reasons I'm for keeping the dependency:
If we were to implement this:
You can make a PR, and we can consider from there. This does not look trivial -- there is a good chance we may end up keeping the dependency for simplicity. |
Thanks for checking it out. Seems non trivial, and you're right, it's unlikely to change so the 2nd issue I mentioned is not a real problem. I'll play with it and see if I can come up with something nice. Then we can discuss in the PR!
I see how this is true for hardhat, but In my case I use foundry which is becoming very popular very quickly, so my workflow is the following:
Here is an asciinema with the recording. I had those issues before so I know how to solve, but it's definitely frustrating. |
@alephao I see where you coming from. IMHO in-sourcing an audited and well-tested contract like OZ might add very additional overhead for maintainers, especially in the upgradable repo, keeping the dependencies is ok for now. We could update the docs and readme for foundry and brownie to how to install Might be related: |
I also use brownie. My brownie-config.yaml files already contains the remapping so that my projects are compatible with hardhat/truffle developers. Updating docs seems like the easiest solution IMO. Keeping OZ dependencies is a better "trust builder" as well. |
Currently, the contract imports
@openzeppelin
which is the default way to import openzeppelin when using a hardhat project.ERC721A/contracts/ERC721A.sol
Lines 6 to 12 in b738004
There are two main problems with that approach:
@openzeppelin/contracts
might beopenzeppelin-contracts
or just@openzeppelin
or any other thing. So they will have to change their remapping to follow this project's remapping which is not a great experience.openzeppelin
, which might result in a different outcome for the contractTo support any project and to provide a better developer experience when using ERC721A, I suggest either providing a flattened version of the contract or copying the source code of the 3rd party libraries used to this project
Happy to do it myself next week if this is desirable
The text was updated successfully, but these errors were encountered: