Skip to content

Commit

Permalink
update activate msg
Browse files Browse the repository at this point in the history
  • Loading branch information
satawatnack committed Jan 6, 2025
1 parent 16e4fda commit da32e60
Show file tree
Hide file tree
Showing 16 changed files with 782 additions and 778 deletions.
2 changes: 1 addition & 1 deletion api/band/bandtss/v1beta1/genesis.pulsar.go

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

2 changes: 1 addition & 1 deletion api/band/oracle/v1/oracle.pulsar.go

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

2 changes: 1 addition & 1 deletion api/band/tss/v1beta1/genesis.pulsar.go

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

930 changes: 467 additions & 463 deletions api/band/tunnel/v1beta1/tx.pulsar.go

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions api/band/tunnel/v1beta1/tx_grpc.pb.go

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

26 changes: 13 additions & 13 deletions proto/band/tunnel/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ service Msg {
// WithdrawFeePayerFunds is a RPC method to withdraw fee payer funds to creator.
rpc WithdrawFeePayerFunds(MsgWithdrawFeePayerFunds) returns (MsgWithdrawFeePayerFundsResponse);

// Activate is a RPC method to activate a tunnel.
rpc Activate(MsgActivate) returns (MsgActivateResponse);
// ActivateTunnel is a RPC method to activate a tunnel.
rpc ActivateTunnel(MsgActivateTunnel) returns (MsgActivateTunnelResponse);

// Deactivate is a RPC method to deactivate a tunnel.
rpc Deactivate(MsgDeactivate) returns (MsgDeactivateResponse);
// DeactivateTunnel is a RPC method to deactivate a tunnel.
rpc DeactivateTunnel(MsgDeactivateTunnel) returns (MsgDeactivateTunnelResponse);

// TriggerTunnel is a RPC method to manually trigger a tunnel.
rpc TriggerTunnel(MsgTriggerTunnel) returns (MsgTriggerTunnelResponse);
Expand Down Expand Up @@ -128,24 +128,24 @@ message MsgWithdrawFeePayerFunds {
// MsgWithdrawFeePayerFundsResponse is the response type for the Msg/WithdrawFeePayerFunds RPC method.
message MsgWithdrawFeePayerFundsResponse {}

// Activate is the transaction message to activate a tunnel.
message MsgActivate {
// ActivateTunnel is the transaction message to activate a tunnel.
message MsgActivateTunnel {
option (cosmos.msg.v1.signer) = "creator";
option (amino.name) = "tunnel/MsgActivate";
option (amino.name) = "tunnel/MsgActivateTunnel";

// tunnel_id is the ID of the tunnel to activate.
uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"];
// creator is the address of the creator.
string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// MsgActivateResponse is the response type for the Msg/Activate RPC method.
message MsgActivateResponse {}
// MsgActivateTunnelResponse is the response type for the Msg/Activate RPC method.
message MsgActivateTunnelResponse {}

// MsgDeactivate is the transaction message to deactivate a tunnel.
message MsgDeactivate {
// MsgDeactivateTunnel is the transaction message to deactivate a tunnel.
message MsgDeactivateTunnel {
option (cosmos.msg.v1.signer) = "creator";
option (amino.name) = "tunnel/MsgDeactivate";
option (amino.name) = "tunnel/MsgDeactivateTunnel";

// tunnel_id is the ID of the tunnel to deactivate.
uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"];
Expand All @@ -154,7 +154,7 @@ message MsgDeactivate {
}

// MsgDeactivateTunnelResponse is the response type for the Msg/Deactivate RPC method.
message MsgDeactivateResponse {}
message MsgDeactivateTunnelResponse {}

// MsgTriggerTunnel is the transaction message to manually trigger a tunnel.
message MsgTriggerTunnel {
Expand Down
2 changes: 1 addition & 1 deletion x/bandtss/types/genesis.pb.go

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

2 changes: 1 addition & 1 deletion x/oracle/types/oracle.pb.go

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

2 changes: 1 addition & 1 deletion x/tss/types/genesis.pb.go

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

16 changes: 8 additions & 8 deletions x/tunnel/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ func GetTxCmd() *cobra.Command {
GetTxCmdUpdateRoute(),
GetTxCmdUpdateSignalsAndInterval(),
GetTxCmdWithdrawFeePayerFunds(),
GetTxCmdActivate(),
GetTxCmdDeactivate(),
GetTxCmdActivateTunnel(),
GetTxCmdDeactivateTunnel(),
GetTxCmdTriggerTunnel(),
GetTxCmdDepositToTunnel(),
GetTxCmdWithdrawFromTunnel(),
Expand Down Expand Up @@ -278,9 +278,9 @@ func GetTxCmdWithdrawFeePayerFunds() *cobra.Command {
return cmd
}

func GetTxCmdActivate() *cobra.Command {
func GetTxCmdActivateTunnel() *cobra.Command {
cmd := &cobra.Command{
Use: "activate [tunnel-id]",
Use: "activate-tunnel [tunnel-id]",
Short: "Activate a tunnel",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
Expand All @@ -294,7 +294,7 @@ func GetTxCmdActivate() *cobra.Command {
return err
}

msg := types.NewMsgActivate(id, clientCtx.GetFromAddress().String())
msg := types.NewMsgActivateTunnel(id, clientCtx.GetFromAddress().String())
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand All @@ -304,9 +304,9 @@ func GetTxCmdActivate() *cobra.Command {
return cmd
}

func GetTxCmdDeactivate() *cobra.Command {
func GetTxCmdDeactivateTunnel() *cobra.Command {
cmd := &cobra.Command{
Use: "deactivate [tunnel-id]",
Use: "deactivate-tunnel [tunnel-id]",
Short: "Deactivate a tunnel",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
Expand All @@ -320,7 +320,7 @@ func GetTxCmdDeactivate() *cobra.Command {
return err
}

msg := types.NewMsgDeactivate(id, clientCtx.GetFromAddress().String())
msg := types.NewMsgDeactivateTunnel(id, clientCtx.GetFromAddress().String())
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
20 changes: 10 additions & 10 deletions x/tunnel/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ func (k msgServer) WithdrawFeePayerFunds(
return &types.MsgWithdrawFeePayerFundsResponse{}, nil
}

// Activate activates a tunnel.
func (k msgServer) Activate(
// ActivateTunnel activates a tunnel.
func (k msgServer) ActivateTunnel(
goCtx context.Context,
msg *types.MsgActivate,
) (*types.MsgActivateResponse, error) {
msg *types.MsgActivateTunnel,
) (*types.MsgActivateTunnelResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

tunnel, err := k.Keeper.GetTunnel(ctx, msg.TunnelID)
Expand All @@ -235,14 +235,14 @@ func (k msgServer) Activate(
return nil, err
}

return &types.MsgActivateResponse{}, nil
return &types.MsgActivateTunnelResponse{}, nil
}

// Deactivate deactivates a tunnel.
func (k msgServer) Deactivate(
// DeactivateTunnel deactivates a tunnel.
func (k msgServer) DeactivateTunnel(
goCtx context.Context,
msg *types.MsgDeactivate,
) (*types.MsgDeactivateResponse, error) {
msg *types.MsgDeactivateTunnel,
) (*types.MsgDeactivateTunnelResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

tunnel, err := k.Keeper.GetTunnel(ctx, msg.TunnelID)
Expand All @@ -262,7 +262,7 @@ func (k msgServer) Deactivate(
return nil, err
}

return &types.MsgDeactivateResponse{}, nil
return &types.MsgDeactivateTunnelResponse{}, nil
}

// TriggerTunnel manually triggers a tunnel.
Expand Down
Loading

0 comments on commit da32e60

Please sign in to comment.