Forta node CLI is a Docker container supervisor that runs and manages multiple services and detection bots (agents) to scan a blockchain network and produce alerts.
For information about running a node, see the Scan Node Quickstart Documentation
- Install Docker and start Docker service
- Install Go
Install Protobuf Compiler.
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
$ go install github.com/golang/mock/mockgen@v1.5.0
$ make install
For a faster iteration in local development, it is sufficient to build the common service container only if it has changed. The CLI requires forta-network/forta-node:latest
containers to be available by default and uses the local ones if other Docker image references were not specified at the compile time.
$ go build -o forta .
Edit Go image version at build stage inside Dockerfile.cli
and then:
$ make main
$ forta init # if you haven't initialized and configured your Forta directory yet
$ forta run
CLI logs are made available via stdout. Logs for the rest of the node services and agents can be inspected by doing:
$ docker ps # see the running containers from here
$ docker logs -f <container_id>
CTRL-C