diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 7b9325ec..fba529f6 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -50200,21 +50200,33 @@ paths: schema: type: object properties: + isRegstrable: + type: boolean fee: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - NOTE: The amount field is an Int which implements the custom - method + NOTE: The amount field is an Int which implements the custom + method - signatures required by gogoproto. + signatures required by gogoproto. + registrationPeriodInYear: + type: string + format: uint64 + maxSubDomainRegistrations: + type: string + format: uint64 + errorMessage: + type: string default: description: An unexpected error response. schema: @@ -50242,6 +50254,11 @@ paths: in: path required: true type: string + - name: registrationPeriodInYear + in: query + required: false + type: string + format: uint64 tags: - Query /mycel-domain/mycel/registry/is_registrable_domain/{name}/{parent}: @@ -81788,18 +81805,30 @@ definitions: mycel.registry.QueryDomainRegistrationFeeResponse: type: object properties: + isRegstrable: + type: boolean fee: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + registrationPeriodInYear: + type: string + format: uint64 + maxSubDomainRegistrations: + type: string + format: uint64 + errorMessage: + type: string mycel.registry.QueryGetDomainOwnershipResponse: type: object properties: diff --git a/proto/mycel/registry/query.proto b/proto/mycel/registry/query.proto index ac790da8..b7ed0f0c 100644 --- a/proto/mycel/registry/query.proto +++ b/proto/mycel/registry/query.proto @@ -135,10 +135,18 @@ message QueryAllDomainOwnershipResponse { message QueryDomainRegistrationFeeRequest { string name = 1; string parent = 2; + uint64 registrationPeriodInYear = 3; } message QueryDomainRegistrationFeeResponse { - cosmos.base.v1beta1.Coin fee = 1 [(gogoproto.nullable) = false]; + bool isRegstrable = 1; + repeated cosmos.base.v1beta1.Coin fee = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + uint64 registrationPeriodInYear = 3; + uint64 maxSubDomainRegistrations = 4; + string errorMessage = 5; } message QueryIsRegistrableDomainRequest { diff --git a/x/registry/client/cli/query_domain_registration_fee.go b/x/registry/client/cli/query_domain_registration_fee.go index 556e4883..b21dde03 100644 --- a/x/registry/client/cli/query_domain_registration_fee.go +++ b/x/registry/client/cli/query_domain_registration_fee.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/mycel-domain/mycel/x/registry/types" + "github.com/spf13/cast" "github.com/spf13/cobra" ) @@ -13,12 +14,13 @@ var _ = strconv.Itoa(0) func CmdDomainRegistrationFee() *cobra.Command { cmd := &cobra.Command{ - Use: "domain-registration-fee [name] [parent]", + Use: "domain-registration-fee [name] [parent] [registration-period-in-year]", Short: "query domain registration fee", - Args: cobra.ExactArgs(2), + Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { reqName := args[0] reqParent := args[1] + reqRegistrationPeriodInYear, err := cast.ToUint64E(args[2]) clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -28,9 +30,9 @@ func CmdDomainRegistrationFee() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) params := &types.QueryDomainRegistrationFeeRequest{ - Name: reqName, Parent: reqParent, + RegistrationPeriodInYear: reqRegistrationPeriodInYear, } res, err := queryClient.DomainRegistrationFee(cmd.Context(), params) diff --git a/x/registry/keeper/query_domain_registration_fee.go b/x/registry/keeper/query_domain_registration_fee.go index 294264df..e7534e61 100644 --- a/x/registry/keeper/query_domain_registration_fee.go +++ b/x/registry/keeper/query_domain_registration_fee.go @@ -9,21 +9,64 @@ import ( "google.golang.org/grpc/status" ) +func createErrorResponse(err error) *types.QueryDomainRegistrationFeeResponse { + return &types.QueryDomainRegistrationFeeResponse{ + IsRegstrable: false, + Fee: sdk.NewCoins(), + RegistrationPeriodInYear: 0, + MaxSubDomainRegistrations: 0, + ErrorMessage: err.Error(), + } +} + func (k Keeper) DomainRegistrationFee(goCtx context.Context, req *types.QueryDomainRegistrationFeeRequest) (*types.QueryDomainRegistrationFeeResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) - - // TODO: Process the query - _ = ctx - domain := types.SecondLevelDomain{Name: req.Name, Parent: req.Parent} - config := k.GetSecondLevelDomainParentsSubdomainConfig(ctx, domain) - fee, err := config.GetRegistrationFee(domain.Name, 1) - if err != nil { - return nil, err + if req.Parent == "" { + // Top level domain + config := types.GetDefaultSubdomainConfig(1) + domain := types.TopLevelDomain{ + Name: req.Name, + SubdomainConfig: &config, + } + err := k.ValidateTopLevelDomainIsRegistrable(ctx, domain) + if err != nil { + return createErrorResponse(err), nil + } + fee, err := k.GetTopLevelDomainFee(ctx, domain, req.RegistrationPeriodInYear) + if err != nil { + return createErrorResponse(err), nil + } else { + return &types.QueryDomainRegistrationFeeResponse{ + IsRegstrable: true, + Fee: fee.TotalFee, + RegistrationPeriodInYear: 1, + MaxSubDomainRegistrations: config.MaxSubdomainRegistrations, + ErrorMessage: "", + }, nil + } + } else { + // Second level domain + domain := types.SecondLevelDomain{Name: req.Name, Parent: req.Parent} + err := k.ValidateSecondLevelDomainIsRegistrable(ctx, domain) + if err != nil { + return createErrorResponse(err), nil + } + config := k.GetSecondLevelDomainParentsSubdomainConfig(ctx, domain) + fee, err := config.GetRegistrationFee(domain.Name, req.RegistrationPeriodInYear) + if err != nil { + return createErrorResponse(err), nil + } else { + return &types.QueryDomainRegistrationFeeResponse{ + IsRegstrable: true, + Fee: sdk.NewCoins(fee), + RegistrationPeriodInYear: 1, + MaxSubDomainRegistrations: 0, + ErrorMessage: "", + }, nil + } } - - return &types.QueryDomainRegistrationFeeResponse{Fee: fee}, nil } diff --git a/x/registry/keeper/top_level_domain_fee.go b/x/registry/keeper/top_level_domain_fee.go index 1542b3f0..5ab09778 100644 --- a/x/registry/keeper/top_level_domain_fee.go +++ b/x/registry/keeper/top_level_domain_fee.go @@ -41,6 +41,7 @@ func (k Keeper) GetTopLevelDomainFee(ctx sdk.Context, topLevelDomain types.TopLe if err != nil { return types.TopLevelDomainFee{}, err } + topLevelDomainFee.TotalFee = sdk.NewCoins(sdk.NewCoin(denom, fee)) // Get burn weight (=W) weight, err := k.GetBurnWeight(ctx) diff --git a/x/registry/types/query.pb.go b/x/registry/types/query.pb.go index c5d88b1a..ff9c6653 100644 --- a/x/registry/types/query.pb.go +++ b/x/registry/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" @@ -735,8 +736,9 @@ func (m *QueryAllDomainOwnershipResponse) GetPagination() *query.PageResponse { } type QueryDomainRegistrationFeeRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` + RegistrationPeriodInYear uint64 `protobuf:"varint,3,opt,name=registrationPeriodInYear,proto3" json:"registrationPeriodInYear,omitempty"` } func (m *QueryDomainRegistrationFeeRequest) Reset() { *m = QueryDomainRegistrationFeeRequest{} } @@ -786,8 +788,19 @@ func (m *QueryDomainRegistrationFeeRequest) GetParent() string { return "" } +func (m *QueryDomainRegistrationFeeRequest) GetRegistrationPeriodInYear() uint64 { + if m != nil { + return m.RegistrationPeriodInYear + } + return 0 +} + type QueryDomainRegistrationFeeResponse struct { - Fee types.Coin `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee"` + IsRegstrable bool `protobuf:"varint,1,opt,name=isRegstrable,proto3" json:"isRegstrable,omitempty"` + Fee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=fee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee"` + RegistrationPeriodInYear uint64 `protobuf:"varint,3,opt,name=registrationPeriodInYear,proto3" json:"registrationPeriodInYear,omitempty"` + MaxSubDomainRegistrations uint64 `protobuf:"varint,4,opt,name=maxSubDomainRegistrations,proto3" json:"maxSubDomainRegistrations,omitempty"` + ErrorMessage string `protobuf:"bytes,5,opt,name=errorMessage,proto3" json:"errorMessage,omitempty"` } func (m *QueryDomainRegistrationFeeResponse) Reset() { *m = QueryDomainRegistrationFeeResponse{} } @@ -823,11 +836,39 @@ func (m *QueryDomainRegistrationFeeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDomainRegistrationFeeResponse proto.InternalMessageInfo -func (m *QueryDomainRegistrationFeeResponse) GetFee() types.Coin { +func (m *QueryDomainRegistrationFeeResponse) GetIsRegstrable() bool { + if m != nil { + return m.IsRegstrable + } + return false +} + +func (m *QueryDomainRegistrationFeeResponse) GetFee() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Fee } - return types.Coin{} + return nil +} + +func (m *QueryDomainRegistrationFeeResponse) GetRegistrationPeriodInYear() uint64 { + if m != nil { + return m.RegistrationPeriodInYear + } + return 0 +} + +func (m *QueryDomainRegistrationFeeResponse) GetMaxSubDomainRegistrations() uint64 { + if m != nil { + return m.MaxSubDomainRegistrations + } + return 0 +} + +func (m *QueryDomainRegistrationFeeResponse) GetErrorMessage() string { + if m != nil { + return m.ErrorMessage + } + return "" } type QueryIsRegistrableDomainRequest struct { @@ -959,70 +1000,75 @@ func init() { func init() { proto.RegisterFile("mycel/registry/query.proto", fileDescriptor_0f2c8f2d33ba1956) } var fileDescriptor_0f2c8f2d33ba1956 = []byte{ - // 997 bytes of a gzipped FileDescriptorProto + // 1083 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0xcf, 0x6f, 0xdc, 0x44, - 0x14, 0xc7, 0x33, 0xdd, 0x36, 0xa2, 0x43, 0x95, 0x2a, 0xd3, 0x10, 0xa5, 0x06, 0x9c, 0x30, 0x55, - 0x4b, 0x00, 0xc5, 0x93, 0x4d, 0x9a, 0x72, 0x00, 0x0e, 0x09, 0xab, 0x94, 0x1f, 0x29, 0x29, 0x0b, - 0x12, 0x12, 0x12, 0x5a, 0x79, 0x37, 0x53, 0xc7, 0xc8, 0xeb, 0x71, 0x3c, 0x4e, 0xe9, 0x2a, 0xca, - 0xa5, 0x7f, 0x01, 0x12, 0xff, 0x04, 0x48, 0x70, 0x00, 0x09, 0x71, 0xe0, 0xca, 0xa1, 0x12, 0x1c, - 0x2a, 0x71, 0xe1, 0x84, 0x50, 0xc2, 0x1f, 0x52, 0x79, 0xfc, 0xdc, 0xac, 0x67, 0x3d, 0xce, 0xee, - 0x6a, 0x6f, 0x5e, 0xbf, 0x37, 0xdf, 0xf9, 0xbc, 0x1f, 0x7e, 0x33, 0x8b, 0xad, 0x6e, 0xaf, 0xc3, - 0x03, 0x16, 0x73, 0xcf, 0x97, 0x49, 0xdc, 0x63, 0x07, 0x87, 0x3c, 0xee, 0x39, 0x51, 0x2c, 0x12, - 0x41, 0x66, 0x94, 0xcd, 0xc9, 0x6d, 0xd6, 0x9c, 0x27, 0x3c, 0xa1, 0x4c, 0x2c, 0x7d, 0xca, 0xbc, - 0xac, 0x57, 0x3c, 0x21, 0xbc, 0x80, 0x33, 0x37, 0xf2, 0x99, 0x1b, 0x86, 0x22, 0x71, 0x13, 0x5f, - 0x84, 0x12, 0xac, 0x6f, 0x76, 0x84, 0xec, 0x0a, 0xc9, 0xda, 0xae, 0xe4, 0x99, 0x38, 0x7b, 0x58, - 0x6f, 0x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, 0x23, 0x8f, 0xff, + 0x9a, 0x19, 0x72, 0xa4, 0x2f, 0x59, 0x46, 0x2f, 0x8a, 0x64, 0xb7, 0x20, 0xf9, 0x90, 0x45, 0x9b, + 0x69, 0x29, 0xeb, 0x02, 0x56, 0xae, 0x86, 0x31, 0x1a, 0x09, 0xdd, 0x36, 0x88, 0xa4, 0x17, 0x1c, + 0xf1, 0x4c, 0x42, 0x64, 0xe9, 0x82, 0x24, 0xcc, 0x26, 0x1a, 0x4f, 0x0a, 0x16, 0x09, 0x65, 0xa9, + 0x50, 0xc5, 0x78, 0x09, 0xa7, 0xc4, 0x12, 0x4f, 0x42, 0xae, 0x06, 0x41, 0x39, 0xe4, 0x06, 0x42, + 0xa7, 0x3b, 0x2e, 0x97, 0xba, 0x66, 0x67, 0xea, 0xda, 0xa9, 0xba, 0x76, 0xd6, 0x7b, 0x52, 0x63, + 0x7b, 0xcb, 0xf5, 0x40, 0xc6, 0x3a, 0x1d, 0x91, 0xe4, 0x27, 0x43, 0x56, 0x56, 0xb2, 0x52, 0x45, + 0x65, 0xb5, 0xf3, 0x56, 0x86, 0x6f, 0x15, 0xc0, 0x87, 0x05, 0xf8, 0xcb, 0x67, 0x82, 0x67, 0x28, + 0x05, 0xf2, 0xf7, 0xd1, 0x6c, 0xbe, 0x25, 0xf7, 0x44, 0x5b, 0xf6, 0xb6, 0x95, 0x78, 0x4a, 0x74, + 0x0d, 0x84, 0x89, 0x58, 0xfc, 0x82, 0x23, 0xff, 0x23, 0x0c, 0x4d, 0x97, 0xe4, 0x91, 0x1a, 0xf4, + 0x91, 0x08, 0x5f, 0x43, 0xe3, 0xb0, 0x1f, 0xf9, 0xb1, 0xc0, 0x5c, 0x77, 0x13, 0xa8, 0xd7, 0x66, + 0x8d, 0xb9, 0x9a, 0xa3, 0xbc, 0x25, 0x8f, 0x0c, 0xf4, 0x52, 0x45, 0x05, 0x72, 0xe5, 0xfb, 0x68, + 0x82, 0xab, 0x46, 0xb9, 0xdf, 0xaf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, 0x90, 0x75, 0xbc, 0x56, 0x59, 0x88, 0xcf, 0xff, 0x2f, 0xa2, 0x11, 0x80, 0xe6, + 0x1b, 0x5d, 0x7b, 0xe7, 0xf1, 0xb1, 0x65, 0x3c, 0x39, 0xb6, 0x8c, 0x7f, 0x8e, 0x2d, 0xe3, 0x8b, + 0x13, 0x6b, 0xe8, 0xc9, 0x89, 0x35, 0xf4, 0xe7, 0x89, 0x35, 0xf4, 0xb1, 0xdd, 0x31, 0xd6, 0x4b, + 0xd6, 0xd9, 0xef, 0x38, 0xb0, 0xd2, 0x11, 0xdf, 0x18, 0x13, 0xbf, 0xca, 0x97, 0xff, 0x0b, 0x00, + 0x00, 0xff, 0xff, 0xff, 0x0a, 0xf1, 0x20, 0xd8, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1971,6 +2017,11 @@ func (m *QueryDomainRegistrationFeeRequest) MarshalToSizedBuffer(dAtA []byte) (i _ = i var l int _ = l + if m.RegistrationPeriodInYear != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.RegistrationPeriodInYear)) + i-- + dAtA[i] = 0x18 + } if len(m.Parent) > 0 { i -= len(m.Parent) copy(dAtA[i:], m.Parent) @@ -2008,16 +2059,47 @@ func (m *QueryDomainRegistrationFeeResponse) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.ErrorMessage) > 0 { + i -= len(m.ErrorMessage) + copy(dAtA[i:], m.ErrorMessage) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ErrorMessage))) + i-- + dAtA[i] = 0x2a + } + if m.MaxSubDomainRegistrations != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.MaxSubDomainRegistrations)) + i-- + dAtA[i] = 0x20 + } + if m.RegistrationPeriodInYear != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.RegistrationPeriodInYear)) + i-- + dAtA[i] = 0x18 + } + if len(m.Fee) > 0 { + for iNdEx := len(m.Fee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Fee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa + if m.IsRegstrable { + i-- + if m.IsRegstrable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -2335,6 +2417,9 @@ func (m *QueryDomainRegistrationFeeRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.RegistrationPeriodInYear != 0 { + n += 1 + sovQuery(uint64(m.RegistrationPeriodInYear)) + } return n } @@ -2344,8 +2429,25 @@ func (m *QueryDomainRegistrationFeeResponse) Size() (n int) { } var l int _ = l - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.IsRegstrable { + n += 2 + } + if len(m.Fee) > 0 { + for _, e := range m.Fee { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.RegistrationPeriodInYear != 0 { + n += 1 + sovQuery(uint64(m.RegistrationPeriodInYear)) + } + if m.MaxSubDomainRegistrations != 0 { + n += 1 + sovQuery(uint64(m.MaxSubDomainRegistrations)) + } + l = len(m.ErrorMessage) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3892,6 +3994,25 @@ func (m *QueryDomainRegistrationFeeRequest) Unmarshal(dAtA []byte) error { } m.Parent = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RegistrationPeriodInYear", wireType) + } + m.RegistrationPeriodInYear = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RegistrationPeriodInYear |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3943,6 +4064,26 @@ func (m *QueryDomainRegistrationFeeResponse) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsRegstrable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsRegstrable = bool(v != 0) + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) } @@ -3971,10 +4112,81 @@ func (m *QueryDomainRegistrationFeeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Fee = append(m.Fee, types.Coin{}) + if err := m.Fee[len(m.Fee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RegistrationPeriodInYear", wireType) + } + m.RegistrationPeriodInYear = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RegistrationPeriodInYear |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxSubDomainRegistrations", wireType) + } + m.MaxSubDomainRegistrations = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxSubDomainRegistrations |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", 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.ErrorMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/registry/types/query.pb.gw.go b/x/registry/types/query.pb.gw.go index e393e20b..acec3d52 100644 --- a/x/registry/types/query.pb.gw.go +++ b/x/registry/types/query.pb.gw.go @@ -343,6 +343,10 @@ func local_request_Query_DomainOwnershipAll_0(ctx context.Context, marshaler run } +var ( + filter_Query_DomainRegistrationFee_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0, "parent": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_Query_DomainRegistrationFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDomainRegistrationFeeRequest var metadata runtime.ServerMetadata @@ -376,6 +380,13 @@ func request_Query_DomainRegistrationFee_0(ctx context.Context, marshaler runtim return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DomainRegistrationFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.DomainRegistrationFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -414,6 +425,13 @@ func local_request_Query_DomainRegistrationFee_0(ctx context.Context, marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DomainRegistrationFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.DomainRegistrationFee(ctx, &protoReq) return msg, metadata, err