Skip to content

Commit

Permalink
feat: add symbol name to the x/uibc QueryAllOutflowsResponse (#2374)
Browse files Browse the repository at this point in the history
* feat: add symbol name to the x/uibc QueryAllOutflowsResponse

* remove unnecessary Keeper reference

* update proto: not nullable outflows

* update query implementation

* fix proto

* re-generate mocks

* fix tests

* MapToSlice

* update tests

* changelog

* lint

* docs and rename

* changelog

* regenerate proto
  • Loading branch information
robert-zaremba authored Jan 2, 2024
1 parent 87c612f commit 32f57bd
Show file tree
Hide file tree
Showing 14 changed files with 1,650 additions and 132 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@ Ref: https://keepachangelog.com/en/1.0.0/

## Unreleased

### Improvements

- [2370](https://github.com/umee-network/umee/pull/2370) Add missing params to `uic/MsgGovUpdateQuota`.
- [2374](https://github.com/umee-network/umee/pull/2374) Add symbol name to the x/uibc QueryAllOutflowsResponse `outflows` entry.

### Features

- [2352](https://github.com/umee-network/umee/pull/2352) new `uibc/MissCounters` query
- [2352](https://github.com/umee-network/umee/pull/2352) new `uibc/Inflows` query.
- [2349](https://github.com/umee-network/umee/pull/2349) UIBC: adding ICS 20 memo handler.
- [2369](https://github.com/umee-network/umee/pull/2369) Add query `leverage/RegisteredTokenMarkets` to fetch Registered Tokens and their Market Summaries for frontend in fewer queries.

### Improvements

- [2370](https://github.com/umee-network/umee/pull/2370) Add missing params to `uic/MsgGovUpdateQuota`.

### Bug Fixes

- [2358](https://github.com/umee-network/umee/pull/2358) metoken endblocker should be before oracle.
Expand Down
14 changes: 6 additions & 8 deletions proto/umee/uibc/v1/query.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
syntax = "proto3";
package umee.uibc.v1;

import "google/api/annotations.proto";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";
import "umee/uibc/v1/quota.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "cosmos/base/v1beta1/coin.proto";
import "umee/uibc/v1/quota.proto";
import "umee/uibc/v1/uibc.proto";

option go_package = "github.com/umee-network/umee/v6/x/uibc";

Expand Down Expand Up @@ -102,8 +103,5 @@ message QueryAllOutflows {}

// QueryOutflowResponse defines response type of Query/Outflow
message QueryAllOutflowsResponse {
repeated cosmos.base.v1beta1.DecCoin outflows = 1 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
(gogoproto.nullable) = false
];
repeated DecCoinSymbol outflows = 1 [(gogoproto.nullable) = false];
}
12 changes: 12 additions & 0 deletions proto/umee/uibc/v1/uibc.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
syntax = "proto3";
package umee.uibc.v1;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";

Expand All @@ -14,3 +15,14 @@ message ICS20Memo {
// messages is a list of `sdk.Msg`s that will be executed when handling ICS20 transfer.
repeated google.protobuf.Any messages = 1;
}

// DecCoinSymbol extends the Cosmos SDK DecCoin type and adds symbol name.
message DecCoinSymbol {
string denom = 1;
string amount = 2
[(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false];
// token symbol name
string symbol = 3;
}
Loading

0 comments on commit 32f57bd

Please sign in to comment.