diff --git a/app/migration.go b/app/migration.go index 82849f99..c4561c99 100644 --- a/app/migration.go +++ b/app/migration.go @@ -21,6 +21,22 @@ func (app *App) MigrationFromV1ToV2Handlers(ctx sdk.Context) { ExecutorAddress: systemActioner, Creator: nftSchemaV1.Owner, }) + + val, found := app.NftmngrKeeper.GetExecutorOfSchema(ctx, nftSchemaV1.Code) + if !found { + val = nftmngrtypes.ExecutorOfSchema{ + NftSchemaCode: nftSchemaV1.Code, + ExecutorAddress: []string{}, + } + } + + // set executorOfSchema + val.ExecutorAddress = append(val.ExecutorAddress, systemActioner) + + app.NftmngrKeeper.SetExecutorOfSchema(ctx, nftmngrtypes.ExecutorOfSchema{ + NftSchemaCode: nftSchemaV1.Code, + ExecutorAddress: val.ExecutorAddress, + }) } // migrate schema to new schema @@ -40,6 +56,7 @@ func (app *App) MigrationFromV1ToV2Handlers(ctx sdk.Context) { }) // migrate NFT attributes to new schema attributes + var schemaAttributes []*nftmngrtypes.SchemaAttribute for _, nftAttribute := range nftSchemaV1.OnchainData.NftAttributes { schemaAttibuteConverted, _ := NftmngrKeeper.ConvertDefaultMintValueToSchemaAttributeValue(nftAttribute.DefaultMintValue) app.NftmngrKeeper.SetSchemaAttribute(ctx, nftmngrtypes.SchemaAttribute{ @@ -54,8 +71,26 @@ func (app *App) MigrationFromV1ToV2Handlers(ctx sdk.Context) { HiddenToMarketplace: nftAttribute.HiddenToMarketplace, Creator: nftSchemaV1.Owner, }) + + schemaAttributes = append(schemaAttributes, &nftmngrtypes.SchemaAttribute{ + NftSchemaCode: nftSchemaV1.Code, + Name: nftAttribute.Name, + DataType: nftAttribute.DataType, + Required: nftAttribute.Required, + DisplayValueField: nftAttribute.DisplayValueField, + DisplayOption: nftAttribute.DisplayOption, + CurrentValue: schemaAttibuteConverted, + HiddenOveride: nftAttribute.HiddenOveride, + HiddenToMarketplace: nftAttribute.HiddenToMarketplace, + Creator: nftSchemaV1.Owner, + }) } + app.NftmngrKeeper.SetAttributeOfSchema(ctx, nftmngrtypes.AttributeOfSchema{ + NftSchemaCode: nftSchemaV1.Code, + SchemaAttributes: schemaAttributes, + }) + // migrate NFT actions to new schema actions for i, nftAction := range nftSchemaV1.OnchainData.Actions { app.NftmngrKeeper.SetActionOfSchema(ctx, nftmngrtypes.ActionOfSchema{ diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index eb72a74e..6fff4a56 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -29767,16 +29767,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftmngr/action_by_ref_id/{refId}': @@ -30274,16 +30264,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftmngr/action_executor/{nftSchemaCode}/{executorAddress}': @@ -30501,86 +30481,55 @@ paths: type: string tags: - Query - '/thesixnetwork/sixnft/nftmngr/action_executorby_schema/{nftSchemaCode}': + /thesixnetwork/sixnft/nftmngr/action_of_schema: get: - summary: Queries a list of ActionExecutorbySchema items. - operationId: ThesixnetworkSixnftNftmngrActionExecutorbySchema + summary: Queries a list of ActionOfSchema items. + operationId: ThesixnetworkSixnftNftmngrActionOfSchemaAll responses: '200': description: A successful response. schema: type: object properties: - nftSchemaCode: - type: string - executorAddress: + actionOfSchema: type: array items: - type: string + type: object + properties: + nftSchemaCode: + type: string + name: + type: string + index: + type: string + format: uint64 pagination: type: object properties: - key: + next_key: type: string format: byte - description: >- - key is a value returned in PageResponse.next_key to begin - - querying the next page most efficiently. Only one of - offset or key - - should be set. - offset: - type: string - format: uint64 - description: >- - offset is a numeric offset that can be used when key is - unavailable. - - It is less efficient than using key. Only one of offset or - key should - - be set. - limit: + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string format: uint64 - description: >- - limit is the total number of results to be returned in the - result page. - - If left empty it will default to a value to be set by each - app. - count_total: - type: boolean - description: >- - count_total is set to true to indicate that the result - set should include - - a count of the total number of items available for - pagination in UIs. - - count_total is only respected when offset is used. It is - ignored when key + title: >- + total is total number of results available if + PageRequest.count_total - is set. - reverse: - type: boolean - description: >- - reverse is set to true if results are to be returned in - the descending order. + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + corresponding request message has used PageRequest. - Since: cosmos-sdk 0.43 - description: |- - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; } - title: >- - PageRequest is to be embedded in gRPC request messages for - efficient - - pagination. Ex: default: description: An unexpected error response. schema: @@ -30767,10 +30716,6 @@ paths: "value": "1.212s" } parameters: - - name: nftSchemaCode - in: path - required: true - type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -30817,22 +30762,12 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query - /thesixnetwork/sixnft/nftmngr/action_of_schema: + '/thesixnetwork/sixnft/nftmngr/action_of_schema/{nftSchemaCode}/{name}': get: - summary: Queries a list of ActionOfSchema items. - operationId: ThesixnetworkSixnftNftmngrActionOfSchemaAll + summary: Queries a ActionOfSchema by index. + operationId: ThesixnetworkSixnftNftmngrActionOfSchema responses: '200': description: A successful response. @@ -30840,44 +30775,15 @@ paths: type: object properties: actionOfSchema: - type: array - items: - type: object - properties: - nftSchemaCode: - type: string - name: - type: string - index: - type: string - format: uint64 - pagination: type: object properties: - next_key: + nftSchemaCode: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + name: + type: string + index: type: string format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } default: description: An unexpected error response. schema: @@ -31064,140 +30970,148 @@ paths: "value": "1.212s" } parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false + - name: nftSchemaCode + in: path + required: true type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false + - name: name + in: path + required: true type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query - '/thesixnetwork/sixnft/nftmngr/action_of_schema/{nftSchemaCode}/{name}': + '/thesixnetwork/sixnft/nftmngr/attribute_of_schema/{nftSchemaCode}': get: - summary: Queries a ActionOfSchema by index. - operationId: ThesixnetworkSixnftNftmngrActionOfSchema + summary: Queries a AttributeOfSchema by index. + operationId: ThesixnetworkSixnftNftmngrAttributeOfSchema responses: '200': description: A successful response. schema: type: object properties: - actionOfSchema: - type: object - properties: - nftSchemaCode: - type: string - name: - type: string - index: - type: string - format: uint64 - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: + nftSchemaCode: type: string - details: + schemaAttribute: type: array items: type: object properties: - '@type': + nftSchemaCode: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any + name: + type: string + data_type: + type: string + required: + type: boolean + display_value_field: + type: string + display_option: + type: object + properties: + bool_true_value: + type: string + bool_false_value: + type: string + opensea: + type: object + properties: + display_type: + type: string + trait_type: + type: string + max_value: + type: string + format: uint64 + current_value: + type: object + properties: + number_attribute_value: + type: object + properties: + value: + type: string + format: uint64 + string_attribute_value: + type: object + properties: + value: + type: string + boolean_attribute_value: + type: object + properties: + value: + type: boolean + float_attribute_value: + type: object + properties: + value: + type: number + format: double + hidden_overide: + type: boolean + title: flag that allows action to override hidden + hidden_to_marketplace: + type: boolean + creator: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) @@ -31318,77 +31232,323 @@ paths: representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: nftSchemaCode + in: path + required: true + type: string + tags: + - Query + /thesixnetwork/sixnft/nftmngr/executor_of_schema: + get: + summary: Queries a list of ExecutorOfSchema items. + operationId: ThesixnetworkSixnftNftmngrExecutorOfSchemaAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + executorOfSchema: + type: array + items: + type: object + properties: + nftSchemaCode: + type: string + executorAddress: + type: array + items: + type: string + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include - field. Example (for message [google.protobuf.Duration][]): + a count of the total number of items available for pagination in + UIs. - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: nftSchemaCode - in: path - required: true - type: string - - name: name - in: path - required: true - type: string + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean tags: - Query - '/thesixnetwork/sixnft/nftmngr/list_action_by_schema/{nftSchemaCode}': + '/thesixnetwork/sixnft/nftmngr/executor_of_schema/{nftSchemaCode}': get: - summary: Queries a list of ListActionBySchema items. - operationId: ThesixnetworkSixnftNftmngrListActionBySchema + summary: Queries a ExecutorOfSchema by index. + operationId: ThesixnetworkSixnftNftmngrExecutorOfSchema responses: '200': description: A successful response. schema: type: object properties: - nftSchemaCode: - type: string - actionOfSchema: - type: array - items: - type: object - properties: - nftSchemaCode: - type: string - name: - type: string - index: - type: string - format: uint64 - pagination: + executorOfSchema: type: object properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + nftSchemaCode: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } + executorAddress: + type: array + items: + type: string default: description: An unexpected error response. schema: @@ -31579,62 +31739,6 @@ paths: in: path required: true type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftmngr/list_attribute_by_schema/{nftSchemaCode}': @@ -31711,33 +31815,6 @@ paths: type: boolean creator: type: string - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } default: description: An unexpected error response. schema: @@ -31928,62 +32005,6 @@ paths: in: path required: true type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query /thesixnetwork/sixnft/nftmngr/metadata_creator: @@ -32271,16 +32292,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftmngr/metadata_creator/{nftSchemaCode}': @@ -32857,16 +32868,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query /thesixnetwork/sixnft/nftmngr/nft_data: @@ -33227,16 +33228,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftmngr/nft_data/{nftSchemaCode}/{tokenId}': @@ -34443,16 +34434,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftmngr/nft_schema/{code}': @@ -35152,16 +35133,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftmngr/nft_schema_by_contract/{originContractAddress}': @@ -35653,16 +35624,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftmngr/organization/{name}': @@ -36410,16 +36371,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftmngr/schema_attribute/{nftSchemaCode}/{name}': @@ -58639,6 +58590,15 @@ definitions: max_value: type: string format: uint64 + thesixnetwork.sixnft.nftmngr.ExecutorOfSchema: + type: object + properties: + nftSchemaCode: + type: string + executorAddress: + type: array + items: + type: string thesixnetwork.sixnft.nftmngr.FeeConfig: type: object properties: @@ -59900,73 +59860,6 @@ definitions: thesixnetwork.sixnft.nftmngr.Params: type: object description: Params defines the parameters for the module. - thesixnetwork.sixnft.nftmngr.QueryActionExecutorbySchemaResponse: - type: object - properties: - nftSchemaCode: - type: string - executorAddress: - type: array - items: - type: string - pagination: - type: object - properties: - key: - type: string - format: byte - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - offset: - type: string - format: uint64 - description: >- - offset is a numeric offset that can be used when key is - unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - limit: - type: string - format: uint64 - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - count_total: - type: boolean - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - reverse: - type: boolean - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - description: |- - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } - title: |- - PageRequest is to be embedded in gRPC request messages for efficient - pagination. Ex: thesixnetwork.sixnft.nftmngr.QueryAllActionByRefIdResponse: type: object properties: @@ -60089,6 +59982,45 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } + thesixnetwork.sixnft.nftmngr.QueryAllExecutorOfSchemaResponse: + type: object + properties: + executorOfSchema: + type: array + items: + type: object + properties: + nftSchemaCode: + type: string + executorAddress: + type: array + items: + type: string + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } thesixnetwork.sixnft.nftmngr.QueryAllMetadataCreatorResponse: type: object properties: @@ -60700,6 +60632,87 @@ definitions: index: type: string format: uint64 + thesixnetwork.sixnft.nftmngr.QueryGetAttributeOfSchemaResponse: + type: object + properties: + nftSchemaCode: + type: string + schemaAttribute: + type: array + items: + type: object + properties: + nftSchemaCode: + type: string + name: + type: string + data_type: + type: string + required: + type: boolean + display_value_field: + type: string + display_option: + type: object + properties: + bool_true_value: + type: string + bool_false_value: + type: string + opensea: + type: object + properties: + display_type: + type: string + trait_type: + type: string + max_value: + type: string + format: uint64 + current_value: + type: object + properties: + number_attribute_value: + type: object + properties: + value: + type: string + format: uint64 + string_attribute_value: + type: object + properties: + value: + type: string + boolean_attribute_value: + type: object + properties: + value: + type: boolean + float_attribute_value: + type: object + properties: + value: + type: number + format: double + hidden_overide: + type: boolean + title: flag that allows action to override hidden + hidden_to_marketplace: + type: boolean + creator: + type: string + thesixnetwork.sixnft.nftmngr.QueryGetExecutorOfSchemaResponse: + type: object + properties: + executorOfSchema: + type: object + properties: + nftSchemaCode: + type: string + executorAddress: + type: array + items: + type: string thesixnetwork.sixnft.nftmngr.QueryGetMetadataCreatorResponse: type: object properties: @@ -61258,48 +61271,6 @@ definitions: type: boolean creator: type: string - thesixnetwork.sixnft.nftmngr.QueryListActionBySchemaResponse: - type: object - properties: - nftSchemaCode: - type: string - actionOfSchema: - type: array - items: - type: object - properties: - nftSchemaCode: - type: string - name: - type: string - index: - type: string - format: uint64 - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } thesixnetwork.sixnft.nftmngr.QueryListAttributeBySchemaResponse: type: object properties: @@ -61367,31 +61338,6 @@ definitions: type: boolean creator: type: string - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } thesixnetwork.sixnft.nftmngr.QueryParamsResponse: type: object properties: diff --git a/proto/nftmngr/attribute_of_schema.proto b/proto/nftmngr/attribute_of_schema.proto new file mode 100644 index 00000000..d2bd623e --- /dev/null +++ b/proto/nftmngr/attribute_of_schema.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +package thesixnetwork.sixnft.nftmngr; +import "nftmngr/schema_attribute.proto"; +option go_package = "github.com/thesixnetwork/sixnft/x/nftmngr/types"; + +message AttributeOfSchema { + string nftSchemaCode = 1; + repeated SchemaAttribute schemaAttributes = 2; + +} + diff --git a/proto/nftmngr/executor_of_schema.proto b/proto/nftmngr/executor_of_schema.proto new file mode 100644 index 00000000..47a7b48b --- /dev/null +++ b/proto/nftmngr/executor_of_schema.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +package thesixnetwork.sixnft.nftmngr; + +option go_package = "github.com/thesixnetwork/sixnft/x/nftmngr/types"; + +message ExecutorOfSchema { + string nftSchemaCode = 1; + repeated string executorAddress = 2; + +} + diff --git a/proto/nftmngr/genesis.proto b/proto/nftmngr/genesis.proto index a659f611..d7d54beb 100644 --- a/proto/nftmngr/genesis.proto +++ b/proto/nftmngr/genesis.proto @@ -15,6 +15,8 @@ import "nftmngr/nft_collection.proto"; import "nftmngr/action_executor.proto"; import "nftmngr/schema_attribute.proto"; import "nftmngr/action_of_schema.proto"; +import "nftmngr/executor_of_schema.proto"; +import "nftmngr/attribute_of_schema.proto"; // this line is used by starport scaffolding # genesis/proto/import option go_package = "github.com/thesixnetwork/sixnft/x/nftmngr/types"; @@ -34,5 +36,7 @@ message GenesisState { repeated ActionExecutor actionExecutorList = 12 [(gogoproto.nullable) = false]; repeated SchemaAttribute schemaAttributeList = 13 [(gogoproto.nullable) = false]; repeated ActionOfSchema actionOfSchemaList = 14 [(gogoproto.nullable) = false]; + repeated ExecutorOfSchema executorOfSchemaList = 15 [(gogoproto.nullable) = false]; + repeated AttributeOfSchema attributeOfSchemaList = 16 [(gogoproto.nullable) = false]; // this line is used by starport scaffolding # genesis/proto/state } diff --git a/proto/nftmngr/query.proto b/proto/nftmngr/query.proto index 21efaf91..51318452 100644 --- a/proto/nftmngr/query.proto +++ b/proto/nftmngr/query.proto @@ -16,6 +16,8 @@ import "nftmngr/metadata_creator.proto"; import "nftmngr/action_executor.proto"; import "nftmngr/schema_attribute.proto"; import "nftmngr/action_of_schema.proto"; +import "nftmngr/executor_of_schema.proto"; +import "nftmngr/attribute_of_schema.proto"; // this line is used by starport scaffolding # 1 import "nftmngr/nft_data.proto"; @@ -58,7 +60,7 @@ service Query { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/action_by_ref_id"; } -// Queries a Organization by index. + // Queries a Organization by index. rpc Organization(QueryGetOrganizationRequest) returns (QueryGetOrganizationResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/organization/{name}"; } @@ -68,12 +70,12 @@ service Query { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/organization"; } -// Queries a NftCollection by index. + // Queries a NftCollection by index. rpc NftCollection(QueryGetNftCollectionRequest) returns (QueryGetNftCollectionResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/nft_collection/{nftSchemaCode}"; } -// Queries a NFTSchemaByContract by index. + // Queries a NFTSchemaByContract by index. rpc NFTSchemaByContract(QueryGetNFTSchemaByContractRequest) returns (QueryGetNFTSchemaByContractResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/nft_schema_by_contract/{originContractAddress}"; } @@ -83,15 +85,15 @@ service Query { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/nft_schema_by_contract"; } -// Queries a NFTFeeConfig by index. + // Queries a NFTFeeConfig by index. rpc NFTFeeConfig(QueryGetNFTFeeConfigRequest) returns (QueryGetNFTFeeConfigResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/nft_fee_config"; } -// Queries a NFTFeeBalance by index. + // Queries a NFTFeeBalance by index. rpc NFTFeeBalance(QueryGetNFTFeeBalanceRequest) returns (QueryGetNFTFeeBalanceResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/nft_fee_balance"; } -// Queries a MetadataCreator by index. + // Queries a MetadataCreator by index. rpc MetadataCreator(QueryGetMetadataCreatorRequest) returns (QueryGetMetadataCreatorResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/metadata_creator/{nftSchemaCode}"; } @@ -101,7 +103,7 @@ service Query { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/metadata_creator"; } -// Queries a ActionExecutor by index. + // Queries a ActionExecutor by index. rpc ActionExecutor(QueryGetActionExecutorRequest) returns (QueryGetActionExecutorResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/action_executor/{nftSchemaCode}/{executorAddress}"; } @@ -111,12 +113,8 @@ service Query { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/action_executor"; } -// Queries a list of ActionExecutorbySchema items. - rpc ActionExecutorbySchema(QueryActionExecutorbySchemaRequest) returns (QueryActionExecutorbySchemaResponse) { - option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/action_executorby_schema/{nftSchemaCode}"; - } -// Queries a SchemaAttribute by index. + // Queries a SchemaAttribute by index. rpc SchemaAttribute(QueryGetSchemaAttributeRequest) returns (QueryGetSchemaAttributeResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/schema_attribute/{nftSchemaCode}/{name}"; } @@ -126,12 +124,12 @@ service Query { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/schema_attribute"; } -// Queries a list of ListAttributeBySchema items. + // Queries a list of ListAttributeBySchema items. rpc ListAttributeBySchema(QueryListAttributeBySchemaRequest) returns (QueryListAttributeBySchemaResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/list_attribute_by_schema/{nftSchemaCode}"; } -// Queries a ActionOfSchema by index. + // Queries a ActionOfSchema by index. rpc ActionOfSchema(QueryGetActionOfSchemaRequest) returns (QueryGetActionOfSchemaResponse) { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/action_of_schema/{nftSchemaCode}/{name}"; } @@ -141,12 +139,22 @@ service Query { option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/action_of_schema"; } -// Queries a list of ListActionBySchema items. - rpc ListActionBySchema(QueryListActionBySchemaRequest) returns (QueryListActionBySchemaResponse) { - option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/list_action_by_schema/{nftSchemaCode}"; + // Queries a ExecutorOfSchema by index. + rpc ExecutorOfSchema(QueryGetExecutorOfSchemaRequest) returns (QueryGetExecutorOfSchemaResponse) { + option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/executor_of_schema/{nftSchemaCode}"; + } + + // Queries a list of ExecutorOfSchema items. + rpc ExecutorOfSchemaAll(QueryAllExecutorOfSchemaRequest) returns (QueryAllExecutorOfSchemaResponse) { + option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/executor_of_schema"; } -// this line is used by starport scaffolding # 2 + // Queries a AttributeOfSchema by index. + rpc AttributeOfSchema(QueryGetAttributeOfSchemaRequest) returns (QueryGetAttributeOfSchemaResponse) { + option (google.api.http).get = "/thesixnetwork/sixnft/nftmngr/attribute_of_schema/{nftSchemaCode}"; + } + + // this line is used by starport scaffolding # 2 } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -306,17 +314,6 @@ message QueryAllActionExecutorResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -message QueryActionExecutorbySchemaRequest { - string nftSchemaCode = 1; - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -message QueryActionExecutorbySchemaResponse { - string nftSchemaCode = 1; - repeated string executorAddress = 2; - cosmos.base.query.v1beta1.PageRequest pagination = 3; -} - message QueryGetSchemaAttributeRequest { string nftSchemaCode = 1; string name = 2; @@ -337,12 +334,10 @@ message QueryAllSchemaAttributeResponse { message QueryListAttributeBySchemaRequest { string nftSchemaCode = 1; - cosmos.base.query.v1beta1.PageRequest pagination = 2; } message QueryListAttributeBySchemaResponse { repeated SchemaAttribute schemaAttribute = 1 [(gogoproto.nullable) = false]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QueryGetActionOfSchemaRequest { @@ -364,15 +359,33 @@ message QueryAllActionOfSchemaResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -message QueryListActionBySchemaRequest { - string nftSchemaCode = 1; - cosmos.base.query.v1beta1.PageRequest pagination = 2; +message QueryGetExecutorOfSchemaRequest { + string nftSchemaCode = 1; + } -message QueryListActionBySchemaResponse { - string nftSchemaCode = 1; - repeated ActionOfSchema actionOfSchema = 2; - cosmos.base.query.v1beta1.PageResponse pagination = 3; +message QueryGetExecutorOfSchemaResponse { + ExecutorOfSchema executorOfSchema = 1 [(gogoproto.nullable) = false]; } +message QueryAllExecutorOfSchemaRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryAllExecutorOfSchemaResponse { + repeated ExecutorOfSchema executorOfSchema = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryGetAttributeOfSchemaRequest { + string nftSchemaCode = 1; + +} + +message QueryGetAttributeOfSchemaResponse { + string nftSchemaCode = 1; + repeated SchemaAttribute schemaAttribute = 2 [(gogoproto.nullable) = false]; +} + + // this line is used by starport scaffolding # 3 diff --git a/x/nftmngr/client/cli/query.go b/x/nftmngr/client/cli/query.go index 8809ec08..4a07afcf 100644 --- a/x/nftmngr/client/cli/query.go +++ b/x/nftmngr/client/cli/query.go @@ -42,16 +42,16 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdShowMetadataCreator()) cmd.AddCommand(CmdListActionExecutor()) cmd.AddCommand(CmdShowActionExecutor()) - cmd.AddCommand(CmdActionExecutorbySchema()) cmd.AddCommand(CmdListSchemaAttribute()) cmd.AddCommand(CmdShowSchemaAttribute()) - cmd.AddCommand(CmdListAttributeBySchema()) cmd.AddCommand(CmdListActionOfSchema()) cmd.AddCommand(CmdShowActionOfSchema()) - cmd.AddCommand(CmdListActionBySchema()) + cmd.AddCommand(CmdListExecutorOfSchema()) + cmd.AddCommand(CmdShowExecutorOfSchema()) + cmd.AddCommand(CmdShowAttributeOfSchema()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/nftmngr/client/cli/query_action_executorby_schema.go b/x/nftmngr/client/cli/query_action_executorby_schema.go deleted file mode 100644 index 66ee2387..00000000 --- a/x/nftmngr/client/cli/query_action_executorby_schema.go +++ /dev/null @@ -1,46 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - "github.com/thesixnetwork/sixnft/x/nftmngr/types" -) - -var _ = strconv.Itoa(0) - -func CmdActionExecutorbySchema() *cobra.Command { - cmd := &cobra.Command{ - Use: "action-executorby-schema [nft-schema-code]", - Short: "Query actionExecutorbySchema", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) (err error) { - reqNftSchemaCode := args[0] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryActionExecutorbySchemaRequest{ - - NftSchemaCode: reqNftSchemaCode, - } - - res, err := queryClient.ActionExecutorbySchema(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/nftmngr/client/cli/query_list_attribute_by_schema.go b/x/nftmngr/client/cli/query_attribute_of_schema.go similarity index 51% rename from x/nftmngr/client/cli/query_list_attribute_by_schema.go rename to x/nftmngr/client/cli/query_attribute_of_schema.go index 8746112e..23f17246 100644 --- a/x/nftmngr/client/cli/query_list_attribute_by_schema.go +++ b/x/nftmngr/client/cli/query_attribute_of_schema.go @@ -1,7 +1,7 @@ package cli import ( - "strconv" + "context" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -9,29 +9,23 @@ import ( "github.com/thesixnetwork/sixnft/x/nftmngr/types" ) -var _ = strconv.Itoa(0) - -func CmdListAttributeBySchema() *cobra.Command { +func CmdShowAttributeOfSchema() *cobra.Command { cmd := &cobra.Command{ - Use: "list-attribute-by-schema [nft-schema-code]", - Short: "Query listAttributeBySchema", + Use: "show-attribute-of-schema [nft-schema-code]", + Short: "shows a attribute_of_schema", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { - reqNftSchemaCode := args[0] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } + clientCtx := client.GetClientContextFromCmd(cmd) queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryListAttributeBySchemaRequest{ + argNftSchemaCode := args[0] - NftSchemaCode: reqNftSchemaCode, + params := &types.QueryGetAttributeOfSchemaRequest{ + NftSchemaCode: argNftSchemaCode, } - res, err := queryClient.ListAttributeBySchema(cmd.Context(), params) + res, err := queryClient.AttributeOfSchema(context.Background(), params) if err != nil { return err } diff --git a/x/nftmngr/client/cli/query_executor_of_schema.go b/x/nftmngr/client/cli/query_executor_of_schema.go new file mode 100644 index 00000000..26cc5dda --- /dev/null +++ b/x/nftmngr/client/cli/query_executor_of_schema.go @@ -0,0 +1,73 @@ +package cli + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +func CmdListExecutorOfSchema() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-executor-of-schema", + Short: "list all executor_of_schema", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAllExecutorOfSchemaRequest{ + Pagination: pageReq, + } + + res, err := queryClient.ExecutorOfSchemaAll(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdShowExecutorOfSchema() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-executor-of-schema [nft-schema-code]", + Short: "shows a executor_of_schema", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + argNftSchemaCode := args[0] + + params := &types.QueryGetExecutorOfSchemaRequest{ + NftSchemaCode: argNftSchemaCode, + } + + res, err := queryClient.ExecutorOfSchema(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/nftmngr/client/cli/query_executor_of_schema_test.go b/x/nftmngr/client/cli/query_executor_of_schema_test.go new file mode 100644 index 00000000..410c6c5c --- /dev/null +++ b/x/nftmngr/client/cli/query_executor_of_schema_test.go @@ -0,0 +1,161 @@ +package cli_test + +import ( + "fmt" + "strconv" + "testing" + + "github.com/cosmos/cosmos-sdk/client/flags" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/stretchr/testify/require" + tmcli "github.com/tendermint/tendermint/libs/cli" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/thesixnetwork/sixnft/testutil/network" + "github.com/thesixnetwork/sixnft/testutil/nullify" + "github.com/thesixnetwork/sixnft/x/nftmngr/client/cli" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func networkWithExecutorOfSchemaObjects(t *testing.T, n int) (*network.Network, []types.ExecutorOfSchema) { + t.Helper() + cfg := network.DefaultConfig() + state := types.GenesisState{} + require.NoError(t, cfg.Codec.UnmarshalJSON(cfg.GenesisState[types.ModuleName], &state)) + + for i := 0; i < n; i++ { + executorOfSchema := types.ExecutorOfSchema{ + NftSchemaCode: strconv.Itoa(i), + } + nullify.Fill(&executorOfSchema) + state.ExecutorOfSchemaList = append(state.ExecutorOfSchemaList, executorOfSchema) + } + buf, err := cfg.Codec.MarshalJSON(&state) + require.NoError(t, err) + cfg.GenesisState[types.ModuleName] = buf + return network.New(t, cfg), state.ExecutorOfSchemaList +} + +func TestShowExecutorOfSchema(t *testing.T) { + net, objs := networkWithExecutorOfSchemaObjects(t, 2) + + ctx := net.Validators[0].ClientCtx + common := []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + for _, tc := range []struct { + desc string + idNftSchemaCode string + + args []string + err error + obj types.ExecutorOfSchema + }{ + { + desc: "found", + idNftSchemaCode: objs[0].NftSchemaCode, + + args: common, + obj: objs[0], + }, + { + desc: "not found", + idNftSchemaCode: strconv.Itoa(100000), + + args: common, + err: status.Error(codes.NotFound, "not found"), + }, + } { + t.Run(tc.desc, func(t *testing.T) { + args := []string{ + tc.idNftSchemaCode, + } + args = append(args, tc.args...) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdShowExecutorOfSchema(), args) + if tc.err != nil { + stat, ok := status.FromError(tc.err) + require.True(t, ok) + require.ErrorIs(t, stat.Err(), tc.err) + } else { + require.NoError(t, err) + var resp types.QueryGetExecutorOfSchemaResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.NotNil(t, resp.ExecutorOfSchema) + require.Equal(t, + nullify.Fill(&tc.obj), + nullify.Fill(&resp.ExecutorOfSchema), + ) + } + }) + } +} + +func TestListExecutorOfSchema(t *testing.T) { + net, objs := networkWithExecutorOfSchemaObjects(t, 5) + + ctx := net.Validators[0].ClientCtx + request := func(next []byte, offset, limit uint64, total bool) []string { + args := []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + if next == nil { + args = append(args, fmt.Sprintf("--%s=%d", flags.FlagOffset, offset)) + } else { + args = append(args, fmt.Sprintf("--%s=%s", flags.FlagPageKey, next)) + } + args = append(args, fmt.Sprintf("--%s=%d", flags.FlagLimit, limit)) + if total { + args = append(args, fmt.Sprintf("--%s", flags.FlagCountTotal)) + } + return args + } + t.Run("ByOffset", func(t *testing.T) { + step := 2 + for i := 0; i < len(objs); i += step { + args := request(nil, uint64(i), uint64(step), false) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListExecutorOfSchema(), args) + require.NoError(t, err) + var resp types.QueryAllExecutorOfSchemaResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.LessOrEqual(t, len(resp.ExecutorOfSchema), step) + require.Subset(t, + nullify.Fill(objs), + nullify.Fill(resp.ExecutorOfSchema), + ) + } + }) + t.Run("ByKey", func(t *testing.T) { + step := 2 + var next []byte + for i := 0; i < len(objs); i += step { + args := request(next, 0, uint64(step), false) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListExecutorOfSchema(), args) + require.NoError(t, err) + var resp types.QueryAllExecutorOfSchemaResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.LessOrEqual(t, len(resp.ExecutorOfSchema), step) + require.Subset(t, + nullify.Fill(objs), + nullify.Fill(resp.ExecutorOfSchema), + ) + next = resp.Pagination.NextKey + } + }) + t.Run("Total", func(t *testing.T) { + args := request(nil, 0, uint64(len(objs)), true) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListExecutorOfSchema(), args) + require.NoError(t, err) + var resp types.QueryAllExecutorOfSchemaResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.NoError(t, err) + require.Equal(t, len(objs), int(resp.Pagination.Total)) + require.ElementsMatch(t, + nullify.Fill(objs), + nullify.Fill(resp.ExecutorOfSchema), + ) + }) +} diff --git a/x/nftmngr/client/cli/query_list_action_by_schema.go b/x/nftmngr/client/cli/query_list_action_by_schema.go deleted file mode 100644 index 420a99ef..00000000 --- a/x/nftmngr/client/cli/query_list_action_by_schema.go +++ /dev/null @@ -1,52 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - "github.com/thesixnetwork/sixnft/x/nftmngr/types" -) - -var _ = strconv.Itoa(0) - -func CmdListActionBySchema() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-action-by-schema [nft-schema-code]", - Short: "Query listActionBySchema", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) (err error) { - reqNftSchemaCode := args[0] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryListActionBySchemaRequest{ - - NftSchemaCode: reqNftSchemaCode, - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - params.Pagination = pageReq - - res, err := queryClient.ListActionBySchema(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/nftmngr/genesis.go b/x/nftmngr/genesis.go index 52d8c261..7347eb9a 100644 --- a/x/nftmngr/genesis.go +++ b/x/nftmngr/genesis.go @@ -61,6 +61,14 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) for _, elem := range genState.ActionOfSchemaList { k.SetActionOfSchema(ctx, elem) } + // Set all the executorOfSchema + for _, elem := range genState.ExecutorOfSchemaList { + k.SetExecutorOfSchema(ctx, elem) + } + // Set all the attributeOfSchema + for _, elem := range genState.AttributeOfSchemaList { + k.SetAttributeOfSchema(ctx, elem) + } // this line is used by starport scaffolding # genesis/module/init k.SetParams(ctx, genState.Params) } @@ -90,6 +98,8 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis.ActionExecutorList = k.GetAllActionExecutor(ctx) genesis.SchemaAttributeList = k.GetAllSchemaAttribute(ctx) genesis.ActionOfSchemaList = k.GetAllActionOfSchema(ctx) + genesis.ExecutorOfSchemaList = k.GetAllExecutorOfSchema(ctx) + genesis.AttributeOfSchemaList = k.GetAllAttributeOfSchema(ctx) // this line is used by starport scaffolding # genesis/module/export return genesis diff --git a/x/nftmngr/genesis_test.go b/x/nftmngr/genesis_test.go index 9fe23ed2..4a24655c 100644 --- a/x/nftmngr/genesis_test.go +++ b/x/nftmngr/genesis_test.go @@ -105,6 +105,22 @@ func TestGenesis(t *testing.T) { Name: "1", }, }, + ExecutorOfSchemaList: []types.ExecutorOfSchema{ + { + NftSchemaCode: "0", + }, + { + NftSchemaCode: "1", + }, + }, + AttributeOfSchemaList: []types.AttributeOfSchema{ + { + NftSchemaCode: "0", + }, + { + NftSchemaCode: "1", + }, + }, // this line is used by starport scaffolding # genesis/test/state } @@ -128,5 +144,7 @@ func TestGenesis(t *testing.T) { require.ElementsMatch(t, genesisState.ActionExecutorList, got.ActionExecutorList) require.ElementsMatch(t, genesisState.SchemaAttributeList, got.SchemaAttributeList) require.ElementsMatch(t, genesisState.ActionOfSchemaList, got.ActionOfSchemaList) + require.ElementsMatch(t, genesisState.ExecutorOfSchemaList, got.ExecutorOfSchemaList) + require.ElementsMatch(t, genesisState.AttributeOfSchemaList, got.AttributeOfSchemaList) // this line is used by starport scaffolding # genesis/test/assert } diff --git a/x/nftmngr/keeper/attribute_of_schema.go b/x/nftmngr/keeper/attribute_of_schema.go new file mode 100644 index 00000000..7c8504b5 --- /dev/null +++ b/x/nftmngr/keeper/attribute_of_schema.go @@ -0,0 +1,63 @@ +package keeper + +import ( + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +// SetAttributeOfSchema set a specific attributeOfSchema in the store from its index +func (k Keeper) SetAttributeOfSchema(ctx sdk.Context, attributeOfSchema types.AttributeOfSchema) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AttributeOfSchemaKeyPrefix)) + b := k.cdc.MustMarshal(&attributeOfSchema) + store.Set(types.AttributeOfSchemaKey( + attributeOfSchema.NftSchemaCode, + ), b) +} + +// GetAttributeOfSchema returns a attributeOfSchema from its index +func (k Keeper) GetAttributeOfSchema( + ctx sdk.Context, + nftSchemaCode string, + +) (val types.AttributeOfSchema, found bool) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AttributeOfSchemaKeyPrefix)) + + b := store.Get(types.AttributeOfSchemaKey( + nftSchemaCode, + )) + if b == nil { + return val, false + } + + k.cdc.MustUnmarshal(b, &val) + return val, true +} + +// RemoveAttributeOfSchema removes a attributeOfSchema from the store +func (k Keeper) RemoveAttributeOfSchema( + ctx sdk.Context, + nftSchemaCode string, + +) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AttributeOfSchemaKeyPrefix)) + store.Delete(types.AttributeOfSchemaKey( + nftSchemaCode, + )) +} + +// GetAllAttributeOfSchema returns all attributeOfSchema +func (k Keeper) GetAllAttributeOfSchema(ctx sdk.Context) (list []types.AttributeOfSchema) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AttributeOfSchemaKeyPrefix)) + iterator := sdk.KVStorePrefixIterator(store, []byte{}) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.AttributeOfSchema + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} diff --git a/x/nftmngr/keeper/attribute_of_schema_test.go b/x/nftmngr/keeper/attribute_of_schema_test.go new file mode 100644 index 00000000..881a8d89 --- /dev/null +++ b/x/nftmngr/keeper/attribute_of_schema_test.go @@ -0,0 +1,63 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + keepertest "github.com/thesixnetwork/sixnft/testutil/keeper" + "github.com/thesixnetwork/sixnft/testutil/nullify" + "github.com/thesixnetwork/sixnft/x/nftmngr/keeper" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func createNAttributeOfSchema(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.AttributeOfSchema { + items := make([]types.AttributeOfSchema, n) + for i := range items { + items[i].NftSchemaCode = strconv.Itoa(i) + + keeper.SetAttributeOfSchema(ctx, items[i]) + } + return items +} + +func TestAttributeOfSchemaGet(t *testing.T) { + keeper, ctx := keepertest.NftmngrKeeper(t) + items := createNAttributeOfSchema(keeper, ctx, 10) + for _, item := range items { + rst, found := keeper.GetAttributeOfSchema(ctx, + item.NftSchemaCode, + ) + require.True(t, found) + require.Equal(t, + nullify.Fill(&item), + nullify.Fill(&rst), + ) + } +} +func TestAttributeOfSchemaRemove(t *testing.T) { + keeper, ctx := keepertest.NftmngrKeeper(t) + items := createNAttributeOfSchema(keeper, ctx, 10) + for _, item := range items { + keeper.RemoveAttributeOfSchema(ctx, + item.NftSchemaCode, + ) + _, found := keeper.GetAttributeOfSchema(ctx, + item.NftSchemaCode, + ) + require.False(t, found) + } +} + +func TestAttributeOfSchemaGetAll(t *testing.T) { + keeper, ctx := keepertest.NftmngrKeeper(t) + items := createNAttributeOfSchema(keeper, ctx, 10) + require.ElementsMatch(t, + nullify.Fill(items), + nullify.Fill(keeper.GetAllAttributeOfSchema(ctx)), + ) +} diff --git a/x/nftmngr/keeper/executor_of_schema.go b/x/nftmngr/keeper/executor_of_schema.go new file mode 100644 index 00000000..782e903a --- /dev/null +++ b/x/nftmngr/keeper/executor_of_schema.go @@ -0,0 +1,63 @@ +package keeper + +import ( + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +// SetExecutorOfSchema set a specific executorOfSchema in the store from its index +func (k Keeper) SetExecutorOfSchema(ctx sdk.Context, executorOfSchema types.ExecutorOfSchema) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ExecutorOfSchemaKeyPrefix)) + b := k.cdc.MustMarshal(&executorOfSchema) + store.Set(types.ExecutorOfSchemaKey( + executorOfSchema.NftSchemaCode, + ), b) +} + +// GetExecutorOfSchema returns a executorOfSchema from its index +func (k Keeper) GetExecutorOfSchema( + ctx sdk.Context, + nftSchemaCode string, + +) (val types.ExecutorOfSchema, found bool) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ExecutorOfSchemaKeyPrefix)) + + b := store.Get(types.ExecutorOfSchemaKey( + nftSchemaCode, + )) + if b == nil { + return val, false + } + + k.cdc.MustUnmarshal(b, &val) + return val, true +} + +// RemoveExecutorOfSchema removes a executorOfSchema from the store +func (k Keeper) RemoveExecutorOfSchema( + ctx sdk.Context, + nftSchemaCode string, + +) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ExecutorOfSchemaKeyPrefix)) + store.Delete(types.ExecutorOfSchemaKey( + nftSchemaCode, + )) +} + +// GetAllExecutorOfSchema returns all executorOfSchema +func (k Keeper) GetAllExecutorOfSchema(ctx sdk.Context) (list []types.ExecutorOfSchema) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ExecutorOfSchemaKeyPrefix)) + iterator := sdk.KVStorePrefixIterator(store, []byte{}) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.ExecutorOfSchema + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} diff --git a/x/nftmngr/keeper/executor_of_schema_test.go b/x/nftmngr/keeper/executor_of_schema_test.go new file mode 100644 index 00000000..77aaa57f --- /dev/null +++ b/x/nftmngr/keeper/executor_of_schema_test.go @@ -0,0 +1,63 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + keepertest "github.com/thesixnetwork/sixnft/testutil/keeper" + "github.com/thesixnetwork/sixnft/testutil/nullify" + "github.com/thesixnetwork/sixnft/x/nftmngr/keeper" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func createNExecutorOfSchema(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.ExecutorOfSchema { + items := make([]types.ExecutorOfSchema, n) + for i := range items { + items[i].NftSchemaCode = strconv.Itoa(i) + + keeper.SetExecutorOfSchema(ctx, items[i]) + } + return items +} + +func TestExecutorOfSchemaGet(t *testing.T) { + keeper, ctx := keepertest.NftmngrKeeper(t) + items := createNExecutorOfSchema(keeper, ctx, 10) + for _, item := range items { + rst, found := keeper.GetExecutorOfSchema(ctx, + item.NftSchemaCode, + ) + require.True(t, found) + require.Equal(t, + nullify.Fill(&item), + nullify.Fill(&rst), + ) + } +} +func TestExecutorOfSchemaRemove(t *testing.T) { + keeper, ctx := keepertest.NftmngrKeeper(t) + items := createNExecutorOfSchema(keeper, ctx, 10) + for _, item := range items { + keeper.RemoveExecutorOfSchema(ctx, + item.NftSchemaCode, + ) + _, found := keeper.GetExecutorOfSchema(ctx, + item.NftSchemaCode, + ) + require.False(t, found) + } +} + +func TestExecutorOfSchemaGetAll(t *testing.T) { + keeper, ctx := keepertest.NftmngrKeeper(t) + items := createNExecutorOfSchema(keeper, ctx, 10) + require.ElementsMatch(t, + nullify.Fill(items), + nullify.Fill(keeper.GetAllExecutorOfSchema(ctx)), + ) +} diff --git a/x/nftmngr/keeper/grpc_query_action_executor_by_schema.go b/x/nftmngr/keeper/grpc_query_action_executor_by_schema.go deleted file mode 100644 index fc84fca6..00000000 --- a/x/nftmngr/keeper/grpc_query_action_executor_by_schema.go +++ /dev/null @@ -1,48 +0,0 @@ -package keeper - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" - "github.com/thesixnetwork/sixnft/x/nftmngr/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (k Keeper) ActionExecutorbySchema(c context.Context, req *types.QueryActionExecutorbySchemaRequest) (*types.QueryActionExecutorbySchemaResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var actionExecutors []types.ActionExecutor - ctx := sdk.UnwrapSDKContext(c) - - store := ctx.KVStore(k.storeKey) - actionExecutorStore := prefix.NewStore(store, types.KeyPrefix(types.ActionExecutorKeyPrefix)) - - _, err := query.Paginate(actionExecutorStore, req.Pagination, func(key []byte, value []byte) error { - var actionExecutor types.ActionExecutor - if err := k.cdc.Unmarshal(value, &actionExecutor); err != nil { - return err - } - - actionExecutors = append(actionExecutors, actionExecutor) - return nil - }) - - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - var executorAddresses []string - // find all actionExecutors by schema - for _, actionExecutor := range actionExecutors { - if actionExecutor.NftSchemaCode == req.NftSchemaCode { - executorAddresses = append(executorAddresses, actionExecutor.ExecutorAddress) - } - } - - return &types.QueryActionExecutorbySchemaResponse{NftSchemaCode: req.NftSchemaCode, ExecutorAddress: executorAddresses}, nil -} diff --git a/x/nftmngr/keeper/grpc_query_attribute_of_schema.go b/x/nftmngr/keeper/grpc_query_attribute_of_schema.go new file mode 100644 index 00000000..7478aff9 --- /dev/null +++ b/x/nftmngr/keeper/grpc_query_attribute_of_schema.go @@ -0,0 +1,32 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) AttributeOfSchema(c context.Context, req *types.QueryGetAttributeOfSchemaRequest) (*types.QueryGetAttributeOfSchemaResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + + val, found := k.GetAttributeOfSchema( + ctx, + req.NftSchemaCode, + ) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + + var schemaAttributes []types.SchemaAttribute + for _, v := range val.SchemaAttributes { + schemaAttributes = append(schemaAttributes, *v) + } + + return &types.QueryGetAttributeOfSchemaResponse{NftSchemaCode: val.NftSchemaCode, SchemaAttribute: schemaAttributes}, nil +} diff --git a/x/nftmngr/keeper/grpc_query_attribute_of_schema_test.go b/x/nftmngr/keeper/grpc_query_attribute_of_schema_test.go new file mode 100644 index 00000000..f894e719 --- /dev/null +++ b/x/nftmngr/keeper/grpc_query_attribute_of_schema_test.go @@ -0,0 +1,69 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + keepertest "github.com/thesixnetwork/sixnft/testutil/keeper" + "github.com/thesixnetwork/sixnft/testutil/nullify" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func TestAttributeOfSchemaQuerySingle(t *testing.T) { + keeper, ctx := keepertest.NftmngrKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNAttributeOfSchema(keeper, ctx, 2) + for _, tc := range []struct { + desc string + request *types.QueryGetAttributeOfSchemaRequest + response *types.QueryGetAttributeOfSchemaResponse + err error + }{ + { + desc: "First", + request: &types.QueryGetAttributeOfSchemaRequest{ + NftSchemaCode: msgs[0].NftSchemaCode, + }, + response: &types.QueryGetAttributeOfSchemaResponse{}, + }, + { + desc: "Second", + request: &types.QueryGetAttributeOfSchemaRequest{ + NftSchemaCode: msgs[1].NftSchemaCode, + }, + response: &types.QueryGetAttributeOfSchemaResponse{}, + }, + { + desc: "KeyNotFound", + request: &types.QueryGetAttributeOfSchemaRequest{ + NftSchemaCode: strconv.Itoa(100000), + }, + err: status.Error(codes.NotFound, "not found"), + }, + { + desc: "InvalidRequest", + err: status.Error(codes.InvalidArgument, "invalid request"), + }, + } { + t.Run(tc.desc, func(t *testing.T) { + response, err := keeper.AttributeOfSchema(wctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + require.Equal(t, + nullify.Fill(tc.response), + nullify.Fill(response), + ) + } + }) + } +} diff --git a/x/nftmngr/keeper/grpc_query_executor_of_schema.go b/x/nftmngr/keeper/grpc_query_executor_of_schema.go new file mode 100644 index 00000000..8ab1211f --- /dev/null +++ b/x/nftmngr/keeper/grpc_query_executor_of_schema.go @@ -0,0 +1,57 @@ +package keeper + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) ExecutorOfSchemaAll(c context.Context, req *types.QueryAllExecutorOfSchemaRequest) (*types.QueryAllExecutorOfSchemaResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var executorOfSchemas []types.ExecutorOfSchema + ctx := sdk.UnwrapSDKContext(c) + + store := ctx.KVStore(k.storeKey) + executorOfSchemaStore := prefix.NewStore(store, types.KeyPrefix(types.ExecutorOfSchemaKeyPrefix)) + + pageRes, err := query.Paginate(executorOfSchemaStore, req.Pagination, func(key []byte, value []byte) error { + var executorOfSchema types.ExecutorOfSchema + if err := k.cdc.Unmarshal(value, &executorOfSchema); err != nil { + return err + } + + executorOfSchemas = append(executorOfSchemas, executorOfSchema) + return nil + }) + + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryAllExecutorOfSchemaResponse{ExecutorOfSchema: executorOfSchemas, Pagination: pageRes}, nil +} + +func (k Keeper) ExecutorOfSchema(c context.Context, req *types.QueryGetExecutorOfSchemaRequest) (*types.QueryGetExecutorOfSchemaResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + + val, found := k.GetExecutorOfSchema( + ctx, + req.NftSchemaCode, + ) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + + return &types.QueryGetExecutorOfSchemaResponse{ExecutorOfSchema: val}, nil +} diff --git a/x/nftmngr/keeper/grpc_query_executor_of_schema_test.go b/x/nftmngr/keeper/grpc_query_executor_of_schema_test.go new file mode 100644 index 00000000..3e3291c6 --- /dev/null +++ b/x/nftmngr/keeper/grpc_query_executor_of_schema_test.go @@ -0,0 +1,126 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + keepertest "github.com/thesixnetwork/sixnft/testutil/keeper" + "github.com/thesixnetwork/sixnft/testutil/nullify" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func TestExecutorOfSchemaQuerySingle(t *testing.T) { + keeper, ctx := keepertest.NftmngrKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNExecutorOfSchema(keeper, ctx, 2) + for _, tc := range []struct { + desc string + request *types.QueryGetExecutorOfSchemaRequest + response *types.QueryGetExecutorOfSchemaResponse + err error + }{ + { + desc: "First", + request: &types.QueryGetExecutorOfSchemaRequest{ + NftSchemaCode: msgs[0].NftSchemaCode, + }, + response: &types.QueryGetExecutorOfSchemaResponse{ExecutorOfSchema: msgs[0]}, + }, + { + desc: "Second", + request: &types.QueryGetExecutorOfSchemaRequest{ + NftSchemaCode: msgs[1].NftSchemaCode, + }, + response: &types.QueryGetExecutorOfSchemaResponse{ExecutorOfSchema: msgs[1]}, + }, + { + desc: "KeyNotFound", + request: &types.QueryGetExecutorOfSchemaRequest{ + NftSchemaCode: strconv.Itoa(100000), + }, + err: status.Error(codes.NotFound, "not found"), + }, + { + desc: "InvalidRequest", + err: status.Error(codes.InvalidArgument, "invalid request"), + }, + } { + t.Run(tc.desc, func(t *testing.T) { + response, err := keeper.ExecutorOfSchema(wctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + require.Equal(t, + nullify.Fill(tc.response), + nullify.Fill(response), + ) + } + }) + } +} + +func TestExecutorOfSchemaQueryPaginated(t *testing.T) { + keeper, ctx := keepertest.NftmngrKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNExecutorOfSchema(keeper, ctx, 5) + + request := func(next []byte, offset, limit uint64, total bool) *types.QueryAllExecutorOfSchemaRequest { + return &types.QueryAllExecutorOfSchemaRequest{ + Pagination: &query.PageRequest{ + Key: next, + Offset: offset, + Limit: limit, + CountTotal: total, + }, + } + } + t.Run("ByOffset", func(t *testing.T) { + step := 2 + for i := 0; i < len(msgs); i += step { + resp, err := keeper.ExecutorOfSchemaAll(wctx, request(nil, uint64(i), uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.ExecutorOfSchema), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.ExecutorOfSchema), + ) + } + }) + t.Run("ByKey", func(t *testing.T) { + step := 2 + var next []byte + for i := 0; i < len(msgs); i += step { + resp, err := keeper.ExecutorOfSchemaAll(wctx, request(next, 0, uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.ExecutorOfSchema), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.ExecutorOfSchema), + ) + next = resp.Pagination.NextKey + } + }) + t.Run("Total", func(t *testing.T) { + resp, err := keeper.ExecutorOfSchemaAll(wctx, request(nil, 0, 0, true)) + require.NoError(t, err) + require.Equal(t, len(msgs), int(resp.Pagination.Total)) + require.ElementsMatch(t, + nullify.Fill(msgs), + nullify.Fill(resp.ExecutorOfSchema), + ) + }) + t.Run("InvalidRequest", func(t *testing.T) { + _, err := keeper.ExecutorOfSchemaAll(wctx, nil) + require.ErrorIs(t, err, status.Error(codes.InvalidArgument, "invalid request")) + }) +} diff --git a/x/nftmngr/keeper/grpc_query_list_action_by_schema.go b/x/nftmngr/keeper/grpc_query_list_action_by_schema.go deleted file mode 100644 index 91daea70..00000000 --- a/x/nftmngr/keeper/grpc_query_list_action_by_schema.go +++ /dev/null @@ -1,44 +0,0 @@ -package keeper - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" - "github.com/thesixnetwork/sixnft/x/nftmngr/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (k Keeper) ListActionBySchema(goCtx context.Context, req *types.QueryListActionBySchemaRequest) (*types.QueryListActionBySchemaResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(goCtx) - var actionOfSchemas []*types.ActionOfSchema - - store := ctx.KVStore(k.storeKey) - actionOfSchemaStore := prefix.NewStore(store, types.KeyPrefix(types.ActionOfSchemaKeyPrefix)) - - pagination, err := query.Paginate(actionOfSchemaStore, req.Pagination, func(key []byte, value []byte) error { - var actionSchema types.ActionOfSchema - if err := k.cdc.Unmarshal(value, &actionSchema); err != nil { - return err - } - if actionSchema.NftSchemaCode == req.NftSchemaCode { - actionOfSchemas = append(actionOfSchemas, &actionSchema) - } - return nil - }) - - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - pagination.Total = uint64(len(actionOfSchemas)) - - return &types.QueryListActionBySchemaResponse{NftSchemaCode: req.GetNftSchemaCode(), ActionOfSchema: actionOfSchemas, Pagination: pagination}, nil - -} diff --git a/x/nftmngr/keeper/grpc_query_list_attribute_by_schema.go b/x/nftmngr/keeper/grpc_query_list_attribute_by_schema.go index 7c203d3a..e6f456f5 100644 --- a/x/nftmngr/keeper/grpc_query_list_attribute_by_schema.go +++ b/x/nftmngr/keeper/grpc_query_list_attribute_by_schema.go @@ -3,9 +3,7 @@ package keeper import ( "context" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" "github.com/thesixnetwork/sixnft/x/nftmngr/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -20,33 +18,19 @@ func (k Keeper) ListAttributeBySchema(goCtx context.Context, req *types.QueryLis ctx := sdk.UnwrapSDKContext(goCtx) store := ctx.KVStore(k.storeKey) - schemaAttributesStore := prefix.NewStore(store, types.KeyPrefix(types.SchemaAttributeKeyPrefix)) + iterator := sdk.KVStorePrefixIterator(store, []byte{}) - pagination, err := query.Paginate(schemaAttributesStore, req.Pagination, func(key []byte, value []byte) error { - var schemaAttribute types.SchemaAttribute - if err := k.cdc.Unmarshal(value, &schemaAttribute); err != nil { - return err - } + defer iterator.Close() - schemaAttributes = append(schemaAttributes, schemaAttribute) - return nil - }) - - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - var listOfSchemaAttibutes []types.SchemaAttribute - // find all actionExecutors by schema - for _, attribute := range schemaAttributes { - if attribute.NftSchemaCode == req.NftSchemaCode { - listOfSchemaAttibutes = append(listOfSchemaAttibutes, attribute) + for ; iterator.Valid(); iterator.Next() { + var schemaAttribute types.SchemaAttribute + k.cdc.MustUnmarshal(iterator.Value(), &schemaAttribute) + if schemaAttribute.NftSchemaCode == req.NftSchemaCode { + schemaAttributes = append(schemaAttributes, schemaAttribute) } } - pagination.Total = uint64(len(listOfSchemaAttibutes)) - - return &types.QueryListAttributeBySchemaResponse{SchemaAttribute: listOfSchemaAttibutes, Pagination: pagination}, nil + return &types.QueryListAttributeBySchemaResponse{SchemaAttribute: schemaAttributes}, nil } // func (k Keeper) ListAttributeBySchemaUsingCtx(ctx sdk.Context, req Pagination *query.PageRequest) ([]*types.SchemaAttribute, error) { diff --git a/x/nftmngr/keeper/msg_server_action_executor.go b/x/nftmngr/keeper/msg_server_action_executor.go index bae02aa1..1cd389bc 100644 --- a/x/nftmngr/keeper/msg_server_action_executor.go +++ b/x/nftmngr/keeper/msg_server_action_executor.go @@ -45,6 +45,22 @@ func (k msgServer) CreateActionExecutor(goCtx context.Context, msg *types.MsgCre ExecutorAddress: msg.ExecutorAddress, } + val, found := k.GetExecutorOfSchema(ctx, msg.NftSchemaCode) + if !found { + val = types.ExecutorOfSchema{ + NftSchemaCode: msg.NftSchemaCode, + ExecutorAddress: []string{}, + } + } + + // set executorOfSchema + val.ExecutorAddress = append(val.ExecutorAddress, msg.ExecutorAddress) + + k.SetExecutorOfSchema(ctx, types.ExecutorOfSchema{ + NftSchemaCode: msg.NftSchemaCode, + ExecutorAddress: val.ExecutorAddress, + }) + k.SetActionExecutor( ctx, actionExecutor, @@ -100,6 +116,22 @@ func (k msgServer) UpdateActionExecutor(goCtx context.Context, msg *types.MsgUpd ExecutorAddress: msg.ExecutorAddress, } + val, found := k.GetExecutorOfSchema(ctx, msg.NftSchemaCode) + if !found { + val = types.ExecutorOfSchema{ + NftSchemaCode: msg.NftSchemaCode, + ExecutorAddress: []string{}, + } + } + + // set executorOfSchema + val.ExecutorAddress = append(val.ExecutorAddress, msg.ExecutorAddress) + + k.SetExecutorOfSchema(ctx, types.ExecutorOfSchema{ + NftSchemaCode: msg.NftSchemaCode, + ExecutorAddress: val.ExecutorAddress, + }) + k.SetActionExecutor(ctx, actionExecutor) // emit events @@ -142,6 +174,27 @@ func (k msgServer) DeleteActionExecutor(goCtx context.Context, msg *types.MsgDel msg.ExecutorAddress, ) + val, found := k.GetExecutorOfSchema(ctx, msg.NftSchemaCode) + if !found { + val = types.ExecutorOfSchema{ + NftSchemaCode: msg.NftSchemaCode, + ExecutorAddress: []string{}, + } + } + + // remove executorOfSchema + for i, executor := range val.ExecutorAddress { + if executor == msg.ExecutorAddress { + val.ExecutorAddress = append(val.ExecutorAddress[:i], val.ExecutorAddress[i+1:]...) + break + } + } + + k.SetExecutorOfSchema(ctx, types.ExecutorOfSchema{ + NftSchemaCode: msg.NftSchemaCode, + ExecutorAddress: val.ExecutorAddress, + }) + // emit events ctx.EventManager().EmitEvent( sdk.NewEvent( diff --git a/x/nftmngr/keeper/msg_server_add_action.go b/x/nftmngr/keeper/msg_server_add_action.go index c0a08c75..a815c26c 100644 --- a/x/nftmngr/keeper/msg_server_add_action.go +++ b/x/nftmngr/keeper/msg_server_add_action.go @@ -49,10 +49,10 @@ func (k msgServer) AddAction(goCtx context.Context, msg *types.MsgAddAction) (*t schema.OnchainData.Actions = append(schema.OnchainData.Actions, &new_action) // save index of action - k.Keeper.SetActionOfSchema(ctx,types.ActionOfSchema{ - Name: new_action.Name, + k.Keeper.SetActionOfSchema(ctx, types.ActionOfSchema{ + Name: new_action.Name, NftSchemaCode: schema.Code, - Index: uint64(len(schema.OnchainData.Actions) - 1), + Index: uint64(len(schema.OnchainData.Actions) - 1), }) // save schema diff --git a/x/nftmngr/keeper/msg_server_create_nft_schema.go b/x/nftmngr/keeper/msg_server_create_nft_schema.go index 8abbc2dd..bf0d0abb 100644 --- a/x/nftmngr/keeper/msg_server_create_nft_schema.go +++ b/x/nftmngr/keeper/msg_server_create_nft_schema.go @@ -87,6 +87,8 @@ func (k msgServer) CreateNFTSchema(goCtx context.Context, msg *types.MsgCreateNF MintAuthorization: schema_input.MintAuthorization, } + var schemaAttributes []*types.SchemaAttribute + // loop over SchemaAttribute and add to nftmngr/code/name for _, scheamDefaultMintAttribute := range schema_input.OnchainData.SchemaAttributes { // parse DefaultMintValue to SchemaAttributeValue @@ -107,8 +109,26 @@ func (k msgServer) CreateNFTSchema(goCtx context.Context, msg *types.MsgCreateNF HiddenToMarketplace: scheamDefaultMintAttribute.HiddenToMarketplace, Creator: msg.Creator, }) + + schemaAttributes = append(schemaAttributes, &types.SchemaAttribute{ + NftSchemaCode: schema_input.Code, + Name: scheamDefaultMintAttribute.Name, + DataType: scheamDefaultMintAttribute.DataType, + Required: scheamDefaultMintAttribute.Required, + DisplayValueField: scheamDefaultMintAttribute.DisplayValueField, + DisplayOption: scheamDefaultMintAttribute.DisplayOption, + CurrentValue: schmaAttributeValue, + HiddenOveride: scheamDefaultMintAttribute.HiddenOveride, + HiddenToMarketplace: scheamDefaultMintAttribute.HiddenToMarketplace, + Creator: msg.Creator, + }) } + k.SetAttributeOfSchema(ctx, types.AttributeOfSchema{ + NftSchemaCode: schema_input.Code, + SchemaAttributes: schemaAttributes, + }) + // Add the schema_input to the store k.Keeper.SetNFTSchema(ctx, schema) @@ -142,6 +162,22 @@ func (k msgServer) CreateNFTSchema(goCtx context.Context, msg *types.MsgCreateNF continue } + val, found := k.GetExecutorOfSchema(ctx, schema_input.Code) + if !found { + val = types.ExecutorOfSchema{ + NftSchemaCode: schema_input.Code, + ExecutorAddress: []string{}, + } + } + + // set executorOfSchema + val.ExecutorAddress = append(val.ExecutorAddress, actionExecutor) + + k.SetExecutorOfSchema(ctx, types.ExecutorOfSchema{ + NftSchemaCode: schema_input.Code, + ExecutorAddress: val.ExecutorAddress, + }) + // set actionExecutor k.SetActionExecutor(ctx, types.ActionExecutor{ Creator: msg.Creator, diff --git a/x/nftmngr/keeper/msg_server_schema_attribute.go b/x/nftmngr/keeper/msg_server_schema_attribute.go index 011a36da..eef0959e 100644 --- a/x/nftmngr/keeper/msg_server_schema_attribute.go +++ b/x/nftmngr/keeper/msg_server_schema_attribute.go @@ -43,7 +43,6 @@ func (k msgServer) UpdateSchemaAttribute(goCtx context.Context, msg *types.MsgUp return nil, sdkerrors.Wrap(types.ErrCreatorDoesNotMatch, msg.Creator) } - err = ValidateAttributeNames([]*types.AttributeDefinition{&update_attribute}) if err != nil { return nil, sdkerrors.Wrap(types.ErrValidatingMetadata, err.Error()) diff --git a/x/nftmngr/types/attribute_of_schema.pb.go b/x/nftmngr/types/attribute_of_schema.pb.go new file mode 100644 index 00000000..ca423689 --- /dev/null +++ b/x/nftmngr/types/attribute_of_schema.pb.go @@ -0,0 +1,380 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: nftmngr/attribute_of_schema.proto + +package types + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type AttributeOfSchema struct { + NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` + SchemaAttributes []*SchemaAttribute `protobuf:"bytes,2,rep,name=schemaAttributes,proto3" json:"schemaAttributes,omitempty"` +} + +func (m *AttributeOfSchema) Reset() { *m = AttributeOfSchema{} } +func (m *AttributeOfSchema) String() string { return proto.CompactTextString(m) } +func (*AttributeOfSchema) ProtoMessage() {} +func (*AttributeOfSchema) Descriptor() ([]byte, []int) { + return fileDescriptor_176788f85b418b2c, []int{0} +} +func (m *AttributeOfSchema) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AttributeOfSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AttributeOfSchema.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 *AttributeOfSchema) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributeOfSchema.Merge(m, src) +} +func (m *AttributeOfSchema) XXX_Size() int { + return m.Size() +} +func (m *AttributeOfSchema) XXX_DiscardUnknown() { + xxx_messageInfo_AttributeOfSchema.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributeOfSchema proto.InternalMessageInfo + +func (m *AttributeOfSchema) GetNftSchemaCode() string { + if m != nil { + return m.NftSchemaCode + } + return "" +} + +func (m *AttributeOfSchema) GetSchemaAttributes() []*SchemaAttribute { + if m != nil { + return m.SchemaAttributes + } + return nil +} + +func init() { + proto.RegisterType((*AttributeOfSchema)(nil), "thesixnetwork.sixnft.nftmngr.AttributeOfSchema") +} + +func init() { proto.RegisterFile("nftmngr/attribute_of_schema.proto", fileDescriptor_176788f85b418b2c) } + +var fileDescriptor_176788f85b418b2c = []byte{ + // 217 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcc, 0x4b, 0x2b, 0xc9, + 0xcd, 0x4b, 0x2f, 0xd2, 0x4f, 0x2c, 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x8d, 0xcf, 0x4f, + 0x8b, 0x2f, 0x4e, 0xce, 0x48, 0xcd, 0x4d, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x29, + 0xc9, 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0x03, 0x31, 0xd3, + 0x4a, 0xf4, 0xa0, 0xfa, 0xa4, 0xe4, 0x60, 0x06, 0x40, 0xf4, 0xc4, 0xc3, 0xcd, 0x81, 0xe8, 0x56, + 0x9a, 0xc2, 0xc8, 0x25, 0xe8, 0x08, 0x13, 0xf3, 0x4f, 0x0b, 0x06, 0xab, 0x12, 0x52, 0xe1, 0xe2, + 0xcd, 0x4b, 0x2b, 0x81, 0x70, 0x9c, 0xf3, 0x53, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, + 0x50, 0x05, 0x85, 0x22, 0xb9, 0x04, 0x20, 0xa6, 0xc2, 0x0d, 0x28, 0x96, 0x60, 0x52, 0x60, 0xd6, + 0xe0, 0x36, 0xd2, 0xd5, 0xc3, 0xe7, 0x28, 0xbd, 0x60, 0x54, 0x5d, 0x41, 0x18, 0xc6, 0x38, 0x79, + 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, + 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x7e, 0x7a, 0x66, 0x49, 0x46, + 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x8a, 0x25, 0xfa, 0x10, 0x4b, 0xf4, 0x2b, 0xf4, 0x61, + 0x5e, 0x2e, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x7b, 0xd4, 0x18, 0x10, 0x00, 0x00, 0xff, + 0xff, 0x36, 0x0c, 0x0b, 0xe8, 0x4b, 0x01, 0x00, 0x00, +} + +func (m *AttributeOfSchema) 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 *AttributeOfSchema) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttributeOfSchema) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SchemaAttributes) > 0 { + for iNdEx := len(m.SchemaAttributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SchemaAttributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributeOfSchema(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.NftSchemaCode) > 0 { + i -= len(m.NftSchemaCode) + copy(dAtA[i:], m.NftSchemaCode) + i = encodeVarintAttributeOfSchema(dAtA, i, uint64(len(m.NftSchemaCode))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintAttributeOfSchema(dAtA []byte, offset int, v uint64) int { + offset -= sovAttributeOfSchema(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AttributeOfSchema) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NftSchemaCode) + if l > 0 { + n += 1 + l + sovAttributeOfSchema(uint64(l)) + } + if len(m.SchemaAttributes) > 0 { + for _, e := range m.SchemaAttributes { + l = e.Size() + n += 1 + l + sovAttributeOfSchema(uint64(l)) + } + } + return n +} + +func sovAttributeOfSchema(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAttributeOfSchema(x uint64) (n int) { + return sovAttributeOfSchema(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AttributeOfSchema) 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 ErrIntOverflowAttributeOfSchema + } + 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: AttributeOfSchema: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributeOfSchema: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributeOfSchema + } + 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 ErrInvalidLengthAttributeOfSchema + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributeOfSchema + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributeOfSchema + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributeOfSchema + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributeOfSchema + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchemaAttributes = append(m.SchemaAttributes, &SchemaAttribute{}) + if err := m.SchemaAttributes[len(m.SchemaAttributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributeOfSchema(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributeOfSchema + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAttributeOfSchema(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAttributeOfSchema + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAttributeOfSchema + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAttributeOfSchema + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAttributeOfSchema + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAttributeOfSchema + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAttributeOfSchema + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAttributeOfSchema = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAttributeOfSchema = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAttributeOfSchema = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/nftmngr/types/executor_of_schema.pb.go b/x/nftmngr/types/executor_of_schema.pb.go new file mode 100644 index 00000000..2dc34677 --- /dev/null +++ b/x/nftmngr/types/executor_of_schema.pb.go @@ -0,0 +1,372 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: nftmngr/executor_of_schema.proto + +package types + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ExecutorOfSchema struct { + NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` + ExecutorAddress []string `protobuf:"bytes,2,rep,name=executorAddress,proto3" json:"executorAddress,omitempty"` +} + +func (m *ExecutorOfSchema) Reset() { *m = ExecutorOfSchema{} } +func (m *ExecutorOfSchema) String() string { return proto.CompactTextString(m) } +func (*ExecutorOfSchema) ProtoMessage() {} +func (*ExecutorOfSchema) Descriptor() ([]byte, []int) { + return fileDescriptor_b9f9b7c97b3275cc, []int{0} +} +func (m *ExecutorOfSchema) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExecutorOfSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExecutorOfSchema.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 *ExecutorOfSchema) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecutorOfSchema.Merge(m, src) +} +func (m *ExecutorOfSchema) XXX_Size() int { + return m.Size() +} +func (m *ExecutorOfSchema) XXX_DiscardUnknown() { + xxx_messageInfo_ExecutorOfSchema.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecutorOfSchema proto.InternalMessageInfo + +func (m *ExecutorOfSchema) GetNftSchemaCode() string { + if m != nil { + return m.NftSchemaCode + } + return "" +} + +func (m *ExecutorOfSchema) GetExecutorAddress() []string { + if m != nil { + return m.ExecutorAddress + } + return nil +} + +func init() { + proto.RegisterType((*ExecutorOfSchema)(nil), "thesixnetwork.sixnft.nftmngr.ExecutorOfSchema") +} + +func init() { proto.RegisterFile("nftmngr/executor_of_schema.proto", fileDescriptor_b9f9b7c97b3275cc) } + +var fileDescriptor_b9f9b7c97b3275cc = []byte{ + // 198 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xc8, 0x4b, 0x2b, 0xc9, + 0xcd, 0x4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(m *ExecutorOfSchema) 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 *ExecutorOfSchema) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecutorOfSchema) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExecutorAddress) > 0 { + for iNdEx := len(m.ExecutorAddress) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ExecutorAddress[iNdEx]) + copy(dAtA[i:], m.ExecutorAddress[iNdEx]) + i = encodeVarintExecutorOfSchema(dAtA, i, uint64(len(m.ExecutorAddress[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.NftSchemaCode) > 0 { + i -= len(m.NftSchemaCode) + copy(dAtA[i:], m.NftSchemaCode) + i = encodeVarintExecutorOfSchema(dAtA, i, uint64(len(m.NftSchemaCode))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintExecutorOfSchema(dAtA []byte, offset int, v uint64) int { + offset -= sovExecutorOfSchema(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ExecutorOfSchema) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NftSchemaCode) + if l > 0 { + n += 1 + l + sovExecutorOfSchema(uint64(l)) + } + if len(m.ExecutorAddress) > 0 { + for _, s := range m.ExecutorAddress { + l = len(s) + n += 1 + l + sovExecutorOfSchema(uint64(l)) + } + } + return n +} + +func sovExecutorOfSchema(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozExecutorOfSchema(x uint64) (n int) { + return sovExecutorOfSchema(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ExecutorOfSchema) 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 ErrIntOverflowExecutorOfSchema + } + 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: ExecutorOfSchema: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutorOfSchema: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExecutorOfSchema + } + 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 ErrInvalidLengthExecutorOfSchema + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExecutorOfSchema + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExecutorOfSchema + } + 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 ErrInvalidLengthExecutorOfSchema + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExecutorOfSchema + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExecutorAddress = append(m.ExecutorAddress, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExecutorOfSchema(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExecutorOfSchema + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipExecutorOfSchema(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExecutorOfSchema + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExecutorOfSchema + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExecutorOfSchema + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthExecutorOfSchema + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupExecutorOfSchema + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthExecutorOfSchema + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthExecutorOfSchema = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowExecutorOfSchema = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupExecutorOfSchema = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/nftmngr/types/genesis.go b/x/nftmngr/types/genesis.go index ecc8816d..4ef8149e 100644 --- a/x/nftmngr/types/genesis.go +++ b/x/nftmngr/types/genesis.go @@ -22,6 +22,8 @@ func DefaultGenesis() *GenesisState { ActionExecutorList: []ActionExecutor{}, SchemaAttributeList: []SchemaAttribute{}, ActionOfSchemaList: []ActionOfSchema{}, + ExecutorOfSchemaList: []ExecutorOfSchema{}, + AttributeOfSchemaList: []AttributeOfSchema{}, // this line is used by starport scaffolding # genesis/types/default Params: DefaultParams(), } @@ -130,6 +132,26 @@ func (gs GenesisState) Validate() error { } actionOfSchemaIndexMap[index] = struct{}{} } + // Check for duplicated index in executorOfSchema + executorOfSchemaIndexMap := make(map[string]struct{}) + + for _, elem := range gs.ExecutorOfSchemaList { + index := string(ExecutorOfSchemaKey(elem.NftSchemaCode)) + if _, ok := executorOfSchemaIndexMap[index]; ok { + return fmt.Errorf("duplicated index for executorOfSchema") + } + executorOfSchemaIndexMap[index] = struct{}{} + } + // Check for duplicated index in attributeOfSchema + attributeOfSchemaIndexMap := make(map[string]struct{}) + + for _, elem := range gs.AttributeOfSchemaList { + index := string(AttributeOfSchemaKey(elem.NftSchemaCode)) + if _, ok := attributeOfSchemaIndexMap[index]; ok { + return fmt.Errorf("duplicated index for attributeOfSchema") + } + attributeOfSchemaIndexMap[index] = struct{}{} + } // this line is used by starport scaffolding # genesis/types/validate return gs.Params.Validate() diff --git a/x/nftmngr/types/genesis.pb.go b/x/nftmngr/types/genesis.pb.go index 5929b652..8788243c 100644 --- a/x/nftmngr/types/genesis.pb.go +++ b/x/nftmngr/types/genesis.pb.go @@ -38,6 +38,8 @@ type GenesisState struct { ActionExecutorList []ActionExecutor `protobuf:"bytes,12,rep,name=actionExecutorList,proto3" json:"actionExecutorList"` SchemaAttributeList []SchemaAttribute `protobuf:"bytes,13,rep,name=schemaAttributeList,proto3" json:"schemaAttributeList"` ActionOfSchemaList []ActionOfSchema `protobuf:"bytes,14,rep,name=actionOfSchemaList,proto3" json:"actionOfSchemaList"` + ExecutorOfSchemaList []ExecutorOfSchema `protobuf:"bytes,15,rep,name=executorOfSchemaList,proto3" json:"executorOfSchemaList"` + AttributeOfSchemaList []AttributeOfSchema `protobuf:"bytes,16,rep,name=attributeOfSchemaList,proto3" json:"attributeOfSchemaList"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -164,6 +166,20 @@ func (m *GenesisState) GetActionOfSchemaList() []ActionOfSchema { return nil } +func (m *GenesisState) GetExecutorOfSchemaList() []ExecutorOfSchema { + if m != nil { + return m.ExecutorOfSchemaList + } + return nil +} + +func (m *GenesisState) GetAttributeOfSchemaList() []AttributeOfSchema { + if m != nil { + return m.AttributeOfSchemaList + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "thesixnetwork.sixnft.nftmngr.GenesisState") } @@ -171,46 +187,49 @@ func init() { func init() { proto.RegisterFile("nftmngr/genesis.proto", fileDescriptor_0c26d098aac64c1a) } var fileDescriptor_0c26d098aac64c1a = []byte{ - // 615 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xdf, 0x6e, 0xd3, 0x30, - 0x14, 0xc6, 0x5b, 0x36, 0x06, 0x73, 0xb7, 0x09, 0xcc, 0x80, 0xaa, 0xda, 0xc2, 0x84, 0x86, 0x98, - 0x36, 0x48, 0xc4, 0x78, 0x82, 0xa5, 0x30, 0x34, 0x89, 0xfd, 0xa1, 0xe5, 0x0a, 0x21, 0x45, 0x4e, - 0x76, 0x9c, 0x45, 0xac, 0xf6, 0x48, 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8c, 0x6f, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x42, - 0xaa, 0x7b, 0x0a, 0xe9, 0x06, 0x00, 0x00, + // 667 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xdf, 0x4e, 0xd4, 0x4e, + 0x14, 0xc7, 0x77, 0x7f, 0xf0, 0x43, 0x9d, 0x05, 0xc4, 0x11, 0x74, 0xb3, 0x81, 0x8a, 0x06, 0x23, + 0x01, 0x6d, 0x23, 0x3e, 0x01, 0x5d, 0xc1, 0x90, 0xc8, 0x1f, 0x77, 0xbd, 0x32, 0x26, 0xcd, 0xb4, + 0xcc, 0x74, 0x1b, 0xd8, 0x19, 0x6c, 0x0f, 0x91, 0xf5, 0x29, 0xbc, 0xf7, 0x85, 0xb8, 0xe4, 0xd2, + 0x2b, 0x63, 0xe0, 0x45, 0x4c, 0xa7, 0x33, 0xa5, 0xed, 0x96, 0x6e, 0xef, 0xba, 0x73, 0xce, 0xf7, + 0xf3, 0x9d, 0x39, 0x7b, 0xce, 0x41, 0x4b, 0x9c, 0xc1, 0x90, 0xfb, 0xa1, 0xe5, 0x53, 0x4e, 0xa3, + 0x20, 0x32, 0xcf, 0x42, 0x01, 0x02, 0x2f, 0xc3, 0x80, 0x46, 0xc1, 0x05, 0xa7, 0xf0, 0x5d, 0x84, + 0x27, 0x66, 0xfc, 0xc9, 0xc0, 0x54, 0xb9, 0x9d, 0x45, 0x5f, 0xf8, 0x42, 0x26, 0x5a, 0xf1, 0x57, + 0xa2, 0xe9, 0x2c, 0x6a, 0xd4, 0x19, 0x09, 0xc9, 0x50, 0x91, 0x3a, 0x6d, 0x7d, 0xca, 0x19, 0x38, + 0x91, 0x37, 0xa0, 0x43, 0xa2, 0x22, 0x4f, 0xb2, 0x91, 0x63, 0x02, 0xfa, 0xdc, 0xd0, 0xe7, 0xc4, + 0x83, 0x40, 0x70, 0xc7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51, 0x42, + 0x8b, 0x6b, 0x95, 0xec, 0x82, 0x6d, 0xbd, 0x1e, 0xa4, 0xc9, 0x5c, 0x9d, 0x5a, 0xf5, 0xf3, 0x42, + 0x5d, 0xab, 0x12, 0xde, 0xed, 0x53, 0x0e, 0x59, 0x66, 0x25, 0xcc, 0xd7, 0x7f, 0x8a, 0xd6, 0xe5, + 0x9f, 0x92, 0xa5, 0xe1, 0x01, 0x5a, 0xd4, 0x5b, 0x30, 0xe7, 0xf2, 0x50, 0xba, 0x98, 0xd5, 0x2e, + 0x3b, 0x05, 0xa5, 0xf2, 0x29, 0x25, 0xe2, 0x13, 0xb4, 0x94, 0x6e, 0xd3, 0x9c, 0xd5, 0x82, 0xb4, + 0xb2, 0x26, 0x3c, 0xa8, 0x28, 0x55, 0x5e, 0xe5, 0x4c, 0x7b, 0xef, 0xf2, 0xda, 0x68, 0x5e, 0x5d, + 0x1b, 0xcd, 0xbf, 0xd7, 0x46, 0xf3, 0xe7, 0x8d, 0xd1, 0xb8, 0xba, 0x31, 0x1a, 0xbf, 0x6f, 0x8c, + 0xc6, 0x17, 0xcb, 0x0f, 0x60, 0x70, 0xee, 0x9a, 0x9e, 0x18, 0x5a, 0x39, 0x47, 0x2b, 0x71, 0xb4, + 0x2e, 0x2c, 0xbd, 0xfc, 0x61, 0x74, 0x46, 0x23, 0x77, 0x46, 0xee, 0xfb, 0x77, 0xff, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x5f, 0x84, 0x3a, 0x34, 0x05, 0x08, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -233,6 +252,36 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AttributeOfSchemaList) > 0 { + for iNdEx := len(m.AttributeOfSchemaList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AttributeOfSchemaList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + } + if len(m.ExecutorOfSchemaList) > 0 { + for iNdEx := len(m.ExecutorOfSchemaList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExecutorOfSchemaList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + } + } if len(m.ActionOfSchemaList) > 0 { for iNdEx := len(m.ActionOfSchemaList) - 1; iNdEx >= 0; iNdEx-- { { @@ -497,6 +546,18 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.ExecutorOfSchemaList) > 0 { + for _, e := range m.ExecutorOfSchemaList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.AttributeOfSchemaList) > 0 { + for _, e := range m.AttributeOfSchemaList { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } return n } @@ -980,6 +1041,74 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorOfSchemaList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExecutorOfSchemaList = append(m.ExecutorOfSchemaList, ExecutorOfSchema{}) + if err := m.ExecutorOfSchemaList[len(m.ExecutorOfSchemaList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeOfSchemaList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttributeOfSchemaList = append(m.AttributeOfSchemaList, AttributeOfSchema{}) + if err := m.AttributeOfSchemaList[len(m.AttributeOfSchemaList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/nftmngr/types/genesis_test.go b/x/nftmngr/types/genesis_test.go index 4f5311b9..d71dfbd4 100644 --- a/x/nftmngr/types/genesis_test.go +++ b/x/nftmngr/types/genesis_test.go @@ -112,6 +112,22 @@ func TestGenesisState_Validate(t *testing.T) { Name: "1", }, }, + ExecutorOfSchemaList: []types.ExecutorOfSchema{ + { + NftSchemaCode: "0", + }, + { + NftSchemaCode: "1", + }, + }, + AttributeOfSchemaList: []types.AttributeOfSchema{ + { + NftSchemaCode: "0", + }, + { + NftSchemaCode: "1", + }, + }, // this line is used by starport scaffolding # types/genesis/validField }, valid: true, @@ -264,6 +280,34 @@ func TestGenesisState_Validate(t *testing.T) { }, valid: false, }, + { + desc: "duplicated executorOfSchema", + genState: &types.GenesisState{ + ExecutorOfSchemaList: []types.ExecutorOfSchema{ + { + NftSchemaCode: "0", + }, + { + NftSchemaCode: "0", + }, + }, + }, + valid: false, + }, + { + desc: "duplicated attributeOfSchema", + genState: &types.GenesisState{ + AttributeOfSchemaList: []types.AttributeOfSchema{ + { + NftSchemaCode: "0", + }, + { + NftSchemaCode: "0", + }, + }, + }, + valid: false, + }, // this line is used by starport scaffolding # types/genesis/testcase } { t.Run(tc.desc, func(t *testing.T) { diff --git a/x/nftmngr/types/key_attribute_of_schema.go b/x/nftmngr/types/key_attribute_of_schema.go new file mode 100644 index 00000000..15b481c6 --- /dev/null +++ b/x/nftmngr/types/key_attribute_of_schema.go @@ -0,0 +1,23 @@ +package types + +import "encoding/binary" + +var _ binary.ByteOrder + +const ( + // AttributeOfSchemaKeyPrefix is the prefix to retrieve all AttributeOfSchema + AttributeOfSchemaKeyPrefix = "AttributeOfSchema/value/" +) + +// AttributeOfSchemaKey returns the store key to retrieve a AttributeOfSchema from the index fields +func AttributeOfSchemaKey( + nftSchemaCode string, +) []byte { + var key []byte + + nftSchemaCodeBytes := []byte(nftSchemaCode) + key = append(key, nftSchemaCodeBytes...) + key = append(key, []byte("/")...) + + return key +} diff --git a/x/nftmngr/types/key_executor_of_schema.go b/x/nftmngr/types/key_executor_of_schema.go new file mode 100644 index 00000000..319a5faa --- /dev/null +++ b/x/nftmngr/types/key_executor_of_schema.go @@ -0,0 +1,23 @@ +package types + +import "encoding/binary" + +var _ binary.ByteOrder + +const ( + // ExecutorOfSchemaKeyPrefix is the prefix to retrieve all ExecutorOfSchema + ExecutorOfSchemaKeyPrefix = "ExecutorOfSchema/value/" +) + +// ExecutorOfSchemaKey returns the store key to retrieve a ExecutorOfSchema from the index fields +func ExecutorOfSchemaKey( + nftSchemaCode string, +) []byte { + var key []byte + + nftSchemaCodeBytes := []byte(nftSchemaCode) + key = append(key, nftSchemaCodeBytes...) + key = append(key, []byte("/")...) + + return key +} diff --git a/x/nftmngr/types/query.pb.go b/x/nftmngr/types/query.pb.go index 3425cc21..8c4c4f05 100644 --- a/x/nftmngr/types/query.pb.go +++ b/x/nftmngr/types/query.pb.go @@ -1697,118 +1697,6 @@ func (m *QueryAllActionExecutorResponse) GetPagination() *query.PageResponse { return nil } -type QueryActionExecutorbySchemaRequest struct { - NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryActionExecutorbySchemaRequest) Reset() { *m = QueryActionExecutorbySchemaRequest{} } -func (m *QueryActionExecutorbySchemaRequest) String() string { return proto.CompactTextString(m) } -func (*QueryActionExecutorbySchemaRequest) ProtoMessage() {} -func (*QueryActionExecutorbySchemaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{36} -} -func (m *QueryActionExecutorbySchemaRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryActionExecutorbySchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryActionExecutorbySchemaRequest.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 *QueryActionExecutorbySchemaRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryActionExecutorbySchemaRequest.Merge(m, src) -} -func (m *QueryActionExecutorbySchemaRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryActionExecutorbySchemaRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryActionExecutorbySchemaRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryActionExecutorbySchemaRequest proto.InternalMessageInfo - -func (m *QueryActionExecutorbySchemaRequest) GetNftSchemaCode() string { - if m != nil { - return m.NftSchemaCode - } - return "" -} - -func (m *QueryActionExecutorbySchemaRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryActionExecutorbySchemaResponse struct { - NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` - ExecutorAddress []string `protobuf:"bytes,2,rep,name=executorAddress,proto3" json:"executorAddress,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryActionExecutorbySchemaResponse) Reset() { *m = QueryActionExecutorbySchemaResponse{} } -func (m *QueryActionExecutorbySchemaResponse) String() string { return proto.CompactTextString(m) } -func (*QueryActionExecutorbySchemaResponse) ProtoMessage() {} -func (*QueryActionExecutorbySchemaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{37} -} -func (m *QueryActionExecutorbySchemaResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryActionExecutorbySchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryActionExecutorbySchemaResponse.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 *QueryActionExecutorbySchemaResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryActionExecutorbySchemaResponse.Merge(m, src) -} -func (m *QueryActionExecutorbySchemaResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryActionExecutorbySchemaResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryActionExecutorbySchemaResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryActionExecutorbySchemaResponse proto.InternalMessageInfo - -func (m *QueryActionExecutorbySchemaResponse) GetNftSchemaCode() string { - if m != nil { - return m.NftSchemaCode - } - return "" -} - -func (m *QueryActionExecutorbySchemaResponse) GetExecutorAddress() []string { - if m != nil { - return m.ExecutorAddress - } - return nil -} - -func (m *QueryActionExecutorbySchemaResponse) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - type QueryGetSchemaAttributeRequest struct { NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` @@ -1818,7 +1706,7 @@ func (m *QueryGetSchemaAttributeRequest) Reset() { *m = QueryGetSchemaAt func (m *QueryGetSchemaAttributeRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetSchemaAttributeRequest) ProtoMessage() {} func (*QueryGetSchemaAttributeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{38} + return fileDescriptor_1406c74dd8ff3e6a, []int{36} } func (m *QueryGetSchemaAttributeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1869,7 +1757,7 @@ func (m *QueryGetSchemaAttributeResponse) Reset() { *m = QueryGetSchemaA func (m *QueryGetSchemaAttributeResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetSchemaAttributeResponse) ProtoMessage() {} func (*QueryGetSchemaAttributeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{39} + return fileDescriptor_1406c74dd8ff3e6a, []int{37} } func (m *QueryGetSchemaAttributeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1913,7 +1801,7 @@ func (m *QueryAllSchemaAttributeRequest) Reset() { *m = QueryAllSchemaAt func (m *QueryAllSchemaAttributeRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllSchemaAttributeRequest) ProtoMessage() {} func (*QueryAllSchemaAttributeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{40} + return fileDescriptor_1406c74dd8ff3e6a, []int{38} } func (m *QueryAllSchemaAttributeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1958,7 +1846,7 @@ func (m *QueryAllSchemaAttributeResponse) Reset() { *m = QueryAllSchemaA func (m *QueryAllSchemaAttributeResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllSchemaAttributeResponse) ProtoMessage() {} func (*QueryAllSchemaAttributeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{41} + return fileDescriptor_1406c74dd8ff3e6a, []int{39} } func (m *QueryAllSchemaAttributeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2002,15 +1890,14 @@ func (m *QueryAllSchemaAttributeResponse) GetPagination() *query.PageResponse { } type QueryListAttributeBySchemaRequest struct { - NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` } func (m *QueryListAttributeBySchemaRequest) Reset() { *m = QueryListAttributeBySchemaRequest{} } func (m *QueryListAttributeBySchemaRequest) String() string { return proto.CompactTextString(m) } func (*QueryListAttributeBySchemaRequest) ProtoMessage() {} func (*QueryListAttributeBySchemaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{42} + return fileDescriptor_1406c74dd8ff3e6a, []int{40} } func (m *QueryListAttributeBySchemaRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2046,23 +1933,15 @@ func (m *QueryListAttributeBySchemaRequest) GetNftSchemaCode() string { return "" } -func (m *QueryListAttributeBySchemaRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - type QueryListAttributeBySchemaResponse struct { - SchemaAttribute []SchemaAttribute `protobuf:"bytes,1,rep,name=schemaAttribute,proto3" json:"schemaAttribute"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + SchemaAttribute []SchemaAttribute `protobuf:"bytes,1,rep,name=schemaAttribute,proto3" json:"schemaAttribute"` } func (m *QueryListAttributeBySchemaResponse) Reset() { *m = QueryListAttributeBySchemaResponse{} } func (m *QueryListAttributeBySchemaResponse) String() string { return proto.CompactTextString(m) } func (*QueryListAttributeBySchemaResponse) ProtoMessage() {} func (*QueryListAttributeBySchemaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{43} + return fileDescriptor_1406c74dd8ff3e6a, []int{41} } func (m *QueryListAttributeBySchemaResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2098,13 +1977,6 @@ func (m *QueryListAttributeBySchemaResponse) GetSchemaAttribute() []SchemaAttrib return nil } -func (m *QueryListAttributeBySchemaResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - type QueryGetActionOfSchemaRequest struct { NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` @@ -2114,7 +1986,7 @@ func (m *QueryGetActionOfSchemaRequest) Reset() { *m = QueryGetActionOfS func (m *QueryGetActionOfSchemaRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetActionOfSchemaRequest) ProtoMessage() {} func (*QueryGetActionOfSchemaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{44} + return fileDescriptor_1406c74dd8ff3e6a, []int{42} } func (m *QueryGetActionOfSchemaRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2165,7 +2037,7 @@ func (m *QueryGetActionOfSchemaResponse) Reset() { *m = QueryGetActionOf func (m *QueryGetActionOfSchemaResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetActionOfSchemaResponse) ProtoMessage() {} func (*QueryGetActionOfSchemaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{45} + return fileDescriptor_1406c74dd8ff3e6a, []int{43} } func (m *QueryGetActionOfSchemaResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2209,7 +2081,7 @@ func (m *QueryAllActionOfSchemaRequest) Reset() { *m = QueryAllActionOfS func (m *QueryAllActionOfSchemaRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllActionOfSchemaRequest) ProtoMessage() {} func (*QueryAllActionOfSchemaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{46} + return fileDescriptor_1406c74dd8ff3e6a, []int{44} } func (m *QueryAllActionOfSchemaRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2254,7 +2126,7 @@ func (m *QueryAllActionOfSchemaResponse) Reset() { *m = QueryAllActionOf func (m *QueryAllActionOfSchemaResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllActionOfSchemaResponse) ProtoMessage() {} func (*QueryAllActionOfSchemaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{47} + return fileDescriptor_1406c74dd8ff3e6a, []int{45} } func (m *QueryAllActionOfSchemaResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2297,23 +2169,22 @@ func (m *QueryAllActionOfSchemaResponse) GetPagination() *query.PageResponse { return nil } -type QueryListActionBySchemaRequest struct { - NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +type QueryGetExecutorOfSchemaRequest struct { + NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` } -func (m *QueryListActionBySchemaRequest) Reset() { *m = QueryListActionBySchemaRequest{} } -func (m *QueryListActionBySchemaRequest) String() string { return proto.CompactTextString(m) } -func (*QueryListActionBySchemaRequest) ProtoMessage() {} -func (*QueryListActionBySchemaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1406c74dd8ff3e6a, []int{48} +func (m *QueryGetExecutorOfSchemaRequest) Reset() { *m = QueryGetExecutorOfSchemaRequest{} } +func (m *QueryGetExecutorOfSchemaRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetExecutorOfSchemaRequest) ProtoMessage() {} +func (*QueryGetExecutorOfSchemaRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1406c74dd8ff3e6a, []int{46} } -func (m *QueryListActionBySchemaRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGetExecutorOfSchemaRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryListActionBySchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGetExecutorOfSchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryListActionBySchemaRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGetExecutorOfSchemaRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2323,50 +2194,181 @@ func (m *QueryListActionBySchemaRequest) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *QueryListActionBySchemaRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListActionBySchemaRequest.Merge(m, src) +func (m *QueryGetExecutorOfSchemaRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetExecutorOfSchemaRequest.Merge(m, src) } -func (m *QueryListActionBySchemaRequest) XXX_Size() int { +func (m *QueryGetExecutorOfSchemaRequest) XXX_Size() int { return m.Size() } -func (m *QueryListActionBySchemaRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListActionBySchemaRequest.DiscardUnknown(m) +func (m *QueryGetExecutorOfSchemaRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetExecutorOfSchemaRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryListActionBySchemaRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGetExecutorOfSchemaRequest proto.InternalMessageInfo -func (m *QueryListActionBySchemaRequest) GetNftSchemaCode() string { +func (m *QueryGetExecutorOfSchemaRequest) GetNftSchemaCode() string { if m != nil { return m.NftSchemaCode } return "" } -func (m *QueryListActionBySchemaRequest) GetPagination() *query.PageRequest { +type QueryGetExecutorOfSchemaResponse struct { + ExecutorOfSchema ExecutorOfSchema `protobuf:"bytes,1,opt,name=executorOfSchema,proto3" json:"executorOfSchema"` +} + +func (m *QueryGetExecutorOfSchemaResponse) Reset() { *m = QueryGetExecutorOfSchemaResponse{} } +func (m *QueryGetExecutorOfSchemaResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetExecutorOfSchemaResponse) ProtoMessage() {} +func (*QueryGetExecutorOfSchemaResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1406c74dd8ff3e6a, []int{47} +} +func (m *QueryGetExecutorOfSchemaResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetExecutorOfSchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetExecutorOfSchemaResponse.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 *QueryGetExecutorOfSchemaResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetExecutorOfSchemaResponse.Merge(m, src) +} +func (m *QueryGetExecutorOfSchemaResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetExecutorOfSchemaResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetExecutorOfSchemaResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetExecutorOfSchemaResponse proto.InternalMessageInfo + +func (m *QueryGetExecutorOfSchemaResponse) GetExecutorOfSchema() ExecutorOfSchema { + if m != nil { + return m.ExecutorOfSchema + } + return ExecutorOfSchema{} +} + +type QueryAllExecutorOfSchemaRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllExecutorOfSchemaRequest) Reset() { *m = QueryAllExecutorOfSchemaRequest{} } +func (m *QueryAllExecutorOfSchemaRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllExecutorOfSchemaRequest) ProtoMessage() {} +func (*QueryAllExecutorOfSchemaRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1406c74dd8ff3e6a, []int{48} +} +func (m *QueryAllExecutorOfSchemaRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllExecutorOfSchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllExecutorOfSchemaRequest.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 *QueryAllExecutorOfSchemaRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllExecutorOfSchemaRequest.Merge(m, src) +} +func (m *QueryAllExecutorOfSchemaRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllExecutorOfSchemaRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllExecutorOfSchemaRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllExecutorOfSchemaRequest proto.InternalMessageInfo + +func (m *QueryAllExecutorOfSchemaRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -type QueryListActionBySchemaResponse struct { - NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` - ActionOfSchema []*ActionOfSchema `protobuf:"bytes,2,rep,name=actionOfSchema,proto3" json:"actionOfSchema,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +type QueryAllExecutorOfSchemaResponse struct { + ExecutorOfSchema []ExecutorOfSchema `protobuf:"bytes,1,rep,name=executorOfSchema,proto3" json:"executorOfSchema"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryListActionBySchemaResponse) Reset() { *m = QueryListActionBySchemaResponse{} } -func (m *QueryListActionBySchemaResponse) String() string { return proto.CompactTextString(m) } -func (*QueryListActionBySchemaResponse) ProtoMessage() {} -func (*QueryListActionBySchemaResponse) Descriptor() ([]byte, []int) { +func (m *QueryAllExecutorOfSchemaResponse) Reset() { *m = QueryAllExecutorOfSchemaResponse{} } +func (m *QueryAllExecutorOfSchemaResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllExecutorOfSchemaResponse) ProtoMessage() {} +func (*QueryAllExecutorOfSchemaResponse) Descriptor() ([]byte, []int) { return fileDescriptor_1406c74dd8ff3e6a, []int{49} } -func (m *QueryListActionBySchemaResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryAllExecutorOfSchemaResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllExecutorOfSchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllExecutorOfSchemaResponse.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 *QueryAllExecutorOfSchemaResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllExecutorOfSchemaResponse.Merge(m, src) +} +func (m *QueryAllExecutorOfSchemaResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllExecutorOfSchemaResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllExecutorOfSchemaResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllExecutorOfSchemaResponse proto.InternalMessageInfo + +func (m *QueryAllExecutorOfSchemaResponse) GetExecutorOfSchema() []ExecutorOfSchema { + if m != nil { + return m.ExecutorOfSchema + } + return nil +} + +func (m *QueryAllExecutorOfSchemaResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryGetAttributeOfSchemaRequest struct { + NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` +} + +func (m *QueryGetAttributeOfSchemaRequest) Reset() { *m = QueryGetAttributeOfSchemaRequest{} } +func (m *QueryGetAttributeOfSchemaRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetAttributeOfSchemaRequest) ProtoMessage() {} +func (*QueryGetAttributeOfSchemaRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1406c74dd8ff3e6a, []int{50} +} +func (m *QueryGetAttributeOfSchemaRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryListActionBySchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGetAttributeOfSchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryListActionBySchemaResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGetAttributeOfSchemaRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2376,35 +2378,73 @@ func (m *QueryListActionBySchemaResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } -func (m *QueryListActionBySchemaResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListActionBySchemaResponse.Merge(m, src) +func (m *QueryGetAttributeOfSchemaRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAttributeOfSchemaRequest.Merge(m, src) } -func (m *QueryListActionBySchemaResponse) XXX_Size() int { +func (m *QueryGetAttributeOfSchemaRequest) XXX_Size() int { return m.Size() } -func (m *QueryListActionBySchemaResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListActionBySchemaResponse.DiscardUnknown(m) +func (m *QueryGetAttributeOfSchemaRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAttributeOfSchemaRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryListActionBySchemaResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGetAttributeOfSchemaRequest proto.InternalMessageInfo -func (m *QueryListActionBySchemaResponse) GetNftSchemaCode() string { +func (m *QueryGetAttributeOfSchemaRequest) GetNftSchemaCode() string { if m != nil { return m.NftSchemaCode } return "" } -func (m *QueryListActionBySchemaResponse) GetActionOfSchema() []*ActionOfSchema { +type QueryGetAttributeOfSchemaResponse struct { + NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` + SchemaAttribute []SchemaAttribute `protobuf:"bytes,2,rep,name=schemaAttribute,proto3" json:"schemaAttribute"` +} + +func (m *QueryGetAttributeOfSchemaResponse) Reset() { *m = QueryGetAttributeOfSchemaResponse{} } +func (m *QueryGetAttributeOfSchemaResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetAttributeOfSchemaResponse) ProtoMessage() {} +func (*QueryGetAttributeOfSchemaResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1406c74dd8ff3e6a, []int{51} +} +func (m *QueryGetAttributeOfSchemaResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetAttributeOfSchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetAttributeOfSchemaResponse.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 *QueryGetAttributeOfSchemaResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAttributeOfSchemaResponse.Merge(m, src) +} +func (m *QueryGetAttributeOfSchemaResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetAttributeOfSchemaResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAttributeOfSchemaResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetAttributeOfSchemaResponse proto.InternalMessageInfo + +func (m *QueryGetAttributeOfSchemaResponse) GetNftSchemaCode() string { if m != nil { - return m.ActionOfSchema + return m.NftSchemaCode } - return nil + return "" } -func (m *QueryListActionBySchemaResponse) GetPagination() *query.PageResponse { +func (m *QueryGetAttributeOfSchemaResponse) GetSchemaAttribute() []SchemaAttribute { if m != nil { - return m.Pagination + return m.SchemaAttribute } return nil } @@ -2446,8 +2486,6 @@ func init() { proto.RegisterType((*QueryGetActionExecutorResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryGetActionExecutorResponse") proto.RegisterType((*QueryAllActionExecutorRequest)(nil), "thesixnetwork.sixnft.nftmngr.QueryAllActionExecutorRequest") proto.RegisterType((*QueryAllActionExecutorResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryAllActionExecutorResponse") - proto.RegisterType((*QueryActionExecutorbySchemaRequest)(nil), "thesixnetwork.sixnft.nftmngr.QueryActionExecutorbySchemaRequest") - proto.RegisterType((*QueryActionExecutorbySchemaResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryActionExecutorbySchemaResponse") proto.RegisterType((*QueryGetSchemaAttributeRequest)(nil), "thesixnetwork.sixnft.nftmngr.QueryGetSchemaAttributeRequest") proto.RegisterType((*QueryGetSchemaAttributeResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryGetSchemaAttributeResponse") proto.RegisterType((*QueryAllSchemaAttributeRequest)(nil), "thesixnetwork.sixnft.nftmngr.QueryAllSchemaAttributeRequest") @@ -2458,144 +2496,152 @@ func init() { proto.RegisterType((*QueryGetActionOfSchemaResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryGetActionOfSchemaResponse") proto.RegisterType((*QueryAllActionOfSchemaRequest)(nil), "thesixnetwork.sixnft.nftmngr.QueryAllActionOfSchemaRequest") proto.RegisterType((*QueryAllActionOfSchemaResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryAllActionOfSchemaResponse") - proto.RegisterType((*QueryListActionBySchemaRequest)(nil), "thesixnetwork.sixnft.nftmngr.QueryListActionBySchemaRequest") - proto.RegisterType((*QueryListActionBySchemaResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryListActionBySchemaResponse") + proto.RegisterType((*QueryGetExecutorOfSchemaRequest)(nil), "thesixnetwork.sixnft.nftmngr.QueryGetExecutorOfSchemaRequest") + proto.RegisterType((*QueryGetExecutorOfSchemaResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryGetExecutorOfSchemaResponse") + proto.RegisterType((*QueryAllExecutorOfSchemaRequest)(nil), "thesixnetwork.sixnft.nftmngr.QueryAllExecutorOfSchemaRequest") + proto.RegisterType((*QueryAllExecutorOfSchemaResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryAllExecutorOfSchemaResponse") + proto.RegisterType((*QueryGetAttributeOfSchemaRequest)(nil), "thesixnetwork.sixnft.nftmngr.QueryGetAttributeOfSchemaRequest") + proto.RegisterType((*QueryGetAttributeOfSchemaResponse)(nil), "thesixnetwork.sixnft.nftmngr.QueryGetAttributeOfSchemaResponse") } func init() { proto.RegisterFile("nftmngr/query.proto", fileDescriptor_1406c74dd8ff3e6a) } var fileDescriptor_1406c74dd8ff3e6a = []byte{ - // 2077 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5a, 0x5f, 0x6f, 0x24, 0x47, - 0x11, 0x77, 0x7b, 0x93, 0x3b, 0xdc, 0xc4, 0x31, 0xb4, 0x1d, 0x63, 0x16, 0xdf, 0x26, 0x34, 0xe6, - 0xb0, 0x8c, 0xb3, 0x73, 0xbe, 0x38, 0x0e, 0x77, 0x98, 0xc3, 0x6b, 0xc7, 0x76, 0x4e, 0x49, 0x7c, - 0xb9, 0xc5, 0x52, 0x14, 0x4b, 0xc8, 0xcc, 0xee, 0xce, 0xae, 0x57, 0x99, 0x9d, 0x71, 0x76, 0xc7, - 0xc4, 0xc6, 0x58, 0x42, 0x3c, 0x23, 0x14, 0xe0, 0x09, 0xf1, 0x09, 0xf2, 0x98, 0x07, 0x9e, 0xc2, - 0x09, 0x10, 0x3a, 0x74, 0x27, 0x21, 0x74, 0x12, 0x12, 0xe2, 0x8f, 0x38, 0xa1, 0xb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, 0xe4, 0xdf, 0x08, 0x3f, 0x17, 0xdb, 0xf5, 0x24, 0xdf, 0x54, 0x00, 0x94, 0xd6, 0xc3, - 0x2d, 0xaf, 0xe4, 0x37, 0x90, 0x2d, 0x31, 0xcd, 0xee, 0xc0, 0x09, 0x28, 0xed, 0x26, 0x27, 0xe6, - 0xdf, 0xfc, 0xba, 0xe9, 0x37, 0x7c, 0x32, 0xd5, 0x4d, 0xa9, 0xdd, 0x98, 0xad, 0x6e, 0xca, 0x1d, - 0x44, 0xd5, 0xac, 0x94, 0xbf, 0xbc, 0x4d, 0xca, 0xca, 0xdf, 0xfb, 0xd5, 0x92, 0x7b, 0xca, 0x5c, - 0x2d, 0xf3, 0xf0, 0x4b, 0xec, 0x90, 0x66, 0x3c, 0x26, 0xfa, 0xfc, 0xc8, 0x7d, 0x84, 0x49, 0xb4, - 0x3d, 0xa8, 0x34, 0xbd, 0x12, 0xdb, 0x9c, 0x4a, 0xd3, 0x2b, 0xb9, 0x27, 0x49, 0x5f, 0x67, 0x5c, - 0xd6, 0xc9, 0x9a, 0x4a, 0x26, 0xfa, 0xe7, 0xde, 0xf8, 0x01, 0x5b, 0xbd, 0x7e, 0xe7, 0x41, 0x05, - 0xdd, 0x7b, 0x50, 0x41, 0xff, 0x7c, 0x50, 0x41, 0x1f, 0x3c, 0xac, 0x0c, 0xdd, 0x7b, 0x58, 0x19, - 0xfa, 0xcb, 0xc3, 0xca, 0xd0, 0x8e, 0xd6, 0xe9, 0x3a, 0x7b, 0x07, 0x8d, 0x6a, 0xd3, 0xee, 0xc5, - 0x3b, 0x3a, 0xf4, 0x5d, 0x39, 0x47, 0xfb, 0xc6, 0xa0, 0x71, 0x8e, 0x7d, 0x6e, 0xfd, 0xd2, 0xff, - 0x02, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xff, 0x7c, 0x3a, 0x87, 0x2f, 0x00, 0x00, + // 2130 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x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, 0x46, 0x78, 0x4a, 0x55, 0xe3, 0x07, 0x4a, 0xb3, + 0xfe, 0x8f, 0x02, 0x30, 0x67, 0xbe, 0x4a, 0x5f, 0xe4, 0x00, 0xaf, 0x91, 0xab, 0x45, 0x01, 0x92, + 0x7f, 0xfb, 0x79, 0xa7, 0x0e, 0x27, 0x89, 0xa6, 0xc3, 0xb3, 0x06, 0xa4, 0xf5, 0x97, 0x4a, 0xf3, + 0x03, 0xa0, 0x35, 0x0e, 0x68, 0x99, 0xb4, 0x0e, 0xc9, 0xbe, 0xe4, 0x97, 0xd8, 0x6a, 0xc8, 0x96, + 0xd6, 0xee, 0x3f, 0x68, 0xa0, 0x4f, 0x1e, 0x34, 0xd0, 0x7f, 0x1e, 0x34, 0xd0, 0xbb, 0x0f, 0x1b, + 0xc7, 0x3e, 0x79, 0xd8, 0x38, 0xf6, 0xb7, 0x87, 0x8d, 0x63, 0xf7, 0x8c, 0x81, 0xe5, 0x6d, 0xed, + 0x74, 0x9a, 0x5d, 0x77, 0x98, 0xae, 0x66, 0x37, 0x54, 0xe4, 0xed, 0x6d, 0xb3, 0x71, 0xe7, 0x38, + 0xff, 0x9a, 0xfb, 0xb9, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xab, 0x6d, 0x76, 0x0b, 0x2b, 0x30, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2646,8 +2692,6 @@ type QueryClient interface { ActionExecutor(ctx context.Context, in *QueryGetActionExecutorRequest, opts ...grpc.CallOption) (*QueryGetActionExecutorResponse, error) // Queries a list of ActionExecutor items. ActionExecutorAll(ctx context.Context, in *QueryAllActionExecutorRequest, opts ...grpc.CallOption) (*QueryAllActionExecutorResponse, error) - // Queries a list of ActionExecutorbySchema items. - ActionExecutorbySchema(ctx context.Context, in *QueryActionExecutorbySchemaRequest, opts ...grpc.CallOption) (*QueryActionExecutorbySchemaResponse, error) // Queries a SchemaAttribute by index. SchemaAttribute(ctx context.Context, in *QueryGetSchemaAttributeRequest, opts ...grpc.CallOption) (*QueryGetSchemaAttributeResponse, error) // Queries a list of SchemaAttribute items. @@ -2658,8 +2702,12 @@ type QueryClient interface { ActionOfSchema(ctx context.Context, in *QueryGetActionOfSchemaRequest, opts ...grpc.CallOption) (*QueryGetActionOfSchemaResponse, error) // Queries a list of ActionOfSchema items. ActionOfSchemaAll(ctx context.Context, in *QueryAllActionOfSchemaRequest, opts ...grpc.CallOption) (*QueryAllActionOfSchemaResponse, error) - // Queries a list of ListActionBySchema items. - ListActionBySchema(ctx context.Context, in *QueryListActionBySchemaRequest, opts ...grpc.CallOption) (*QueryListActionBySchemaResponse, error) + // Queries a ExecutorOfSchema by index. + ExecutorOfSchema(ctx context.Context, in *QueryGetExecutorOfSchemaRequest, opts ...grpc.CallOption) (*QueryGetExecutorOfSchemaResponse, error) + // Queries a list of ExecutorOfSchema items. + ExecutorOfSchemaAll(ctx context.Context, in *QueryAllExecutorOfSchemaRequest, opts ...grpc.CallOption) (*QueryAllExecutorOfSchemaResponse, error) + // Queries a AttributeOfSchema by index. + AttributeOfSchema(ctx context.Context, in *QueryGetAttributeOfSchemaRequest, opts ...grpc.CallOption) (*QueryGetAttributeOfSchemaResponse, error) } type queryClient struct { @@ -2832,15 +2880,6 @@ func (c *queryClient) ActionExecutorAll(ctx context.Context, in *QueryAllActionE return out, nil } -func (c *queryClient) ActionExecutorbySchema(ctx context.Context, in *QueryActionExecutorbySchemaRequest, opts ...grpc.CallOption) (*QueryActionExecutorbySchemaResponse, error) { - out := new(QueryActionExecutorbySchemaResponse) - err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftmngr.Query/ActionExecutorbySchema", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) SchemaAttribute(ctx context.Context, in *QueryGetSchemaAttributeRequest, opts ...grpc.CallOption) (*QueryGetSchemaAttributeResponse, error) { out := new(QueryGetSchemaAttributeResponse) err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftmngr.Query/SchemaAttribute", in, out, opts...) @@ -2886,9 +2925,27 @@ func (c *queryClient) ActionOfSchemaAll(ctx context.Context, in *QueryAllActionO return out, nil } -func (c *queryClient) ListActionBySchema(ctx context.Context, in *QueryListActionBySchemaRequest, opts ...grpc.CallOption) (*QueryListActionBySchemaResponse, error) { - out := new(QueryListActionBySchemaResponse) - err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftmngr.Query/ListActionBySchema", in, out, opts...) +func (c *queryClient) ExecutorOfSchema(ctx context.Context, in *QueryGetExecutorOfSchemaRequest, opts ...grpc.CallOption) (*QueryGetExecutorOfSchemaResponse, error) { + out := new(QueryGetExecutorOfSchemaResponse) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftmngr.Query/ExecutorOfSchema", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ExecutorOfSchemaAll(ctx context.Context, in *QueryAllExecutorOfSchemaRequest, opts ...grpc.CallOption) (*QueryAllExecutorOfSchemaResponse, error) { + out := new(QueryAllExecutorOfSchemaResponse) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftmngr.Query/ExecutorOfSchemaAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AttributeOfSchema(ctx context.Context, in *QueryGetAttributeOfSchemaRequest, opts ...grpc.CallOption) (*QueryGetAttributeOfSchemaResponse, error) { + out := new(QueryGetAttributeOfSchemaResponse) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftmngr.Query/AttributeOfSchema", in, out, opts...) if err != nil { return nil, err } @@ -2933,8 +2990,6 @@ type QueryServer interface { ActionExecutor(context.Context, *QueryGetActionExecutorRequest) (*QueryGetActionExecutorResponse, error) // Queries a list of ActionExecutor items. ActionExecutorAll(context.Context, *QueryAllActionExecutorRequest) (*QueryAllActionExecutorResponse, error) - // Queries a list of ActionExecutorbySchema items. - ActionExecutorbySchema(context.Context, *QueryActionExecutorbySchemaRequest) (*QueryActionExecutorbySchemaResponse, error) // Queries a SchemaAttribute by index. SchemaAttribute(context.Context, *QueryGetSchemaAttributeRequest) (*QueryGetSchemaAttributeResponse, error) // Queries a list of SchemaAttribute items. @@ -2945,8 +3000,12 @@ type QueryServer interface { ActionOfSchema(context.Context, *QueryGetActionOfSchemaRequest) (*QueryGetActionOfSchemaResponse, error) // Queries a list of ActionOfSchema items. ActionOfSchemaAll(context.Context, *QueryAllActionOfSchemaRequest) (*QueryAllActionOfSchemaResponse, error) - // Queries a list of ListActionBySchema items. - ListActionBySchema(context.Context, *QueryListActionBySchemaRequest) (*QueryListActionBySchemaResponse, error) + // Queries a ExecutorOfSchema by index. + ExecutorOfSchema(context.Context, *QueryGetExecutorOfSchemaRequest) (*QueryGetExecutorOfSchemaResponse, error) + // Queries a list of ExecutorOfSchema items. + ExecutorOfSchemaAll(context.Context, *QueryAllExecutorOfSchemaRequest) (*QueryAllExecutorOfSchemaResponse, error) + // Queries a AttributeOfSchema by index. + AttributeOfSchema(context.Context, *QueryGetAttributeOfSchemaRequest) (*QueryGetAttributeOfSchemaResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -3007,9 +3066,6 @@ func (*UnimplementedQueryServer) ActionExecutor(ctx context.Context, req *QueryG func (*UnimplementedQueryServer) ActionExecutorAll(ctx context.Context, req *QueryAllActionExecutorRequest) (*QueryAllActionExecutorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ActionExecutorAll not implemented") } -func (*UnimplementedQueryServer) ActionExecutorbySchema(ctx context.Context, req *QueryActionExecutorbySchemaRequest) (*QueryActionExecutorbySchemaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ActionExecutorbySchema not implemented") -} func (*UnimplementedQueryServer) SchemaAttribute(ctx context.Context, req *QueryGetSchemaAttributeRequest) (*QueryGetSchemaAttributeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SchemaAttribute not implemented") } @@ -3025,8 +3081,14 @@ func (*UnimplementedQueryServer) ActionOfSchema(ctx context.Context, req *QueryG func (*UnimplementedQueryServer) ActionOfSchemaAll(ctx context.Context, req *QueryAllActionOfSchemaRequest) (*QueryAllActionOfSchemaResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ActionOfSchemaAll not implemented") } -func (*UnimplementedQueryServer) ListActionBySchema(ctx context.Context, req *QueryListActionBySchemaRequest) (*QueryListActionBySchemaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListActionBySchema not implemented") +func (*UnimplementedQueryServer) ExecutorOfSchema(ctx context.Context, req *QueryGetExecutorOfSchemaRequest) (*QueryGetExecutorOfSchemaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecutorOfSchema not implemented") +} +func (*UnimplementedQueryServer) ExecutorOfSchemaAll(ctx context.Context, req *QueryAllExecutorOfSchemaRequest) (*QueryAllExecutorOfSchemaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecutorOfSchemaAll not implemented") +} +func (*UnimplementedQueryServer) AttributeOfSchema(ctx context.Context, req *QueryGetAttributeOfSchemaRequest) (*QueryGetAttributeOfSchemaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AttributeOfSchema not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -3357,38 +3419,20 @@ func _Query_ActionExecutorAll_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Query_ActionExecutorbySchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryActionExecutorbySchemaRequest) +func _Query_SchemaAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetSchemaAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).ActionExecutorbySchema(ctx, in) + return srv.(QueryServer).SchemaAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/thesixnetwork.sixnft.nftmngr.Query/ActionExecutorbySchema", + FullMethod: "/thesixnetwork.sixnft.nftmngr.Query/SchemaAttribute", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ActionExecutorbySchema(ctx, req.(*QueryActionExecutorbySchemaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SchemaAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetSchemaAttributeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SchemaAttribute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/thesixnetwork.sixnft.nftmngr.Query/SchemaAttribute", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SchemaAttribute(ctx, req.(*QueryGetSchemaAttributeRequest)) + return srv.(QueryServer).SchemaAttribute(ctx, req.(*QueryGetSchemaAttributeRequest)) } return interceptor(ctx, in, info, handler) } @@ -3465,20 +3509,56 @@ func _Query_ActionOfSchemaAll_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Query_ListActionBySchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryListActionBySchemaRequest) +func _Query_ExecutorOfSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetExecutorOfSchemaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ExecutorOfSchema(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/thesixnetwork.sixnft.nftmngr.Query/ExecutorOfSchema", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ExecutorOfSchema(ctx, req.(*QueryGetExecutorOfSchemaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ExecutorOfSchemaAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllExecutorOfSchemaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ExecutorOfSchemaAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/thesixnetwork.sixnft.nftmngr.Query/ExecutorOfSchemaAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ExecutorOfSchemaAll(ctx, req.(*QueryAllExecutorOfSchemaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AttributeOfSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetAttributeOfSchemaRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).ListActionBySchema(ctx, in) + return srv.(QueryServer).AttributeOfSchema(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/thesixnetwork.sixnft.nftmngr.Query/ListActionBySchema", + FullMethod: "/thesixnetwork.sixnft.nftmngr.Query/AttributeOfSchema", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ListActionBySchema(ctx, req.(*QueryListActionBySchemaRequest)) + return srv.(QueryServer).AttributeOfSchema(ctx, req.(*QueryGetAttributeOfSchemaRequest)) } return interceptor(ctx, in, info, handler) } @@ -3559,10 +3639,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ActionExecutorAll", Handler: _Query_ActionExecutorAll_Handler, }, - { - MethodName: "ActionExecutorbySchema", - Handler: _Query_ActionExecutorbySchema_Handler, - }, { MethodName: "SchemaAttribute", Handler: _Query_SchemaAttribute_Handler, @@ -3584,8 +3660,16 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_ActionOfSchemaAll_Handler, }, { - MethodName: "ListActionBySchema", - Handler: _Query_ListActionBySchema_Handler, + MethodName: "ExecutorOfSchema", + Handler: _Query_ExecutorOfSchema_Handler, + }, + { + MethodName: "ExecutorOfSchemaAll", + Handler: _Query_ExecutorOfSchemaAll_Handler, + }, + { + MethodName: "AttributeOfSchema", + Handler: _Query_AttributeOfSchema_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -4914,99 +4998,6 @@ func (m *QueryAllActionExecutorResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryActionExecutorbySchemaRequest) 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 *QueryActionExecutorbySchemaRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryActionExecutorbySchemaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.NftSchemaCode) > 0 { - i -= len(m.NftSchemaCode) - copy(dAtA[i:], m.NftSchemaCode) - i = encodeVarintQuery(dAtA, i, uint64(len(m.NftSchemaCode))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryActionExecutorbySchemaResponse) 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 *QueryActionExecutorbySchemaResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryActionExecutorbySchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.ExecutorAddress) > 0 { - for iNdEx := len(m.ExecutorAddress) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExecutorAddress[iNdEx]) - copy(dAtA[i:], m.ExecutorAddress[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ExecutorAddress[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.NftSchemaCode) > 0 { - i -= len(m.NftSchemaCode) - copy(dAtA[i:], m.NftSchemaCode) - i = encodeVarintQuery(dAtA, i, uint64(len(m.NftSchemaCode))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryGetSchemaAttributeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5181,18 +5172,6 @@ func (m *QueryListAttributeBySchemaRequest) MarshalToSizedBuffer(dAtA []byte) (i _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } if len(m.NftSchemaCode) > 0 { i -= len(m.NftSchemaCode) copy(dAtA[i:], m.NftSchemaCode) @@ -5223,18 +5202,6 @@ func (m *QueryListAttributeBySchemaResponse) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } if len(m.SchemaAttribute) > 0 { for iNdEx := len(m.SchemaAttribute) - 1; iNdEx >= 0; iNdEx-- { { @@ -5406,7 +5373,70 @@ func (m *QueryAllActionOfSchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryListActionBySchemaRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGetExecutorOfSchemaRequest) 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 *QueryGetExecutorOfSchemaRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetExecutorOfSchemaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NftSchemaCode) > 0 { + i -= len(m.NftSchemaCode) + copy(dAtA[i:], m.NftSchemaCode) + i = encodeVarintQuery(dAtA, i, uint64(len(m.NftSchemaCode))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetExecutorOfSchemaResponse) 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 *QueryGetExecutorOfSchemaResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetExecutorOfSchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ExecutorOfSchema.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllExecutorOfSchemaRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5416,12 +5446,12 @@ func (m *QueryListActionBySchemaRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryListActionBySchemaRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllExecutorOfSchemaRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryListActionBySchemaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllExecutorOfSchemaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -5436,19 +5466,12 @@ func (m *QueryListActionBySchemaRequest) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - } - if len(m.NftSchemaCode) > 0 { - i -= len(m.NftSchemaCode) - copy(dAtA[i:], m.NftSchemaCode) - i = encodeVarintQuery(dAtA, i, uint64(len(m.NftSchemaCode))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryListActionBySchemaResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllExecutorOfSchemaResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5458,12 +5481,12 @@ func (m *QueryListActionBySchemaResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryListActionBySchemaResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllExecutorOfSchemaResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryListActionBySchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllExecutorOfSchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -5478,12 +5501,12 @@ func (m *QueryListActionBySchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } - if len(m.ActionOfSchema) > 0 { - for iNdEx := len(m.ActionOfSchema) - 1; iNdEx >= 0; iNdEx-- { + if len(m.ExecutorOfSchema) > 0 { + for iNdEx := len(m.ExecutorOfSchema) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.ActionOfSchema[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ExecutorOfSchema[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -5491,9 +5514,32 @@ func (m *QueryListActionBySchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } } + return len(dAtA) - i, nil +} + +func (m *QueryGetAttributeOfSchemaRequest) 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 *QueryGetAttributeOfSchemaRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetAttributeOfSchemaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l if len(m.NftSchemaCode) > 0 { i -= len(m.NftSchemaCode) copy(dAtA[i:], m.NftSchemaCode) @@ -5504,16 +5550,60 @@ func (m *QueryListActionBySchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *QueryGetAttributeOfSchemaResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil +} + +func (m *QueryGetAttributeOfSchemaResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetAttributeOfSchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SchemaAttribute) > 0 { + for iNdEx := len(m.SchemaAttribute) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SchemaAttribute[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.NftSchemaCode) > 0 { + i -= len(m.NftSchemaCode) + copy(dAtA[i:], m.NftSchemaCode) + i = encodeVarintQuery(dAtA, i, uint64(len(m.NftSchemaCode))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base } func (m *QueryParamsRequest) Size() (n int) { if m == nil { @@ -6017,46 +6107,6 @@ func (m *QueryAllActionExecutorResponse) Size() (n int) { return n } -func (m *QueryActionExecutorbySchemaRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NftSchemaCode) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryActionExecutorbySchemaResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NftSchemaCode) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if len(m.ExecutorAddress) > 0 { - for _, s := range m.ExecutorAddress { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func (m *QueryGetSchemaAttributeRequest) Size() (n int) { if m == nil { return 0 @@ -6127,10 +6177,6 @@ func (m *QueryListAttributeBySchemaRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } return n } @@ -6146,10 +6192,6 @@ func (m *QueryListAttributeBySchemaResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } return n } @@ -6213,7 +6255,7 @@ func (m *QueryAllActionOfSchemaResponse) Size() (n int) { return n } -func (m *QueryListActionBySchemaRequest) Size() (n int) { +func (m *QueryGetExecutorOfSchemaRequest) Size() (n int) { if m == nil { return 0 } @@ -6223,6 +6265,26 @@ func (m *QueryListActionBySchemaRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + return n +} + +func (m *QueryGetExecutorOfSchemaResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ExecutorOfSchema.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllExecutorOfSchemaRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) @@ -6230,18 +6292,14 @@ func (m *QueryListActionBySchemaRequest) Size() (n int) { return n } -func (m *QueryListActionBySchemaResponse) Size() (n int) { +func (m *QueryAllExecutorOfSchemaResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.NftSchemaCode) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if len(m.ActionOfSchema) > 0 { - for _, e := range m.ActionOfSchema { + if len(m.ExecutorOfSchema) > 0 { + for _, e := range m.ExecutorOfSchema { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -6253,6 +6311,38 @@ func (m *QueryListActionBySchemaResponse) Size() (n int) { return n } +func (m *QueryGetAttributeOfSchemaRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NftSchemaCode) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetAttributeOfSchemaResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NftSchemaCode) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.SchemaAttribute) > 0 { + for _, e := range m.SchemaAttribute { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -9597,7 +9687,7 @@ func (m *QueryAllActionExecutorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryActionExecutorbySchemaRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetSchemaAttributeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9620,10 +9710,10 @@ func (m *QueryActionExecutorbySchemaRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryActionExecutorbySchemaRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetSchemaAttributeRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryActionExecutorbySchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetSchemaAttributeRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -9660,9 +9750,9 @@ func (m *QueryActionExecutorbySchemaRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9672,27 +9762,23 @@ func (m *QueryActionExecutorbySchemaRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9715,7 +9801,7 @@ func (m *QueryActionExecutorbySchemaRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryActionExecutorbySchemaResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetSchemaAttributeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9738,17 +9824,17 @@ func (m *QueryActionExecutorbySchemaResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryActionExecutorbySchemaResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetSchemaAttributeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryActionExecutorbySchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetSchemaAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SchemaAttribute", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9758,57 +9844,76 @@ func (m *QueryActionExecutorbySchemaResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutorAddress", wireType) + if err := m.SchemaAttribute.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - 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 - } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllSchemaAttributeRequest) 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 } - m.ExecutorAddress = append(m.ExecutorAddress, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: + 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: QueryAllSchemaAttributeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllSchemaAttributeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -9865,7 +9970,7 @@ func (m *QueryActionExecutorbySchemaResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetSchemaAttributeRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllSchemaAttributeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9888,17 +9993,17 @@ func (m *QueryGetSchemaAttributeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetSchemaAttributeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllSchemaAttributeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetSchemaAttributeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllSchemaAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SchemaAttribute", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9908,29 +10013,31 @@ func (m *QueryGetSchemaAttributeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) + m.SchemaAttribute = append(m.SchemaAttribute, SchemaAttribute{}) + if err := m.SchemaAttribute[len(m.SchemaAttribute)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9940,23 +10047,27 @@ func (m *QueryGetSchemaAttributeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -9979,7 +10090,7 @@ func (m *QueryGetSchemaAttributeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetSchemaAttributeResponse) Unmarshal(dAtA []byte) error { +func (m *QueryListAttributeBySchemaRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10002,17 +10113,17 @@ func (m *QueryGetSchemaAttributeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetSchemaAttributeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryListAttributeBySchemaRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetSchemaAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryListAttributeBySchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaAttribute", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -10022,24 +10133,23 @@ func (m *QueryGetSchemaAttributeResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.SchemaAttribute.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -10062,7 +10172,7 @@ func (m *QueryGetSchemaAttributeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllSchemaAttributeRequest) Unmarshal(dAtA []byte) error { +func (m *QueryListAttributeBySchemaResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10085,15 +10195,15 @@ func (m *QueryAllSchemaAttributeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllSchemaAttributeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryListAttributeBySchemaResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllSchemaAttributeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryListAttributeBySchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SchemaAttribute", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10120,10 +10230,8 @@ func (m *QueryAllSchemaAttributeRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SchemaAttribute = append(m.SchemaAttribute, SchemaAttribute{}) + if err := m.SchemaAttribute[len(m.SchemaAttribute)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10148,7 +10256,7 @@ func (m *QueryAllSchemaAttributeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllSchemaAttributeResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetActionOfSchemaRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10171,17 +10279,17 @@ func (m *QueryAllSchemaAttributeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllSchemaAttributeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetActionOfSchemaRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllSchemaAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetActionOfSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaAttribute", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -10191,31 +10299,29 @@ func (m *QueryAllSchemaAttributeResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.SchemaAttribute = append(m.SchemaAttribute, SchemaAttribute{}) - if err := m.SchemaAttribute[len(m.SchemaAttribute)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -10225,27 +10331,23 @@ func (m *QueryAllSchemaAttributeResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -10268,7 +10370,7 @@ func (m *QueryAllSchemaAttributeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryListAttributeBySchemaRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetActionOfSchemaResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10291,17 +10393,17 @@ func (m *QueryListAttributeBySchemaRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryListAttributeBySchemaRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetActionOfSchemaResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListAttributeBySchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetActionOfSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ActionOfSchema", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -10311,25 +10413,76 @@ func (m *QueryListAttributeBySchemaRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) + if err := m.ActionOfSchema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + 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 *QueryAllActionOfSchemaRequest) 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: QueryAllActionOfSchemaRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllActionOfSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -10386,7 +10539,7 @@ func (m *QueryListAttributeBySchemaRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryListAttributeBySchemaResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllActionOfSchemaResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10409,15 +10562,15 @@ func (m *QueryListAttributeBySchemaResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryListAttributeBySchemaResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllActionOfSchemaResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListAttributeBySchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllActionOfSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaAttribute", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ActionOfSchema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10444,8 +10597,8 @@ func (m *QueryListAttributeBySchemaResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SchemaAttribute = append(m.SchemaAttribute, SchemaAttribute{}) - if err := m.SchemaAttribute[len(m.SchemaAttribute)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ActionOfSchema = append(m.ActionOfSchema, ActionOfSchema{}) + if err := m.ActionOfSchema[len(m.ActionOfSchema)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10506,7 +10659,7 @@ func (m *QueryListAttributeBySchemaResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetActionOfSchemaRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetExecutorOfSchemaRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10529,10 +10682,10 @@ func (m *QueryGetActionOfSchemaRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetActionOfSchemaRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetExecutorOfSchemaRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetActionOfSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetExecutorOfSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10567,38 +10720,6 @@ func (m *QueryGetActionOfSchemaRequest) Unmarshal(dAtA []byte) error { } m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -10620,7 +10741,7 @@ func (m *QueryGetActionOfSchemaRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetActionOfSchemaResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetExecutorOfSchemaResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10643,15 +10764,15 @@ func (m *QueryGetActionOfSchemaResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetActionOfSchemaResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetExecutorOfSchemaResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetActionOfSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetExecutorOfSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionOfSchema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorOfSchema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10678,7 +10799,7 @@ func (m *QueryGetActionOfSchemaResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ActionOfSchema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ExecutorOfSchema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10703,7 +10824,7 @@ func (m *QueryGetActionOfSchemaResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllActionOfSchemaRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllExecutorOfSchemaRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10726,10 +10847,10 @@ func (m *QueryAllActionOfSchemaRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllActionOfSchemaRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllExecutorOfSchemaRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllActionOfSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllExecutorOfSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10789,7 +10910,7 @@ func (m *QueryAllActionOfSchemaRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllActionOfSchemaResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllExecutorOfSchemaResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10812,15 +10933,15 @@ func (m *QueryAllActionOfSchemaResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllActionOfSchemaResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllExecutorOfSchemaResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllActionOfSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllExecutorOfSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionOfSchema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorOfSchema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10847,8 +10968,8 @@ func (m *QueryAllActionOfSchemaResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ActionOfSchema = append(m.ActionOfSchema, ActionOfSchema{}) - if err := m.ActionOfSchema[len(m.ActionOfSchema)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ExecutorOfSchema = append(m.ExecutorOfSchema, ExecutorOfSchema{}) + if err := m.ExecutorOfSchema[len(m.ExecutorOfSchema)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10909,7 +11030,7 @@ func (m *QueryAllActionOfSchemaResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryListActionBySchemaRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetAttributeOfSchemaRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10932,10 +11053,10 @@ func (m *QueryListActionBySchemaRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryListActionBySchemaRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetAttributeOfSchemaRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListActionBySchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetAttributeOfSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10970,42 +11091,6 @@ func (m *QueryListActionBySchemaRequest) Unmarshal(dAtA []byte) error { } m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -11027,7 +11112,7 @@ func (m *QueryListActionBySchemaRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryListActionBySchemaResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetAttributeOfSchemaResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11050,10 +11135,10 @@ func (m *QueryListActionBySchemaResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryListActionBySchemaResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetAttributeOfSchemaResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListActionBySchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetAttributeOfSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -11090,41 +11175,7 @@ func (m *QueryListActionBySchemaResponse) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionOfSchema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActionOfSchema = append(m.ActionOfSchema, &ActionOfSchema{}) - if err := m.ActionOfSchema[len(m.ActionOfSchema)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SchemaAttribute", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11151,10 +11202,8 @@ func (m *QueryListActionBySchemaResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SchemaAttribute = append(m.SchemaAttribute, SchemaAttribute{}) + if err := m.SchemaAttribute[len(m.SchemaAttribute)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/nftmngr/types/query.pb.gw.go b/x/nftmngr/types/query.pb.gw.go index 66ace806..f6896af7 100644 --- a/x/nftmngr/types/query.pb.gw.go +++ b/x/nftmngr/types/query.pb.gw.go @@ -851,78 +851,6 @@ func local_request_Query_ActionExecutorAll_0(ctx context.Context, marshaler runt } -var ( - filter_Query_ActionExecutorbySchema_0 = &utilities.DoubleArray{Encoding: map[string]int{"nftSchemaCode": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_ActionExecutorbySchema_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryActionExecutorbySchemaRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["nftSchemaCode"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nftSchemaCode") - } - - protoReq.NftSchemaCode, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nftSchemaCode", 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_ActionExecutorbySchema_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ActionExecutorbySchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ActionExecutorbySchema_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryActionExecutorbySchemaRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["nftSchemaCode"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nftSchemaCode") - } - - protoReq.NftSchemaCode, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nftSchemaCode", 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_ActionExecutorbySchema_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ActionExecutorbySchema(ctx, &protoReq) - return msg, metadata, err - -} - func request_Query_SchemaAttribute_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryGetSchemaAttributeRequest var metadata runtime.ServerMetadata @@ -1035,10 +963,6 @@ func local_request_Query_SchemaAttributeAll_0(ctx context.Context, marshaler run } -var ( - filter_Query_ListAttributeBySchema_0 = &utilities.DoubleArray{Encoding: map[string]int{"nftSchemaCode": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - func request_Query_ListAttributeBySchema_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryListAttributeBySchemaRequest var metadata runtime.ServerMetadata @@ -1061,13 +985,6 @@ func request_Query_ListAttributeBySchema_0(ctx context.Context, marshaler runtim return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nftSchemaCode", 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_ListAttributeBySchema_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ListAttributeBySchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -1095,13 +1012,6 @@ func local_request_Query_ListAttributeBySchema_0(ctx context.Context, marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nftSchemaCode", 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_ListAttributeBySchema_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ListAttributeBySchema(ctx, &protoReq) return msg, metadata, err @@ -1219,12 +1129,35 @@ func local_request_Query_ActionOfSchemaAll_0(ctx context.Context, marshaler runt } -var ( - filter_Query_ListActionBySchema_0 = &utilities.DoubleArray{Encoding: map[string]int{"nftSchemaCode": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +func request_Query_ExecutorOfSchema_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetExecutorOfSchemaRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["nftSchemaCode"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nftSchemaCode") + } + + protoReq.NftSchemaCode, err = runtime.String(val) -func request_Query_ListActionBySchema_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListActionBySchemaRequest + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nftSchemaCode", err) + } + + msg, err := client.ExecutorOfSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ExecutorOfSchema_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetExecutorOfSchemaRequest var metadata runtime.ServerMetadata var ( @@ -1245,20 +1178,49 @@ func request_Query_ListActionBySchema_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nftSchemaCode", err) } + msg, err := server.ExecutorOfSchema(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_ExecutorOfSchemaAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_ExecutorOfSchemaAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllExecutorOfSchemaRequest + 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_ListActionBySchema_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ExecutorOfSchemaAll_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListActionBySchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ExecutorOfSchemaAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_ListActionBySchema_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListActionBySchemaRequest +func local_request_Query_ExecutorOfSchemaAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllExecutorOfSchemaRequest + 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_ExecutorOfSchemaAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ExecutorOfSchemaAll(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AttributeOfSchema_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAttributeOfSchemaRequest var metadata runtime.ServerMetadata var ( @@ -1279,14 +1241,34 @@ func local_request_Query_ListActionBySchema_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nftSchemaCode", err) } - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + msg, err := client.AttributeOfSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AttributeOfSchema_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAttributeOfSchemaRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["nftSchemaCode"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nftSchemaCode") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ListActionBySchema_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.NftSchemaCode, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nftSchemaCode", err) } - msg, err := server.ListActionBySchema(ctx, &protoReq) + msg, err := server.AttributeOfSchema(ctx, &protoReq) return msg, metadata, err } @@ -1711,7 +1693,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_ActionExecutorbySchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_SchemaAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1722,7 +1704,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ActionExecutorbySchema_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_SchemaAttribute_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1730,11 +1712,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ActionExecutorbySchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_SchemaAttribute_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_SchemaAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_SchemaAttributeAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1745,7 +1727,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_SchemaAttribute_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_SchemaAttributeAll_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1753,11 +1735,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_SchemaAttribute_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_SchemaAttributeAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_SchemaAttributeAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ListAttributeBySchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1768,7 +1750,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_SchemaAttributeAll_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ListAttributeBySchema_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1776,11 +1758,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_SchemaAttributeAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ListAttributeBySchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ListAttributeBySchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ActionOfSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1791,7 +1773,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ListAttributeBySchema_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ActionOfSchema_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1799,11 +1781,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ListAttributeBySchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ActionOfSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ActionOfSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ActionOfSchemaAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1814,7 +1796,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ActionOfSchema_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ActionOfSchemaAll_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1822,11 +1804,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ActionOfSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ActionOfSchemaAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ActionOfSchemaAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ExecutorOfSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1837,7 +1819,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ActionOfSchemaAll_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ExecutorOfSchema_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1845,11 +1827,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ActionOfSchemaAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ExecutorOfSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ListActionBySchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ExecutorOfSchemaAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1860,7 +1842,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ListActionBySchema_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ExecutorOfSchemaAll_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1868,7 +1850,30 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ListActionBySchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ExecutorOfSchemaAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AttributeOfSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_AttributeOfSchema_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AttributeOfSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -2273,7 +2278,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_ActionExecutorbySchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_SchemaAttribute_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) @@ -2282,18 +2287,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ActionExecutorbySchema_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_SchemaAttribute_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_ActionExecutorbySchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_SchemaAttribute_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_SchemaAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_SchemaAttributeAll_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) @@ -2302,18 +2307,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_SchemaAttribute_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_SchemaAttributeAll_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_SchemaAttribute_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_SchemaAttributeAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_SchemaAttributeAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ListAttributeBySchema_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) @@ -2322,18 +2327,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_SchemaAttributeAll_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ListAttributeBySchema_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_SchemaAttributeAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ListAttributeBySchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ListAttributeBySchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ActionOfSchema_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) @@ -2342,18 +2347,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ListAttributeBySchema_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ActionOfSchema_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_ListAttributeBySchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ActionOfSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ActionOfSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ActionOfSchemaAll_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) @@ -2362,18 +2367,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ActionOfSchema_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ActionOfSchemaAll_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_ActionOfSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ActionOfSchemaAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ActionOfSchemaAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ExecutorOfSchema_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) @@ -2382,18 +2387,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ActionOfSchemaAll_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ExecutorOfSchema_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_ActionOfSchemaAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ExecutorOfSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ListActionBySchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ExecutorOfSchemaAll_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) @@ -2402,14 +2407,34 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ListActionBySchema_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ExecutorOfSchemaAll_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_ListActionBySchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ExecutorOfSchemaAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AttributeOfSchema_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_AttributeOfSchema_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_AttributeOfSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -2453,8 +2478,6 @@ var ( pattern_Query_ActionExecutorAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"thesixnetwork", "sixnft", "nftmngr", "action_executor"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ActionExecutorbySchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"thesixnetwork", "sixnft", "nftmngr", "action_executorby_schema", "nftSchemaCode"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_SchemaAttribute_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{"thesixnetwork", "sixnft", "nftmngr", "schema_attribute", "nftSchemaCode", "name"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_SchemaAttributeAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"thesixnetwork", "sixnft", "nftmngr", "schema_attribute"}, "", runtime.AssumeColonVerbOpt(true))) @@ -2465,7 +2488,11 @@ var ( pattern_Query_ActionOfSchemaAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"thesixnetwork", "sixnft", "nftmngr", "action_of_schema"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ListActionBySchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"thesixnetwork", "sixnft", "nftmngr", "list_action_by_schema", "nftSchemaCode"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ExecutorOfSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"thesixnetwork", "sixnft", "nftmngr", "executor_of_schema", "nftSchemaCode"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_ExecutorOfSchemaAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"thesixnetwork", "sixnft", "nftmngr", "executor_of_schema"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_AttributeOfSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"thesixnetwork", "sixnft", "nftmngr", "attribute_of_schema", "nftSchemaCode"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -2505,8 +2532,6 @@ var ( forward_Query_ActionExecutorAll_0 = runtime.ForwardResponseMessage - forward_Query_ActionExecutorbySchema_0 = runtime.ForwardResponseMessage - forward_Query_SchemaAttribute_0 = runtime.ForwardResponseMessage forward_Query_SchemaAttributeAll_0 = runtime.ForwardResponseMessage @@ -2517,5 +2542,9 @@ var ( forward_Query_ActionOfSchemaAll_0 = runtime.ForwardResponseMessage - forward_Query_ListActionBySchema_0 = runtime.ForwardResponseMessage + forward_Query_ExecutorOfSchema_0 = runtime.ForwardResponseMessage + + forward_Query_ExecutorOfSchemaAll_0 = runtime.ForwardResponseMessage + + forward_Query_AttributeOfSchema_0 = runtime.ForwardResponseMessage ) diff --git a/x/nftmngr/types/tx.pb.go b/x/nftmngr/types/tx.pb.go index eae5657c..91a65b13 100644 --- a/x/nftmngr/types/tx.pb.go +++ b/x/nftmngr/types/tx.pb.go @@ -561,6 +561,7 @@ func (m *UpdatedOpenseaAttributes) GetAttributes() []*OpenseaAttribute { type UpdatedOriginData struct { // Types that are valid to be assigned to UpdatedOriginData: + // // *UpdatedOriginData_Opensea UpdatedOriginData isUpdatedOriginData_UpdatedOriginData `protobuf_oneof:"updated_origin_data"` }