mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 08:15:19 +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
119 lines
3.5 KiB
Protocol Buffer
119 lines
3.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
package kava.incentive.v1beta1;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "kava/incentive/v1beta1/claims.proto";
|
|
import "kava/incentive/v1beta1/params.proto";
|
|
|
|
// import "cosmos/base/v1beta1/coin.proto";
|
|
// import "cosmos/base/v1beta1/coins.proto";
|
|
|
|
option go_package = "github.com/kava-labs/kava/x/incentive/types";
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
// AccumulationTime stores the previous reward distribution time and its corresponding collateral type
|
|
message AccumulationTime {
|
|
option deprecated = true;
|
|
|
|
string collateral_type = 1;
|
|
|
|
google.protobuf.Timestamp previous_accumulation_time = 2 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.stdtime) = true
|
|
];
|
|
}
|
|
|
|
// AccrualTime stores the previous reward distribution time and its
|
|
// corresponding collateral type and claim type. This is the new version of
|
|
// AccumulationTime that is used for the new claim types.
|
|
message AccrualTime {
|
|
ClaimType claim_type = 1;
|
|
string collateral_type = 2;
|
|
google.protobuf.Timestamp previous_accumulation_time = 3 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.stdtime) = true
|
|
];
|
|
}
|
|
|
|
// GenesisRewardState groups together the global state for a particular reward so it can be exported in genesis.
|
|
message GenesisRewardState {
|
|
repeated AccumulationTime accumulation_times = 1 [
|
|
(gogoproto.castrepeated) = "AccumulationTimes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardIndex multi_reward_indexes = 2 [
|
|
(gogoproto.castrepeated) = "MultiRewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// GenesisState is the state that must be provided at genesis.
|
|
message GenesisState {
|
|
Params params = 1 [(gogoproto.nullable) = false];
|
|
|
|
GenesisRewardState usdx_reward_state = 2 [
|
|
(gogoproto.customname) = "USDXRewardState",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
GenesisRewardState hard_supply_reward_state = 3 [(gogoproto.nullable) = false];
|
|
|
|
GenesisRewardState hard_borrow_reward_state = 4 [(gogoproto.nullable) = false];
|
|
|
|
GenesisRewardState delegator_reward_state = 5 [(gogoproto.nullable) = false];
|
|
|
|
GenesisRewardState swap_reward_state = 6 [(gogoproto.nullable) = false];
|
|
|
|
repeated USDXMintingClaim usdx_minting_claims = 7 [
|
|
(gogoproto.customname) = "USDXMintingClaims",
|
|
(gogoproto.castrepeated) = "USDXMintingClaims",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated HardLiquidityProviderClaim hard_liquidity_provider_claims = 8 [
|
|
(gogoproto.castrepeated) = "HardLiquidityProviderClaims",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated DelegatorClaim delegator_claims = 9 [
|
|
(gogoproto.castrepeated) = "DelegatorClaims",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated SwapClaim swap_claims = 10 [
|
|
(gogoproto.castrepeated) = "SwapClaims",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
GenesisRewardState savings_reward_state = 11 [(gogoproto.nullable) = false];
|
|
|
|
repeated SavingsClaim savings_claims = 12 [
|
|
(gogoproto.castrepeated) = "SavingsClaims",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
GenesisRewardState earn_reward_state = 13 [(gogoproto.nullable) = false];
|
|
|
|
repeated EarnClaim earn_claims = 14 [
|
|
(gogoproto.castrepeated) = "EarnClaims",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated Claim claims = 15 [
|
|
(gogoproto.castrepeated) = "Claims",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated AccrualTime accrual_times = 16 [
|
|
(gogoproto.castrepeated) = "AccrualTimes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated TypedRewardIndexes reward_indexes = 17 [
|
|
(gogoproto.castrepeated) = "TypedRewardIndexesList",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|