Skip to content

Commit 12eaf53

Browse files
authored
Merge pull request #877 from onflow/auto-update-onflow-cadence-v1.7.0
Update to Cadence v1.7.0
2 parents a55163d + 837981b commit 12eaf53

File tree

14 files changed

+295
-299
lines changed

14 files changed

+295
-299
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI
22

33
env:
4-
GO_VERSION: "1.23"
4+
GO_VERSION: "1.25"
55

66
on:
77
pull_request:
@@ -32,8 +32,8 @@ jobs:
3232
with:
3333
go-version: ${{ env.GO_VERSION }}
3434
- name: Run golangci-lint
35-
uses: golangci/golangci-lint-action@v6
35+
uses: golangci/golangci-lint-action@v8
3636
with:
3737
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
38-
version: v1.63.4
38+
version: v2.4
3939
args: --timeout=10m

.golangci.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
[linters]
1+
version = '2'
2+
3+
[formatters]
24
enable = [
35
"goimports",
46
]

api/pull.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,7 @@ func (api *PullAPI) NewPendingTransactionFilter(
178178
return "", err
179179
}
180180

181-
full := false
182-
if fullTx != nil && *fullTx {
183-
full = true
184-
}
181+
full := fullTx != nil && *fullTx
185182

186183
f := newTransactionsFilter(api.config.FilterExpiry, last, full)
187184

api/server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func (h *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
267267
}
268268

269269
r.Body = io.NopCloser(bytes.NewBuffer(b))
270-
r.Body.Close()
270+
_ = r.Body.Close()
271271
}
272272

