2022-03-31 10:00:02 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2024-03-06 06:31:09 +00:00
|
|
|
package cerc.auction.v1;
|
|
|
|
|
|
|
|
import "cosmos/msg/v1/msg.proto";
|
2022-03-31 10:00:02 +00:00
|
|
|
import "gogoproto/gogo.proto";
|
2024-03-06 06:31:09 +00:00
|
|
|
import "google/api/annotations.proto";
|
2022-03-31 10:00:02 +00:00
|
|
|
import "google/protobuf/duration.proto";
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
2024-09-16 05:45:44 +00:00
|
|
|
import "cosmos_proto/cosmos.proto";
|
2024-03-06 06:31:09 +00:00
|
|
|
import "cerc/auction/v1/auction.proto";
|
|
|
|
|
2024-04-01 14:23:34 +00:00
|
|
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/auction";
|
2024-03-06 06:31:09 +00:00
|
|
|
|
|
|
|
// Tx defines the gRPC tx interface
|
|
|
|
service Msg {
|
|
|
|
option (cosmos.msg.v1.service) = true;
|
|
|
|
|
|
|
|
// CreateAuction is the command for creating an auction
|
|
|
|
rpc CreateAuction(MsgCreateAuction) returns (MsgCreateAuctionResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/auction/v1/create_auction";
|
|
|
|
};
|
2022-03-31 10:00:02 +00:00
|
|
|
|
2024-03-06 06:31:09 +00:00
|
|
|
// CommitBid is the command for committing a bid
|
|
|
|
rpc CommitBid(MsgCommitBid) returns (MsgCommitBidResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/auction/v1/commit_bid";
|
|
|
|
};
|
|
|
|
|
|
|
|
// RevealBid is the command for revealing a bid
|
|
|
|
rpc RevealBid(MsgRevealBid) returns (MsgRevealBidResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/auction/v1/reveal_bid";
|
|
|
|
};
|
2024-09-16 05:45:44 +00:00
|
|
|
|
|
|
|
// UpdateParams defines an operation for updating the x/staking module
|
|
|
|
// parameters.
|
|
|
|
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
2024-03-06 06:31:09 +00:00
|
|
|
}
|
2022-03-31 10:00:02 +00:00
|
|
|
|
|
|
|
// MsgCreateAuction defines a create auction message
|
|
|
|
message MsgCreateAuction {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2024-03-06 06:31:09 +00:00
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
2022-03-31 10:00:02 +00:00
|
|
|
|
2024-09-19 04:39:42 +00:00
|
|
|
// Address of the signer
|
|
|
|
string signer = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\"" ];
|
|
|
|
|
|
|
|
// Auction kind (vickrey | provider)
|
|
|
|
string kind = 2 [ (gogoproto.moretags) = "json:\"kind\" yaml:\"kind\"" ];
|
|
|
|
|
2022-03-31 10:00:02 +00:00
|
|
|
// Duration of the commits phase in seconds
|
2024-09-19 04:39:42 +00:00
|
|
|
google.protobuf.Duration commits_duration = 3 [
|
2024-03-12 05:37:24 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2022-03-31 10:00:02 +00:00
|
|
|
(gogoproto.stdduration) = true,
|
2024-03-12 05:37:24 +00:00
|
|
|
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
|
2022-03-31 10:00:02 +00:00
|
|
|
];
|
2024-03-06 06:31:09 +00:00
|
|
|
|
2022-03-31 10:00:02 +00:00
|
|
|
// Duration of the reveals phase in seconds
|
2024-09-19 04:39:42 +00:00
|
|
|
google.protobuf.Duration reveals_duration = 4 [
|
2024-03-12 05:37:24 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2022-03-31 10:00:02 +00:00
|
|
|
(gogoproto.stdduration) = true,
|
2024-03-12 05:37:24 +00:00
|
|
|
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
|
2022-03-31 10:00:02 +00:00
|
|
|
];
|
2024-03-06 06:31:09 +00:00
|
|
|
|
2022-03-31 10:00:02 +00:00
|
|
|
// Commit fees
|
2024-09-19 04:39:42 +00:00
|
|
|
cosmos.base.v1beta1.Coin commit_fee = 5 [
|
2022-03-31 10:00:02 +00:00
|
|
|
(gogoproto.nullable) = false,
|
|
|
|
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
|
|
|
|
];
|
2024-03-06 06:31:09 +00:00
|
|
|
|
2022-03-31 10:00:02 +00:00
|
|
|
// Reveal fees
|
2024-09-19 04:39:42 +00:00
|
|
|
cosmos.base.v1beta1.Coin reveal_fee = 6 [
|
2022-03-31 10:00:02 +00:00
|
|
|
(gogoproto.nullable) = false,
|
|
|
|
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
|
|
|
|
];
|
2024-03-06 06:31:09 +00:00
|
|
|
|
2024-09-19 04:39:42 +00:00
|
|
|
// Minimum acceptable bid amount
|
|
|
|
// Only applicable in vickrey auctions
|
|
|
|
cosmos.base.v1beta1.Coin minimum_bid = 7 [
|
2022-03-31 10:00:02 +00:00
|
|
|
(gogoproto.nullable) = false,
|
|
|
|
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
|
|
|
|
];
|
2024-03-06 06:31:09 +00:00
|
|
|
|
2024-09-19 04:39:42 +00:00
|
|
|
// Maximum acceptable bid amount
|
|
|
|
// Only applicable in provider auctions
|
2024-09-16 05:45:44 +00:00
|
|
|
cosmos.base.v1beta1.Coin max_price = 8 [
|
|
|
|
(gogoproto.nullable) = false,
|
|
|
|
(gogoproto.moretags) = "json:\"max_price\" yaml:\"max_price\""
|
|
|
|
];
|
|
|
|
|
2024-09-19 04:39:42 +00:00
|
|
|
// Number of desired providers (num of auction winners)
|
|
|
|
// Only applicable in provider auctions
|
2024-09-16 05:45:44 +00:00
|
|
|
int32 num_providers = 9;
|
2022-03-31 10:00:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCreateAuctionResponse returns the details of the created auction
|
|
|
|
message MsgCreateAuctionResponse {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2024-03-06 06:31:09 +00:00
|
|
|
|
2022-03-31 10:00:02 +00:00
|
|
|
// Auction details
|
2024-03-12 05:37:24 +00:00
|
|
|
Auction auction = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\"" ];
|
2022-03-31 10:00:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CommitBid defines the message to commit a bid
|
|
|
|
message MsgCommitBid {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2024-03-06 06:31:09 +00:00
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
|
|
|
// Auction id
|
2024-03-12 05:37:24 +00:00
|
|
|
string auction_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\"" ];
|
2022-03-31 10:00:02 +00:00
|
|
|
|
|
|
|
// Commit Hash
|
2024-03-12 05:37:24 +00:00
|
|
|
string commit_hash = 2
|
|
|
|
[ (gogoproto.moretags) = "json:\"commit_hash\" yaml:\"commit_hash\"" ];
|
2024-03-06 06:31:09 +00:00
|
|
|
|
2022-03-31 10:00:02 +00:00
|
|
|
// Address of the signer
|
2024-03-12 05:37:24 +00:00
|
|
|
string signer = 3
|
|
|
|
[ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\"" ];
|
2022-03-31 10:00:02 +00:00
|
|
|
}
|
|
|
|
|
2024-03-06 06:31:09 +00:00
|
|
|
// MsgCommitBidResponse returns the state of the auction after the bid creation
|
|
|
|
message MsgCommitBidResponse {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// Auction details
|
2024-03-12 05:37:24 +00:00
|
|
|
Bid bid = 1 [ (gogoproto.moretags) = "json:\"bid\" yaml:\"bid\"" ];
|
2024-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
2022-03-31 10:00:02 +00:00
|
|
|
// RevealBid defines the message to reveal a bid
|
|
|
|
message MsgRevealBid {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2024-03-06 06:31:09 +00:00
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
|
|
|
// Auction id
|
2024-03-12 05:37:24 +00:00
|
|
|
string auction_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\"" ];
|
2022-03-31 10:00:02 +00:00
|
|
|
|
|
|
|
// Commit Hash
|
2024-03-12 05:37:24 +00:00
|
|
|
string reveal = 2
|
|
|
|
[ (gogoproto.moretags) = "json:\"reveal\" yaml:\"reveal\"" ];
|
2024-03-06 06:31:09 +00:00
|
|
|
|
2022-03-31 10:00:02 +00:00
|
|
|
// Address of the signer
|
2024-03-12 05:37:24 +00:00
|
|
|
string signer = 3
|
|
|
|
[ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\"" ];
|
2022-03-31 10:00:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgRevealBidResponse returns the state of the auction after the bid reveal
|
|
|
|
message MsgRevealBidResponse {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
2024-03-06 06:31:09 +00:00
|
|
|
// Auction details
|
2024-03-12 05:37:24 +00:00
|
|
|
Auction auction = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\"" ];
|
2022-03-31 10:00:02 +00:00
|
|
|
}
|
2024-09-16 05:45:44 +00:00
|
|
|
|
|
|
|
// MsgUpdateParams is the Msg/UpdateParams request type.
|
|
|
|
message MsgUpdateParams {
|
|
|
|
option (cosmos.msg.v1.signer) = "authority";
|
|
|
|
|
|
|
|
// authority is the address that controls the module (defaults to x/gov unless
|
|
|
|
// overwritten).
|
|
|
|
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
|
|
|
|
|
|
|
// params defines the x/auction parameters to update.
|
|
|
|
//
|
|
|
|
// NOTE: All parameters must be supplied.
|
|
|
|
Params params = 2 [ (gogoproto.nullable) = false ];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgUpdateParamsResponse defines the response structure for executing a
|
|
|
|
// MsgUpdateParams message.
|
|
|
|
message MsgUpdateParamsResponse {};
|