Skip to content

Commit 60b9a3b

Browse files
Add disable_deposits. Update go, linter and astria libraries
1 parent 0b639ac commit 60b9a3b

File tree

20 files changed

+130
-84
lines changed

20 files changed

+130
-84
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@v5
1717
with:
18-
go-version: '1.24'
18+
go-version: '1.25'
1919
cache: false
2020
- name: golangci-lint
21-
uses: golangci/golangci-lint-action@v6
21+
uses: golangci/golangci-lint-action@v8
2222
with:
23-
version: v1.64.6
23+
version: v2.4.0
2424
args: --timeout=5m
2525
test:
2626
name: Test
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install Go
3333
uses: actions/setup-go@v5
3434
with:
35-
go-version: 1.24.x
35+
go-version: 1.25.x
3636
- name: Golang tests
3737
env:
3838
GO111MODULE: on

.golangci.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,43 @@
1+
version: "2"
12
linters:
23
enable:
4+
- containedctx
5+
- copyloopvar
36
- goconst
47
- gocritic
5-
- gofmt
6-
- govet
7-
- prealloc
8-
- unconvert
9-
- unused
10-
- errcheck
11-
- ineffassign
12-
- containedctx
13-
- usetesting
14-
- musttag
8+
- gosec
9+
- makezero
1510
- mirror
16-
- tagalign
17-
- zerologlint
18-
- copyloopvar
1911
- misspell
12+
- musttag
2013
- noctx
2114
- prealloc
2215
- protogetter
23-
- makezero
16+
- tagalign
17+
- unconvert
18+
- usetesting
19+
- zerologlint
20+
settings:
21+
gosec:
22+
excludes:
23+
- G115
24+
exclusions:
25+
generated: lax
26+
presets:
27+
- comments
28+
- common-false-positives
29+
- legacy
30+
- std-error-handling
31+
paths:
32+
- third_party$
33+
- builtin$
34+
- examples$
35+
formatters:
36+
enable:
37+
- gofmt
38+
exclusions:
39+
generated: lax
40+
paths:
41+
- third_party$
42+
- builtin$
43+
- examples$

build/api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ---------------------------------------------------------------------
22
# The first stage container, for building the application
33
# ---------------------------------------------------------------------
4-
FROM golang:1.24.1-alpine as builder
4+
FROM golang:1.25.1-alpine AS builder
55

66
ENV CGO_ENABLED=0
77
ENV GO111MODULE=on

build/celestials/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ---------------------------------------------------------------------
22
# The first stage container, for building the application
33
# ---------------------------------------------------------------------
4-
FROM golang:1.24.1-alpine as builder
4+
FROM golang:1.25.1-alpine AS builder
55

66
ENV CGO_ENABLED=0
77
ENV GO111MODULE=on

build/indexer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ---------------------------------------------------------------------
22
# The first stage container, for building the application
33
# ---------------------------------------------------------------------
4-
FROM golang:1.24.1-alpine as builder
4+
FROM golang:1.25.1-alpine AS builder
55

66
ENV CGO_ENABLED=0
77
ENV GO111MODULE=on

build/private_api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ---------------------------------------------------------------------
22
# The first stage container, for building the application
33
# ---------------------------------------------------------------------
4-
FROM golang:1.24.1-alpine as builder
4+
FROM golang:1.25.1-alpine AS builder
55

66
ENV CGO_ENABLED=0
77
ENV GO111MODULE=on

cmd/api/cache/response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (r *ResponseRecorder) copyHeaders() {
4242
}
4343

4444
r.headerCopied = true
45-
copyHeaders(r.ResponseWriter.Header(), r.headers)
45+
copyHeaders(r.Header(), r.headers)
4646
}
4747

