Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Oct 19, 2023
1 parent 22463c1 commit f1eef05
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 196 deletions.
4 changes: 2 additions & 2 deletions ignite/templates/app/files/go.mod.plush
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
cosmossdk.io/api v0.7.1
cosmossdk.io/client/v2 v2.0.0-20231005140444-10bd5a2cacdc
cosmossdk.io/client/v2 v2.0.0-20231018124024-3abc61fb75d4
cosmossdk.io/core v0.11.0
cosmossdk.io/depinject v1.0.0-alpha.4
cosmossdk.io/errors v1.0.0
Expand All @@ -19,7 +19,7 @@ require (
github.com/cometbft/cometbft v0.38.0
github.com/cosmos/cosmos-db v1.0.0
github.com/cosmos/cosmos-proto v1.0.0-beta.3
github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231005140444-10bd5a2cacdc
github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231018124024-3abc61fb75d4
github.com/cosmos/gogoproto v1.4.11
github.com/cosmos/ibc-go/modules/capability v1.0.0-rc6
github.com/cosmos/ibc-go/v8 v8.0.0-beta.1
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

var _ = strconv.Itoa(0)

// This command does not use AutoCLI because it gives a better UX to do not.
func CmdSend<%= packetName.UpperCamel %>() *cobra.Command {
flagPacketTimeoutTimestamp := "packet-timeout-timestamp"

Expand Down
6 changes: 6 additions & 0 deletions ignite/templates/ibc/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,14 @@ func protoTxModify(opts *PacketOptions) genny.RunFn {
}
}

// clientCliTxModify does not use AutoCLI here, because it as a better UX as it is.
func clientCliTxModify(replacer placeholder.Replacer, opts *PacketOptions) genny.RunFn {
return func(r *genny.Runner) error {
// TODO
// create tx.go if not exist
// add send command
// edit module.go to a tx command on app module basic

Check warning on line 356 in ignite/templates/ibc/packet.go

View check run for this annotation

Codecov / codecov/patch

ignite/templates/ibc/packet.go#L352-L356

Added lines #L352 - L356 were not covered by tests
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "client/cli/tx.go")
f, err := r.Disk.Find(path)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
Tx: &autocliv1.ServiceCommandDescriptor{
Service: modulev1.Msg_ServiceDesc.ServiceName,
EnhanceCustomCommand: true, // only required if you want to use the custom command
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "UpdateParams",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r
}
}

// GetTxCmd returns the root Tx command for the module.
// These commands enrich the AutoCLI tx commands.
// When creating non AutoCLI commands, add the following:
// func (a AppModuleBasic) GetTxCmd() *cobra.Command {
// return cli.GetTxCmd()
// }

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

0 comments on commit f1eef05

Please sign in to comment.