From 3e01130feabe56852d09546bec76256fde115458 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Sun, 22 Oct 2023 16:53:14 -0600 Subject: [PATCH] Fix Proto lints --- proto/cosmos/distribution/v1beta1/query.proto | 25 +++++++++++++++++ proto/cosmos/staking/v1beta1/query.proto | 1 + proto/cosmos/staking/v1beta1/tx.proto | 27 ------------------- 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/proto/cosmos/distribution/v1beta1/query.proto b/proto/cosmos/distribution/v1beta1/query.proto index 4788467d9fd3..ce1e110d4636 100644 --- a/proto/cosmos/distribution/v1beta1/query.proto +++ b/proto/cosmos/distribution/v1beta1/query.proto @@ -70,6 +70,12 @@ service Query { rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; } + + // TokenizeShareRecordReward queries the tokenize share record rewards + rpc TokenizeShareRecordReward(QueryTokenizeShareRecordRewardRequest) + returns (QueryTokenizeShareRecordRewardResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/{owner_address}/tokenize_share_record_rewards"; + } } // QueryParamsRequest is the request type for the Query/Params RPC method. @@ -254,3 +260,22 @@ message QueryCommunityPoolResponse { (amino.dont_omitempty) = true ]; } + +// QueryTokenizeShareRecordRewardRequest is the request type for the Query/TokenizeShareRecordReward RPC +// method. +message QueryTokenizeShareRecordRewardRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner_address = 1 [(gogoproto.moretags) = "yaml:\"owner_address\""]; +} + +// QueryTokenizeShareRecordRewardResponse is the response type for the Query/TokenizeShareRecordReward +// RPC method. +message QueryTokenizeShareRecordRewardResponse { + // rewards defines all the rewards accrued by a delegator. + repeated TokenizeShareRecordReward rewards = 1 [(gogoproto.nullable) = false]; + // total defines the sum of all the rewards. + repeated cosmos.base.v1beta1.DecCoin total = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; +} diff --git a/proto/cosmos/staking/v1beta1/query.proto b/proto/cosmos/staking/v1beta1/query.proto index 632ca8110bb7..e0662b3ee9c9 100644 --- a/proto/cosmos/staking/v1beta1/query.proto +++ b/proto/cosmos/staking/v1beta1/query.proto @@ -5,6 +5,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/staking/v1beta1/staking.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/query/v1/query.proto"; import "amino/amino.proto"; diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto index 16d879cd8477..aeda37c82915 100644 --- a/proto/cosmos/staking/v1beta1/tx.proto +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -50,15 +50,6 @@ service Msg { // from bonded to unbonding rpc UnbondValidator(MsgUnbondValidator) returns (MsgUnbondValidatorResponse); - // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation - // and delegate back to previous validator. - // - // This has been backported from SDK 46 as a desirable safety feature for LSM. - // If a liquid staking provider is exploited and the exploiter initiates an undelegation, - // having access to CancelUnbondingDelegation allows the liquid staking provider to cancel - // the undelegation with a software upgrade and thus avoid loss of user funds - rpc CancelUnbondingDelegation(MsgCancelUnbondingDelegation) returns (MsgCancelUnbondingDelegationResponse); - // TokenizeShares defines a method for tokenizing shares from a validator. rpc TokenizeShares(MsgTokenizeShares) returns (MsgTokenizeSharesResponse); @@ -190,7 +181,6 @@ message MsgUndelegate { // MsgUndelegateResponse defines the Msg/Undelegate response type. // This allows a validator to stop their services and jail themselves without // experiencing a slash - message MsgUndelegateResponse { google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; @@ -247,23 +237,6 @@ message MsgUnbondValidator { // MsgUnbondValidatorResponse defines the Msg/UnbondValidator response type. message MsgUnbondValidatorResponse {} -// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator -// -// Since: cosmos-sdk 0.46 -message MsgCancelUnbondingDelegation { - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - // amount is always less than or equal to unbonding delegation entry balance - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; - // creation_height is the height which the unbonding took place. - int64 creation_height = 4; -} - -// MsgCancelUnbondingDelegationResponse -// -// Since: cosmos-sdk 0.46 -message MsgCancelUnbondingDelegationResponse {} - // MsgTokenizeShares tokenizes a delegation message MsgTokenizeShares { option (gogoproto.equal) = false;