Skip to content

feat: all chains and all channels query#978

Open
joemonem wants to merge 4 commits intomainfrom
kernel-channel-chain-queries
Open

feat: all chains and all channels query#978
joemonem wants to merge 4 commits intomainfrom
kernel-channel-chain-queries

Conversation

@joemonem
Copy link
Copy Markdown
Contributor

@joemonem joemonem commented Sep 9, 2025

Motivation

Users couldn't query all chains nor all channels

Implementation

  • Added all chains and all channels queries

Testing

None

Version Changes

  • kernel: 1.2.5-b.3 -> 1.2.5-b.4

Checklist

  • Versions bumped correctly and documented
  • Changelog entry added or label applied

@joemonem joemonem requested a review from SlayerAnsh September 9, 2025 15:23
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 9, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kernel-channel-chain-queries

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the packages/std Includes changes to the Standard crate label Sep 9, 2025
Copy link
Copy Markdown
Contributor

@SlayerAnsh SlayerAnsh left a comment

Choose a reason for hiding this comment

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

Having 1 query that returns chain and associated channels (both ics20 and direct) would be better. In this approach client won't have sufficient info to map channels to chains

Comment thread contracts/os/andromeda-kernel/src/contract.rs Outdated
Comment thread contracts/os/andromeda-kernel/src/contract.rs Outdated
QueryMsg::ListAllChannels { start_after, limit } => encode_binary(
&query::list_all_channels(deps, start_after.as_deref(), limit)?,
),
QueryMsg::ListChainsWithChannels { start_after, limit } => encode_binary(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good, we need another query that takes chain are argument and returns its channel details (both ics20 and direct). If its not present then it will error with Chain Not Found

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is already covered by the ChannelInfo query, i'll adjust it to return an error if it's not found instead of a None value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages/std Includes changes to the Standard crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants