laconicd/proto/cerc/auction/v1/tx.proto
Prathamesh Musale aed2d6d4c6
Some checks failed
Integration Tests / test-integration (push) Successful in 2m0s
E2E Tests / test-e2e (push) Failing after 2m2s
Unit Tests / test-unit (push) Successful in 1m19s
Lint / Run golangci-lint (push) Successful in 4m26s
Rename RPC method to reserve authority and fix proto lint errors (#17)
- Rename RPC method to reserve authority from `ReserveName` to `ReserveAuthority`
  and `GetBondsModuleBalance` to `GetBondModuleBalance`
- Run lint formatter
- Fix proto lint errors and regenerate proto bindings

Reviewed-on: deep-stack/laconic2d#17
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-03-07 11:25:15 +00:00

137 lines
4.1 KiB
Protocol Buffer

syntax = "proto3";
package cerc.auction.v1;
import "cosmos/msg/v1/msg.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cerc/auction/v1/auction.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction";
// 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";
};
// 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";
};
}
// MsgCreateAuction defines a create auction message
message MsgCreateAuction {
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "signer";
// Duration of the commits phase in seconds
google.protobuf.Duration commits_duration = 1 [
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
];
// Duration of the reveals phase in seconds
google.protobuf.Duration reveals_duration = 2 [
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
];
// Commit fees
cosmos.base.v1beta1.Coin commit_fee = 3 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
];
// Reveal fees
cosmos.base.v1beta1.Coin reveal_fee = 4 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
];
// Minimum acceptable bid amount
cosmos.base.v1beta1.Coin minimum_bid = 5 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
];
// Address of the signer
string signer = 6
[ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\"" ];
}
// MsgCreateAuctionResponse returns the details of the created auction
message MsgCreateAuctionResponse {
option (gogoproto.goproto_getters) = false;
// Auction details
Auction auction = 1
[ (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\"" ];
}
// CommitBid defines the message to commit a bid
message MsgCommitBid {
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "signer";
// Auction id
string auction_id = 1
[ (gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\"" ];
// Commit Hash
string commit_hash = 2
[ (gogoproto.moretags) = "json:\"commit_hash\" yaml:\"commit_hash\"" ];
// Address of the signer
string signer = 3
[ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\"" ];
}
// MsgCommitBidResponse returns the state of the auction after the bid creation
message MsgCommitBidResponse {
option (gogoproto.goproto_getters) = false;
// Auction details
Bid bid = 1 [ (gogoproto.moretags) = "json:\"bid\" yaml:\"bid\"" ];
}
// RevealBid defines the message to reveal a bid
message MsgRevealBid {
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "signer";
// Auction id
string auction_id = 1
[ (gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\"" ];
// Commit Hash
string reveal = 2
[ (gogoproto.moretags) = "json:\"reveal\" yaml:\"reveal\"" ];
// Address of the signer
string signer = 3
[ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\"" ];
}
// MsgRevealBidResponse returns the state of the auction after the bid reveal
message MsgRevealBidResponse {
option (gogoproto.goproto_getters) = false;
// Auction details
Auction auction = 1
[ (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\"" ];
}