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 query for the total supply of a coin #903

Merged
merged 2 commits into from
Sep 7, 2022
Merged

Add query for the total supply of a coin #903

merged 2 commits into from
Sep 7, 2022

Conversation

larry0x
Copy link
Contributor

@larry0x larry0x commented Jul 12, 2022

currently it is not possible to query the total supply of a native SDK coin. this is something that protocols often need to do, especially that now contract are able to mint native coins thanks to the tokenfactory module. this PR adds the binding for this query type.

see also:

NOTE: the CI tests fail because they depend on the PR for wasmvm being merged first

@larry0x larry0x requested a review from alpe as a code owner July 12, 2022 17:27
@larry0x larry0x changed the title Larry/bank total supply query Add query for the total supply of a coin Jul 12, 2022
@larry0x
Copy link
Contributor Author

larry0x commented Jul 12, 2022

the CI tests fail because they depend on the PR for wasmvm being merged first

@faddat
Copy link
Contributor

faddat commented Jul 23, 2022

I love this.

@alpe alpe added the blocked label Aug 24, 2022
@@ -189,6 +189,16 @@ func BankQuerier(bankKeeper types.BankViewKeeper) func(ctx sdk.Context, request
}
return json.Marshal(res)
}
if request.Supply != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks good. Some happy path test with the mock would be good for regression

@webmaster128 webmaster128 mentioned this pull request Sep 6, 2022
8 tasks
@ethanfrey ethanfrey added this to the v0.29.0 milestone Sep 6, 2022
@ethanfrey ethanfrey removed the blocked label Sep 6, 2022
@ethanfrey
Copy link
Member

This is now available with cosmwasm 1.1 and wasmvm 1.1.

Once those are merged, we can rebase and merge this one.

@alpe alpe merged commit b8c1d76 into CosmWasm:main Sep 7, 2022
@faddat faddat mentioned this pull request Oct 2, 2022
Magicloud pushed a commit to fpco/wasmd that referenced this pull request Jan 13, 2023
* add bank supply query

* remove a local dev dependency
conorpp pushed a commit to wormhole-foundation/wasmd that referenced this pull request Feb 1, 2023
* add bank supply query

* remove a local dev dependency
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.

4 participants