0g-chain/proto/kava/earn/v1beta1/vault.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

64 lines
2.1 KiB
Protocol Buffer

syntax = "proto3";
package kava.earn.v1beta1;
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "kava/earn/v1beta1/strategy.proto";
option go_package = "github.com/kava-labs/kava/x/earn/types";
// AllowedVault is a vault that is allowed to be created. These can be
// modified via parameter governance.
message AllowedVault {
// Denom is the only supported denomination of the vault for deposits and withdrawals.
string denom = 1;
// VaultStrategy is the strategy used for this vault.
repeated StrategyType strategies = 2 [(gogoproto.castrepeated) = "StrategyTypes"];
// IsPrivateVault is true if the vault only allows depositors contained in
// AllowedDepositors.
bool is_private_vault = 3;
// AllowedDepositors is a list of addresses that are allowed to deposit to
// this vault if IsPrivateVault is true. Addresses not contained in this list
// are not allowed to deposit into this vault. If IsPrivateVault is false,
// this should be empty and ignored.
repeated bytes allowed_depositors = 4 [
(cosmos_proto.scalar) = "cosmos.AddressBytes",
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
];
}
// VaultRecord is the state of a vault.
message VaultRecord {
// TotalShares is the total distributed number of shares in the vault.
VaultShare total_shares = 1 [(gogoproto.nullable) = false];
}
// VaultShareRecord defines the vault shares owned by a depositor.
message VaultShareRecord {
// Depositor represents the owner of the shares
bytes depositor = 1 [
(cosmos_proto.scalar) = "cosmos.AddressBytes",
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
];
// Shares represent the vault shares owned by the depositor.
repeated VaultShare shares = 2 [
(gogoproto.castrepeated) = "VaultShares",
(gogoproto.nullable) = false
];
}
// VaultShare defines shares of a vault owned by a depositor.
message VaultShare {
option (gogoproto.goproto_stringer) = false;
string denom = 1;
string amount = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}