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 custom query with check state #15

Merged

Conversation

whylee259
Copy link
Contributor

@whylee259 whylee259 commented Jul 23, 2020

closes line/link#940

Description

Add an ability to query custom(Module Querier) with the check state.

  • adds a path prefix check-state
  • handles check-state like the custom query except obtaining MultiStore

Motivation and context

line/link#940

How has this been tested?

  • make test
  • cli
$ linkcli query account link1w8q77a5awmsvfvtajcu65nrrxrkjajgdjxhrvl --check_state=false                                                              1 ↵
{
  "type": "cosmos-sdk/Account",
  "value": {
    "address": "link1w8q77a5awmsvfvtajcu65nrrxrkjajgdjxhrvl",
    "coins": [
      {
        "denom": "link",
        "amount": "999"
      }
    ],
    "public_key": "linkpub1addwnpepqdf5t2mhz2jrvn3ggzqee4sqpl2hhfqhdadkguqjd3pwucp0zecjx02hzt5",
    "account_number": 3,
    "sequence": 2
  }
}

$ linkcli query account link1w8q77a5awmsvfvtajcu65nrrxrkjajgdjxhrvl --check_state=true 
{
  "type": "cosmos-sdk/Account",
  "value": {
    "address": "link1w8q77a5awmsvfvtajcu65nrrxrkjajgdjxhrvl",
    "coins": [
      {
        "denom": "link",
        "amount": "999"
      }
    ],
    "public_key": "linkpub1addwnpepqdf5t2mhz2jrvn3ggzqee4sqpl2hhfqhdadkguqjd3pwucp0zecjx02hzt5",
    "account_number": 3,
    "sequence": 3
  }
}

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@whylee259 whylee259 requested review from kfangw, hsyis, kukugi and wetcod July 23, 2020 09:45
@whylee259 whylee259 self-assigned this Jul 23, 2020
@whylee259 whylee259 added the WIP label Jul 23, 2020
@whylee259 whylee259 removed the WIP label Jul 27, 2020
@whylee259
Copy link
Contributor Author

PTL

Copy link
Contributor

@wetcod wetcod left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kfangw kfangw left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@whylee259 whylee259 merged commit e6cb294 into Finschia:develop Jul 28, 2020
kfangw pushed a commit that referenced this pull request Sep 24, 2020
kfangw pushed a commit that referenced this pull request Oct 28, 2020
kfangw pushed a commit that referenced this pull request Nov 17, 2020
wetcod pushed a commit that referenced this pull request Dec 8, 2020
@egonspace egonspace mentioned this pull request Mar 22, 2021
9 tasks
egonspace pushed a commit that referenced this pull request Mar 28, 2021
* Setting up a test network 

closes issue #12
BREAKING CHANGE: makeup Build/Dockerize Commands
closes issue #1
closes issue #15
closes issue #33
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