diff --git a/go.mod b/go.mod index 7b80d0536..08a2a6571 100644 --- a/go.mod +++ b/go.mod @@ -78,16 +78,13 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v3 v3.2103.2 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/gin-gonic/gin v1.7.7 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect @@ -97,10 +94,8 @@ require ( github.com/golang/glog v1.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.1.2 // indirect github.com/google/flatbuffers v1.12.1 // indirect github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.2.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect @@ -126,7 +121,6 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.7 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect @@ -150,13 +144,11 @@ require ( go.opencensus.io v0.23.0 // indirect golang.org/x/mod v0.11.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.4.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/tools v0.6.0 // indirect google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/uint128 v1.2.0 // indirect @@ -172,6 +164,17 @@ require ( nhooyr.io/websocket v1.8.6 // indirect ) +require ( + github.com/danieljoos/wincred v1.1.2 // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/gin-gonic/gin v1.7.7 // indirect + github.com/google/btree v1.1.2 + github.com/google/gofuzz v1.2.0 // indirect + github.com/pelletier/go-toml/v2 v2.0.7 // indirect + golang.org/x/sync v0.4.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect +) + replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto index a567e073f..5c4894c61 100644 --- a/proto/cosmos/bank/v1beta1/query.proto +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -47,6 +47,11 @@ service Query { option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}"; } + // TokenFactoryDenomMetadata queries the client metadata of a given token factory coin denomination. + rpc TokenFactoryDenomMetadata(QueryTokenFactoryDenomMetadataRequest) returns (QueryDenomMetadataResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/token_factory/denoms_metadata"; + } + // DenomsMetadata queries the client metadata for all registered coin denominations. rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) { option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata"; @@ -185,6 +190,12 @@ message QueryDenomMetadataRequest { string denom = 1; } +// QueryTokenFactoryDenomMetadataRequest is the request type for the Query/TokenFactoryDenomMetadata RPC method. +message QueryTokenFactoryDenomMetadataRequest { + // denom is the (token factory) coin denom to query the metadata for. + string denom = 1; +} + // QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC // method. message QueryDenomMetadataResponse { diff --git a/x/bank/keeper/grpc_query.go b/x/bank/keeper/grpc_query.go index e8576d12d..a709f0b87 100644 --- a/x/bank/keeper/grpc_query.go +++ b/x/bank/keeper/grpc_query.go @@ -200,3 +200,8 @@ func (k BaseKeeper) DenomMetadata(c context.Context, req *types.QueryDenomMetada Metadata: metadata, }, nil } + +// TokenFactoryDenomMetadata implements Query/TokenFactoryDenomMetadata gRPC method. +func (k BaseKeeper) TokenFactoryDenomMetadata(c context.Context, req *types.QueryTokenFactoryDenomMetadataRequest) (*types.QueryDenomMetadataResponse, error) { + return k.DenomMetadata(c, &types.QueryDenomMetadataRequest{Denom: req.Denom}) +} diff --git a/x/bank/keeper/grpc_query_test.go b/x/bank/keeper/grpc_query_test.go index 00f6ccba7..5c5d51a4a 100644 --- a/x/bank/keeper/grpc_query_test.go +++ b/x/bank/keeper/grpc_query_test.go @@ -180,10 +180,10 @@ func (suite *IntegrationTestSuite) TestQueryParams() { suite.Require().Equal(suite.app.BankKeeper.GetParams(suite.ctx), res.GetParams()) } -func (suite *IntegrationTestSuite) QueryDenomsMetadataRequest() { +func (suite *IntegrationTestSuite) TestQueryDenomsMetadataRequest() { var ( req *types.QueryDenomsMetadataRequest - expMetadata = []types.Metadata{} + expMetadata []types.Metadata ) testCases := []struct { @@ -282,7 +282,7 @@ func (suite *IntegrationTestSuite) QueryDenomsMetadataRequest() { } } -func (suite *IntegrationTestSuite) QueryDenomMetadataRequest() { +func (suite *IntegrationTestSuite) TestQueryDenomMetadataRequest() { var ( req *types.QueryDenomMetadataRequest expMetadata = types.Metadata{} @@ -312,7 +312,7 @@ func (suite *IntegrationTestSuite) QueryDenomMetadataRequest() { { "success", func() { - expMetadata := types.Metadata{ + expMetadata = types.Metadata{ Description: "The native staking token of the Cosmos Hub.", DenomUnits: []*types.DenomUnit{ { @@ -358,3 +358,76 @@ func (suite *IntegrationTestSuite) QueryDenomMetadataRequest() { }) } } + +func (suite *IntegrationTestSuite) TestQueryTokenFactoryDenomMetadataRequest() { + var ( + req *types.QueryTokenFactoryDenomMetadataRequest + expMetadata = types.Metadata{} + ) + tokenFactoryDenom := "factory/sei1gxskuzvhr4s8sdm2rpruaf7yx2dnmjn0zfdu9q/NEWCOIN" + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty denom", + func() { + req = &types.QueryTokenFactoryDenomMetadataRequest{} + }, + false, + }, + { + "not found denom", + func() { + req = &types.QueryTokenFactoryDenomMetadataRequest{ + Denom: tokenFactoryDenom, + } + }, + false, + }, + { + "success", + func() { + + expMetadata = types.Metadata{ + Description: "Token factory custom token", + DenomUnits: []*types.DenomUnit{ + { + Denom: tokenFactoryDenom, + Exponent: 0, + Aliases: []string{tokenFactoryDenom}, + }, + }, + Base: tokenFactoryDenom, + Display: tokenFactoryDenom, + } + + suite.app.BankKeeper.SetDenomMetaData(suite.ctx, expMetadata) + req = &types.QueryTokenFactoryDenomMetadataRequest{ + Denom: expMetadata.Base, + } + }, + true, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() + ctx := sdk.WrapSDKContext(suite.ctx) + + res, err := suite.queryClient.TokenFactoryDenomMetadata(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(expMetadata, res.Metadata) + } else { + suite.Require().Error(err) + } + }) + } +} diff --git a/x/bank/types/query.pb.go b/x/bank/types/query.pb.go index e81ca6b3b..2965ea93f 100644 --- a/x/bank/types/query.pb.go +++ b/x/bank/types/query.pb.go @@ -736,6 +736,52 @@ func (m *QueryDenomMetadataRequest) GetDenom() string { return "" } +// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. +type QueryTokenFactoryDenomMetadataRequest struct { + // denom is the coin denom to query the metadata for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryTokenFactoryDenomMetadataRequest) Reset() { *m = QueryTokenFactoryDenomMetadataRequest{} } +func (m *QueryTokenFactoryDenomMetadataRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenFactoryDenomMetadataRequest) ProtoMessage() {} +func (*QueryTokenFactoryDenomMetadataRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9c6fc1939682df13, []int{15} +} +func (m *QueryTokenFactoryDenomMetadataRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenFactoryDenomMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenFactoryDenomMetadataRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTokenFactoryDenomMetadataRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenFactoryDenomMetadataRequest.Merge(m, src) +} +func (m *QueryTokenFactoryDenomMetadataRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenFactoryDenomMetadataRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenFactoryDenomMetadataRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenFactoryDenomMetadataRequest proto.InternalMessageInfo + +func (m *QueryTokenFactoryDenomMetadataRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + // QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC // method. type QueryDenomMetadataResponse struct { @@ -747,7 +793,7 @@ func (m *QueryDenomMetadataResponse) Reset() { *m = QueryDenomMetadataRe func (m *QueryDenomMetadataResponse) String() string { return proto.CompactTextString(m) } func (*QueryDenomMetadataResponse) ProtoMessage() {} func (*QueryDenomMetadataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9c6fc1939682df13, []int{15} + return fileDescriptor_9c6fc1939682df13, []int{16} } func (m *QueryDenomMetadataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -799,69 +845,73 @@ func init() { proto.RegisterType((*QueryDenomsMetadataRequest)(nil), "cosmos.bank.v1beta1.QueryDenomsMetadataRequest") proto.RegisterType((*QueryDenomsMetadataResponse)(nil), "cosmos.bank.v1beta1.QueryDenomsMetadataResponse") proto.RegisterType((*QueryDenomMetadataRequest)(nil), "cosmos.bank.v1beta1.QueryDenomMetadataRequest") + proto.RegisterType((*QueryTokenFactoryDenomMetadataRequest)(nil), "cosmos.bank.v1beta1.QueryTokenFactoryDenomMetadataRequest") proto.RegisterType((*QueryDenomMetadataResponse)(nil), "cosmos.bank.v1beta1.QueryDenomMetadataResponse") } func init() { proto.RegisterFile("cosmos/bank/v1beta1/query.proto", fileDescriptor_9c6fc1939682df13) } var fileDescriptor_9c6fc1939682df13 = []byte{ - // 896 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x97, 0x5d, 0x6b, 0x23, 0x55, - 0x18, 0xc7, 0x73, 0xaa, 0x4d, 0xd3, 0x27, 0x28, 0x78, 0x1a, 0x31, 0x9d, 0xda, 0x89, 0x4c, 0xb5, - 0x4d, 0x6b, 0x3a, 0xd3, 0x24, 0x82, 0xd6, 0x1b, 0x69, 0x2a, 0x7a, 0x21, 0xd2, 0x98, 0x7a, 0x25, - 0x48, 0x39, 0x49, 0xc6, 0x31, 0x34, 0x99, 0x33, 0xcd, 0x99, 0x88, 0xa1, 0x14, 0x44, 0x10, 0x04, - 0x41, 0x05, 0x6f, 0x04, 0x6f, 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x16, 0xcd, 0x8a, 0x1c, - 0x2f, 0xb9, 0xde, 0xe3, 0x5c, 0x26, 0xce, 0x85, 0x72, 0x71, 0x69, 0xd8, 0x91, 0xf2, 0x90, 0xbe, - 0x56, 0x7f, 0x23, 0x78, 0x75, 0xd0, 0x84, 0xf1, 0xb4, 0xce, 0xc3, 0xb7, 0x82, 0xb6, 0x13, 0x3d, - 0x41, 0xb2, 0xe6, 0x38, 0xeb, 0x3a, 0x7e, 0x3b, 0x0a, 0x6b, 0x69, 0xff, 0xe2, 0x4a, 0x47, 0x97, - 0x57, 0x3a, 0x7a, 0x70, 0xa5, 0xa3, 0xdf, 0xaf, 0xf5, 0xd8, 0xe5, 0xb5, 0x1e, 0xbb, 0x7b, 0xad, - 0xc7, 0xbe, 0xda, 0x9c, 0xf8, 0x83, 0xe0, 0x7b, 0x51, 0x96, 0xff, 0x2e, 0xa8, 0xc6, 0xf9, 0xff, - 0x15, 0xc5, 0x27, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xfd, 0x88, 0xa1, 0x2f, 0x0d, 0x00, 0x00, + // 942 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcf, 0x8b, 0x23, 0x45, + 0x18, 0x4d, 0xad, 0x6e, 0x26, 0xfb, 0x05, 0x05, 0x6b, 0x23, 0x66, 0x7a, 0x9c, 0x8e, 0xf4, 0xba, + 0x3b, 0x99, 0x35, 0xdb, 0x3d, 0x49, 0x16, 0x74, 0x07, 0x44, 0x36, 0x2b, 0xeb, 0x41, 0x64, 0x63, + 0xd6, 0x93, 0x20, 0xa1, 0x92, 0xd4, 0xb6, 0x21, 0x49, 0x57, 0x6f, 0xaa, 0x23, 0x86, 0x65, 0x40, + 0x04, 0x41, 0x10, 0x54, 0xf0, 0x22, 0x78, 0x19, 0x2f, 0x82, 0x9e, 0x05, 0xff, 0x01, 0x0f, 0x73, + 0xf0,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0d, 0xa2, 0x9c, 0xc5, 0x70, 0x12, 0xc7, 0x2b, 0x5c, + 0x37, 0x05, 0x2e, 0x1b, 0x97, 0x22, 0x71, 0x09, 0x69, 0x78, 0x53, 0x7b, 0xc8, 0x54, 0xab, 0x9f, + 0x11, 0x6c, 0x2e, 0x75, 0x39, 0xbc, 0x1f, 0x77, 0x5c, 0xe2, 0xad, 0xf1, 0xfc, 0x04, 0xf6, 0x05, + 0x81, 0x9b, 0xb8, 0x12, 0x49, 0x20, 0x98, 0xf4, 0x6b, 0x3e, 0x90, 0x0d, 0xe7, 0xe9, 0xe0, 0x6f, + 0x11, 0x3c, 0x3d, 0x3b, 0x8a, 0xf0, 0xaa, 0xfe, 0xf3, 0xb3, 0xd1, 0xd8, 0x4b, 0x9e, 0xa0, 0x10, + 0x97, 0x04, 0xe2, 0x6b, 0xf8, 0xc5, 0x24, 0x92, 0xd7, 0xee, 0x1c, 0x9d, 0x98, 0xe8, 0xf8, 0xc4, + 0x44, 0x7f, 0x9d, 0x98, 0xe8, 0xcb, 0x53, 0x33, 0x75, 0x7c, 0x6a, 0xa6, 0x7e, 0x3f, 0x35, 0x53, + 0xef, 0xee, 0xc6, 0x7e, 0x16, 0x7d, 0x28, 0xcb, 0x8a, 0xaf, 0xa3, 0x56, 0x5a, 0xfc, 0xbb, 0xaa, + 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x4c, 0x8c, 0xa6, 0x35, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -891,6 +941,8 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // DenomsMetadata queries the client metadata of a given coin denomination. DenomMetadata(ctx context.Context, in *QueryDenomMetadataRequest, opts ...grpc.CallOption) (*QueryDenomMetadataResponse, error) + // DenomsMetadata queries the client metadata of a given coin denomination. + TokenFactoryDenomMetadata(ctx context.Context, in *QueryTokenFactoryDenomMetadataRequest, opts ...grpc.CallOption) (*QueryDenomMetadataResponse, error) // DenomsMetadata queries the client metadata for all registered coin denominations. DenomsMetadata(ctx context.Context, in *QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*QueryDenomsMetadataResponse, error) } @@ -966,6 +1018,15 @@ func (c *queryClient) DenomMetadata(ctx context.Context, in *QueryDenomMetadataR return out, nil } +func (c *queryClient) TokenFactoryDenomMetadata(ctx context.Context, in *QueryTokenFactoryDenomMetadataRequest, opts ...grpc.CallOption) (*QueryDenomMetadataResponse, error) { + out := new(QueryDenomMetadataResponse) + err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/TokenFactoryDenomMetadata", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) DenomsMetadata(ctx context.Context, in *QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*QueryDenomsMetadataResponse, error) { out := new(QueryDenomsMetadataResponse) err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/DenomsMetadata", in, out, opts...) @@ -992,6 +1053,8 @@ type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // DenomsMetadata queries the client metadata of a given coin denomination. DenomMetadata(context.Context, *QueryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) + // DenomsMetadata queries the client metadata of a given coin denomination. + TokenFactoryDenomMetadata(context.Context, *QueryTokenFactoryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) // DenomsMetadata queries the client metadata for all registered coin denominations. DenomsMetadata(context.Context, *QueryDenomsMetadataRequest) (*QueryDenomsMetadataResponse, error) } @@ -1021,6 +1084,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) DenomMetadata(ctx context.Context, req *QueryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomMetadata not implemented") } +func (*UnimplementedQueryServer) TokenFactoryDenomMetadata(ctx context.Context, req *QueryTokenFactoryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenFactoryDenomMetadata not implemented") +} func (*UnimplementedQueryServer) DenomsMetadata(ctx context.Context, req *QueryDenomsMetadataRequest) (*QueryDenomsMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomsMetadata not implemented") } @@ -1155,6 +1221,24 @@ func _Query_DenomMetadata_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_TokenFactoryDenomMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenFactoryDenomMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TokenFactoryDenomMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.bank.v1beta1.Query/TokenFactoryDenomMetadata", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenFactoryDenomMetadata(ctx, req.(*QueryTokenFactoryDenomMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_DenomsMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryDenomsMetadataRequest) if err := dec(in); err != nil { @@ -1205,6 +1289,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "DenomMetadata", Handler: _Query_DenomMetadata_Handler, }, + { + MethodName: "TokenFactoryDenomMetadata", + Handler: _Query_TokenFactoryDenomMetadata_Handler, + }, { MethodName: "DenomsMetadata", Handler: _Query_DenomsMetadata_Handler, @@ -1785,6 +1873,36 @@ func (m *QueryDenomMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *QueryTokenFactoryDenomMetadataRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTokenFactoryDenomMetadataRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenFactoryDenomMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryDenomMetadataResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2052,6 +2170,19 @@ func (m *QueryDenomMetadataRequest) Size() (n int) { return n } +func (m *QueryTokenFactoryDenomMetadataRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryDenomMetadataResponse) Size() (n int) { if m == nil { return 0 @@ -3537,6 +3668,88 @@ func (m *QueryDenomMetadataRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryTokenFactoryDenomMetadataRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTokenFactoryDenomMetadataRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenFactoryDenomMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryDenomMetadataResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/bank/types/query.pb.gw.go b/x/bank/types/query.pb.gw.go index a6ea74de9..0290dfe6e 100644 --- a/x/bank/types/query.pb.gw.go +++ b/x/bank/types/query.pb.gw.go @@ -409,6 +409,42 @@ func local_request_Query_DenomMetadata_0(ctx context.Context, marshaler runtime. } +var ( + filter_Query_TokenFactoryDenomMetadata_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TokenFactoryDenomMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenFactoryDenomMetadataRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TokenFactoryDenomMetadata_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TokenFactoryDenomMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenFactoryDenomMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenFactoryDenomMetadataRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TokenFactoryDenomMetadata_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TokenFactoryDenomMetadata(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_DenomsMetadata_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -591,6 +627,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_TokenFactoryDenomMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TokenFactoryDenomMetadata_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenFactoryDenomMetadata_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_DenomsMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -792,6 +848,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_TokenFactoryDenomMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TokenFactoryDenomMetadata_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenFactoryDenomMetadata_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_DenomsMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -830,6 +906,8 @@ var ( pattern_Query_DenomMetadata_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", "denoms_metadata", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_TokenFactoryDenomMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"cosmos", "bank", "v1beta1", "token_factory", "denoms_metadata"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DenomsMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "bank", "v1beta1", "denoms_metadata"}, "", runtime.AssumeColonVerbOpt(false))) ) @@ -848,5 +926,7 @@ var ( forward_Query_DenomMetadata_0 = runtime.ForwardResponseMessage + forward_Query_TokenFactoryDenomMetadata_0 = runtime.ForwardResponseMessage + forward_Query_DenomsMetadata_0 = runtime.ForwardResponseMessage ) diff --git a/x/params/types/types.pb.go b/x/params/types/types.pb.go index 452b35311..26b19b325 100644 --- a/x/params/types/types.pb.go +++ b/x/params/types/types.pb.go @@ -27,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Defines fee params that are controlled through governance type FeesParams struct { - GlobalMinimumGasPrices github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=global_minimum_gas_prices,json=GlobalMinimumGasPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"global_minimum_gas_prices"` + GlobalMinimumGasPrices github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=global_minimum_gas_prices,json=globalMinimumGasPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"global_minimum_gas_prices"` } func (m *FeesParams) Reset() { *m = FeesParams{} } @@ -122,26 +122,27 @@ func init() { func init() { proto.RegisterFile("cosmos/params/types/types.proto", fileDescriptor_56d782f42fecdb16) } var fileDescriptor_56d782f42fecdb16 = []byte{ - // 294 bytes of a gzipped FileDescriptorProto + // 306 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x85, 0x92, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xa2, 0x10, 0x05, 0x7a, 0x10, 0x05, 0x7a, 0x65, 0x86, 0x49, 0xa9, 0x25, 0x89, 0x86, 0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, 0x9e, 0x9a, 0x97, 0x5a, 0x9c, 0x59, + 0x1c, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0xe4, 0xc1, 0xc5, 0x9d, 0x96, 0x9a, 0x5a, 0x1c, 0x0f, 0xf1, + 0xba, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0xa2, 0x1e, 0xd6, 0x00, 0xd1, 0x43, 0x78, 0xcb, + 0x89, 0x05, 0xe4, 0xa8, 0x20, 0xae, 0x34, 0x84, 0x88, 0xe7, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, + 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, + 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x85, 0xdf, 0xf1, 0x15, 0x28, 0x71, 0x93, 0xc4, + 0x06, 0x0e, 0x49, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x85, 0xe4, 0xf2, 0xb9, 0x01, + 0x00, 0x00, } func (this *FeesParams) Equal(that interface{}) bool {