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