-
Notifications
You must be signed in to change notification settings - Fork 354
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
Refactor directory structure #335
Comments
With those examples, we'd still have to include the module name first before namespace, right? If so, I think this would be more accurate:
If we're following the examples, we could include ERC721Enumerable in the ERC721 lib. Importing would look something like this:
And in the actual library module:
I don't love this approach because I think it's easier to navigate/maintain the repo with the extension separated. The precedent this sets would be that extensions should be included in the same module :( but this is consistent with the proposed examples and solves |
I liked this proposal:
If we need to include
That is, |
I think we can do either.
We could also do: from openzeppelin.token.erc721.library import ERC721 and from openzeppelin.token.erc721.enumerable.library import ERC721Enumerable
Although this helps keep files together, it does not solve |
Following up on my last comment, even though that final proposal does not fully solve |
Taking into consideration that:
library.cairo
and some others are named as the module (e.g.ownable.cairo
)library.cairo
)from openzeppelin.upgrades.library import Proxy
ERC721_Enumerable
should probably live underERC721
ERC20_Mintable.cairo
toERC20Mintable.cairo
? it's weirdI suggest to put presets and libraries in different directories, thus allowing libraries to be named after their namespaces and not
library.cairo
. Maybe something like:openzeppelin.library.token import ERC20
andopenzeppelin.presets.token import ERC20Mintable
openzeppelin.token.library import ERC20
andopenzeppelin.token.presets import ERC20Mintable
Although that doesn't fully solve
4
The text was updated successfully, but these errors were encountered: