Skip to content

Commit

Permalink
Update gno version
Browse files Browse the repository at this point in the history
  • Loading branch information
zivkovicmilos committed Jul 6, 2024
1 parent 249c18d commit 68bc87f
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 218 deletions.
11 changes: 8 additions & 3 deletions backup/client/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ type Client struct {
}

// NewClient creates a new TM2 HTTP client
func NewClient(remote string) *Client {
return &Client{
client: rpcClient.NewHTTP(remote, ""),
func NewClient(remote string) (*Client, error) {
c, err := rpcClient.NewHTTPClient(remote)
if err != nil {
return nil, fmt.Errorf("unable to create HTTP client, %w", err)
}

return &Client{
client: c,
}, nil
}

func (c *Client) GetLatestBlockNumber() (uint64, error) {
Expand Down
5 changes: 4 additions & 1 deletion cmd/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ func (c *backupCfg) exec(ctx context.Context, _ []string) error {
}

// Set up the client
client := http.NewClient(c.remote)
client, err := http.NewClient(c.remote)
if err != nil {
return fmt.Errorf("could not create a gno client, %w", err)
}

// Set up the logger
zapLogger, loggerErr := zap.NewDevelopment()
Expand Down
5 changes: 4 additions & 1 deletion cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ func (c *restoreCfg) exec(ctx context.Context, _ []string) error {
}

// Set up the client
client := http.NewClient(c.remote)
client, err := http.NewClient(c.remote)
if err != nil {
return fmt.Errorf("unable to create gno client, %w", err)
}

// Set up the logger
zapLogger, loggerErr := zap.NewDevelopment()
Expand Down
62 changes: 29 additions & 33 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,45 @@ module github.com/gnolang/tx-archive
go 1.21

require (
github.com/gnolang/gno v0.0.0-20231112174927-b1a53c018ea4
github.com/gnolang/gno v0.1.0-nightly.20240627
github.com/peterbourgon/ff/v3 v3.4.0
github.com/stretchr/testify v1.9.0
go.uber.org/zap v1.27.0
)

require (
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c // indirect
github.com/btcsuite/btcd/btcutil v1.0.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cockroachdb/apd v1.1.0 // indirect
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/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/badger/v3 v3.2103.4 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/gnolang/goleveldb v0.0.9 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/flatbuffers v1.12.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.12.3 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/linxGnu/grocksdb v1.8.4 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rs/cors v1.10.1 // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.opencensus.io v0.22.5 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
github.com/rs/xid v1.5.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/sdk v1.27.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect
google.golang.org/grpc v1.64.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 68bc87f

Please sign in to comment.