You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document describes the process of contributing to this project. It is
4
+
intended for anyone considering opening an issue or pull request.
5
+
6
+
## AI Assistance
7
+
8
+
> [!IMPORTANT]
9
+
>
10
+
> If you are using **any kind of AI assistance** to contribute to this project,
11
+
> it must be disclosed in the pull request.
12
+
13
+
If you are using any kind of AI assistance while contributing to this project,
14
+
**this must be disclosed in the pull request**, along with the extent to which
15
+
AI assistance was used. Trivial tab-completion doesn't need to be disclosed, as
16
+
long as it is limited to single keywords or short phrases.
17
+
18
+
An example disclosure:
19
+
20
+
> This PR was written primarily by Claude Code.
21
+
22
+
Or a more detailed disclosure:
23
+
24
+
> I consulted ChatGPT to understand the codebase but the solution was fully
25
+
> authored manually by myself.
26
+
27
+
## Quick start
28
+
29
+
If you'd like to contribute, report a bug, suggest a feature or you've
30
+
implemented a feature you should open an issue or pull request.
31
+
32
+
Any contribution to the project is expected to contain code that is formatted,
33
+
linted and that the existing tests still pass. Adding unit tests for new code is
34
+
also welcome.
35
+
36
+
## Dev environment
37
+
38
+
The indexer is implemented using Go - it is recommended to use version 1.24 or later. An RPC connection URL and a MySQL database are required in order to run the main indexer. Configuration should be provided via a `config.toml` file - you can copy
39
+
`config.example.toml` and modify to connect to your specific RPC provider and database instance as well as set other
40
+
parameters.
41
+
42
+
## Linting and formatting
43
+
44
+
`golangci-lint` is used for linting - install instructions may be found
45
+
\[[here](https://golangci-lint.run/docs/welcome/install/#local-installation)\]. Once installed you can run with:
46
+
47
+
```
48
+
$ golangci-lint run
49
+
```
50
+
51
+
For formatting use the standard `go fmt` command:
52
+
53
+
```
54
+
$ go fmt ./...
55
+
```
56
+
57
+
It is recommended to set up your editor to run both of these automatically.
58
+
59
+
## Testing
60
+
61
+
Run the tests with:
62
+
63
+
```
64
+
$ go test ./...
65
+
```
66
+
67
+
Note that the `main_test.go` is an integration test which requires an RPC connection and MySQL database -
68
+
you can edit the test config file at `testing/config_test.toml`. Environment variable overrides are also
69
+
supported for convenience.
70
+
71
+
## Release process (if applicable)
72
+
73
+
Releases are made by creating a tag. The CHANGELOG.md should also be updated with the release details.
0 commit comments