-
Notifications
You must be signed in to change notification settings - Fork 24
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: ensure the UX for new contracts is consistent with the parachains. #232
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #232 +/- ##
==========================================
+ Coverage 70.78% 70.84% +0.05%
==========================================
Files 47 47
Lines 7445 7443 -2
Branches 7445 7443 -2
==========================================
+ Hits 5270 5273 +3
+ Misses 1289 1284 -5
Partials 886 886
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run cargo run new contract
and select ERC20, for some reason it hangs on:
┌ Pop CLI : Generating "duck" using Erc20!
│
◓ Generating contract...
Hmmm It works for me. What is doing is cloning the ERC20 from https://github.com/use-ink/ink-examples/tree/main/erc20 |
Do we need to clone it? We have logic for downloading source code archives from GitHub, which is much faster, especially as we don't need the commit history for the created contract? Perhaps the sourcing module should be moved from parachains to common? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few improvements still required.
This is out of scope for this PR. |
Can you try this PR: #239 to see if you still experience this issue? |
Same issue for me. This is also happening on |
This is now working for me. I believe it was an internet issue. I will continue to monitor this in case it happens again and discover the source of the issue. |
As Frank suggested in a comment above, downloading source code archives from GitHub is much faster than cloning the repository. I have initiated this improvement in another PR: : #239 However, it will require more time for a proper refactor of sourcing logic. If you encounter the error again, please debug to gather more information to replicate it accurately. |
Note that this is missing the audit warning that we have in the parachains ux, which should be added as a separate PR. |
Ensure the UX for new contracts is consistent with the parachains. Remove the
--path
flag for contracts to match the behavior of parachains. Restructure the user guidance for generating a new contract to follow the same order as parachains: 1. template to use 2. name (path) of the project.