Skip to content

Add an new endpoint for querying contracts by code id and creator #2317

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

BigtoC
Copy link
Contributor

@BigtoC BigtoC commented Jul 7, 2025

No description provided.

Copy link

codecov bot commented Jul 7, 2025

Codecov Report

Attention: Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 45.23%. Comparing base (81fcfd7) to head (2ebe5e9).

Files with missing lines Patch % Lines
x/wasm/keeper/querier.go 92.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2317      +/-   ##
==========================================
+ Coverage   45.12%   45.23%   +0.10%     
==========================================
  Files          80       80              
  Lines       11097    11122      +25     
==========================================
+ Hits         5008     5031      +23     
- Misses       5649     5650       +1     
- Partials      440      441       +1     
Files with missing lines Coverage Δ
x/wasm/keeper/querier.go 78.63% <92.00%> (+1.07%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BigtoC
Copy link
Contributor Author

BigtoC commented Jul 7, 2025

Hello @chipshort! Could you help re-run the Protobuf Linting job? It's a rate limit error.

@chipshort
Copy link
Contributor

Hey @BigtoC, I'm not a maintainer here anymore. Pinging @pinosu to take a look.

@pinosu
Copy link
Contributor

pinosu commented Jul 7, 2025

hey @BigtoC , can you explain what is the use case for this query?
you have query contract by codeid and query contract by creator as 2 separate queries, what is the need for this endpoint?

@BigtoC
Copy link
Contributor Author

BigtoC commented Jul 7, 2025

hey @BigtoC , can you explain what is the use case for this query? you have query contract by codeid and query contract by creator as 2 separate queries, what is the need for this endpoint?

Hi @pinosu, I want to reduce call cost and time by making one RPC call to handle this logic, instead of making 2 separate calls to the RPC node.

@pinosu
Copy link
Contributor

pinosu commented Jul 7, 2025

Hi @pinosu, I want to reduce call cost and time by making one RPC call to handle this logic, instead of making 2 separate calls to the RPC node.

Hi, this seems like a niche use case. The query itself is free (no fees), and the time saved wouldn't be significant, especially considering that such queries are generally not meant to be run frequently.
Why do you run this query so often to consider it relevant?

@BigtoC
Copy link
Contributor Author

BigtoC commented Jul 7, 2025

Hi @pinosu, I want to reduce call cost and time by making one RPC call to handle this logic, instead of making 2 separate calls to the RPC node.

Hi, this seems like a niche use case. The query itself is free (no fees), and the time saved wouldn't be significant, especially considering that such queries are generally not meant to be run frequently. Why do you run this query so often to consider it relevant?

Hi, I'm working with my team on a web app, which serves as an admin portal to manage all deployed contracts of specific code IDs and creators. I think we can improve the network performance by adding this endpoint.
I understand this is a niche use case. I had another merged PR that solved a problem with a niche use case, but it did beneficial for a product I was working on, so I'm thinking that I can make this PR to help me and maybe others in the future.
Thank you for reviewing 🙏

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.

3 participants