Skip to content

Commit

Permalink
Revert "Build/update proto (#852)"
Browse files Browse the repository at this point in the history
This reverts commit 816c695.
  • Loading branch information
snobbee authored Dec 10, 2023
1 parent 816c695 commit 1045907
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 2,708 deletions.
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"integration": "./scripts/integration.sh",
"test": "yarn jest --passWithNoTests --collect-coverage --projects jest-unit.config.js",
"test:integration": "yarn jest --projects --collect-coverage jest-integration.config.js",
"syncProto": "rm -rf proto && degit Sifchain/sifnode/proto/sifnode#${TAG:-'master'} proto/sifnode && degit Sifchain/sifnode/third_party/proto#${TAG:-'master'} proto/third_party",
"syncProto": "rm -rf proto && degit Sifchain/sifnode/proto/sifnode#${TAG:-'develop'} proto/sifnode && degit Sifchain/sifnode/third_party/proto#${TAG:-'develop'} proto/third_party",
"codegen": "protoc -I=proto -I=proto/third_party proto/sifnode/**/**/*.proto --plugin=../node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/generated/proto --ts_proto_opt='esModuleInterop=true,forceLong=long,useOptionals=messages'"
},
"files": [
Expand Down
2 changes: 0 additions & 2 deletions core/proto/sifnode/clp/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ option go_package = "github.com/Sifchain/sifnode/x/clp/types";

import "sifnode/clp/v1/params.proto";
import "sifnode/clp/v1/types.proto";
import "sifnode/clp/v1/rewards_bucket.proto";

// GenesisState - all clp state that must be provided at genesis
// TODO: Add parameters to Genesis state ,such as minimum liquidity required to
Expand All @@ -17,5 +16,4 @@ message GenesisState {
repeated string address_whitelist = 2;
repeated sifnode.clp.v1.Pool pool_list = 3;
repeated sifnode.clp.v1.LiquidityProvider liquidity_providers = 4;
repeated RewardsBucket rewards_bucket_list = 5 [(gogoproto.nullable) = false];
}
3 changes: 0 additions & 3 deletions core/proto/sifnode/clp/v1/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ message RewardParams {
repeated RewardPeriod reward_periods = 4;
string reward_period_start_time =
5; // start time of the current (or last) reward period
uint64 rewards_lock_period = 6; // in blocks
string rewards_epoch_identifier = 7; // week, day, hour, etc
bool rewards_distribute = 8; // true if reward bucket should be distributed
}

// These params are non-governable and are calculated on chain
Expand Down
30 changes: 1 addition & 29 deletions core/proto/sifnode/clp/v1/querier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import "sifnode/clp/v1/types.proto";
import "sifnode/clp/v1/params.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "google/api/annotations.proto";
import "sifnode/clp/v1/rewards_bucket.proto";

option go_package = "github.com/Sifchain/sifnode/x/clp/types";

Expand Down Expand Up @@ -60,15 +59,6 @@ service Query {
rpc GetPoolShareEstimate(PoolShareEstimateReq) returns (PoolShareEstimateRes) {
option (google.api.http).get = "/sifchain/clp/v1/pool_share_estimate";
};
// Queries a list of RewardsBucket items.
rpc GetRewardsBucket (RewardsBucketReq) returns (RewardsBucketRes) {
option (google.api.http).get = "/sifchain/clp/v1/rewards_bucket/{denom}";

}
rpc GetRewardsBucketAll (AllRewardsBucketReq) returns (AllRewardsBucketRes) {
option (google.api.http).get = "/sifchain/clp/v1/clp/rewards_bucket";

}
}

message PoolReq {
Expand Down Expand Up @@ -272,22 +262,4 @@ message SwapInfo {
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint",
(gogoproto.nullable) = false
];
}

message RewardsBucketReq {
string denom = 1;
}

message RewardsBucketRes {
RewardsBucket rewards_bucket = 1 [(gogoproto.nullable) = false];
}

message AllRewardsBucketReq {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}

message AllRewardsBucketRes {
repeated RewardsBucket rewards_bucket = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

}
17 changes: 0 additions & 17 deletions core/proto/sifnode/clp/v1/rewards_bucket.proto

This file was deleted.

12 changes: 0 additions & 12 deletions core/proto/sifnode/clp/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ syntax = "proto3";
package sifnode.clp.v1;

import "gogoproto/gogo.proto";
import "cosmos/base/coin.proto";
import "sifnode/clp/v1/types.proto";
import "sifnode/clp/v1/params.proto";

Expand Down Expand Up @@ -35,7 +34,6 @@ service Msg {
rpc ModifyLiquidityProtectionRates(MsgModifyLiquidityProtectionRates) returns (MsgModifyLiquidityProtectionRatesResponse);
rpc AddProviderDistributionPeriod(MsgAddProviderDistributionPeriodRequest) returns (MsgAddProviderDistributionPeriodResponse);
rpc UpdateSwapFeeParams(MsgUpdateSwapFeeParamsRequest) returns (MsgUpdateSwapFeeParamsResponse);
rpc AddLiquidityToRewardsBucket (MsgAddLiquidityToRewardsBucketRequest) returns (MsgAddLiquidityToRewardsBucketResponse);
}

// message MsgUpdateStakingRewardParams{
Expand Down Expand Up @@ -200,9 +198,6 @@ message MsgUpdateRewardsParamsRequest {
string signer = 1 [ (gogoproto.moretags) = "yaml:\"signer\"" ];
uint64 liquidity_removal_lock_period = 2; // in blocks
uint64 liquidity_removal_cancel_period = 3; // in blocks
uint64 rewards_lock_period = 4; // in blocks
string rewards_epoch_identifier = 5; // week, day, hour, etc
bool rewards_distribute = 6; // true or false
}

message MsgUpdateRewardsParamsResponse {}
Expand Down Expand Up @@ -286,10 +281,3 @@ message MsgUpdateSwapFeeParamsRequest {
}

message MsgUpdateSwapFeeParamsResponse {}

message MsgAddLiquidityToRewardsBucketRequest {
string signer = 1;
repeated cosmos.base.v1beta1.Coin amount = 2 [(gogoproto.nullable) = false];
}

message MsgAddLiquidityToRewardsBucketResponse {}
13 changes: 0 additions & 13 deletions core/proto/sifnode/clp/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ syntax = "proto3";
package sifnode.clp.v1;

import "gogoproto/gogo.proto";
import "cosmos/base/coin.proto";

option go_package = "github.com/Sifchain/sifnode/x/clp/types";

Expand Down Expand Up @@ -80,12 +79,6 @@ message Pool {
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint",
(gogoproto.nullable) = false
];
// the amount of external asset rewards distributed to liquidity providers from reward buckets
string reward_amount_external = 19 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint",
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"reward_amount_external\""
];
}

message LiquidityProvider {
Expand All @@ -97,12 +90,6 @@ message LiquidityProvider {
];
string liquidity_provider_address = 3;
repeated LiquidityUnlock unlocks = 4;
int64 last_updated_block = 5; // contains the block height of the last update
// distributed or added to liquidity provider shares rewards
repeated cosmos.base.v1beta1.Coin reward_amount = 6 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

message LiquidityUnlock {
Expand Down
40 changes: 0 additions & 40 deletions core/proto/sifnode/epochs/v1/genesis.proto

This file was deleted.

51 changes: 0 additions & 51 deletions core/proto/sifnode/epochs/v1/query.proto

This file was deleted.

Loading

0 comments on commit 1045907

Please sign in to comment.