Skip to content

Commit 2e72706

Browse files
First commit
1 parent 0bbe6c2 commit 2e72706

30 files changed

+3983
-1
lines changed

.github/workflows/test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
push:
3+
4+
name: Tests
5+
jobs:
6+
golangci:
7+
name: Linter
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
- name: Set up Go
13+
uses: actions/setup-go@v5
14+
with:
15+
go-version: '1.23'
16+
cache: false
17+
- name: golangci-lint
18+
uses: golangci/golangci-lint-action@v6
19+
with:
20+
version: v1.60.3
21+
args: --timeout=5m
22+
23+
test:
24+
name: Test
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Install Go
31+
uses: actions/setup-go@v5
32+
with:
33+
go-version: 1.23.x
34+
35+
- name: Golang tests
36+
env:
37+
GO111MODULE: on
38+
run: |
39+
go mod download
40+
go test -p 8 ./...
41+
42+
- name: Update coverage report
43+
uses: ncruces/[email protected]
44+
with:
45+
report: 'true'
46+
chart: 'true'
47+
amend: 'true'
48+
reuse-go: 'true'
49+
continue-on-error: true

.golangci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
linters:
2+
enable:
3+
- goconst
4+
- gocritic
5+
- gofmt
6+
- govet
7+
- prealloc
8+
- unconvert
9+
- unused
10+
- errcheck
11+
- ineffassign
12+
- containedctx
13+
- tenv
14+
- musttag
15+
- mirror
16+
- tagalign
17+
- zerologlint
18+
- copyloopvar
19+
- gosec
20+
- misspell
21+
- noctx
22+
- prealloc
23+
- protogetter
24+
- makezero
25+
linters-settings:
26+
gosec:
27+
excludes:
28+
- G115

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-include .env
2+
export $(shell sed 's/=.*//' .env)
3+
4+
generate:
5+
go generate -v ./pkg/api ./pkg/module ./pkg/storage
6+
7+
lint:
8+
golangci-lint run
9+
10+
test:
11+
go test -p 8 -timeout 60s ./...
12+
13+
.PHONY: generate lint test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# celestial-module
1+
# Celestial module
22
Package containig Celestials module for indexing its data

