mirror of
https://github.com/colinear-labs/chain.git
synced 2026-03-05 12:14:26 -08:00
scaffold base auction & nextAuction types
This commit is contained in:
14
proto/cosmostest/auction.proto
Normal file
14
proto/cosmostest/auction.proto
Normal file
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
package cosmostest.cosmostest;
|
||||
|
||||
option go_package = "cosmos-test/x/cosmostest/types";
|
||||
|
||||
message Auction {
|
||||
string index = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
string bids = 4;
|
||||
string highestBid = 5;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package cosmostest.cosmostest;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmostest/params.proto";
|
||||
import "cosmostest/next_auction.proto";
|
||||
import "cosmostest/auction.proto";
|
||||
// this line is used by starport scaffolding # genesis/proto/import
|
||||
|
||||
option go_package = "cosmos-test/x/cosmostest/types";
|
||||
@@ -10,5 +12,7 @@ option go_package = "cosmos-test/x/cosmostest/types";
|
||||
// GenesisState defines the cosmostest module's genesis state.
|
||||
message GenesisState {
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
NextAuction nextAuction = 2;
|
||||
repeated Auction auctionList = 3 [(gogoproto.nullable) = false];
|
||||
// this line is used by starport scaffolding # genesis/proto/state
|
||||
}
|
||||
|
||||
9
proto/cosmostest/next_auction.proto
Normal file
9
proto/cosmostest/next_auction.proto
Normal file
@@ -0,0 +1,9 @@
|
||||
syntax = "proto3";
|
||||
package cosmostest.cosmostest;
|
||||
|
||||
option go_package = "cosmos-test/x/cosmostest/types";
|
||||
|
||||
message NextAuction {
|
||||
uint64 auctionId = 1;
|
||||
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "cosmostest/params.proto";
|
||||
import "cosmostest/next_auction.proto";
|
||||
import "cosmostest/auction.proto";
|
||||
// this line is used by starport scaffolding # 1
|
||||
|
||||
option go_package = "cosmos-test/x/cosmostest/types";
|
||||
@@ -15,7 +17,21 @@ service Query {
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos-test/cosmostest/params";
|
||||
}
|
||||
// this line is used by starport scaffolding # 2
|
||||
// Queries a NextAuction by index.
|
||||
rpc NextAuction(QueryGetNextAuctionRequest) returns (QueryGetNextAuctionResponse) {
|
||||
option (google.api.http).get = "/cosmos-test/cosmostest/next_auction";
|
||||
}
|
||||
// Queries a Auction by index.
|
||||
rpc Auction(QueryGetAuctionRequest) returns (QueryGetAuctionResponse) {
|
||||
option (google.api.http).get = "/cosmos-test/cosmostest/auction/{index}";
|
||||
}
|
||||
|
||||
// Queries a list of Auction items.
|
||||
rpc AuctionAll(QueryAllAuctionRequest) returns (QueryAllAuctionResponse) {
|
||||
option (google.api.http).get = "/cosmos-test/cosmostest/auction";
|
||||
}
|
||||
|
||||
// this line is used by starport scaffolding # 2
|
||||
}
|
||||
|
||||
// QueryParamsRequest is request type for the Query/Params RPC method.
|
||||
@@ -27,4 +43,27 @@ message QueryParamsResponse {
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message QueryGetNextAuctionRequest {}
|
||||
|
||||
message QueryGetNextAuctionResponse {
|
||||
NextAuction NextAuction = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
message QueryGetAuctionRequest {
|
||||
string index = 1;
|
||||
|
||||
}
|
||||
|
||||
message QueryGetAuctionResponse {
|
||||
Auction auction = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message QueryAllAuctionRequest {
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
message QueryAllAuctionResponse {
|
||||
repeated Auction auction = 1 [(gogoproto.nullable) = false];
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// this line is used by starport scaffolding # 3
|
||||
|
||||
Reference in New Issue
Block a user