generated from sergeyWh1te/go-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee20da6
commit 17178ec
Showing
4 changed files
with
47 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
# Finding-forwarder | ||
Service forwards findings from forta-local-node to telegram, opsGenia and discord | ||
|
||
## How to use the template | ||
1. Clone repository | ||
## How to develop | ||
1. Install go1.22.3+ | ||
2. cd root repository | ||
3. make tools | ||
4. make vendor | ||
5. copy `sample.env` to `.env` | ||
6. docker-compose up -d | ||
7. make build | ||
8. Run service ./bin/service | ||
6. clone https://github.com/lidofinance/alerting-forta/ | ||
1. cd ethereum-steth | ||
2. make steth | ||
7. clone https://github.com/forta-network/forta-node/ | ||
1. cd forta-node | ||
2. make containers | ||
8. Go back to current project then docker-compose up -d | ||
|
||
## Where I have to start to code my custom logic? | ||
* [Register handler](./internal/app/server/routes.go) | ||
* [Logic layer](./internal/pkg/telegram): /internal/pkg/your_package_name/. Just see an example with [User package](./internal/pkg/telegram) | ||
* [Env](./internal/env/env.go) | ||
* [Connecters](./internal/connectors) pg, logger, redis and etc... | ||
* For external clients you have to create folder in ./internal/clients/<your_client_name>/client.go where your_client_name - is google_client, alchemy or internal client for private network. | ||
### I dont need steth-bot. What I have to do? | ||
1. comment service-ethereum-steth in docker-compose file | ||
2. on your local host in your bot repo - ```yarn start``` | ||
3. Also, you have to provide the container name of your bot to FORTA-SOFTWARE by analogy with steth: | ||
1. Container name for steth is **ethereum-steth** look docker-compose file | ||
2. put bot's container name to the file forta-local-config.yml by analogy with steth | ||
3. Consider that in app has programmed consumer for your team bot or use fallback consumer | ||
(provider any name that not included in the list internal/utils/registry/registry.go) | ||
|
||
### I want to develop finding-forwarder server or worker | ||
1. comment forwarder-server or forwarder-worker in docker-compose file | ||
2. provide env variable for application that it could connect to nats in docker | ||
|
||
## Docs and rules | ||
1. [App structure layout](./docs/structure.md) | ||
2. [Code style](./docs/code_style.md) | ||
|
||
## Current drivers or dependencies | ||
|
||
1. Logger - [Logrus](https://github.com/sirupsen/logrus) | ||
2. Mockery [Mockery](https://github.com/vektra/mockery) | ||
3. Http router [go-chi](https://github.com/go-chi/chi) | ||
4. Env reader [Viper](https://github.com/spf13/viper) | ||
2. [Code style](./docs/code_style.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters