Skip to content

Conversation

@moliholy
Copy link
Collaborator

@moliholy moliholy commented Oct 28, 2025

Closes #689.

This PR allows to properly query keys with composed types by transforming them into tuples.

You can test it out by running:

pop call chain --pallet Hrmp --function HrmpChannels --args "1000" "4566" --url wss://rpc.ibp.network/paseo

OR

pop call chain --pallet Hrmp --function HrmpChannels --args 1000 4566 --url wss://rpc.ibp.network/paseo

OR

pop call chain --pallet Hrmp --function HrmpChannels --args "(1000,4566)" --url wss://rpc.ibp.network/paseo

OR

pop call chain --pallet Hrmp --function HrmpChannels --url wss://rpc.ibp.network/paseo

And manually typing 1000 and 4566 as parameters.

Screenshot 2025-10-28 at 19 52 06

Since I was on it, I also:

  • Fixed the way storage data is printed out in the terminal.
  • Placed the logic to ask for a new call governed solely by the --skip-confirm flag, which is more specific.
  • Included --skip-confirm in display().

@moliholy moliholy requested a review from AlexD10S October 28, 2025 18:17
@moliholy moliholy self-assigned this Oct 28, 2025
@moliholy moliholy changed the title Fix/pop call with tuples fix: pop call with tuples Oct 28, 2025
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 48.57143% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.06%. Comparing base (1308301) to head (9108ff9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/pop-cli/src/commands/call/chain.rs 44.23% 19 Missing and 10 partials ⚠️
crates/pop-chains/src/call/metadata/mod.rs 61.11% 0 Missing and 7 partials ⚠️
@@            Coverage Diff             @@
##             main     #696      +/-   ##
==========================================
+ Coverage   76.89%   77.06%   +0.16%     
==========================================
  Files         109      109              
  Lines       24635    24667      +32     
  Branches    24635    24667      +32     
==========================================
+ Hits        18944    19010      +66     
+ Misses       3702     3654      -48     
- Partials     1989     2003      +14     
Files with missing lines Coverage Δ
crates/pop-chains/src/call/metadata/mod.rs 89.55% <61.11%> (+0.41%) ⬆️
crates/pop-cli/src/commands/call/chain.rs 67.19% <44.23%> (+4.56%) ⬆️

... and 1 file 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 force-pushed the fix/pop-call-with-tuples branch from 0b1578b to 8f662d8 Compare October 28, 2025 21:28
@moliholy
Copy link
Collaborator Author

moliholy commented Oct 28, 2025

@AlexD10S there's still an edge case: if the second parameter is not specified, it does not return anything. I believe this is expected, as the key is composite. Actually, polkadotjs does not return anything either. But of course this is subject to further discussion.

@moliholy moliholy force-pushed the fix/pop-call-with-tuples branch from 673393e to d2fa86f Compare October 29, 2025 00:46
@moliholy moliholy changed the title fix: pop call with tuples fix: pop call with composite types Oct 29, 2025
@moliholy moliholy force-pushed the fix/pop-call-with-tuples branch from 513c9e7 to 9108ff9 Compare October 29, 2025 01:01
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.

Amazing!! Thanks for fixing this

@moliholy moliholy merged commit 4c38fc3 into main Oct 29, 2025
19 checks passed
@moliholy moliholy deleted the fix/pop-call-with-tuples branch October 29, 2025 09:09
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.

fix: pop call error querying hrmp channels

3 participants