watcher-ts/README.md

57 lines
2.4 KiB
Markdown
Raw Normal View History

# watcher-ts
2021-05-11 11:08:30 +00:00
2022-12-21 13:07:42 +00:00
![Cute Panopticon](./docs/watchers-graphic.png)
2021-05-11 11:08:30 +00:00
Watchers make managing data in Dapp development as frictionless as possible. They do this by querying, transforming, and caching Ethereum state data cheaper and faster compared to existing solutions. This data also comes with evidence for generating cryptographic proofs to provide verification that the data is authentic.
2021-05-13 10:19:15 +00:00
Go [here](https://github.com/cerc-io/stack-orchestrator/tree/main/app/data/stacks/erc20) for a quick start demo of setting up the stack and deploying/using the erc20 watcher via the Laconic Stack Orchestrator.
2021-05-11 11:08:30 +00:00
2022-12-21 13:07:42 +00:00
## Prerequisites
2022-12-21 13:07:42 +00:00
### User Mode
2022-12-21 13:07:42 +00:00
- `laconic-so` [Install](https://github.com/cerc-io/stack-orchestrator#setup)
2022-12-21 13:07:42 +00:00
The Laconic Stack Orchestrator provides all the tools to quickly get started with watchers.
### Developer Mode
- `yarn` [Install](https://yarnpkg.com/getting-started/install)
- `postgres` [Install](https://www.postgresql.org/download/)
2023-01-16 12:45:39 +00:00
You'll need the above if you plan on digging into this repo, writing your own watchers, or experimenting with watchers not currently supported by Stack Orchestrator. See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for more information.
## Services
2022-12-21 13:07:42 +00:00
The default configuration files used by watchers assume the following services are setup and running on localhost:
2021-06-04 09:49:30 +00:00
2022-12-21 13:07:42 +00:00
* [cerc-io/go-ethereum](https://github.com/cerc-io/go-ethereum/tree/v1.10.25-statediff-v4) on port 8545
* [cerc-io/ipld-eth-server](https://github.com/cerc-io/ipld-eth-server) with native GQL API enabled, on port 8082
* [cerc-io/ipld-eth-db](https://github.com/cerc-io/ipld-eth-db) to populate the postgres database for `ipld-eth-server`
2021-06-04 09:49:30 +00:00
These services are dockerized by the Laconic Stack Orchestrator (`laconic-so`). [Use it](https://github.com/cerc-io/stack-orchestrator) unless you plan on digging into those codebases. For more information on setting up these services up by hand, see [here](/docs/README.md)
2022-12-21 13:07:42 +00:00
## Setup
From the root of this repository, run:
`yarn && yarn build`
to download dependencies.
Orient yourself with the available CLI commands [here](docs/cli.md) and in some cases, watchers have in-depth demos (e.g. [mobymask](https://github.com/cerc-io/mobymask-watcher-ts))
2022-12-21 13:07:42 +00:00
[//]: # (TODO: ## Generating Watchers)
2023-01-10 15:02:05 +00:00
2022-12-21 13:07:42 +00:00
## Tests
* [graph-node](./packages/graph-node/README.md)
2023-01-10 15:02:05 +00:00
2022-12-21 13:07:42 +00:00
## Further Reading
2023-01-10 15:02:05 +00:00
2022-12-21 13:07:42 +00:00
[//]: # (TODO: link to docs.laconic.com when ready)
2023-01-10 15:02:05 +00:00
2022-12-21 13:07:42 +00:00
- [Watchers Blog Post](https://www.laconic.com/blog/laconic-watchers)