Skip to content

Commit

Permalink
resolve issues in single node start
Browse files Browse the repository at this point in the history
  • Loading branch information
jelysn committed Apr 18, 2024
1 parent 61f4962 commit 5605f96
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 1,409 deletions.
45 changes: 45 additions & 0 deletions proto/elys/incentive/pool.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
syntax = "proto3";
package elys.incentive;

option go_package = "github.com/elys-network/elys/x/incentive/types";

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";

// Pool Info
message PoolInfo {
// reward amount
uint64 pool_id = 1;
// reward wallet address
string reward_wallet = 2;
// multiplier for lp rewards
string multiplier = 3 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// Block number since the creation of PoolInfo
string num_blocks = 4 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
// Total dex rewards given
string dex_reward_amount_given = 5 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// Total eden rewards given
string eden_reward_amount_given = 6 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
// Eden APR, updated at every distribution
string eden_apr = 7 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// Dex APR, updated at every distribution
string dex_apr = 8 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}
5 changes: 0 additions & 5 deletions x/commitment/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ func NewKeeper(
assetProfileKeeper types.AssetProfileKeeper,
authority string,
) *Keeper {
// set KeyTable if it has not already been set
if !ps.HasKeyTable() {
ps = ps.WithKeyTable(types.ParamKeyTable())
}

return &Keeper{
cdc: cdc,
storeKey: storeKey,
Expand Down
12 changes: 0 additions & 12 deletions x/commitment/keeper/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ import (
"github.com/elys-network/elys/x/commitment/types"
)

// GetParams returns the current parameters of the Commitment module
func (k Keeper) GetLegacyParams(ctx sdk.Context) types.LegacyParams {
var params types.LegacyParams
k.paramstore.GetParamSet(ctx, &params)
return params
}

// SetParams set the params
func (k Keeper) SetLegacyParams(ctx sdk.Context, params types.LegacyParams) {
k.paramstore.SetParamSet(ctx, &params)
}

// GetParams get all parameters as types.Params
func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) {
store := ctx.KVStore(k.storeKey)
Expand Down
Loading

0 comments on commit 5605f96

Please sign in to comment.