Fork of watcher-ts repo that will act as a mirror.
Go to file
2022-11-28 19:10:36 +05:30
.github/workflows Npm gitea publish (#200) 2022-10-13 15:12:24 -04:00
.husky Add husky for setting lint in commit hook. (#248) 2021-09-20 16:25:54 +05:30
packages Upgrade package versions to 0.2.17 (#269) 2022-11-28 19:10:36 +05:30
.dockerignore docker image and Github Actions to build image 2021-07-23 15:42:50 +03:00
.gitignore Npm gitea publish (#200) 2022-10-13 15:12:24 -04:00
.npmrc Deploy example contract in graph-node (#113) 2022-04-29 15:11:40 +05:30
Dockerfile Deploy example contract in graph-node (#113) 2022-04-29 15:11:40 +05:30
lerna.json Upgrade package versions to 0.2.17 (#269) 2022-11-28 19:10:36 +05:30
LICENSE Add APGL license and copyright notices (#212) 2021-08-12 15:28:13 +05:30
Makefile Change package name prefixes to cerc-io (#177) 2022-09-09 17:13:01 +05:30
package.json Gracefully shutdown server (#265) 2022-11-28 12:01:28 +05:30
README.md Add a demo for erc20-watcher (#268) 2022-11-28 18:54:09 +05:30
yarn.lock Add isPruned flag to erc721-watcher custom transferCount entity (#266) 2022-11-28 14:14:02 +05:30

watcher-ts

Setup

There are packages used from github so we need to follow the following steps to install them:

  1. Create a github PAT (personal access token) if it does not already exist.

    https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-token

  2. Configure the PAT with scopes mentioned in https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries. This is required to install or publish github packages.

  3. Follow the steps in https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token to authenticate to github packages. We can also run the follwing to authenticate by logging in to npm.

    $ npm login --scope=@cerc-io --registry=https://npm.pkg.github.com
    
    > Username: USERNAME
    > Password: TOKEN
    > Email: PUBLIC-EMAIL-ADDRESS
    

    Replace with the following:

    • USERNAME: GitHub username
    • TOKEN: Personal access token (configured above)
    • PUBLIC-EMAIL-ADDRESS: Email address
  4. When authenticating to github packages for the first time, yarn install may throw Unauthorized error. To overcome this we need to run yarn install in packages/graph-node directory. After this yarn install for watcher-ts works properly even from root of the repo.

This project uses yarn workspaces.

Install packages (Node.JS v16.13.1):

yarn

Build packages:

yarn build

Tests

Services

The default config files used by the watchers assume the following services are setup and running on localhost:

  • vulcanize/go-ethereum on port 8545
  • vulcanize/ipld-eth-server with native GQL API enabled, on port 8082

Note

  • In vulcanize/ipld-eth-server, add the following statement to [ethereum] section in environments/config.toml:

    chainConfig = "./chain.json" # ETH_CHAIN_CONFIG

Watchers