-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix: improve contract experience #330
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #330 +/- ##
==========================================
- Coverage 70.33% 70.27% -0.06%
==========================================
Files 53 54 +1
Lines 9098 9152 +54
Branches 9098 9152 +54
==========================================
+ Hits 6399 6432 +33
- Misses 1718 1736 +18
- Partials 981 984 +3
|
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.
Looks good, various minor improvements and clippy warnings to address and then I'm good to approve.
Really happy with this PR. One thing to note, if I re-deploy the same contract, the code hash is not shown:
Code hash is shown for the above command is shown. But then if I re-deploy:
Code hash not shown:
I guess this is expected as you mentioned here:
For some reason the logs are empty. Is this the correct log path? |
Exactly. If the contract has already been uploaded, retrieving the code_hash is a bit more complex. I left it out for now, but we can handle it later by parsing events or querying on-chain. As for the logs, they are working. |
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.
I see the feedback has been included.
I don't have much more to point out rather than a small nit. But definitely not blocking the merge.
The emojis are not colored like the rest of the prompt is :P
Aside from that, I would assume that a user who can instantiate some code, has access to the code and could obtain the hash easily. Though, I agree that being consistent and showing it every time would be the best experience.
I think more verbosity would nice. |
Agree. Makes sense to have |
closes #319 |
code_hash
upon deployment #290. Thecode_hash
is now displayed when runningpop up contract
for both upload only (-u
) and upload + instantiate scenarios.For instantiating an already uploaded contract,
code_hash
is currently not displayed, as retrieving it would require parsing events or querying the value on-chain.It adds
-lerror,runtime::contracts=debug
when runningsubstrate-contracts-node
to allow debugging messages (the contract has to be build without --release flag).