go.mod

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
module github.com/celenium-io/celestial-module
2+
3+
go 1.23.2
4+
5+
replace (
6+
github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.25.1-sdk-v0.46.16
7+
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
8+
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
9+
github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v1.43.0-tm-v0.34.35
10+
)
11+
12+
require (
13+
github.com/cosmos/cosmos-sdk v0.46.16
14+
github.com/dipdup-net/go-lib v0.4.7
15+
github.com/dipdup-net/indexer-sdk v0.0.6
16+
github.com/go-testfixtures/testfixtures/v3 v3.14.0
17+
github.com/goccy/go-json v0.10.5
18+
github.com/opus-domini/fast-shot v1.1.4
19+
github.com/pkg/errors v0.9.1
20+
github.com/stretchr/testify v1.10.0
21+
github.com/uptrace/bun v1.1.17
22+
go.uber.org/mock v0.5.0
23+
golang.org/x/time v0.9.0
24+
)
25+
26+
require (
27+
cel.dev/expr v0.16.1 // indirect
28+
cloud.google.com/go v0.116.0 // indirect
29+
cloud.google.com/go/auth v0.9.9 // indirect
30+
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
31+
cloud.google.com/go/compute/metadata v0.5.2 // indirect
32+
cloud.google.com/go/iam v1.2.1 // indirect
33+
cloud.google.com/go/longrunning v0.6.1 // indirect
34+
cloud.google.com/go/monitoring v1.21.1 // indirect
35+
cloud.google.com/go/spanner v1.73.0 // indirect
36+
dario.cat/mergo v1.0.0 // indirect
37+
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
38+
github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0 // indirect
39+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.1 // indirect
40+
github.com/Microsoft/go-winio v0.6.2 // indirect
41+
github.com/Microsoft/hcsshim v0.11.5 // indirect
42+
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
43+
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
44+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
45+
github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 // indirect
46+
github.com/containerd/containerd v1.7.18 // indirect
47+
github.com/containerd/errdefs v0.1.0 // indirect
48+
github.com/containerd/log v0.1.0 // indirect
49+
github.com/cosmos/btcutil v1.0.5 // indirect
50+
github.com/cpuguy83/dockercfg v0.3.1 // indirect
51+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
52+
github.com/dipdup-io/workerpool v0.0.4 // indirect
53+
github.com/distribution/reference v0.6.0 // indirect
54+
github.com/docker/docker v27.1.1+incompatible // indirect
55+
github.com/docker/go-connections v0.5.0 // indirect
56+
github.com/docker/go-units v0.5.0 // indirect
57+
github.com/envoyproxy/go-control-plane v0.13.0 // indirect
58+
github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect
59+
github.com/felixge/httpsnoop v1.0.4 // indirect
60+
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
61+
github.com/go-logr/logr v1.4.2 // indirect
62+
github.com/go-logr/stdr v1.2.2 // indirect
63+
github.com/go-ole/go-ole v1.3.0 // indirect
64+
github.com/go-playground/locales v0.14.1 // indirect
65+
github.com/go-playground/universal-translator v0.18.1 // indirect
66+
github.com/go-playground/validator/v10 v10.18.0 // indirect
67+
github.com/gogo/protobuf v1.3.3 // indirect
68+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
69+
github.com/google/s2a-go v0.1.8 // indirect
70+
github.com/google/uuid v1.6.0 // indirect
71+
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
72+
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
73+
github.com/googleapis/go-sql-spanner v1.7.4 // indirect
74+
github.com/jinzhu/inflection v1.0.0 // indirect
75+
github.com/json-iterator/go v1.1.12 // indirect
76+
github.com/klauspost/compress v1.17.9 // indirect
77+
github.com/leodido/go-urn v1.4.0 // indirect
78+
github.com/lib/pq v1.10.9 // indirect
79+
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
80+
github.com/magiconair/properties v1.8.7 // indirect
81+
github.com/mattn/go-colorable v0.1.14 // indirect
82+
github.com/mattn/go-isatty v0.0.20 // indirect
83+
github.com/moby/docker-image-spec v1.3.1 // indirect
84+
github.com/moby/patternmatcher v0.6.0 // indirect
85+
github.com/moby/sys/sequential v0.5.0 // indirect
86+
github.com/moby/sys/user v0.3.0 // indirect
87+
github.com/moby/term v0.5.0 // indirect
88+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
89+
github.com/modern-go/reflect2 v1.0.2 // indirect
90+
github.com/morikuni/aec v1.0.0 // indirect
91+
github.com/opencontainers/go-digest v1.0.0 // indirect
92+
github.com/opencontainers/image-spec v1.1.0 // indirect
93+
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
94+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
95+
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
96+
github.com/rogpeppe/go-internal v1.12.0 // indirect
97+
github.com/rs/zerolog v1.33.0 // indirect
98+
github.com/shirou/gopsutil/v3 v3.23.12 // indirect
99+
github.com/shoenig/go-m1cpu v0.1.6 // indirect
100+
github.com/sirupsen/logrus v1.9.3 // indirect
101+
github.com/testcontainers/testcontainers-go v0.32.0 // indirect
102+
github.com/testcontainers/testcontainers-go/modules/postgres v0.32.0 // indirect
103+
github.com/tklauser/go-sysconf v0.3.12 // indirect
104+
github.com/tklauser/numcpus v0.6.1 // indirect
105+
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
106+
github.com/uptrace/bun/dialect/pgdialect v1.1.17 // indirect
107+
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
108+
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
109+
github.com/yusufpapurcu/wmi v1.2.3 // indirect
110+
go.opencensus.io v0.24.0 // indirect
111+
go.opentelemetry.io/contrib/detectors/gcp v1.29.0 // indirect
112+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
113+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
114+
go.opentelemetry.io/otel v1.30.0 // indirect
115+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect
116+
go.opentelemetry.io/otel/metric v1.30.0 // indirect
117+
go.opentelemetry.io/otel/sdk v1.30.0 // indirect
118+
go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect
119+
go.opentelemetry.io/otel/trace v1.30.0 // indirect
120+
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
121+
golang.org/x/crypto v0.31.0 // indirect
122+
golang.org/x/net v0.33.0 // indirect
123+
golang.org/x/oauth2 v0.23.0 // indirect
124+
golang.org/x/sync v0.10.0 // indirect
125+
golang.org/x/sys v0.29.0 // indirect
126+
golang.org/x/text v0.21.0 // indirect
127+
google.golang.org/api v0.203.0 // indirect
128+
google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53 // indirect
129+
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
130+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
131+
google.golang.org/grpc v1.68.0 // indirect
132+
google.golang.org/protobuf v1.35.1 // indirect
133+
gopkg.in/yaml.v3 v3.0.1 // indirect
134+
)

0 commit comments

Comments
 (0)