Skip to content

Commit

Permalink
Fix Proto lints
Browse files Browse the repository at this point in the history
  • Loading branch information
zmanian committed Oct 22, 2023
1 parent da8c84f commit 3e01130
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
25 changes: 25 additions & 0 deletions proto/cosmos/distribution/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"];
}
1 change: 1 addition & 0 deletions proto/cosmos/staking/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
27 changes: 0 additions & 27 deletions proto/cosmos/staking/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3e01130

Please sign in to comment.