watcher-ts/packages/address-watcher
Ashwin Phatak a7ec3d8da8
Add APGL license and copyright notices (#212)
* Add license & copyright declarations for add-watcher.

* Add copyright declarations for cache.

* Add copyright declarations for erc20-watcher.

* Add copyright declarations for ipld-eth-client.

* Add copyright declarations for tracing-client.

* Add copyright declarations for uni-watcher.

* Add copyright declarations for solidity-mapper.

* Add copyright declarations for uni-info-watcher.

* Add copyright declarations for util.

* Add copyright declarations for lighthouse-watcher.

* Change license identifier in .sol files.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-12 15:28:13 +05:30
..
environments uni-watcher smoke test (#172) 2021-07-30 19:50:56 +05:30
src Add APGL license and copyright notices (#212) 2021-08-12 15:28:13 +05:30
.eslintignore Address watcher package scaffolding (#75) 2021-06-17 17:56:38 +05:30
.eslintrc.json Address watcher package scaffolding (#75) 2021-06-17 17:56:38 +05:30
.gitignore Address watcher package scaffolding (#75) 2021-06-17 17:56:38 +05:30
package.json Add APGL license and copyright notices (#212) 2021-08-12 15:28:13 +05:30
README.md Update docs. (#142) 2021-07-16 16:35:49 +05:30
tsconfig.json Indexing to get traces given address (#79) 2021-06-21 15:38:36 +05:30

Address Watcher

Setup

Create a postgres12 database for the job queue:

sudo su - postgres
createdb address-watcher-job-queue

Enable the pgcrypto extension on the job queue database (https://github.com/timgit/pg-boss/blob/master/docs/usage.md#intro).

Example:

postgres@tesla:~$ psql -U postgres -h localhost address-watcher-job-queue
Password for user postgres:
psql (12.7 (Ubuntu 12.7-1.pgdg18.04+1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

address-watcher-job-queue=# CREATE EXTENSION pgcrypto;
CREATE EXTENSION
address-watcher-job-queue=# exit

Create a postgres12 database for the address watcher:

sudo su - postgres
createdb address-watcher

Update environments/local.toml with database connection settings for both the databases.

Update the upstream config in environments/local.toml and provide the ipld-eth-server GQL API, the indexer-db postgraphile and the tracing API (debug_traceTransaction RPC provider) endpoints.

Run

Run the following scripts in different terminals.

GQL server:

yarn server

Job runner for processing the tracing requests queue:

yarn job-runner

To fill a block range:

yarn fill --startBlock 1 --endBlock 1000