mirror of
				https://github.com/0glabs/0g-chain.git
				synced 2025-11-04 10:37:26 +00:00 
			
		
		
		
	* Update cometbft, cosmos, ethermint, and ibc-go * Replace github.com/tendermint/tendermint by github.com/cometbft/cometbft * Replace github.com/tendermint/tm-db by github.com/cometbft/cometbft-db * Replace gogo/protobuf with cosmos/gogoproto & simapp replacement * Replace cosmos-sdk/simapp/helpers with cosmos-sdk/testutil/sims * Remove no longer used simulations * Replace ibchost with ibcexported See https://github.com/cosmos/ibc-go/blob/v7.2.2/docs/migrations/v6-to-v7.md#ibc-module-constants * Add new consensus params keeper * Add consensus keeper to blockers * Fix keeper and module issues in app.go * Add IsSendEnabledCoins and update SetParams interface changes * Fix protobuf build for cosmos 47 (#1800) * fix cp errors by using -f; fix lint by only linting our proto dir; and use proofs.proto directly from ics23 for ibc-go v7 * run proto-all; commit updated third party deps and swagger changes * regenerate proto files * use correct gocosmos build plugin for buf * re-gen all protobuf files to update paths for new gocosmos plugin * update protoc and buf to latest versions * fix staking keeper issues in app.go * update tally handler for gov changes * chain id fix and flag fixes * update deps for cometbft 47.7 upgrade * remove all module legacy queriers * update stakingKeeper to pointer * Replace ModuleCdc from govv1beta1 to govcodec * remove simulations * abci.LastCommitInfo → abci.CommitInfo * Remove unused code in keys.go * simapp.MakeTestEncodingConfig -> moduletestutil.MakeTestEncodingConfi * Fix chain id issues in tests * Fix remaining unit test issues * Update changelog for upgrade * Fix e2e tests using updated kvtool * Update protonet to v47 compatible genesis * Bump cometbft-db to v0.9.1-kava.1 * Update kvtool * Remove extra changelog * Fix merged rocksdb issues * go mod cleanup * Bump cometbft-db to v9 and go to 1.21 * Bump rocksdb version to v8.10.0 * Update kvtool to latest version * Update gin to v1.9.0 * Use ibctm.ModuleName in app_test * Fallback to genesis chain id instead of client toml * Remove all simulations * Fix cdp migrations issue with v47 * Update dependencies to correct tags --------- Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
		
			
				
	
	
		
			153 lines
		
	
	
		
			4.9 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
			
		
		
	
	
			153 lines
		
	
	
		
			4.9 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
syntax = "proto3";
 | 
						|
package cosmos.nft.v1beta1;
 | 
						|
 | 
						|
import "cosmos/base/query/v1beta1/pagination.proto";
 | 
						|
import "google/api/annotations.proto";
 | 
						|
import "cosmos/nft/v1beta1/nft.proto";
 | 
						|
 | 
						|
option go_package = "github.com/cosmos/cosmos-sdk/x/nft";
 | 
						|
 | 
						|
// Query defines the gRPC querier service.
 | 
						|
