Skip to content

Latest commit

 

History

History

scribe

Scribe

Scribe is a service that goes through all chains and contracts specified in a config file and creates a database with logs, receipts, and transactions.

Usage

Run the following command to start the Scribe:

$ go run main.go

Then the Scribe command line will be exposed. You can use the following commands:

# Start the Scribe
$ scribe --config </Full/Path/To/Config.yaml> --db <sqlite or mysql> --path <path/to/database or database url>
# Call a single backfill with the scribe
$ backfill --config </Full/Path/To/Config.yaml> --db <sqlite or mysql> --path <path/to/database or database url>
# Start the Scribe server
$ server --port <port> --db <sqlite or mysql> --path <path/to/database or database url>

Directory Structure

scribe
├── api: Contains the Swagger API definition and GQL Client tests.
├── backfill: Used to fetch logs, receipts, and transactions to store in the database
├── cmd: The command line interface functions for running the Scribe and GraphQL server
├── config: Configuration files for the Scribe
├── db: The database schema and functions for interacting with the database
├── graphql: GraphQL implementation for the Scribe's recorded data
│   ├── client: The client interface for the GraphQL server
│   ├── contrib: The GraphQL generators for the Scribe
│   └── server: The server implementation for GraphQL
│       └── graph: The server's models, resolvers, and schemas
├── grpc: The gRPC client implementation for the Scribe
├── internal: Internal packages for the Scribe
├── node: The new block listener that calls backfill
├── scripts: Scripts for Scribe
└── testutil: Test utilities for the Scribe

Regenerating protobuf definitions:

make generate