Skip to content

Conversation

@moliholy
Copy link
Collaborator

@moliholy moliholy commented Sep 2, 2025

Closes #502

This PR makes the pop up path/to/my/contract command interactive.

Since I was on it, I also removed some redundant code, which got encapsulated in utility functions.

Example

Screenshot 2025-09-03 at 01 27 54

@moliholy moliholy requested a review from AlexD10S September 2, 2025 23:33
@moliholy moliholy self-assigned this Sep 2, 2025
@moliholy moliholy changed the title feat: make pop up contract interactive Make pop up <contract> interactive Sep 2, 2025
Copy link
Collaborator

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really enjoyed reviewing this PR, super clean and easy to follow 👏. I only left a small note about a unit test, and GitHub triggers a clippy warning.

I tested the behaviour and the DevEx feels great, nice work! 🎉

One thought: a contract could technically have multiple constructors, but probably not worth addressing now. Since ink! v6 is moving toward Solidity compatibility with a single constructor, the current approach (using the default) seems like the best DevEx. And if needed, users can always specify a different constructor with the --constructor flag.

Copy link
Collaborator

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the test, LGTM!

@codecov
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 70.58824% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.02%. Comparing base (607512e) to head (7c56132).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
crates/pop-contracts/src/utils/metadata.rs 78.57% 0 Missing and 9 partials ⚠️
crates/pop-cli/src/commands/up/contract.rs 0.00% 8 Missing ⚠️
crates/pop-cli/src/common/contracts.rs 90.00% 0 Missing and 3 partials ⚠️
crates/pop-contracts/src/call.rs 0.00% 3 Missing ⚠️
crates/pop-contracts/src/up.rs 0.00% 2 Missing ⚠️
@@            Coverage Diff             @@
##             main     #606      +/-   ##
==========================================
- Coverage   79.36%   77.02%   -2.35%     
==========================================
  Files         106      108       +2     
  Lines       25979    24785    -1194     
  Branches    25979    24785    -1194     
==========================================
- Hits        20619    19090    -1529     
- Misses       3073     3694     +621     
+ Partials     2287     2001     -286     
Files with missing lines Coverage Δ
crates/pop-cli/src/commands/call/contract.rs 67.91% <ø> (-12.54%) ⬇️
crates/pop-contracts/src/up.rs 0.00% <0.00%> (-67.00%) ⬇️
crates/pop-cli/src/common/contracts.rs 80.64% <90.00%> (+1.92%) ⬆️
crates/pop-contracts/src/call.rs 0.00% <0.00%> (-73.89%) ⬇️
crates/pop-cli/src/commands/up/contract.rs 14.37% <0.00%> (-22.23%) ⬇️
crates/pop-contracts/src/utils/metadata.rs 90.28% <78.57%> (-1.27%) ⬇️

... and 25 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@moliholy moliholy merged commit 47c6279 into main Sep 3, 2025
22 of 24 checks passed
@moliholy moliholy deleted the pop-up-guide branch September 3, 2025 11:49
@AlexD10S AlexD10S changed the title Make pop up <contract> interactive feat: make pop up <contract> interactive Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: guide UI in pop up contract

3 participants