mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-13 03:25:20 +00:00
d5dcfe73b2
* 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
122 lines
3.1 KiB
Protocol Buffer
122 lines
3.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package kava.incentive.v1beta1;
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
import "gogoproto/gogo.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
option go_package = "github.com/kava-labs/kava/x/incentive/types";
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
// RewardPeriod stores the state of an ongoing reward
|
|
message RewardPeriod {
|
|
bool active = 1;
|
|
|
|
string collateral_type = 2;
|
|
|
|
google.protobuf.Timestamp start = 3 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.stdtime) = true
|
|
];
|
|
|
|
google.protobuf.Timestamp end = 4 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.stdtime) = true
|
|
];
|
|
|
|
cosmos.base.v1beta1.Coin rewards_per_second = 5 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
// MultiRewardPeriod supports multiple reward types
|
|
message MultiRewardPeriod {
|
|
bool active = 1;
|
|
|
|
string collateral_type = 2;
|
|
|
|
google.protobuf.Timestamp start = 3 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.stdtime) = true
|
|
];
|
|
|
|
google.protobuf.Timestamp end = 4 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.stdtime) = true
|
|
];
|
|
|
|
repeated cosmos.base.v1beta1.Coin rewards_per_second = 5 [
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// Multiplier amount the claim rewards get increased by, along with how long the claim rewards are locked
|
|
message Multiplier {
|
|
string name = 1;
|
|
|
|
int64 months_lockup = 2;
|
|
|
|
bytes factor = 3 [
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// MultipliersPerDenom is a map of denoms to a set of multipliers
|
|
message MultipliersPerDenom {
|
|
string denom = 1;
|
|
|
|
repeated Multiplier multipliers = 2 [
|
|
(gogoproto.castrepeated) = "Multipliers",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// Params
|
|
message Params {
|
|
repeated RewardPeriod usdx_minting_reward_periods = 1 [
|
|
(gogoproto.customname) = "USDXMintingRewardPeriods",
|
|
(gogoproto.castrepeated) = "RewardPeriods",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardPeriod hard_supply_reward_periods = 2 [
|
|
(gogoproto.castrepeated) = "MultiRewardPeriods",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardPeriod hard_borrow_reward_periods = 3 [
|
|
(gogoproto.castrepeated) = "MultiRewardPeriods",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardPeriod delegator_reward_periods = 4 [
|
|
(gogoproto.castrepeated) = "MultiRewardPeriods",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardPeriod swap_reward_periods = 5 [
|
|
(gogoproto.castrepeated) = "MultiRewardPeriods",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultipliersPerDenom claim_multipliers = 6 [
|
|
(gogoproto.castrepeated) = "MultipliersPerDenoms",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
google.protobuf.Timestamp claim_end = 7 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.stdtime) = true
|
|
];
|
|
|
|
repeated MultiRewardPeriod savings_reward_periods = 8 [
|
|
(gogoproto.castrepeated) = "MultiRewardPeriods",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardPeriod earn_reward_periods = 9 [
|
|
(gogoproto.castrepeated) = "MultiRewardPeriods",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|