Skip to content

Commit 6d24d4a

Browse files
committed
Update gno version
1 parent fe104c2 commit 6d24d4a

File tree

6 files changed

+115
-58
lines changed

6 files changed

+115
-58
lines changed

client/http/http.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ type Client struct {
1616
}
1717

1818
// NewClient creates a new TM2 HTTP client
19-
func NewClient(remote string) *Client {
20-
return &Client{
21-
client: rpcClient.NewHTTP(remote, ""),
19+
func NewClient(remote string) (*Client, error) {
20+
client, err := rpcClient.NewHTTPClient(remote)
21+
if err != nil {
22+
return nil, fmt.Errorf("unable to create HTTP client, %w", err)
2223
}
24+
25+
return &Client{
26+
client: client,
27+
}, nil
2328
}
2429

2530
func (c *Client) GetAccount(address crypto.Address) (std.Account, error) {

cmd/serve.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,17 @@ func (c *faucetCfg) exec(_ context.Context, _ []string) error {
181181
// Create a new logger
182182
logger := slog.New(slog.NewTextHandler(os.Stdout, nil))
183183

184+
// Create the tm2 client
185+
client, err := tm2Client.NewClient(c.remote)
186+
if err != nil {
187+
return fmt.Errorf("unable to create client, %w", err)
188+
}
189+
184190
// Create a new faucet with
185191
// static gas estimation
186192
f, err := faucet.NewFaucet(
187193
static.New(gasFee, gasWanted),
188-
tm2Client.NewClient(c.remote),
194+
client,
189195
faucet.WithLogger(logger),
190196
faucet.WithConfig(c.config),
191197
)

go.mod

+25-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/gnolang/faucet
33
go 1.21
44

55
require (
6-
github.com/gnolang/gno v0.0.0-20240313211052-3481a03c98bc
6+
github.com/gnolang/gno v0.0.0-20240429120125-3832b1312d7d
77
github.com/go-chi/chi/v5 v5.0.12
88
github.com/pelletier/go-toml v1.9.5
99
github.com/peterbourgon/ff/v3 v3.4.0
@@ -13,23 +13,36 @@ require (
1313
)
1414

1515
require (
16-
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
17-
github.com/btcsuite/btcd/btcutil v1.1.3 // indirect
16+
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
17+
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
18+
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
1819
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
1920
github.com/davecgh/go-spew v1.1.1 // indirect
20-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
21+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
2122
github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 // indirect
23+
github.com/go-logr/logr v1.4.1 // indirect
24+
github.com/go-logr/stdr v1.2.2 // indirect
2225
github.com/gorilla/websocket v1.5.1 // indirect
23-
github.com/jaekwon/testify v1.6.1 // indirect
24-
github.com/kr/pretty v0.1.0 // indirect
25-
github.com/kr/text v0.2.0 // indirect
26+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
2627
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
2728
github.com/pmezard/go-difflib v1.0.0 // indirect
28-
golang.org/x/crypto v0.19.0 // indirect
29+
github.com/rs/xid v1.5.0 // indirect
30+
go.opentelemetry.io/otel v1.25.0 // indirect
31+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect
32+
go.opentelemetry.io/otel/metric v1.25.0 // indirect
33+
go.opentelemetry.io/otel/sdk v1.25.0 // indirect
34+
go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect
35+
go.opentelemetry.io/otel/trace v1.25.0 // indirect
36+
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
37+
golang.org/x/crypto v0.21.0 // indirect
2938
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
30-
golang.org/x/mod v0.15.0 // indirect
31-
golang.org/x/net v0.21.0 // indirect
32-
golang.org/x/sys v0.17.0 // indirect
33-
google.golang.org/protobuf v1.31.0 // indirect
39+
golang.org/x/mod v0.16.0 // indirect
40+
golang.org/x/net v0.23.0 // indirect
41+
golang.org/x/sys v0.18.0 // indirect
42+
golang.org/x/text v0.14.0 // indirect
43+
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
44+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
45+
google.golang.org/grpc v1.63.0 // indirect
46+
google.golang.org/protobuf v1.33.0 // indirect
3447
gopkg.in/yaml.v3 v3.0.1 // indirect
3548
)

0 commit comments

Comments
 (0)