-
Notifications
You must be signed in to change notification settings - Fork 27
feat: all chains and all channels query #978
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
6d7cbb7
5f4213c
5dc7da8
496a5b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,16 +166,28 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> Result<Binary, ContractErr | |
| QueryMsg::ChannelInfo { chain } => encode_binary(&query::channel_info(deps, chain)?), | ||
| QueryMsg::Recoveries { addr } => encode_binary(&query::recoveries(deps, addr)?), | ||
| QueryMsg::ChainName {} => encode_binary(&query::chain_name(deps)?), | ||
| // Base queries | ||
| QueryMsg::Version {} => encode_binary(&ADOContract::default().query_version(deps)?), | ||
| QueryMsg::AdoType {} => encode_binary(&ADOContract::default().query_type(deps)?), | ||
| QueryMsg::Owner {} => encode_binary(&ADOContract::default().query_contract_owner(deps)?), | ||
| QueryMsg::ChainNameByChannel { channel } => { | ||
| encode_binary(&query::chain_name_by_channel(deps, channel)?) | ||
| } | ||
| QueryMsg::ListAllChains { start_after, limit } => encode_binary(&query::list_all_chains( | ||
| deps, | ||
| start_after.as_deref(), | ||
| limit, | ||
| )?), | ||
| QueryMsg::ListAllChannels { start_after, limit } => encode_binary( | ||
|
joemonem marked this conversation as resolved.
Outdated
|
||
| &query::list_all_channels(deps, start_after.as_deref(), limit)?, | ||
| ), | ||
| QueryMsg::ListChainsWithChannels { start_after, limit } => encode_binary( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is already covered by the |
||
| &query::list_chains_with_channels(deps, start_after.as_deref(), limit)?, | ||
| ), | ||
| QueryMsg::PendingPackets { channel_id } => { | ||
| encode_binary(&query::pending_packets(deps, channel_id)?) | ||
| } | ||
| QueryMsg::GetEnv { variable } => encode_binary(&query::get_env(deps, variable)?), | ||
|
|
||
| // Base queries | ||
| QueryMsg::Version {} => encode_binary(&ADOContract::default().query_version(deps)?), | ||
| QueryMsg::AdoType {} => encode_binary(&ADOContract::default().query_type(deps)?), | ||
| QueryMsg::Owner {} => encode_binary(&ADOContract::default().query_contract_owner(deps)?), | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.