-
Notifications
You must be signed in to change notification settings - Fork 169
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 MarketSummary query #894
Conversation
Codecov Report
@@ Coverage Diff @@
## main #894 +/- ##
==========================================
- Coverage 51.08% 51.04% -0.05%
==========================================
Files 64 64
Lines 9425 9431 +6
==========================================
- Hits 4815 4814 -1
- Misses 4365 4372 +7
Partials 245 245
|
string oracle_price = 3 | ||
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = true]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note how nullable is true here - if oracle is down, this field will be null but the query will work.
string market_size = 7 | ||
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note market_size
(tokens) not market_size_usd
here. See discussion question in PR description
This is the assets USD price (double check with core dev)
Yes wont make any difference on the front end. |
It's correct - the 10^6 difference is between |
* feat: add MarketSummary query (cherry picked from commit 0ecf33c) # Conflicts: # x/leverage/types/query.pb.go # x/leverage/types/query.pb.gw.go
Description
Adds a query which groups a set of queries the frontend often executes together.
Needs discussion:
exchange_rate
requested in client #434 refer to asset's USD price (x/oracle
query) or its uToken exchange rate (x/leverage
query)? Currently returns both.5M ATOM
instead of usd market size (e.g.100M USD
)? Frontend would then multiple by oracle price.closes: #893
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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
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...
!
in the type prefix if API or client breaking change