mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 18:15:19 +00:00
4b8e224f6a
* Revert "Add incentive migrations for earn rewards (#1406)" This reverts commit937e5f339f
. * Revert "Use different accumulator for earn (#1395)" This reverts commitcf009647e6
. * Revert "Add base earn incentive accumulator (#1393)" This reverts commit44a90a8ef9
. * Revert "Add generic incentive `AccumulateRewards` method (#1392)" This reverts commitdce631d3de
. * Revert "Add GetSynchronizedClaim and swap adapter (#1386)" This reverts commitf52a581ea9
. * Revert "Add Initialize/Synchronize Claim methods (#1383)" This reverts commitc2061f626e
. * Revert "Add source adapter interface definition (#1377)" This reverts commit2abb2ce606
. * Revert "Add incentive RewardIndexes types and state methods (#1381)" This reverts commit4a3002b09c
. * Revert "Add AccrualTime type and state methods (#1379)" This reverts commitdf1c2ffc34
. * Revert "Add incentive claim state methods (#1375)" This reverts commit90735e29ed
. * Revert "Add generic Claim type (#1371)" This reverts commit45fc1a7643
. * Regerate protos and minor revert fixes
172 lines
4.7 KiB
Protocol Buffer
172 lines
4.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
package kava.incentive.v1beta1;
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
import "cosmos_proto/cosmos.proto";
|
|
import "gogoproto/gogo.proto";
|
|
|
|
option go_package = "github.com/kava-labs/kava/x/incentive/types";
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
// -------------- Base Claim Types, Reward Indexes --------------
|
|
|
|
// BaseClaim is a claim with a single reward coin types
|
|
message BaseClaim {
|
|
option (cosmos_proto.implements_interface) = "Claim";
|
|
|
|
bytes owner = 1 [
|
|
(cosmos_proto.scalar) = "cosmos.AddressBytes",
|
|
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
|
|
];
|
|
|
|
cosmos.base.v1beta1.Coin reward = 2 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
// BaseMultiClaim is a claim with multiple reward coin types
|
|
message BaseMultiClaim {
|
|
option (cosmos_proto.implements_interface) = "Claim";
|
|
|
|
bytes owner = 1 [
|
|
(cosmos_proto.scalar) = "cosmos.AddressBytes",
|
|
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
|
|
];
|
|
|
|
repeated cosmos.base.v1beta1.Coin reward = 2 [
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// RewardIndex stores reward accumulation information
|
|
message RewardIndex {
|
|
string collateral_type = 1;
|
|
|
|
bytes reward_factor = 2 [
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// RewardIndexesProto defines a Protobuf wrapper around a RewardIndexes slice
|
|
message RewardIndexesProto {
|
|
repeated RewardIndex reward_indexes = 1 [
|
|
(gogoproto.castrepeated) = "RewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// MultiRewardIndex stores reward accumulation information on multiple reward types
|
|
message MultiRewardIndex {
|
|
string collateral_type = 1;
|
|
|
|
repeated RewardIndex reward_indexes = 2 [
|
|
(gogoproto.castrepeated) = "RewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// MultiRewardIndexesProto defines a Protobuf wrapper around a MultiRewardIndexes slice
|
|
message MultiRewardIndexesProto {
|
|
repeated MultiRewardIndex multi_reward_indexes = 1 [
|
|
(gogoproto.castrepeated) = "MultiRewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// -------------- Custom Claim Types --------------
|
|
|
|
// USDXMintingClaim is for USDX minting rewards
|
|
message USDXMintingClaim {
|
|
option (cosmos_proto.implements_interface) = "Claim";
|
|
|
|
BaseClaim base_claim = 1 [
|
|
(gogoproto.embed) = true,
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated RewardIndex reward_indexes = 2 [
|
|
(gogoproto.castrepeated) = "RewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// HardLiquidityProviderClaim stores the hard liquidity provider rewards that can be claimed by owner
|
|
message HardLiquidityProviderClaim {
|
|
option (cosmos_proto.implements_interface) = "Claim";
|
|
|
|
BaseMultiClaim base_claim = 1 [
|
|
(gogoproto.embed) = true,
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardIndex supply_reward_indexes = 2 [
|
|
(gogoproto.castrepeated) = "MultiRewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardIndex borrow_reward_indexes = 3 [
|
|
(gogoproto.castrepeated) = "MultiRewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// DelegatorClaim stores delegation rewards that can be claimed by owner
|
|
message DelegatorClaim {
|
|
option (cosmos_proto.implements_interface) = "Claim";
|
|
|
|
BaseMultiClaim base_claim = 1 [
|
|
(gogoproto.embed) = true,
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardIndex reward_indexes = 2 [
|
|
(gogoproto.castrepeated) = "MultiRewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// SwapClaim stores the swap rewards that can be claimed by owner
|
|
message SwapClaim {
|
|
option (cosmos_proto.implements_interface) = "Claim";
|
|
|
|
BaseMultiClaim base_claim = 1 [
|
|
(gogoproto.embed) = true,
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardIndex reward_indexes = 2 [
|
|
(gogoproto.castrepeated) = "MultiRewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// SavingsClaim stores the savings rewards that can be claimed by owner
|
|
message SavingsClaim {
|
|
option (cosmos_proto.implements_interface) = "Claim";
|
|
|
|
BaseMultiClaim base_claim = 1 [
|
|
(gogoproto.embed) = true,
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardIndex reward_indexes = 2 [
|
|
(gogoproto.castrepeated) = "MultiRewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// EarnClaim stores the earn rewards that can be claimed by owner
|
|
message EarnClaim {
|
|
option (cosmos_proto.implements_interface) = "Claim";
|
|
|
|
BaseMultiClaim base_claim = 1 [
|
|
(gogoproto.embed) = true,
|
|
(gogoproto.nullable) = false
|
|
];
|
|
|
|
repeated MultiRewardIndex reward_indexes = 2 [
|
|
(gogoproto.castrepeated) = "MultiRewardIndexes",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|