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 the api for querying next account number #1011

Merged

Conversation

zemyblue
Copy link
Member

@zemyblue zemyblue commented May 19, 2023

Description

closes: #1001

Add the query api that can query next account number.
This api is temporary api. So I added deprecated annotation.

And the GetNextAccountNumber function of bank keeper return the next global account number and increments the number, so I added another similar function as QueryNextAccountNumber.
QueryNextAccountNumber function is equals with some parts of GetNextAccountNumber function. But I just copy and paste this part, because this is temporary function.

I want to use the function name as NextAccountIndex, but the inside codes almost use NextAccountNumber. So I use NextAccountNumber. Please don't confuse this is not a query api for querying the number of accounts.

Added part

  • add NextAccountNumber query api in cosmos.bank.v1beta1.query proto
    • update swagger and related docs
  • GetNextAccountNumber function in bank keeper
  • grpc for NextAccountNumber and test.

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

❗ No coverage uploaded for pull request base (release/v0.47.x@e9fe906). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##             release/v0.47.x    #1011   +/-   ##
==================================================
  Coverage                   ?   62.01%           
==================================================
  Files                      ?      656           
  Lines                      ?    78918           
  Branches                   ?        0           
==================================================
  Hits                       ?    48939           
  Misses                     ?    27292           
  Partials                   ?     2687           

@zemyblue zemyblue requested a review from 0Tech May 19, 2023 06:18
Copy link
Collaborator

@0Tech 0Tech left a comment

Choose a reason for hiding this comment

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

LGTM

Sadly, this change will affect our plans to catch up with the upstream.

@zemyblue
Copy link
Member Author

LGTM

Sadly, this change will affect our plans to catch up with the upstream.

So, I added deprecated annotation. This means we will change it later.

@zemyblue zemyblue merged commit 94b5a52 into Finschia:release/v0.47.x May 22, 2023
@zemyblue zemyblue deleted the feat/temp_query_next_account_index branch May 22, 2023 01:00
zemyblue added a commit to zemyblue/finschia-sdk that referenced this pull request Jun 8, 2023
* feat: add `NextAccountNumber` query api in cosmos.auth.v1beta1.query proto

* feat: implement query account number in x/auth module

* chore: update changelog.

* fix: line error

* fix: proto function typo

(cherry picked from commit 94b5a52)
zemyblue added a commit that referenced this pull request Jun 8, 2023
…1026)

* feat: add the api for querying next account number (#1011)

* feat: add `NextAccountNumber` query api in cosmos.auth.v1beta1.query proto

* feat: implement query account number in x/auth module

* chore: update changelog.

* fix: line error

* fix: proto function typo

(cherry picked from commit 94b5a52)

* chore: update changelog

* Update CHANGELOG.md

Co-authored-by: Youngtaek Yoon <noreply@yoon.anonaddy.me>

---------

Co-authored-by: Youngtaek Yoon <noreply@yoon.anonaddy.me>
zemyblue added a commit to zemyblue/finschia-sdk that referenced this pull request Jul 4, 2023
* feat: add `NextAccountNumber` query api in cosmos.auth.v1beta1.query proto

* feat: implement query account number in x/auth module

* chore: update changelog.

* fix: line error

* fix: proto function typo

(cherry picked from commit 94b5a52)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants