0g-chain/proto/kava/auction/v1beta1/auction.proto
Nick DeLuca d5dcfe73b2
Refactor Buf Usage (#1399)
* start makefile refactor to smaller units; break out proto-dep updating;
add check-proto-deps target for use in CI in order to determine if
depdencies have diverged

* add proto check workflow

* download go modules before checking proto deps

* clean up -- hide output and add error message for check target

* add error message for check-rsync

* update any type, and ibc-go protos for v3.4.0

* add buf generate files for gogo, docs, and swagger

* update swagger dirs and run with latest swagger gen

* ignore new build directories

* refactor proto makefile logic -- use buf instead of scripts

* remove old protobuf scripts

* run all proto checks on push

* remove moved file

* set default value for protoc machine

* install build deps seperately

* fetch master for buf check breaking

* checkout from https url in CI for buf breaking

* fix rsync file permissions on darwin

* ignore build dirs

* fix issue with apple provided make; clean up build deps; switch to buf
format

* remove clang format file -- using buf format now

* run make proto-format (buf format changes)

* update generated files for proto format changes
2022-11-22 16:22:07 -07:00

99 lines
3.0 KiB
Protocol Buffer

syntax = "proto3";
package kava.auction.v1beta1;
import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/kava-labs/kava/x/auction/types";
option (gogoproto.goproto_getters_all) = false;
// BaseAuction defines common attributes of all auctions
message BaseAuction {
option (cosmos_proto.implements_interface) = "Auction";
uint64 id = 1 [(gogoproto.customname) = "ID"];
string initiator = 2;
cosmos.base.v1beta1.Coin lot = 3 [(gogoproto.nullable) = false];
bytes bidder = 4 [
(cosmos_proto.scalar) = "cosmos.AddressBytes",
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
];
cosmos.base.v1beta1.Coin bid = 5 [(gogoproto.nullable) = false];
bool has_received_bids = 6;
google.protobuf.Timestamp end_time = 7 [
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true
];
google.protobuf.Timestamp max_end_time = 8 [
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true
];
}
// SurplusAuction is a forward auction that burns what it receives from bids.
// It is normally used to sell off excess pegged asset acquired by the CDP system.
message SurplusAuction {
option (cosmos_proto.implements_interface) = "Auction";
BaseAuction base_auction = 1 [
(gogoproto.embed) = true,
(gogoproto.nullable) = false
];
}
// DebtAuction is a reverse auction that mints what it pays out.
// It is normally used to acquire pegged asset to cover the CDP system's debts that were not covered by selling
// collateral.
message DebtAuction {
option (cosmos_proto.implements_interface) = "Auction";
BaseAuction base_auction = 1 [
(gogoproto.embed) = true,
(gogoproto.nullable) = false
];
cosmos.base.v1beta1.Coin corresponding_debt = 2 [(gogoproto.nullable) = false];
}
// CollateralAuction is a two phase auction.
// Initially, in forward auction phase, bids can be placed up to a max bid.
// Then it switches to a reverse auction phase, where the initial amount up for auction is bid down.
// Unsold Lot is sent to LotReturns, being divided among the addresses by weight.
// Collateral auctions are normally used to sell off collateral seized from CDPs.
message CollateralAuction {
option (cosmos_proto.implements_interface) = "Auction";
BaseAuction base_auction = 1 [
(gogoproto.embed) = true,
(gogoproto.nullable) = false
];
cosmos.base.v1beta1.Coin corresponding_debt = 2 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin max_bid = 3 [(gogoproto.nullable) = false];
WeightedAddresses lot_returns = 4 [(gogoproto.nullable) = false];
}
// WeightedAddresses is a type for storing some addresses and associated weights.
message WeightedAddresses {
repeated bytes addresses = 1 [
(cosmos_proto.scalar) = "cosmos.AddressBytes",
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
];
repeated bytes weights = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
}