4848
func (w *ResponseRecorder) WriteHeader(statusCode int) {

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module github.com/celenium-io/astria-indexer
22

3-
go 1.24.1
3+
go 1.25.1
44

55
require (
6-
buf.build/gen/go/astria/primitives/protocolbuffers/go v1.36.6-20250410153152-4e41f6ebb18a.1
7-
buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.36.6-20250418224031-4bdba75ef449.1
6+
buf.build/gen/go/astria/primitives/protocolbuffers/go v1.36.9-00000000000000-67f8c2acb424.1
7+
buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.36.9-00000000000000-ccc62afb8fe0.1
88
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.36.6-20250418224031-3bbc472dfc9b.1
9-
buf.build/gen/go/astria/vendored/protocolbuffers/go v1.36.6-20250418162348-cb98d7f0591d.1
9+
buf.build/gen/go/astria/vendored/protocolbuffers/go v1.36.9-00000000000000-0be0456e5dbf.1
1010
cosmossdk.io/errors v1.0.1
1111
github.com/celenium-io/celestial-module v0.0.7
1212
github.com/cometbft/cometbft v0.38.17
@@ -44,7 +44,7 @@ require (
4444
go.uber.org/fx v1.22.0
4545
go.uber.org/mock v0.5.0
4646
golang.org/x/time v0.10.0
47-
google.golang.org/protobuf v1.36.6
47+
google.golang.org/protobuf v1.36.9
4848
)
4949

5050
require (

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
buf.build/gen/go/astria/primitives/protocolbuffers/go v1.36.6-20250410153152-4e41f6ebb18a.1 h1:LN3MNru1VwNVZFkWf+WTphdlIUznD4eFXg8F3b4U/5A=
2-
buf.build/gen/go/astria/primitives/protocolbuffers/go v1.36.6-20250410153152-4e41f6ebb18a.1/go.mod h1:wMIS5d6G3o0qmGC5WWOVXByfPSgeSqzZ/oMKG8zLw1g=
3-
buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.36.6-20250418224031-4bdba75ef449.1 h1:J5YzAGKHLC4iirGRCxhc//4Do51rvk0hu30XfaiMIQs=
4-
buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.36.6-20250418224031-4bdba75ef449.1/go.mod h1:k+ilL78c+6nrmvRtxtUhG2CtNgYooPXkw+vD+ohBB8g=
1+
buf.build/gen/go/astria/primitives/protocolbuffers/go v1.36.9-00000000000000-67f8c2acb424.1 h1:/n9ClSADVG0hhffq1RomR9zfu+FLlpaKdKkwSBmJj2w=
2+
buf.build/gen/go/astria/primitives/protocolbuffers/go v1.36.9-00000000000000-67f8c2acb424.1/go.mod h1:v5+PFgMRs4R8/lqWDSStO8DFI95WRrAUhekcQSu/9/g=
3+
buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.36.9-00000000000000-ccc62afb8fe0.1 h1:OUxsA6FdCaW4uN51LiWzDDLxigOOE7TqHgvHDIEJVCo=
4+
buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.36.9-00000000000000-ccc62afb8fe0.1/go.mod h1:12QD/s/Uc9b/KHqMlZIF93FXHJ4+hkbpc9uDcOhk4Pg=
55
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.36.6-20250418224031-3bbc472dfc9b.1 h1:DUCaakbu8ZKA+n2rFh4ODtsT5KIHmhvZh5T+D0B/EnU=
66
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.36.6-20250418224031-3bbc472dfc9b.1/go.mod h1:OBNFm9dHNbLy8bzZt8or7romdG69nsL5xGqkHiUW3wc=
7-
buf.build/gen/go/astria/vendored/protocolbuffers/go v1.36.6-20250418162348-cb98d7f0591d.1 h1:eAG41GXW4p7UGvua67YgkuPs+Heb864Ey65pBYl8sLk=
8-
buf.build/gen/go/astria/vendored/protocolbuffers/go v1.36.6-20250418162348-cb98d7f0591d.1/go.mod h1:jVLJ4hKiYBPwf+gayj5gHwKAT7r4jjTj5TWzG5+/cfs=
7+
buf.build/gen/go/astria/vendored/protocolbuffers/go v1.36.9-00000000000000-0be0456e5dbf.1 h1:Z4Dr3kRiQ+lzYmnYQc29gbRiEec4bCdOKDIPzbDdJUw=
8+
buf.build/gen/go/astria/vendored/protocolbuffers/go v1.36.9-00000000000000-0be0456e5dbf.1/go.mod h1:Eu0eTqI9hIvtiwYK+f/73DEbvpXAiWdJOb75C/BYuMg=
99
cel.dev/expr v0.19.0 h1:lXuo+nDhpyJSpWxpPVi5cPUwzKb+dsdOiw6IreM5yt0=
1010
cel.dev/expr v0.19.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
1111
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
@@ -2493,8 +2493,8 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
24932493
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
24942494
google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
24952495
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
2496-
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
2497-
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
2496+
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
2497+
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
24982498
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
24992499
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
25002500
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

internal/storage/bridge.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package storage
55

66
import (
77
"context"
8+
89
pkgTypes "github.com/celenium-io/astria-indexer/pkg/types"
910
"github.com/dipdup-net/indexer-sdk/pkg/storage"
1011
"github.com/uptrace/bun"
@@ -24,14 +25,15 @@ type IBridge interface {
2425
type Bridge struct {
2526
bun.BaseModel `bun:"table:bridge" comment:"Table with bridges"`
2627

27-
Id uint64 `bun:"id,pk,notnull,autoincrement" comment:"Unique internal identity"`
28-
RollupId uint64 `bun:"rollup_id" comment:"Rollup id"`
29-
AddressId uint64 `bun:"address_id,unique:bridge_address_id" comment:"Address id"`
30-
Asset string `bun:"asset" comment:"Asset"`
31-
FeeAsset string `bun:"fee_asset" comment:"Fee asset"`
32-
SudoId uint64 `bun:"sudo_id" comment:"Address which is authorized to change the bridge"`
33-
WithdrawerId uint64 `bun:"withdrawer_id" comment:"Address which is used to make withdrawals from the bridge account"`
34-
InitHeight pkgTypes.Level `bun:"init_height" comment:"Height when bridge was initialized"`
28+
Id uint64 `bun:"id,pk,notnull,autoincrement" comment:"Unique internal identity"`
29+
RollupId uint64 `bun:"rollup_id" comment:"Rollup id"`
30+
AddressId uint64 `bun:"address_id,unique:bridge_address_id" comment:"Address id"`
31+
Asset string `bun:"asset" comment:"Asset"`
32+
FeeAsset string `bun:"fee_asset" comment:"Fee asset"`
33+
SudoId uint64 `bun:"sudo_id" comment:"Address which is authorized to change the bridge"`
34+
WithdrawerId uint64 `bun:"withdrawer_id" comment:"Address which is used to make withdrawals from the bridge account"`
35+
InitHeight pkgTypes.Level `bun:"init_height" comment:"Height when bridge was initialized"`
36+
DisableDeposits bool `bun:"disable_deposits" comment:"Disable deposits to the bridge account"`
3537

3638
Rollup *Rollup `bun:"rel:has-one,join:rollup_id=id"`
3739
Address *Address `bun:"rel:has-one,join:address_id=id"`

0 commit comments

Comments
 (0)