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

feat: Add baskets Query API #628

Merged
merged 17 commits into from
Nov 24, 2021
Merged

feat: Add baskets Query API #628

merged 17 commits into from
Nov 24, 2021

Conversation

amaury1093
Copy link
Contributor

@amaury1093 amaury1093 commented Nov 10, 2021

Description

Closes #648

The initial PR by aaron #610 only added Protobuf Msgs. This PR adds some Query endpoints.

Depends on:


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@codecov
Copy link

codecov bot commented Nov 10, 2021

Codecov Report

Merging #628 (b0a7dad) into master (78051dc) will increase coverage by 1.47%.
The diff coverage is n/a.

❗ Current head b0a7dad differs from pull request most recent head d35568e. Consider uploading reports for the commit d35568e to get more accurate results

@@            Coverage Diff             @@
##           master     #628      +/-   ##
==========================================
+ Coverage   72.11%   73.58%   +1.47%     
==========================================
  Files         107      105       -2     
  Lines       15212    14832     -380     
==========================================
- Hits        10970    10914      -56     
+ Misses       3481     3164     -317     
+ Partials      761      754       -7     
Flag Coverage Δ
experimental-codecov 73.58% <ø> (+1.34%) ⬆️
stable-codecov 65.33% <ø> (+1.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Member

@ryanchristo ryanchristo left a comment

Choose a reason for hiding this comment

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

Looks good so far.

proto/regen/ecocredit/v1alpha1/query.proto Outdated Show resolved Hide resolved
proto/regen/ecocredit/v1alpha1/query.proto Outdated Show resolved Hide resolved
proto/regen/ecocredit/v1alpha1/query.proto Outdated Show resolved Hide resolved
@blushi blushi mentioned this pull request Nov 15, 2021
4 tasks
@amaury1093
Copy link
Contributor Author

R4R!

Proto lint is failing because some fields are missing comments. I'll be out for 1 week, does someone want to take over and add some comments on proto files?

@amaury1093 amaury1093 marked this pull request as ready for review November 16, 2021 14:37
@blushi
Copy link
Member

blushi commented Nov 16, 2021

R4R!

Proto lint is failing because some fields are missing comments. I'll be out for 1 week, does someone want to take over and add some comments on proto files?

@AmauryM I can work on that!

@blushi blushi requested a review from ryanchristo November 18, 2021 12:09
Copy link
Member

@ryanchristo ryanchristo left a comment

Choose a reason for hiding this comment

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

Looks good to me. I think Basket should live within types.proto but pre-approving.

Comment on lines +421 to +422
// Basket defines a credit basket.
message Basket {
Copy link
Member

Choose a reason for hiding this comment

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

Should we move this to types.proto?

Copy link
Member

Choose a reason for hiding this comment

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

it's only being used for queries so I'd rather keep it in query.proto

Comment on lines +247 to +252
// multiplier is an integer number which is applied to credit units when
// converting to basket units. For example if the multiplier is 2000, then
// 1.1 credits will result in 2200 basket tokens. If there are any fractional
// amounts left over in this calculation when adding credits to a basket,
// those fractional amounts will not get added to the basket.
string multiplier = 2;
Copy link
Member

Choose a reason for hiding this comment

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

It looks like there are some conflicts that will occur here with #649. We are removing BasketCriteria and using Filter directly within MsgCreateBasket but I think this move was the right idea.

Copy link
Member

Choose a reason for hiding this comment

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

good to know, let's see which one gets merged first!

@ryanchristo
Copy link
Member

Closes #648 ?

@ryanchristo ryanchristo mentioned this pull request Nov 18, 2021
Copy link
Contributor

@likhita-809 likhita-809 left a comment

Choose a reason for hiding this comment

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

lgtm

@blushi blushi enabled auto-merge (squash) November 24, 2021 07:55
@blushi blushi merged commit 2fcfba3 into master Nov 24, 2021
@blushi blushi deleted the am/baskets-grpc branch November 24, 2021 07:57
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 proto lint
4 participants