From 8e66f2598e577c81d205a59a2caf56f68aa1f173 Mon Sep 17 00:00:00 2001 From: zemyblue Date: Mon, 6 Feb 2023 16:34:57 +0900 Subject: [PATCH] docs: update proto format and related document. --- docs/core/proto-docs.md | 25 ++++++++++++++----------- proto/cosmos/tx/v1beta1/service.proto | 2 +- proto/lbm/base/ostracon/v1/query.proto | 10 +++++----- x/collection/collection.pb.go | 4 ++++ x/collection/event.pb.go | 2 ++ x/collection/query.pb.go | 5 +++++ x/collection/tx.pb.go | 3 +++ 7 files changed, 34 insertions(+), 17 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index ddcf30196f..65941ea069 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -9246,12 +9246,15 @@ Params defines the parameters for the collection module. Deprecated: use TokenClass TokenType defines the information of token type. +It represents a NFTClass whose class_id is token_type. + +Note: There is no TokenType instance for FTClass. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `contract_id` | [string](#string) | | contract id associated with the contract. | -| `token_type` | [string](#string) | | token type defines the unique identifier of the token type. | +| `token_type` | [string](#string) | | token type defines the unique identifier of the token type. the format of the value is identical to that of class_id. | | `name` | [string](#string) | | name defines the human-readable name of the token type. | | `meta` | [string](#string) | | meta is a brief description of the token type. | @@ -9424,7 +9427,7 @@ Since: 0.46.0 (finschia) | ----- | ---- | ----- | ----------- | | `contract_id` | [string](#string) | | contract id associated with the contract. | | `operator` | [string](#string) | | address which triggered the create. | -| `token_type` | [string](#string) | | token type associated with the token class. | +| `token_type` | [string](#string) | | token type associated with the token class. refer to TokenType for the definition. | | `name` | [string](#string) | | name of the token class. | | `meta` | [string](#string) | | metadata of the token class. | @@ -9567,7 +9570,7 @@ Since: 0.46.0 (finschia) | ----- | ---- | ----- | ----------- | | `contract_id` | [string](#string) | | contract id associated with the contract. | | `operator` | [string](#string) | | address which triggered the modify. | -| `token_type` | [string](#string) | | token type associated with the token class. | +| `token_type` | [string](#string) | | token type associated with the token class. refer to TokenType for the definition. | | `changes` | [Attribute](#lbm.collection.v1.Attribute) | repeated | changes of the attributes applied. possible attribute keys are same as those of MsgModify. | | `type_name` | [string](#string) | | type name of the token class. | @@ -10344,7 +10347,7 @@ QueryNFTBurntRequest is the request type for the Query/NFTBurnt RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `contract_id` | [string](#string) | | contract id associated with the contract. | -| `token_type` | [string](#string) | | token type associated with the token type. | +| `token_type` | [string](#string) | | token type associated with the token type. refer to TokenType for the definition. | @@ -10375,7 +10378,7 @@ QueryNFTMintedRequest is the request type for the Query/NFTMinted RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `contract_id` | [string](#string) | | contract id associated with the contract. | -| `token_type` | [string](#string) | | token type associated with the token type. | +| `token_type` | [string](#string) | | token type associated with the token type. refer to TokenType for the definition. | @@ -10406,7 +10409,7 @@ QueryNFTSupplyRequest is the request type for the Query/NFTSupply RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `contract_id` | [string](#string) | | contract id associated with the contract. | -| `token_type` | [string](#string) | | token type associated with the token type. | +| `token_type` | [string](#string) | | token type associated with the token type. refer to TokenType for the definition. | @@ -10565,7 +10568,7 @@ QueryTokenTypeRequest is the request type for the Query/TokenType RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `contract_id` | [string](#string) | | contract id associated with the contract. | -| `token_type` | [string](#string) | | token type associated with the token type. | +| `token_type` | [string](#string) | | token type associated with the token type. refer to TokenType for the definition. | @@ -10660,7 +10663,7 @@ QueryTokensWithTokenTypeRequest is the request type for the Query/TokensWithToke | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `contract_id` | [string](#string) | | contract id associated with the contract. | -| `token_type` | [string](#string) | | token type associated with the token type. | +| `token_type` | [string](#string) | | token type associated with the token type. refer to TokenType for the definition. | | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | @@ -10740,7 +10743,7 @@ MintNFTParam defines a parameter for minting nft. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `token_type` | [string](#string) | | token type or class id of the nft. Note: it cannot start with zero. | +| `token_type` | [string](#string) | | token type or class id of the nft. Note: it cannot start with zero. refer to TokenType for the definition. | | `name` | [string](#string) | | name defines the human-readable name of the nft (mandatory). Note: it has an app-specific limit in length. | | `meta` | [string](#string) | | meta is a brief description of the nft. Note: it has an app-specific limit in length. | @@ -11019,7 +11022,7 @@ MsgIssueNFTResponse is the Msg/IssueNFT response type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `token_type` | [string](#string) | | id of the new token type. | +| `token_type` | [string](#string) | | id of the new token type. refer to TokenType for the definition. | @@ -11101,7 +11104,7 @@ MsgModify is the Msg/Modify request type. | ----- | ---- | ----- | ----------- | | `contract_id` | [string](#string) | | contract id associated with the contract. | | `owner` | [string](#string) | | the address of the grantee which must have modify permission. | -| `token_type` | [string](#string) | | token type of the token. | +| `token_type` | [string](#string) | | token type of the token. refer to TokenType for the definition. | | `token_index` | [string](#string) | | token index of the token. if index is empty, it would modify the corresponding token type. if index is not empty, it would modify the corresponding nft. Note: if token type is of FTs, the index cannot be empty. | | `changes` | [Attribute](#lbm.collection.v1.Attribute) | repeated | changes to apply. possible attribute keys on modifying collection: name, base_img_uri, meta. possible attribute keys on modifying token type and token: name, meta. | diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index c1a18fd72a..3b30a28eba 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -159,7 +159,7 @@ message GetBlockWithTxsRequest { message GetBlockWithTxsResponse { // txs are the transactions in the block. repeated cosmos.tx.v1beta1.Tx txs = 1; - .tendermint.types.BlockID block_id = 2; + .tendermint.types.BlockID block_id = 2; .ostracon.types.Block block = 3; // pagination defines a pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 4; diff --git a/proto/lbm/base/ostracon/v1/query.proto b/proto/lbm/base/ostracon/v1/query.proto index fb1568beb7..2d22625a38 100644 --- a/proto/lbm/base/ostracon/v1/query.proto +++ b/proto/lbm/base/ostracon/v1/query.proto @@ -95,7 +95,7 @@ message GetBlockByHeightRequest { // GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. message GetBlockByHeightResponse { .tendermint.types.BlockID block_id = 1; - .ostracon.types.Block block = 2; + .ostracon.types.Block block = 2; } // GetBlockByHashRequest is the request type for the Query/GetBlockByHash RPC method. @@ -106,7 +106,7 @@ message GetBlockByHashRequest { // GetBlockByHashResponse is the response type for the Query/GetBlockByHash RPC method. message GetBlockByHashResponse { .tendermint.types.BlockID block_id = 1; - .ostracon.types.Block block = 2; + .ostracon.types.Block block = 2; } // GetBlockResultsByHeightRequest is the request type for the Query/GetBlockResultsByHeight RPC method. @@ -116,7 +116,7 @@ message GetBlockResultsByHeightRequest { // GetBlockResultsByHeightResponse is the response type for the Query/GetBlockResultsByHeight RPC method. message GetBlockResultsByHeightResponse { - int64 height = 1; + int64 height = 1; repeated .tendermint.abci.ResponseDeliverTx txs_results = 2; .tendermint.abci.ResponseBeginBlock res_begin_block = 3; .tendermint.abci.ResponseEndBlock res_end_block = 4; @@ -128,7 +128,7 @@ message GetLatestBlockRequest {} // GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. message GetLatestBlockResponse { .tendermint.types.BlockID block_id = 1; - .ostracon.types.Block block = 2; + .ostracon.types.Block block = 2; } // GetSyncingRequest is the request type for the Query/GetSyncing RPC method. @@ -145,7 +145,7 @@ message GetNodeInfoRequest {} // GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. message GetNodeInfoResponse { .tendermint.p2p.DefaultNodeInfo default_node_info = 1; - VersionInfo application_version = 2; + VersionInfo application_version = 2; } // VersionInfo is the type for the GetNodeInfoResponse message. diff --git a/x/collection/collection.pb.go b/x/collection/collection.pb.go index c497e23b6f..fbfc6b6047 100644 --- a/x/collection/collection.pb.go +++ b/x/collection/collection.pb.go @@ -488,10 +488,14 @@ var xxx_messageInfo_FT proto.InternalMessageInfo // Deprecated: use TokenClass // // TokenType defines the information of token type. +// It represents a NFTClass whose class_id is token_type. +// +// Note: There is no TokenType instance for FTClass. type TokenType struct { // contract id associated with the contract. ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` // token type defines the unique identifier of the token type. + // the format of the value is identical to that of class_id. TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // name defines the human-readable name of the token type. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` diff --git a/x/collection/event.pb.go b/x/collection/event.pb.go index 7445d7227e..f91b2b8e52 100644 --- a/x/collection/event.pb.go +++ b/x/collection/event.pb.go @@ -617,6 +617,7 @@ type EventCreatedNFTClass struct { // address which triggered the create. Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` // token type associated with the token class. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,3,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // name of the token class. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` @@ -1136,6 +1137,7 @@ type EventModifiedTokenClass struct { // address which triggered the modify. Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` // token type associated with the token class. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,3,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // changes of the attributes applied. // possible attribute keys are same as those of MsgModify. diff --git a/x/collection/query.pb.go b/x/collection/query.pb.go index 37c3035a4b..9af3fe3a82 100644 --- a/x/collection/query.pb.go +++ b/x/collection/query.pb.go @@ -548,6 +548,7 @@ type QueryNFTSupplyRequest struct { // contract id associated with the contract. ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` // token type associated with the token type. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` } @@ -642,6 +643,7 @@ type QueryNFTMintedRequest struct { // contract id associated with the contract. ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` // token type associated with the token type. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` } @@ -736,6 +738,7 @@ type QueryNFTBurntRequest struct { // contract id associated with the contract. ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` // token type associated with the token type. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` } @@ -1027,6 +1030,7 @@ type QueryTokenTypeRequest struct { // contract id associated with the contract. ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` // token type associated with the token type. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` } @@ -1339,6 +1343,7 @@ type QueryTokensWithTokenTypeRequest struct { // contract id associated with the contract. ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` // token type associated with the token type. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` diff --git a/x/collection/tx.pb.go b/x/collection/tx.pb.go index 261e3d6207..fa5631e93e 100644 --- a/x/collection/tx.pb.go +++ b/x/collection/tx.pb.go @@ -1042,6 +1042,7 @@ func (m *MsgIssueNFT) GetOwner() string { // MsgIssueNFTResponse is the Msg/IssueNFT response type. type MsgIssueNFTResponse struct { // id of the new token type. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,1,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` } @@ -1323,6 +1324,7 @@ func (m *MsgMintNFTResponse) GetTokenIds() []string { type MintNFTParam struct { // token type or class id of the nft. // Note: it cannot start with zero. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,1,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // name defines the human-readable name of the nft (mandatory). // Note: it has an app-specific limit in length. @@ -1825,6 +1827,7 @@ type MsgModify struct { // the address of the grantee which must have modify permission. Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` // token type of the token. + // refer to TokenType for the definition. TokenType string `protobuf:"bytes,3,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // token index of the token. // if index is empty, it would modify the corresponding token type.