mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-10-04 08:25:18 +00:00
42 lines
1.5 KiB
Protocol Buffer
42 lines
1.5 KiB
Protocol Buffer
|
syntax = "proto3";
|
||
|
package kava.earn.v1beta1;
|
||
|
|
||
|
option go_package = "github.com/kava-labs/kava/x/earn/types";
|
||
|
|
||
|
import "gogoproto/gogo.proto";
|
||
|
import "cosmos/base/v1beta1/coin.proto";
|
||
|
import "cosmos_proto/cosmos.proto";
|
||
|
import "kava/earn/v1beta1/strategy.proto";
|
||
|
|
||
|
// 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 strategies to use for this vault.
|
||
|
StrategyType vault_strategy = 2;
|
||
|
}
|
||
|
|
||
|
// VaultRecord is the state of a vault and is used to store the state of a
|
||
|
// vault.
|
||
|
message VaultRecord {
|
||
|
// Denom is the only supported denomination of the vault for deposits and
|
||
|
// withdrawals.
|
||
|
string denom = 1;
|
||
|
// TotalSupply is the total supply of the vault, denominated **only** in the
|
||
|
// user deposit/withdrawal denom, must be the same as the Denom field.
|
||
|
cosmos.base.v1beta1.Coin total_supply = 2 [(gogoproto.nullable) = false];
|
||
|
}
|
||
|
|
||
|
// VaultShareRecord defines the shares owned by a depositor and vault.
|
||
|
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"
|
||
|
];
|
||
|
// amount_supplied represents the total amount a depositor has supplied to the
|
||
|
// vault. The vault is determined by the coin denom.
|
||
|
cosmos.base.v1beta1.Coin amount_supplied = 2 [(gogoproto.nullable) = false];
|
||
|
}
|