Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(x/account): Enable AutoCLI for x/accounts #22727

Closed
wants to merge 16 commits into from
Prev Previous commit
Next Next commit
autocli for Execute
  • Loading branch information
DongLieu committed Dec 3, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
addaleax Anna Henningsen
commit a542644bf9824fc165f49df54213858fc88a31a0
12 changes: 12 additions & 0 deletions x/accounts/autocli.go
Original file line number Diff line number Diff line change
@@ -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,
},
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
@@ -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"
@@ -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 {