From ee55387f0231b000614ee89a8044b739889da97d Mon Sep 17 00:00:00 2001 From: Sai Kumar Date: Mon, 18 Oct 2021 12:42:19 +0530 Subject: [PATCH 1/3] fix: fix the query account balance by ibc denom --- docs/core/proto-docs.md | 4 +- proto/cosmos/bank/v1beta1/query.proto | 2 +- x/authz/query.pb.go | 2 +- x/bank/types/query.pb.go | 122 +++++++++++++------------- x/bank/types/query.pb.gw.go | 2 +- 5 files changed, 66 insertions(+), 66 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index aaaaf20f1655..bb3bcc1bc76c 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -1279,7 +1279,7 @@ GrantAuthorization defines the GenesisState/GrantAuthorization type. ### QueryGranterGrantsRequest -QueryGranterGrantsRequest is the request type for the Query/Grants RPC method. +QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. | Field | Type | Label | Description | @@ -2269,7 +2269,7 @@ Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Balance` | [QueryBalanceRequest](#cosmos.bank.v1beta1.QueryBalanceRequest) | [QueryBalanceResponse](#cosmos.bank.v1beta1.QueryBalanceResponse) | Balance queries the balance of a single coin for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}/{denom}| +| `Balance` | [QueryBalanceRequest](#cosmos.bank.v1beta1.QueryBalanceRequest) | [QueryBalanceResponse](#cosmos.bank.v1beta1.QueryBalanceResponse) | Balance queries the balance of a single coin for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}/{denom=**}| | `AllBalances` | [QueryAllBalancesRequest](#cosmos.bank.v1beta1.QueryAllBalancesRequest) | [QueryAllBalancesResponse](#cosmos.bank.v1beta1.QueryAllBalancesResponse) | AllBalances queries the balance of all coins for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}| | `TotalSupply` | [QueryTotalSupplyRequest](#cosmos.bank.v1beta1.QueryTotalSupplyRequest) | [QueryTotalSupplyResponse](#cosmos.bank.v1beta1.QueryTotalSupplyResponse) | TotalSupply queries the total supply of all coins. | GET|/cosmos/bank/v1beta1/supply| | `SupplyOf` | [QuerySupplyOfRequest](#cosmos.bank.v1beta1.QuerySupplyOfRequest) | [QuerySupplyOfResponse](#cosmos.bank.v1beta1.QuerySupplyOfResponse) | SupplyOf queries the supply of a single coin. | GET|/cosmos/bank/v1beta1/supply/{denom}| diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto index f42c93a758ef..668c83b1e60d 100644 --- a/proto/cosmos/bank/v1beta1/query.proto +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -14,7 +14,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; service Query { // Balance queries the balance of a single coin for a single account. rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/{denom}"; + option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/{denom=**}"; } // AllBalances queries the balance of all coins for a single account. diff --git a/x/authz/query.pb.go b/x/authz/query.pb.go index 681c9f40092c..92e7b4f8a3ba 100644 --- a/x/authz/query.pb.go +++ b/x/authz/query.pb.go @@ -156,7 +156,7 @@ func (m *QueryGrantsResponse) GetPagination() *query.PageResponse { return nil } -// QueryGranterGrantsRequest is the request type for the Query/Grants RPC method. +// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. type QueryGranterGrantsRequest struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // pagination defines an pagination for the request. diff --git a/x/bank/types/query.pb.go b/x/bank/types/query.pb.go index 36018d4df0fd..070aa4203b1a 100644 --- a/x/bank/types/query.pb.go +++ b/x/bank/types/query.pb.go @@ -873,67 +873,67 @@ func init() { func init() { proto.RegisterFile("cosmos/bank/v1beta1/query.proto", fileDescriptor_9c6fc1939682df13) } var fileDescriptor_9c6fc1939682df13 = []byte{ - // 949 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x04, 0xea, 0x24, 0xcf, 0xc0, 0x61, 0x6a, 0x44, 0xb2, 0xa1, 0x36, 0xda, 0x42, 0x93, - 0xb4, 0xc9, 0x6e, 0xed, 0x22, 0x55, 0xe5, 0x82, 0xe2, 0x22, 0x38, 0x20, 0x54, 0xb3, 0xe5, 0x84, - 0x84, 0xa2, 0xb1, 0xbd, 0x2c, 0xab, 0xd8, 0x3b, 0x5b, 0xcf, 0x9a, 0x12, 0x45, 0x95, 0x10, 0x27, - 0x4e, 0x80, 0xc4, 0x81, 0x03, 0x42, 0x94, 0x0b, 0x08, 0xce, 0xfc, 0x11, 0x39, 0x70, 0xa8, 0xca, - 0x85, 0x13, 0xa0, 0x84, 0x03, 0x7f, 0x06, 0xf2, 0xcc, 0x9b, 0xf5, 0xae, 0xbd, 0x5e, 0xaf, 0xc0, - 0x9c, 0xbc, 0x3b, 0xf3, 0x7e, 0x7c, 0xdf, 0x37, 0xf3, 0xde, 0x5b, 0x43, 0xbd, 0xcb, 0xc5, 0x80, - 0x0b, 0xbb, 0xc3, 0x82, 0x23, 0xfb, 0xc3, 0x46, 0xc7, 0x8d, 0x58, 0xc3, 0xbe, 0x37, 0x72, 0x87, - 0xc7, 0x56, 0x38, 0xe4, 0x11, 0xa7, 0x17, 0x95, 0x81, 0x35, 0x36, 0xb0, 0xd0, 0xc0, 0xb8, 0x1a, - 0x7b, 0x09, 0x57, 0x59, 0xc7, 0xbe, 0x21, 0xf3, 0xfc, 0x80, 0x45, 0x3e, 0x0f, 0x54, 0x00, 0xa3, - 0xea, 0x71, 0x8f, 0xcb, 0x47, 0x7b, 0xfc, 0x84, 0xab, 0xcf, 0x7b, 0x9c, 0x7b, 0x7d, 0xd7, 0x66, - 0xa1, 0x6f, 0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8, 0x17, 0xe7, 0xb5, 0xd2, 0xa3, - 0xf3, 0x5a, 0xe9, 0xb7, 0xf3, 0x5a, 0xe9, 0xdd, 0xdd, 0xdc, 0xaf, 0xb2, 0x8f, 0x54, 0x6c, 0xf9, - 0x71, 0xd6, 0x29, 0xcb, 0x7f, 0x2b, 0x37, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x11, 0x1b, 0xa0, - 0xde, 0xa0, 0x0d, 0x00, 0x00, + // 954 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xce, 0x14, 0x36, 0x6d, 0x5f, 0x80, 0xc3, 0x6c, 0x10, 0xad, 0xcb, 0x26, 0xc8, 0x0b, 0xdb, + 0x1f, 0xdb, 0xda, 0xdb, 0xec, 0x4a, 0x68, 0x57, 0x42, 0xa8, 0x59, 0x04, 0x07, 0x84, 0xb6, 0x78, + 0x39, 0x21, 0xa1, 0x6a, 0x92, 0x18, 0x63, 0x35, 0xf1, 0x78, 0x33, 0x0e, 0x4b, 0x55, 0x55, 0x42, + 0x9c, 0x38, 0x01, 0x12, 0x37, 0x10, 0x62, 0xb9, 0x80, 0xe0, 0xcc, 0x1f, 0xd1, 0x03, 0x87, 0x0a, + 0x84, 0xc4, 0x09, 0x50, 0xcb, 0x81, 0x3f, 0x03, 0x65, 0xe6, 0x8d, 0x63, 0x27, 0x8e, 0x63, 0x41, + 0x38, 0xc5, 0x9e, 0x79, 0x3f, 0xbe, 0xef, 0x9b, 0x79, 0xef, 0x39, 0x50, 0x6f, 0x73, 0xd1, 0xe3, + 0xc2, 0x6e, 0xb1, 0xe0, 0xd0, 0x7e, 0x7f, 0xb7, 0xe5, 0x46, 0x6c, 0xd7, 0x7e, 0x30, 0x70, 0xfb, + 0x47, 0x56, 0xd8, 0xe7, 0x11, 0xa7, 0x97, 0x95, 0x81, 0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a, 0x7d, 0xbe, 0x08, 0x56, 0xfa, 0x15, 0x81, 0x4a, 0xa2, 0xb9, 0xe5, 0x5d, 0xf9, 0xc9, + 0xd6, 0x9f, 0x77, 0xe5, 0x33, 0x3a, 0xa6, 0xb9, 0x2b, 0xa1, 0x5d, 0xa7, 0x9b, 0xd3, 0xa1, 0x61, + 0x33, 0xd5, 0x1a, 0x36, 0xef, 0x9e, 0x9e, 0xd7, 0xc8, 0xd9, 0x79, 0x8d, 0xfc, 0x79, 0x5e, 0x23, + 0x9f, 0x5d, 0xd4, 0x4a, 0x67, 0x17, 0xb5, 0xd2, 0x6f, 0x17, 0xb5, 0xd2, 0xdb, 0x9b, 0xb9, 0x1f, + 0x66, 0x1f, 0xa8, 0xd8, 0xf2, 0xfb, 0xac, 0x55, 0x96, 0x7f, 0x58, 0x6e, 0xfe, 0x13, 0x00, 0x00, + 0xff, 0xff, 0xe9, 0x4b, 0xea, 0xd4, 0xa3, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bank/types/query.pb.gw.go b/x/bank/types/query.pb.gw.go index 60ebdb975662..d8a9d7c6fe68 100644 --- a/x/bank/types/query.pb.gw.go +++ b/x/bank/types/query.pb.gw.go @@ -820,7 +820,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"cosmos", "bank", "v1beta1", "balances", "address", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 3, 0, 4, 1, 5, 5}, []string{"cosmos", "bank", "v1beta1", "balances", "address", "denom"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AllBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "bank", "v1beta1", "balances", "address"}, "", runtime.AssumeColonVerbOpt(false))) From 6b527558d15097d71f0ecd7e12eabdcecd984b21 Mon Sep 17 00:00:00 2001 From: Sai Kumar Date: Fri, 22 Oct 2021 16:27:28 +0530 Subject: [PATCH 2/3] refactor: change the account balance by denom grpc-gateway to support the ibc-denom --- docs/core/proto-docs.md | 2 +- proto/cosmos/bank/v1beta1/query.proto | 12 +-- x/bank/client/testutil/grpc.go | 4 +- x/bank/types/query.pb.go | 118 +++++++++++++------------- x/bank/types/query.pb.gw.go | 30 +++---- 5 files changed, 81 insertions(+), 85 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 35803c98b222..d40671f16c15 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -2269,7 +2269,7 @@ Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Balance` | [QueryBalanceRequest](#cosmos.bank.v1beta1.QueryBalanceRequest) | [QueryBalanceResponse](#cosmos.bank.v1beta1.QueryBalanceResponse) | Balance queries the balance of a single coin for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}/{denom=**}| +| `Balance` | [QueryBalanceRequest](#cosmos.bank.v1beta1.QueryBalanceRequest) | [QueryBalanceResponse](#cosmos.bank.v1beta1.QueryBalanceResponse) | Balance queries the balance of a single coin for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}/by_denom| | `AllBalances` | [QueryAllBalancesRequest](#cosmos.bank.v1beta1.QueryAllBalancesRequest) | [QueryAllBalancesResponse](#cosmos.bank.v1beta1.QueryAllBalancesResponse) | AllBalances queries the balance of all coins for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}| | `TotalSupply` | [QueryTotalSupplyRequest](#cosmos.bank.v1beta1.QueryTotalSupplyRequest) | [QueryTotalSupplyResponse](#cosmos.bank.v1beta1.QueryTotalSupplyResponse) | TotalSupply queries the total supply of all coins. | GET|/cosmos/bank/v1beta1/supply| | `SupplyOf` | [QuerySupplyOfRequest](#cosmos.bank.v1beta1.QuerySupplyOfRequest) | [QuerySupplyOfResponse](#cosmos.bank.v1beta1.QuerySupplyOfResponse) | SupplyOf queries the supply of a single coin. | GET|/cosmos/bank/v1beta1/supply/{denom}| diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto index 668c83b1e60d..2cef32f0c5a3 100644 --- a/proto/cosmos/bank/v1beta1/query.proto +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -14,7 +14,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; service Query { // Balance queries the balance of a single coin for a single account. rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/{denom=**}"; + option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/by_denom"; } // AllBalances queries the balance of all coins for a single account. @@ -57,7 +57,7 @@ service Query { // QueryBalanceRequest is the request type for the Query/Balance RPC method. message QueryBalanceRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // address is the address to query balances for. @@ -75,7 +75,7 @@ message QueryBalanceResponse { // QueryBalanceRequest is the request type for the Query/AllBalances RPC method. message QueryAllBalancesRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // address is the address to query balances for. @@ -90,7 +90,7 @@ message QueryAllBalancesRequest { message QueryAllBalancesResponse { // balances is the balances of all the coins. repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; @@ -99,7 +99,7 @@ message QueryAllBalancesResponse { // QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC // method. message QueryTotalSupplyRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // pagination defines an optional pagination for the request. @@ -111,7 +111,7 @@ message QueryTotalSupplyRequest { message QueryTotalSupplyResponse { // supply is the supply of the coins repeated cosmos.base.v1beta1.Coin supply = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; diff --git a/x/bank/client/testutil/grpc.go b/x/bank/client/testutil/grpc.go index cebaa32388bd..f6088d8f6ccc 100644 --- a/x/bank/client/testutil/grpc.go +++ b/x/bank/client/testutil/grpc.go @@ -250,7 +250,7 @@ func (s *IntegrationTestSuite) TestBalancesGRPCHandler() { }, { "gPRC account balance of a denom", - fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/%s", baseURL, val.Address.String(), s.cfg.BondDenom), + fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/by_denom?denom=%s", baseURL, val.Address.String(), s.cfg.BondDenom), &types.QueryBalanceResponse{}, &types.QueryBalanceResponse{ Balance: &sdk.Coin{ @@ -261,7 +261,7 @@ func (s *IntegrationTestSuite) TestBalancesGRPCHandler() { }, { "gPRC account balance of a bogus denom", - fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/foobar", baseURL, val.Address.String()), + fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/by_denom?denom=foobar", baseURL, val.Address.String()), &types.QueryBalanceResponse{}, &types.QueryBalanceResponse{ Balance: &sdk.Coin{ diff --git a/x/bank/types/query.pb.go b/x/bank/types/query.pb.go index 070aa4203b1a..b3f82e93df5c 100644 --- a/x/bank/types/query.pb.go +++ b/x/bank/types/query.pb.go @@ -873,67 +873,67 @@ func init() { func init() { proto.RegisterFile("cosmos/bank/v1beta1/query.proto", fileDescriptor_9c6fc1939682df13) } var fileDescriptor_9c6fc1939682df13 = []byte{ - // 954 bytes of a gzipped FileDescriptorProto + // 953 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0xe3, 0x44, 0x14, 0xce, 0x14, 0x36, 0x6d, 0x5f, 0x80, 0xc3, 0x6c, 0x10, 0xad, 0xcb, 0x26, 0xc8, 0x0b, 0xdb, - 0x1f, 0xdb, 0xda, 0xdb, 0xec, 0x4a, 0x68, 0x57, 0x42, 0xa8, 0x59, 0x04, 0x07, 0x84, 0xb6, 0x78, - 0x39, 0x21, 0xa1, 0x6a, 0x92, 0x18, 0x63, 0x35, 0xf1, 0x78, 0x33, 0x0e, 0x4b, 0x55, 0x55, 0x42, - 0x9c, 0x38, 0x01, 0x12, 0x37, 0x10, 0x62, 0xb9, 0x80, 0xe0, 0xcc, 0x1f, 0xd1, 0x03, 0x87, 0x0a, - 0x84, 0xc4, 0x09, 0x50, 0xcb, 0x81, 0x3f, 0x03, 0x65, 0xe6, 0x8d, 0x63, 0x27, 0x8e, 0x63, 0x41, - 0x38, 0xc5, 0x9e, 0x79, 0x3f, 0xbe, 0xef, 0x9b, 0x79, 0xef, 0x39, 0x50, 0x6f, 0x73, 0xd1, 0xe3, - 0xc2, 0x6e, 0xb1, 0xe0, 0xd0, 0x7e, 0x7f, 0xb7, 0xe5, 0x46, 0x6c, 0xd7, 0x7e, 0x30, 0x70, 0xfb, - 0x47, 0x56, 0xd8, 0xe7, 0x11, 0xa7, 0x97, 0x95, 0x81, 0x35, 0x34, 0xb0, 0xd0, 0xc0, 0xd8, 0x8a, - 0xbd, 0x84, 0xab, 0xac, 0x63, 0xdf, 0x90, 0x79, 0x7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xd2, 0x6f, 0x08, 0x54, 0x12, 0xad, 0x2d, 0xef, 0xca, 0x4f, 0x37, 0xfe, + 0xbc, 0x2b, 0x9f, 0xd1, 0x2f, 0xcd, 0x7d, 0x09, 0xed, 0x06, 0xdd, 0x9e, 0x0d, 0x0d, 0x5b, 0xa9, + 0xd6, 0xb0, 0x79, 0xfb, 0xf4, 0xbc, 0x46, 0x1e, 0x9d, 0xd7, 0xc8, 0x9f, 0xe7, 0x35, 0xf2, 0xc5, + 0x45, 0xad, 0xf4, 0xe8, 0xa2, 0x56, 0xfa, 0xed, 0xa2, 0x56, 0x7a, 0x77, 0x3b, 0xf7, 0xb3, 0xec, + 0x23, 0x15, 0x5b, 0x7e, 0x9d, 0xb5, 0xca, 0xf2, 0xef, 0xca, 0xcd, 0x7f, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x40, 0x2b, 0xe5, 0x20, 0xa1, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bank/types/query.pb.gw.go b/x/bank/types/query.pb.gw.go index d8a9d7c6fe68..c9b15fdda0de 100644 --- a/x/bank/types/query.pb.gw.go +++ b/x/bank/types/query.pb.gw.go @@ -31,6 +31,10 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var ( + filter_Query_Balance_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + func request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryBalanceRequest var metadata runtime.ServerMetadata @@ -53,15 +57,11 @@ func request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } - val, ok = pathParams["denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - protoReq.Denom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Balance_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.Balance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -91,15 +91,11 @@ func local_request_Query_Balance_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } - val, ok = pathParams["denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - protoReq.Denom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Balance_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.Balance(ctx, &protoReq) @@ -820,7 +816,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 3, 0, 4, 1, 5, 5}, []string{"cosmos", "bank", "v1beta1", "balances", "address", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "bank", "v1beta1", "balances", "address", "by_denom"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AllBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "bank", "v1beta1", "balances", "address"}, "", runtime.AssumeColonVerbOpt(false))) From ae93ce9ff40e608a66a12c333cb55879ddadd731 Mon Sep 17 00:00:00 2001 From: Sai Kumar Date: Fri, 22 Oct 2021 16:36:49 +0530 Subject: [PATCH 3/3] updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 911984bb0cf5..7907a22e00db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -157,6 +157,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#10239](https://github.com/cosmos/cosmos-sdk/pull/10239) Fixed x/bank/044 migrateDenomMetadata. * (x/upgrade) [\#10189](https://github.com/cosmos/cosmos-sdk/issues/10189) Removed potential sources of non-determinism in upgrades * [\#10258](https://github.com/cosmos/cosmos-sdk/issues/10258) Fixes issue related to segmentaiton fault on mac m1 arm64 +* [\#10394](https://github.com/cosmos/cosmos-sdk/issues/10394) Fixes issue related to grpc-gateway of account balance by + ibc-denom. ### State Machine Breaking