This project uses yarn workspaces.
Install packages (Node.JS v15.11.0):
yarnThe default config files used by the watchers assume the following services are setup and running on localhost:
vulcanize/go-ethereumon port 8545vulcanize/ipld-eth-serverwith native GQL API enabled, on port 8082postgraphileon thevulcanize/ipld-eth-serverdatabase, on port 5000
-
In
vulcanize/ipld-eth-server, add the following statement to[ethereum]section inenvironments/config.toml:chainConfig = "./chain.json" # ETH_CHAIN_CONFIG
Note: Requires postgres12.
Login as the postgres user:
sudo su - postgresCreate the databases for the watchers:
createdb erc20-watcher
createdb address-watcher
createdb uni-watcher
createdb uni-info-watcher
Create the databases for the job queues and enable the pgcrypto extension on them (https://github.com/timgit/pg-boss/blob/master/docs/usage.md#intro):
createdb address-watcher-job-queue
createdb uni-watcher-job-queue
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
postgres@tesla:~$ psql -U postgres -h localhost uni-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.
uni-watcher-job-queue=# CREATE EXTENSION pgcrypto;
CREATE EXTENSION
uni-watcher-job-queue=# exit
Reset the databases used by the watchers:
yarn db:resetTo run any watcher, cd into their package folder and run:
yarn serverIf the watcher uses a job queue, start the job runner in another terminal:
yarn job-runner