Skip to content
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

Add Build Address gRPC Query #1753

Merged
merged 11 commits into from
Jan 9, 2024

Conversation

NotJeremyLiu
Copy link
Contributor

@NotJeremyLiu NotJeremyLiu commented Dec 10, 2023

Closes #1705

@NotJeremyLiu NotJeremyLiu marked this pull request as ready for review December 10, 2023 04:51
@NotJeremyLiu NotJeremyLiu changed the title [WIP] Add Build Address gRPC Query Add Build Address gRPC Query Dec 10, 2023
@NotJeremyLiu
Copy link
Contributor Author

NotJeremyLiu commented Dec 10, 2023

Not exactly sure why test-system CI is failing, running make test-system locally passes

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (19d1826) 54.89% compared to head (44b7abd) 54.99%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1753      +/-   ##
==========================================
+ Coverage   54.89%   54.99%   +0.09%     
==========================================
  Files          64       64              
  Lines        9640     9663      +23     
==========================================
+ Hits         5292     5314      +22     
  Misses       3822     3822              
- Partials      526      527       +1     
Files Coverage Δ
x/wasm/keeper/querier.go 78.57% <100.00%> (+2.00%) ⬆️
x/wasm/client/cli/query.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@NotJeremyLiu
Copy link
Contributor Author

@alpe this is ready for review whenever you get the chance

@pinosu
Copy link
Contributor

pinosu commented Dec 12, 2023

@NotJeremyLiu fyi #1748 .
I will review it asap 👍

Copy link
Contributor

@pinosu pinosu 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 taking this task! 💐
There are some changes needed to improve code quality and also it would be great if you could add more test cases such as wrong args, missing args etc..
Overall really nice work! 💯


func TestQueryBuildAddress(t *testing.T) {
specs := map[string]struct {
srcQuery *types.QueryBuildAddressRequest
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
srcQuery *types.QueryBuildAddressRequest
src *types.QueryBuildAddressRequest

personal preference, just to keep consistent with all the others

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done here: e405904

x/wasm/keeper/querier_test.go Outdated Show resolved Hide resolved
Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>
@NotJeremyLiu
Copy link
Contributor Author

Thanks for taking this task! 💐 There are some changes needed to improve code quality and also it would be great if you could add more test cases such as wrong args, missing args etc.. Overall really nice work! 💯

Thank you for reviewing, will address feedback later tonight!

@pinosu
Copy link
Contributor

pinosu commented Dec 19, 2023

@NotJeremyLiu thanks for making the changes. Now code looks good. 💯
Could you modify the GetCmdBuildAddress() function to use the querier instead of calling directly the keeper?

@NotJeremyLiu
Copy link
Contributor Author

@NotJeremyLiu thanks for making the changes. Now code looks good. 💯 Could you modify the GetCmdBuildAddress() function to use the querier instead of calling directly the keeper?

@pinosu Yes I can do that, sorry have been busy with work, will ping you directly once done and ready for re-review!

@NotJeremyLiu
Copy link
Contributor Author

@NotJeremyLiu thanks for making the changes. Now code looks good. 💯 Could you modify the GetCmdBuildAddress() function to use the querier instead of calling directly the keeper?

Done here: b17c9fb

@NotJeremyLiu NotJeremyLiu requested a review from pinosu December 27, 2023 06:49
@NotJeremyLiu
Copy link
Contributor Author

NotJeremyLiu commented Dec 27, 2023

all feedback addressed and more unit tests added, ready for re-review @pinosu

Copy link
Contributor

@pinosu pinosu left a comment

Choose a reason for hiding this comment

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

Nice work! 💯 LGTM 👍

@pinosu pinosu merged commit 651abcf into CosmWasm:main Jan 9, 2024
16 checks passed
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.

Add gRPC querier for Build Address Query
2 participants