273273
// additional response handling
@@ -324,10 +324,10 @@ func (h *Server) Stop() {
324324
err := h.server.Shutdown(ctx)
325325
if err != nil && err == ctx.Err() {
326326
h.logger.Warn().Msg("HTTP server graceful shutdown timed out")
327-
h.server.Close()
327+
_ = h.server.Close()
328328
}
329329

330-
h.listener.Close()
330+
_ = h.listener.Close()
331331
h.logger.Info().Msgf(
332332
"HTTP server stopped, endpoint: %s", h.listener.Addr(),
333333
)

bootstrap/bootstrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ func (b *Bootstrap) StopProfilerServer() {
429429
if err != nil {
430430
if errors.Is(err, context.DeadlineExceeded) {
431431
b.logger.Warn().Msg("Profiler server graceful shutdown timed out")
432-
b.profiler.Close()
432+
_ = b.profiler.Close()
433433
} else {
434434
b.logger.Err(err).Msg("Profiler server graceful shutdown failed")
435435
}

cmd/blocks/cmd.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import (
44
"errors"
55
"fmt"
66

7-
errs "github.com/onflow/flow-evm-gateway/models/errors"
8-
"github.com/onflow/flow-evm-gateway/storage/pebble"
97
"github.com/rs/zerolog/log"
108
"github.com/spf13/cobra"
119

10+
errs "github.com/onflow/flow-evm-gateway/models/errors"
11+
"github.com/onflow/flow-evm-gateway/storage/pebble"
12+
1213
flowGo "github.com/onflow/flow-go/model/flow"
1314
)
1415

@@ -20,7 +21,9 @@ var Cmd = &cobra.Command{
2021
if err != nil {
2122
return fmt.Errorf("failed to open pebble db: %w", err)
2223
}
23-
defer pebbleDB.Close()
24+
defer func() {
25+
_ = pebbleDB.Close()
26+
}()
2427
store := pebble.New(pebbleDB, log.Logger)
2528

2629
blocks := pebble.NewBlocks(store, flowGo.ChainID(chainID))

cmd/run/cmd.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,12 @@ func parseConfigFromFlags() error {
215215
cfg.ForceStartCadenceHeight = forceStartHeight
216216
}
217217

218-
if txStateValidation == config.LocalIndexValidation {
218+
switch txStateValidation {
219+
case config.LocalIndexValidation:
219220
cfg.TxStateValidation = config.LocalIndexValidation
220-
} else if txStateValidation == config.TxSealValidation {
221+
case config.TxSealValidation:
221222
cfg.TxStateValidation = config.TxSealValidation
222-
} else {
223+
default:
223224
return fmt.Errorf("unknown tx state validation: %s", txStateValidation)
224225
}
225226

go.mod

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
11
module github.com/onflow/flow-evm-gateway
22

3-
go 1.23.7
4-
5-
toolchain go1.23.8
3+
go 1.25.0
64

75
require (
86
github.com/cockroachdb/pebble v1.1.5
9-
github.com/ethereum/go-ethereum v1.16.2
7+
github.com/ethereum/go-ethereum v1.16.3
108
github.com/goccy/go-json v0.10.4
119
github.com/hashicorp/go-multierror v1.1.1
1210
github.com/hashicorp/golang-lru/v2 v2.0.7
1311
github.com/holiman/uint256 v1.3.2
14-
github.com/onflow/atree v0.10.0
15-
github.com/onflow/cadence v1.7.0-preview.1
16-
github.com/onflow/flow-go v0.42.3-util-fix.0.20250819165158-ea886bab7c19
17-
github.com/onflow/flow-go-sdk v1.7.0
12+
github.com/onflow/atree v0.10.1
13+
github.com/onflow/cadence v1.7.0
14+
github.com/onflow/flow-go v0.43.0-dev-pebble.1.0.20250910132853-12699a150fd9
15+
github.com/onflow/flow-go-sdk v1.8.1
1816
github.com/prometheus/client_golang v1.20.5
1917
github.com/rs/cors v1.8.0
2018
github.com/rs/zerolog v1.33.0
2119
github.com/samber/slog-zerolog v1.0.0
2220
github.com/sethvargo/go-limiter v1.0.0
2321
github.com/sethvargo/go-retry v0.2.3
2422
github.com/spf13/cobra v1.8.1
25-
github.com/stretchr/testify v1.10.0
23+
github.com/stretchr/testify v1.11.1
2624
go.uber.org/atomic v1.11.0
2725
go.uber.org/ratelimit v0.3.1
2826
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
29-
golang.org/x/sync v0.15.0
30-
google.golang.org/grpc v1.74.2
27+
golang.org/x/sync v0.16.0
28+
google.golang.org/grpc v1.75.0
3129
)
3230

3331
require (
3432
cloud.google.com/go v0.120.0 // indirect
35-
cloud.google.com/go/auth v0.16.2 // indirect
33+
cloud.google.com/go/auth v0.16.4 // indirect
3634
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
37-
cloud.google.com/go/compute/metadata v0.7.0 // indirect
35+
cloud.google.com/go/compute/metadata v0.8.0 // indirect
3836
cloud.google.com/go/iam v1.5.2 // indirect
3937
cloud.google.com/go/kms v1.22.0 // indirect
4038
cloud.google.com/go/longrunning v0.6.7 // indirect
@@ -45,7 +43,7 @@ require (
4543
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
4644
github.com/benbjohnson/clock v1.3.5 // indirect
4745
github.com/beorn7/perks v1.0.1 // indirect
48-
github.com/bits-and-blooms/bitset v1.20.0 // indirect
46+
github.com/bits-and-blooms/bitset v1.24.0 // indirect
4947
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
5048
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
5149
github.com/cespare/xxhash v1.1.0 // indirect
@@ -95,7 +93,7 @@ require (
9593
github.com/google/s2a-go v0.1.9 // indirect
9694
github.com/google/uuid v1.6.0 // indirect
9795
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
98-
github.com/googleapis/gax-go/v2 v2.14.2 // indirect
96+
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
9997
github.com/gorilla/websocket v1.5.3 // indirect
10098
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
10199
github.com/hashicorp/errwrap v1.1.0 // indirect
@@ -116,7 +114,7 @@ require (
116114
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
117115
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
118116
github.com/jordanschalm/lockctx v0.0.0-20250412215529-226f85c10956 // indirect
119-
github.com/k0kubun/pp v3.0.1+incompatible // indirect
117+
github.com/k0kubun/pp/v3 v3.5.0 // indirect
120118
github.com/kevinburke/go-bindata v3.24.0+incompatible // indirect
121119
github.com/klauspost/compress v1.17.11 // indirect
122120
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
@@ -128,9 +126,9 @@ require (
128126
github.com/libp2p/go-msgio v0.3.0 // indirect
129127
github.com/logrusorgru/aurora/v4 v4.0.0 // indirect
130128
github.com/magiconair/properties v1.8.7 // indirect
131-
github.com/mattn/go-colorable v0.1.13 // indirect
129+
github.com/mattn/go-colorable v0.1.14 // indirect
132130
github.com/mattn/go-isatty v0.0.20 // indirect
133-
github.com/mattn/go-runewidth v0.0.15 // indirect
131+
github.com/mattn/go-runewidth v0.0.16 // indirect
134132
github.com/minio/sha256-simd v1.0.1 // indirect
135133
github.com/mitchellh/mapstructure v1.5.0 // indirect
136134
github.com/mr-tron/base58 v1.2.0 // indirect
@@ -146,14 +144,16 @@ require (
146144
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
147145
github.com/olekukonko/tablewriter v0.0.5 // indirect
148146
github.com/onflow/crypto v0.25.3 // indirect
149-
github.com/onflow/flow-core-contracts/lib/go/contracts v1.7.3 // indirect
150-
github.com/onflow/flow-core-contracts/lib/go/templates v1.7.1 // indirect
147+
github.com/onflow/fixed-point v0.1.1 // indirect
148+
github.com/onflow/flow-core-contracts/lib/go/contracts v1.7.4-0.20250825173510-91e6f28b0224 // indirect
149+
github.com/onflow/flow-core-contracts/lib/go/templates v1.7.2-0.20250825173510-91e6f28b0224 // indirect
151150
github.com/onflow/flow-evm-bridge v0.1.0 // indirect
152151
github.com/onflow/flow-ft/lib/go/contracts v1.0.1 // indirect
153152
github.com/onflow/flow-ft/lib/go/templates v1.0.1 // indirect
154153
github.com/onflow/flow-nft/lib/go/contracts v1.2.4 // indirect
155154
github.com/onflow/flow-nft/lib/go/templates v1.2.1 // indirect
156-
github.com/onflow/flow/protobuf/go/flow v0.4.11 // indirect
155+
github.com/onflow/flow/protobuf/go/flow v0.4.12 // indirect
156+
github.com/onflow/go-ethereum v1.13.4 // indirect
157157
github.com/onflow/sdks v0.6.0-preview.1 // indirect
158158
github.com/onsi/ginkgo v1.16.4 // indirect
159159
github.com/onsi/gomega v1.18.1 // indirect
@@ -171,7 +171,7 @@ require (
171171
github.com/prometheus/common v0.61.0 // indirect
172172
github.com/prometheus/procfs v0.15.1 // indirect
173173
github.com/psiemens/sconfig v0.1.0 // indirect
174-
github.com/rivo/uniseg v0.4.4 // indirect
174+
github.com/rivo/uniseg v0.4.7 // indirect
175175
github.com/rogpeppe/go-internal v1.13.1 // indirect
176176
github.com/samber/lo v1.39.0 // indirect
177177
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
@@ -198,31 +198,31 @@ require (
198198
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
199199
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
200200
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
201-
go.opentelemetry.io/otel v1.36.0 // indirect
201+
go.opentelemetry.io/otel v1.37.0 // indirect
202202
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect
203203
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect
204-
go.opentelemetry.io/otel/metric v1.36.0 // indirect
205-
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
206-
go.opentelemetry.io/otel/trace v1.36.0 // indirect
204+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
205+
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
206+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
207207
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
208208
go.uber.org/multierr v1.11.0 // indirect
209209
go.uber.org/zap v1.27.0 // indirect
210-
golang.org/x/crypto v0.39.0 // indirect
211-
golang.org/x/net v0.41.0 // indirect
210+
golang.org/x/crypto v0.41.0 // indirect
211+
golang.org/x/net v0.43.0 // indirect
212212
golang.org/x/oauth2 v0.30.0 // indirect
213-
golang.org/x/sys v0.33.0 // indirect
214-
golang.org/x/text v0.26.0 // indirect
213+
golang.org/x/sys v0.35.0 // indirect
214+
golang.org/x/text v0.28.0 // indirect
215215
golang.org/x/time v0.12.0 // indirect
216216
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
217217
gonum.org/v1/gonum v0.16.0 // indirect
218-
google.golang.org/api v0.241.0 // indirect
218+
google.golang.org/api v0.247.0 // indirect
219219
google.golang.org/appengine v1.6.8 // indirect
220-
google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect
221-
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect
222-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
223-
google.golang.org/protobuf v1.36.6 // indirect
220+
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect
221+
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
222+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b // indirect
223+
google.golang.org/protobuf v1.36.7 // indirect
224224
gopkg.in/ini.v1 v1.67.0 // indirect
225225
gopkg.in/yaml.v2 v2.4.0 // indirect
226226
gopkg.in/yaml.v3 v3.0.1 // indirect
227-
lukechampine.com/blake3 v1.4.0 // indirect
227+
lukechampine.com/blake3 v1.4.1 // indirect
228228
)

0 commit comments

Comments
 (0)