Skip to content

Commit

Permalink
autocli for Execute
Browse files Browse the repository at this point in the history
  • Loading branch information
DongLieu committed Dec 3, 2024
1 parent f1a888c commit a542644
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 100 deletions.
12 changes: 12 additions & 0 deletions x/accounts/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{ProtoField: "funds", Varargs: true},
},
},
{
RpcMethod: "Execute",
Use: "execute <account-address> <execute-msg-type-url> <json-message>",
Short: "Execute state transition to account",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "sender"},
{ProtoField: "target"},
{ProtoField: "execute_msg_type_url"},
{ProtoField: "json_message"},
{ProtoField: "funds", Varargs: true},
},
},
},
EnhanceCustomCommand: true,
},
Expand Down
98 changes: 0 additions & 98 deletions x/accounts/cli/cli.go

This file was deleted.

3 changes: 1 addition & 2 deletions x/accounts/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"cosmossdk.io/core/appmodule"
appmodulev2 "cosmossdk.io/core/appmodule/v2"
"cosmossdk.io/core/registry"
"cosmossdk.io/x/accounts/cli"
v1 "cosmossdk.io/x/accounts/v1"

"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -117,7 +116,7 @@ func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error)
}

func (AppModule) GetTxCmd() *cobra.Command {
return cli.TxCmd(ModuleName)
return nil
}

func (AppModule) GetQueryCmd() *cobra.Command {
Expand Down

0 comments on commit a542644

Please sign in to comment.