service Query {
 | 
						|
  // Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721
 | 
						|
  rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
 | 
						|
    option (google.api.http).get = "/cosmos/nft/v1beta1/balance/{owner}/{class_id}";
 | 
						|
  }
 | 
						|
 | 
						|
  // Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721
 | 
						|
  rpc Owner(QueryOwnerRequest) returns (QueryOwnerResponse) {
 | 
						|
    option (google.api.http).get = "/cosmos/nft/v1beta1/owner/{class_id}/{id}";
 | 
						|
  }
 | 
						|
 | 
						|
  // Supply queries the number of NFTs from the given class, same as totalSupply of ERC721.
 | 
						|
  rpc Supply(QuerySupplyRequest) returns (QuerySupplyResponse) {
 | 
						|
    option (google.api.http).get = "/cosmos/nft/v1beta1/supply/{class_id}";
 | 
						|
  }
 | 
						|
 | 
						|
  // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in
 | 
						|
  // ERC721Enumerable
 | 
						|
  rpc NFTs(QueryNFTsRequest) returns (QueryNFTsResponse) {
 | 
						|
    option (google.api.http).get = "/cosmos/nft/v1beta1/nfts";
 | 
						|
  }
 | 
						|
 | 
						|
  // NFT queries an NFT based on its class and id.
 | 
						|
  rpc NFT(QueryNFTRequest) returns (QueryNFTResponse) {
 | 
						|
    option (google.api.http).get = "/cosmos/nft/v1beta1/nfts/{class_id}/{id}";
 | 
						|
  }
 | 
						|
 | 
						|
  // Class queries an NFT class based on its id
 | 
						|
  rpc Class(QueryClassRequest) returns (QueryClassResponse) {
 | 
						|
    option (google.api.http).get = "/cosmos/nft/v1beta1/classes/{class_id}";
 | 
						|
  }
 | 
						|
 | 
						|
  // Classes queries all NFT classes
 | 
						|
  rpc Classes(QueryClassesRequest) returns (QueryClassesResponse) {
 | 
						|
    option (google.api.http).get = "/cosmos/nft/v1beta1/classes";
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
// QueryBalanceRequest is the request type for the Query/Balance RPC method
 | 
						|
message QueryBalanceRequest {
 | 
						|
  // class_id associated with the nft
 | 
						|
  string class_id = 1;
 | 
						|
 | 
						|
  // owner is the owner address of the nft
 | 
						|
  string owner = 2;
 | 
						|
}
 | 
						|
 | 
						|
// QueryBalanceResponse is the response type for the Query/Balance RPC method
 | 
						|
message QueryBalanceResponse {
 | 
						|
  // amount is the number of all NFTs of a given class owned by the owner
 | 
						|
  uint64 amount = 1;
 | 
						|
}
 | 
						|
 | 
						|
// QueryOwnerRequest is the request type for the Query/Owner RPC method
 | 
						|
message QueryOwnerRequest {
 | 
						|
  // class_id associated with the nft
 | 
						|
  string class_id = 1;
 | 
						|
 | 
						|
  // id is a unique identifier of the NFT
 | 
						|
  string id = 2;
 | 
						|
}
 | 
						|
 | 
						|
// QueryOwnerResponse is the response type for the Query/Owner RPC method
 | 
						|
message QueryOwnerResponse {
 | 
						|
  // owner is the owner address of the nft
 | 
						|
  string owner = 1;
 | 
						|
}
 | 
						|
 | 
						|
// QuerySupplyRequest is the request type for the Query/Supply RPC method
 | 
						|
message QuerySupplyRequest {
 | 
						|
  // class_id associated with the nft
 | 
						|
  string class_id = 1;
 | 
						|
}
 | 
						|
 | 
						|
// QuerySupplyResponse is the response type for the Query/Supply RPC method
 | 
						|
message QuerySupplyResponse {
 | 
						|
  // amount is the number of all NFTs from the given class
 | 
						|
  uint64 amount = 1;
 | 
						|
}
 | 
						|
 | 
						|
// QueryNFTstRequest is the request type for the Query/NFTs RPC method
 | 
						|
message QueryNFTsRequest {
 | 
						|
  // class_id associated with the nft
 | 
						|
  string class_id = 1;
 | 
						|
 | 
						|
  // owner is the owner address of the nft
 | 
						|
  string owner = 2;
 | 
						|
 | 
						|
  // pagination defines an optional pagination for the request.
 | 
						|
  cosmos.base.query.v1beta1.PageRequest pagination = 3;
 | 
						|
}
 | 
						|
 | 
						|
// QueryNFTsResponse is the response type for the Query/NFTs RPC methods
 | 
						|
message QueryNFTsResponse {
 | 
						|
  // NFT defines the NFT
 | 
						|
  repeated cosmos.nft.v1beta1.NFT nfts = 1;
 | 
						|
 | 
						|
  // pagination defines the pagination in the response.
 | 
						|
  cosmos.base.query.v1beta1.PageResponse pagination = 2;
 | 
						|
}
 | 
						|
 | 
						|
// QueryNFTRequest is the request type for the Query/NFT RPC method
 | 
						|
message QueryNFTRequest {
 | 
						|
  // class_id associated with the nft
 | 
						|
  string class_id = 1;
 | 
						|
 | 
						|
  // id is a unique identifier of the NFT
 | 
						|
  string id = 2;
 | 
						|
}
 | 
						|
 | 
						|
// QueryNFTResponse is the response type for the Query/NFT RPC method
 | 
						|
message QueryNFTResponse {
 | 
						|
  // owner is the owner address of the nft
 | 
						|
  cosmos.nft.v1beta1.NFT nft = 1;
 | 
						|
}
 | 
						|
 | 
						|
// QueryClassRequest is the request type for the Query/Class RPC method
 | 
						|
message QueryClassRequest {
 | 
						|
  // class_id associated with the nft
 | 
						|
  string class_id = 1;
 | 
						|
}
 | 
						|
 | 
						|
// QueryClassResponse is the response type for the Query/Class RPC method
 | 
						|
message QueryClassResponse {
 | 
						|
  // class defines the class of the nft type.
 | 
						|
  cosmos.nft.v1beta1.Class class = 1;
 | 
						|
}
 | 
						|
 | 
						|
// QueryClassesRequest is the request type for the Query/Classes RPC method
 | 
						|
message QueryClassesRequest {
 | 
						|
  // pagination defines an optional pagination for the request.
 | 
						|
  cosmos.base.query.v1beta1.PageRequest pagination = 1;
 | 
						|
}
 | 
						|
 | 
						|
// QueryClassesResponse is the response type for the Query/Classes RPC method
 | 
						|
message QueryClassesResponse {
 | 
						|
  // class defines the class of the nft type.
 | 
						|
  repeated cosmos.nft.v1beta1.Class classes = 1;
 | 
						|
 | 
						|
  // pagination defines the pagination in the response.
 | 
						|
  cosmos.base.query.v1beta1.PageResponse pagination = 2;
 | 
						|
}
 |