Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ require (
)

require (
cosmossdk.io/api v0.7.2
cosmossdk.io/client/v2 v2.0.0-beta.1
cosmossdk.io/core v0.11.0
cosmossdk.io/errors v1.0.1
cosmossdk.io/log v1.3.0
Expand All @@ -45,7 +47,6 @@ require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.5 // indirect
cloud.google.com/go/storage v1.35.1 // indirect
cosmossdk.io/api v0.7.2 // indirect
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
cosmossdk.io/x/tx v0.13.0 // indirect
Expand Down
56 changes: 56 additions & 0 deletions x/adminmodule/autocli.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package adminmodule

import (
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
"cosmossdk.io/client/v2/autocli"
)

var _ autocli.HasAutoCLIConfig = AppModule{}

func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Query: &autocliv1.ServiceCommandDescriptor{
Service: "cosmos.adminmodule.adminmodule.Query",
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Admins",
Use: "admins",
Short: "Query list of admins",
},
{
RpcMethod: "ArchivedProposals",
Use: "archivedproposals",
Short: "Query archived proposals",
},
{
RpcMethod: "ArchivedProposalsLegacy",
Use: "archivedproposalslegacy",
Short: "Query legacy archived proposals",
},
},
EnhanceCustomCommand: true,
},
Tx: &autocliv1.ServiceCommandDescriptor{
Service: "cosmos.adminmodule.adminmodule.Msg",
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "DeleteAdmin",
Use: "delete-admin [admin]",
Short: "Delete admin",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "admin"}},
},
{
RpcMethod: "AddAdmin",
Use: "add-admin [admin]",
Short: "Add new admin",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "admin"}},
},
{
RpcMethod: "SubmitProposalLegacy",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there no command for a usual SubmitProposal command?

Skip: true,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also why do we skip it?

},
},
EnhanceCustomCommand: true,
},
}
}
32 changes: 0 additions & 32 deletions x/adminmodule/client/cli/query.go

This file was deleted.

43 changes: 0 additions & 43 deletions x/adminmodule/client/cli/query_admins.go

This file was deleted.

73 changes: 0 additions & 73 deletions x/adminmodule/client/cli/query_archived_proposals.go

This file was deleted.

4 changes: 0 additions & 4 deletions x/adminmodule/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ func GetTxCmd(propCmds []*cobra.Command) *cobra.Command {
RunE: client.ValidateCmd,
}

cmd.AddCommand(CmdDeleteAdmin())

cmd.AddCommand(CmdAddAdmin())

cmdSubmitProp := CmdSubmitProposal()
for _, propCmd := range propCmds {
flags.AddTxFlagsToCmd(propCmd)
Expand Down
45 changes: 0 additions & 45 deletions x/adminmodule/client/cli/tx_add_admin.go

This file was deleted.

44 changes: 0 additions & 44 deletions x/adminmodule/client/cli/tx_delete_admin.go

This file was deleted.

2 changes: 1 addition & 1 deletion x/adminmodule/client/cli/tx_ibc_upgrade_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/cosmos/ibc-go/v8/modules/core/exported"
)

// NewCmdSubmitUpgradeProposal implements a command handler for submitting an upgrade IBC client proposal transaction.
// NewCmdSubmitIbcClientUpgradeProposal implements a command handler for submitting an upgrade IBC client proposal transaction.
func NewCmdSubmitIbcClientUpgradeProposal() *cobra.Command {
cmd := &cobra.Command{
Use: "ibc-upgrade [name] [height] [path/to/upgraded_client_state.json] (--title [title] | --description [description]) [flags]",
Expand Down
12 changes: 3 additions & 9 deletions x/adminmodule/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/cosmos/admin-module/v2/x/adminmodule/client/cli"
"github.com/spf13/cobra"

// this line is used by starport scaffolding # 1
"cosmossdk.io/core/appmodule"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"

abci "github.com/cometbft/cometbft/abci/types"
"github.com/grpc-ecosystem/grpc-gateway/runtime"

"github.com/cosmos/admin-module/v2/x/adminmodule/client/cli"
"github.com/cosmos/admin-module/v2/x/adminmodule/keeper"
"github.com/cosmos/admin-module/v2/x/adminmodule/types"
"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -95,11 +94,6 @@ func (a AppModuleBasic) GetTxCmd() *cobra.Command {
return cli.GetTxCmd(proposalCLIHandlers)
}

// GetQueryCmd returns the capability module's root query command.
func (AppModuleBasic) GetQueryCmd() *cobra.Command {
return cli.GetQueryCmd(types.StoreKey)
}

// ----------------------------------------------------------------------------
// AppModule
// ----------------------------------------------------------------------------
Expand Down