2022-04-05 07:09:27 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package vulcanize.auction.v1beta1;
|
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
2023-01-09 06:49:11 +00:00
|
|
|
import "google/api/annotations.proto";
|
2022-04-05 07:09:27 +00:00
|
|
|
import "google/protobuf/duration.proto";
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
|
|
import "vulcanize/auction/v1beta1/types.proto";
|
|
|
|
|
2022-09-07 06:36:11 +00:00
|
|
|
option go_package = "github.com/cerc-io/laconicd/x/auction/types";
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// MsgCreateAuction defines a create auction message
|
|
|
|
message MsgCreateAuction {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// Duration of the commits phase in seconds
|
|
|
|
google.protobuf.Duration commits_duration = 1 [
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2022-04-05 07:09:27 +00:00
|
|
|
(gogoproto.stdduration) = true,
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
|
2022-04-05 07:09:27 +00:00
|
|
|
];
|
|
|
|
// Duration of the reveals phase in seconds
|
|
|
|
google.protobuf.Duration reveals_duration = 2 [
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2022-04-05 07:09:27 +00:00
|
|
|
(gogoproto.stdduration) = true,
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
|
2022-04-05 07:09:27 +00:00
|
|
|
];
|
|
|
|
// Commit fees
|
2022-10-10 10:38:33 +00:00
|
|
|
cosmos.base.v1beta1.Coin commit_fee = 3
|
|
|
|
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
// Reveal fees
|
2022-10-10 10:38:33 +00:00
|
|
|
cosmos.base.v1beta1.Coin reveal_fee = 4
|
|
|
|
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
// Minimum acceptable bid amount
|
2022-10-10 10:38:33 +00:00
|
|
|
cosmos.base.v1beta1.Coin minimum_bid = 5
|
|
|
|
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
// Address of the signer
|
2022-10-10 10:38:33 +00:00
|
|
|
string signer = 6 [(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCreateAuctionResponse returns the details of the created auction
|
|
|
|
message MsgCreateAuctionResponse {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// Auction details
|
2022-10-10 10:38:33 +00:00
|
|
|
Auction auction = 1 [(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CommitBid defines the message to commit a bid
|
|
|
|
message MsgCommitBid {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// Auction ID
|
2022-10-10 10:38:33 +00:00
|
|
|
string auction_id = 1 [(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
// Commit Hash
|
2022-10-10 10:38:33 +00:00
|
|
|
string commit_hash = 2 [(gogoproto.moretags) = "json:\"commit_hash\" yaml:\"commit_hash\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
// Address of the signer
|
2022-10-10 10:38:33 +00:00
|
|
|
string signer = 3 [(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// RevealBid defines the message to reveal a bid
|
|
|
|
message MsgRevealBid {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// Auction ID
|
2022-10-10 10:38:33 +00:00
|
|
|
string auction_id = 1 [(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
// Commit Hash
|
2022-10-10 10:38:33 +00:00
|
|
|
string reveal = 2 [(gogoproto.moretags) = "json:\"reveal\" yaml:\"reveal\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
// Address of the signer
|
2022-10-10 10:38:33 +00:00
|
|
|
string signer = 3 [(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCommitBidResponse returns the state of the auction after the bid creation
|
|
|
|
message MsgCommitBidResponse {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// Auction details
|
2022-10-10 10:38:33 +00:00
|
|
|
Bid bid = 1 [(gogoproto.moretags) = "json:\"bid\" yaml:\"bid\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgRevealBidResponse returns the state of the auction after the bid reveal
|
|
|
|
message MsgRevealBidResponse {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// Auction details
|
2022-10-10 10:38:33 +00:00
|
|
|
Auction auction = 1 [(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Tx defines the gRPC tx interface
|
|
|
|
service Msg {
|
|
|
|
// CreateAuction is the command for creating an auction
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc CreateAuction(MsgCreateAuction) returns (MsgCreateAuctionResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/auction/v1beta1/create_auction";
|
|
|
|
};
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// CommitBid is the command for committing a bid
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc CommitBid(MsgCommitBid) returns (MsgCommitBidResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/auction/v1beta1/commit_bid";
|
|
|
|
};
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2022-10-10 10:38:33 +00:00
|
|
|
// RevealBid is the command for revealing a bid
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc RevealBid(MsgRevealBid) returns (MsgRevealBidResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/auction/v1beta1/reveal_bid";
|
|
|
|
};
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|