Skip to content

Commit

Permalink
fix(gnokeykc): gnokeykc maketx {addpkg,call,run} missing because of t…
Browse files Browse the repository at this point in the history
…m2 separation (fixes gnolang#2373) (gnolang#2375)

Fixes gnolang#2373. 

Seems `gnokeykc` was indirectly broken in gnolang#1483 (when tm2 was made
completely independent from gno messages as addpkg).

`gnokey` now makes use of `github.com/gnolang/gno/gno.land/pkg/keyscli`
and this PR proposes to use the same root cmd.


https://github.com/gnolang/gno/blob/5fdbce0e1fe533165c0c2009e93695ece677b2bd/gno.land/pkg/keyscli/README.md?plain=1#L1-L12
  • Loading branch information
grepsuzette authored and gfanton committed Jul 23, 2024
1 parent f1f7b98 commit 1594226
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions contribs/gnokeykc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down Expand Up @@ -47,6 +48,7 @@ require (
go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/mod v0.19.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions contribs/gnokeykc/go.sum

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

3 changes: 2 additions & 1 deletion contribs/gnokeykc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"os"

"github.com/gnolang/gno/gno.land/pkg/keyscli"
"github.com/gnolang/gno/gnovm/pkg/gnoenv"
"github.com/gnolang/gno/tm2/pkg/commands"
"github.com/gnolang/gno/tm2/pkg/crypto/keys/client"
Expand All @@ -15,7 +16,7 @@ func main() {
wrappedio := &wrappedIO{IO: stdio}
baseCfg := client.DefaultBaseOptions
baseCfg.Home = gnoenv.HomeDir()
cmd := client.NewRootCmdWithBaseConfig(wrappedio, baseCfg)
cmd := keyscli.NewRootCmd(wrappedio, baseCfg)
cmd.AddSubCommands(newKcCmd(stdio))

cmd.Execute(context.Background(), os.Args[1:])
Expand Down

0 comments on commit 1594226

Please sign in to comment.