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

fix(gnokeykc): gnokeykc maketx {addpkg,call,run} missing because of tm2 separation (fixes #2373) #2375

Merged
merged 7 commits into from
Jul 22, 2024

Conversation

grepsuzette
Copy link
Contributor

@grepsuzette grepsuzette commented Jun 18, 2024

Fixes #2373.

Seems gnokeykc was indirectly broken in #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.

## keycli
`keycli` is an extension of `tm2/keys/client`, enhancing its functionality. It provides the following features:
- **addpkg**: Allows you to upload a new package to the blockchain.
- **run**: Execute Gno code by invoking the main() function from the target package.
- **call**: Executes a single function call within a Realm.
- **maketx**: Compose a transaction (tx) document to sign (and possibly broadcast).
---
Most of these features have been extracted from `tm2/keys/client` to ensure that `tm2` remains completely independent of `gnovm` and `gno.land`. For more detailed information regarding this change, please refer to [PR#1483](https://github.com/gnolang/gno/pull/1483)

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 54.64%. Comparing base (fa98780) to head (5a913b9).

Files Patch % Lines
contribs/gnokeykc/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2375      +/-   ##
==========================================
- Coverage   55.01%   54.64%   -0.38%     
==========================================
  Files         595      584      -11     
  Lines       79731    78638    -1093     
==========================================
- Hits        43866    42973     -893     
+ Misses      32548    32453      -95     
+ Partials     3317     3212     -105     
Flag Coverage Δ
contribs/gnodev 26.00% <ø> (ø)
contribs/gnofaucet 14.46% <ø> (ø)
contribs/gnokeykc 0.00% <0.00%> (ø)
contribs/gnomd 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

please fix CI and we should be good to go

@moul
Copy link
Member

moul commented Jul 16, 2024

I don’t have permission to push to your PR. Here’s the fix (go mod tidy):

diff --git a/contribs/gnokeykc/go.mod b/contribs/gnokeykc/go.mod
index 2d206e97..d86c7155 100644
--- a/contribs/gnokeykc/go.mod
+++ b/contribs/gnokeykc/go.mod
@@ -48,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
diff --git a/contribs/gnokeykc/go.sum b/contribs/gnokeykc/go.sum
index 9f2349e1..e20600ea 100644
--- a/contribs/gnokeykc/go.sum
+++ b/contribs/gnokeykc/go.sum
@@ -95,6 +95,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
 github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
+github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8=
 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg=
 github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
@@ -154,6 +156,8 @@ go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+
 go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI=
 go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
 go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
+go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
+go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
 golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=

@grepsuzette
Copy link
Contributor Author

Thank you Manfred!

All checks have passed, should be ready.

@thehowl thehowl merged commit 4ff6bc7 into gnolang:master Jul 22, 2024
77 of 78 checks passed
gfanton pushed a commit to gfanton/gno that referenced this pull request Jul 23, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

contribs/gnokeykc has only tm2 features (missing thinkgs like maketx addpkg)
4 participants