2022-03-31 10:00:02 +00:00
|
|
|
syntax = "proto3";
|
2024-03-06 06:31:09 +00:00
|
|
|
|
|
|
|
package cerc.auction.v1;
|
2022-03-31 10:00:02 +00:00
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
2024-03-06 06:31:09 +00:00
|
|
|
import "cerc/auction/v1/auction.proto";
|
|
|
|
|
|
|
|
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction";
|
|
|
|
|
|
|
|
// Query defines the gRPC querier interface for the auction module
|
|
|
|
service Query {
|
|
|
|
// Params queries auction module params
|
|
|
|
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
|
|
|
option (google.api.http).get = "/cerc/auction/v1/params";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Auctions queries all auctions
|
|
|
|
rpc Auctions(QueryAuctionsRequest) returns (QueryAuctionsResponse) {
|
|
|
|
option (google.api.http).get = "/cerc/auction/v1/auctions";
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetAuction queries an auction
|
2024-03-12 05:37:24 +00:00
|
|
|
rpc GetAuction(QueryGetAuctionRequest) returns (QueryGetAuctionResponse) {
|
2024-03-06 06:31:09 +00:00
|
|
|
option (google.api.http).get = "/cerc/auction/v1/auctions/{id}";
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetBid queries an auction bid
|
2024-03-12 05:37:24 +00:00
|
|
|
rpc GetBid(QueryGetBidRequest) returns (QueryGetBidResponse) {
|
|
|
|
option (google.api.http).get =
|
|
|
|
"/cerc/auction/v1/bids/{auction_id}/{bidder}";
|
2024-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// GetBids queries all auction bids
|
2024-03-12 05:37:24 +00:00
|
|
|
rpc GetBids(QueryGetBidsRequest) returns (QueryGetBidsResponse) {
|
2024-03-06 06:31:09 +00:00
|
|
|
option (google.api.http).get = "/cerc/auction/v1/bids/{auction_id}";
|
|
|
|
}
|
2022-03-31 10:00:02 +00:00
|
|
|
|
2024-03-06 06:31:09 +00:00
|
|
|
// AuctionsByBidder queries auctions by bidder
|
2024-03-12 05:37:24 +00:00
|
|
|
rpc AuctionsByBidder(QueryAuctionsByBidderRequest)
|
|
|
|
returns (QueryAuctionsByBidderResponse) {
|
|
|
|
option (google.api.http).get =
|
|
|
|
"/cerc/auction/v1/by-bidder/{bidder_address}";
|
2024-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// AuctionsByOwner queries auctions by owner
|
2024-03-12 05:37:24 +00:00
|
|
|
rpc AuctionsByOwner(QueryAuctionsByOwnerRequest)
|
|
|
|
returns (QueryAuctionsByOwnerResponse) {
|
2024-03-06 06:31:09 +00:00
|
|
|
option (google.api.http).get = "/cerc/auction/v1/by-owner/{owner_address}";
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetAuctionModuleBalance queries the auction module account balance
|
2024-03-12 05:37:24 +00:00
|
|
|
rpc GetAuctionModuleBalance(QueryGetAuctionModuleBalanceRequest)
|
|
|
|
returns (QueryGetAuctionModuleBalanceResponse) {
|
2024-03-06 06:31:09 +00:00
|
|
|
option (google.api.http).get = "/cerc/auction/v1/balance";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
// QueryParamsRequest is the format to query the parameters of the auction
|
|
|
|
// module
|
2024-03-06 06:31:09 +00:00
|
|
|
message QueryParamsRequest {}
|
|
|
|
|
|
|
|
// QueryParamsResponse returns parameters of the auction module
|
2024-03-12 05:37:24 +00:00
|
|
|
message QueryParamsResponse { Params params = 1; }
|
2022-03-31 10:00:02 +00:00
|
|
|
|
|
|
|
// AuctionsRequest is the format for querying all the auctions
|
2024-03-06 06:31:09 +00:00
|
|
|
message QueryAuctionsRequest {
|
2022-03-31 10:00:02 +00:00
|
|
|
// pagination defines an optional pagination info for the next request
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AuctionsResponse returns the list of all auctions
|
2024-03-06 06:31:09 +00:00
|
|
|
message QueryAuctionsResponse {
|
2022-03-31 10:00:02 +00:00
|
|
|
// List of auctions
|
|
|
|
Auctions auctions = 1;
|
|
|
|
// pagination defines an optional pagination info for the next request
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AuctionRequest is the format for querying a specific auction
|
2024-03-12 05:37:24 +00:00
|
|
|
message QueryGetAuctionRequest {
|
2024-03-06 06:31:09 +00:00
|
|
|
// Auction id
|
2022-03-31 10:00:02 +00:00
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AuctionResponse returns the details of the queried auction
|
2024-03-12 05:37:24 +00:00
|
|
|
message QueryGetAuctionResponse {
|
2022-03-31 10:00:02 +00:00
|
|
|
// Auction details
|
|
|
|
Auction auction = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// BidRequest is the format for querying a specific bid in an auction
|
2024-03-12 05:37:24 +00:00
|
|
|
message QueryGetBidRequest {
|
2024-03-06 06:31:09 +00:00
|
|
|
// Auction id
|
2022-03-31 10:00:02 +00:00
|
|
|
string auction_id = 1;
|
|
|
|
// Bidder address
|
|
|
|
string bidder = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// BidResponse returns the details of the queried bid
|
2024-03-12 05:37:24 +00:00
|
|
|
message QueryGetBidResponse {
|
2022-03-31 10:00:02 +00:00
|
|
|
// Bid details
|
|
|
|
Bid bid = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// BidsRequest is the format for querying all bids in an auction
|
2024-03-12 05:37:24 +00:00
|
|
|
message QueryGetBidsRequest {
|
2024-03-06 06:31:09 +00:00
|
|
|
// Auction id
|
2022-03-31 10:00:02 +00:00
|
|
|
string auction_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// BidsResponse returns details of all bids in an auction
|
2024-03-12 05:37:24 +00:00
|
|
|
message QueryGetBidsResponse {
|
2022-03-31 10:00:02 +00:00
|
|
|
// List of bids in the auction
|
|
|
|
repeated Bid bids = 1;
|
|
|
|
}
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
// AuctionsByBidderRequest is the format for querying all auctions containing a
|
|
|
|
// bidder address
|
2024-03-06 06:31:09 +00:00
|
|
|
message QueryAuctionsByBidderRequest {
|
2022-03-31 10:00:02 +00:00
|
|
|
// Address of the bidder
|
|
|
|
string bidder_address = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AuctionsByBidderResponse returns all auctions containing a bidder
|
2024-03-06 06:31:09 +00:00
|
|
|
message QueryAuctionsByBidderResponse {
|
2022-03-31 10:00:02 +00:00
|
|
|
// List of auctions
|
|
|
|
Auctions auctions = 1;
|
|
|
|
}
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
// AuctionsByOwnerRequest is the format for querying all auctions created by an
|
|
|
|
// owner
|
2024-03-06 06:31:09 +00:00
|
|
|
message QueryAuctionsByOwnerRequest {
|
2022-03-31 10:00:02 +00:00
|
|
|
// Address of the owner
|
|
|
|
string owner_address = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AuctionsByOwnerResponse returns all auctions created by an owner
|
2024-03-06 06:31:09 +00:00
|
|
|
message QueryAuctionsByOwnerResponse {
|
2022-03-31 10:00:02 +00:00
|
|
|
// List of auctions
|
|
|
|
Auctions auctions = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// BalanceRequest is the format to fetch all balances
|
2024-03-06 06:31:09 +00:00
|
|
|
message QueryGetAuctionModuleBalanceRequest {}
|
2022-03-31 10:00:02 +00:00
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
// QueryGetAuctionModuleBalanceResponse is the response type for auction module
|
|
|
|
// balance rpc method
|
2024-03-06 06:31:09 +00:00
|
|
|
message QueryGetAuctionModuleBalanceResponse {
|
2022-03-31 10:00:02 +00:00
|
|
|
// Set of all balances within the auction
|
|
|
|
repeated cosmos.base.v1beta1.Coin balance = 1 [
|
2024-03-06 06:31:09 +00:00
|
|
|
(gogoproto.nullable) = false,
|
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
2024-03-12 05:37:24 +00:00
|
|
|
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
2022-03-31 10:00:02 +00:00
|
|
|
];
|
|
|
|
}
|