Skip to content

Commit

Permalink
fix the prtobuf lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
TimmyExogenous committed Mar 18, 2024
1 parent ddaf1a2 commit e8f6c8c
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 142 deletions.
12 changes: 6 additions & 6 deletions proto/exocore/operator/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,17 @@ message OptInToCosmosChainRequest {
message OptInToCosmosChainResponse {
}

// InitiateOptOutFromCosmosChainRequest defines the InitiateOptOutFromCosmosChain request.
message InitiateOptOutFromCosmosChainRequest {
// InitOptOutFromCosmosChainRequest defines the InitOptOutFromCosmosChain request.
message InitOptOutFromCosmosChainRequest {
option (cosmos.msg.v1.signer) = "address";
// address is the operator address
string address = 1;
// chain_id is the identifier for the chain that wants to opt out.
string chain_id = 2;
}

// InitiateOptOutFromCosmosChainResponse defines the InitiateOptOutFromCosmosChain response.
message InitiateOptOutFromCosmosChainResponse {
// InitOptOutFromCosmosChainResponse defines the InitOptOutFromCosmosChain response.
message InitOptOutFromCosmosChainResponse {
}

// Msg defines the operator Msg service.
Expand All @@ -155,10 +155,10 @@ service Msg {
// start validatring on a chain. The operator must sign the request with
// the key with which they registered in the system.
rpc OptInToCosmosChain(OptInToCosmosChainRequest) returns (OptInToCosmosChainResponse) {};
// InitiateOptOutFromCosmosChain is a method with which an operator can initiate
// InitOptOutFromCosmosChain is a method with which an operator can initiate
// the opt out process from a chain. The operator must sign the request with
// the key with which they registered in the system. The opt-out process takes
// as long as the chain's unbonding period to complete, plus some loose change
// for message relaying across chains.
rpc InitiateOptOutFromCosmosChain(InitiateOptOutFromCosmosChainRequest) returns (InitiateOptOutFromCosmosChainResponse) {};
rpc InitOptOutFromCosmosChain(InitOptOutFromCosmosChainRequest) returns (InitOptOutFromCosmosChainResponse) {};
}
10 changes: 5 additions & 5 deletions x/operator/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ func (k *Keeper) OptInToCosmosChain(
return &types.OptInToCosmosChainResponse{}, nil
}

// InitiateOptOutFromCosmosChain is a method corresponding to OptInToCosmosChain
// InitOptOutFromCosmosChain is a method corresponding to OptInToCosmosChain
// It provides a function to opt out from the app chain Avs for the operators.
func (k *Keeper) InitiateOptOutFromCosmosChain(
func (k *Keeper) InitOptOutFromCosmosChain(
goCtx context.Context,
req *types.InitiateOptOutFromCosmosChainRequest,
) (*types.InitiateOptOutFromCosmosChainResponse, error) {
req *types.InitOptOutFromCosmosChainRequest,
) (*types.InitOptOutFromCosmosChainResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
addr, err := sdk.AccAddressFromBech32(req.Address)
if err != nil {
Expand All @@ -63,7 +63,7 @@ func (k *Keeper) InitiateOptOutFromCosmosChain(
); err != nil {
return nil, err
}
return &types.InitiateOptOutFromCosmosChainResponse{}, nil
return &types.InitOptOutFromCosmosChainResponse{}, nil
}

func stringToPubKey(pubKey string) (key tmprotocrypto.PublicKey, err error) {
Expand Down
2 changes: 1 addition & 1 deletion x/operator/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
(*sdk.Msg)(nil),
&RegisterOperatorReq{},
&OptInToCosmosChainRequest{},
&InitiateOptOutFromCosmosChainRequest{},
&InitOptOutFromCosmosChainRequest{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
Expand Down
6 changes: 3 additions & 3 deletions x/operator/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var (

// add for dogfood
_ sdk.Msg = &OptInToCosmosChainRequest{}
_ sdk.Msg = &InitiateOptOutFromCosmosChainRequest{}
_ sdk.Msg = &InitOptOutFromCosmosChainRequest{}
)

// GetSigners returns the expected signers for a MsgUpdateParams message.
Expand Down Expand Up @@ -44,12 +44,12 @@ func (m *OptInToCosmosChainRequest) ValidateBasic() error {
return nil
}

func (m *InitiateOptOutFromCosmosChainRequest) GetSigners() []sdk.AccAddress {
func (m *InitOptOutFromCosmosChainRequest) GetSigners() []sdk.AccAddress {
addr := sdk.MustAccAddressFromBech32(m.Address)
return []sdk.AccAddress{addr}
}

func (m *InitiateOptOutFromCosmosChainRequest) ValidateBasic() error {
func (m *InitOptOutFromCosmosChainRequest) ValidateBasic() error {
if _, err := sdk.AccAddressFromBech32(m.Address); err != nil {
return errorsmod.Wrap(err, "invalid from address")
}
Expand Down
2 changes: 1 addition & 1 deletion x/operator/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8f6c8c

Please sign in to comment.