Skip to content

Commit

Permalink
Use watcher-ts packages without yarn link and update readme (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikugogoi authored Nov 25, 2022
1 parent 0cc6734 commit b47c371
Show file tree
Hide file tree
Showing 6 changed files with 1,353 additions and 55 deletions.
70 changes: 39 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,6 @@ This project uses [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspac
yarn
```

- Link [@cerc-io/watcher-ts](https://github.com/cerc-io/watcher-ts) packages:

- In `@cerc-io/watcher-ts` repo, build and link the packages to use from uniswap-watcher-ts

```bash
# Build packages
yarn && yarn build

# Link packages
cd packages/util && yarn link && cd ../..
cd packages/cli && yarn link && cd ../..
cd packages/ipld-eth-client && yarn link && cd ../..
cd packages/solidity-mapper && yarn link && cd ../..
cd packages/graph-node && yarn link && cd ../..
cd packages/cache && yarn link && cd ../..
# Workaround for typeorm dependency issue when using yarn link
cd node_modules/typeorm && yarn link && cd ../..
```

- In `uniswap-watcher-ts`:

```bash
yarn link "@cerc-io/util"
yarn link "@cerc-io/cli"
yarn link "@cerc-io/ipld-eth-client"
yarn link "@cerc-io/solidity-mapper"
yarn link "@cerc-io/graph-node"
yarn link "@cerc-io/cache"
yarn link "typeorm"
```

- Build packages:

```bash
Expand All @@ -50,6 +19,45 @@ This project uses [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspac
yarn build:contracts
```

### Development

This repo uses packages from [@cerc-io/watcher-ts](https://github.com/cerc-io/watcher-ts).

For development with changes in watcher-ts, yarn link the packages:

- In `@cerc-io/watcher-ts` repo, build and link the packages to use from uniswap-watcher-ts

```bash
# Build packages
yarn && yarn build

# Link packages
cd packages/util && yarn link && cd ../..
cd packages/cli && yarn link && cd ../..
cd packages/ipld-eth-client && yarn link && cd ../..
cd packages/solidity-mapper && yarn link && cd ../..
cd packages/cache && yarn link && cd ../..
# Workaround for typeorm dependency issue when using yarn link
cd node_modules/typeorm && yarn link && cd ../..
```

- In `uniswap-watcher-ts`:

```bash
yarn link "@cerc-io/util"
yarn link "@cerc-io/cli"
yarn link "@cerc-io/ipld-eth-client"
yarn link "@cerc-io/solidity-mapper"
yarn link "@cerc-io/cache"
yarn link "typeorm"
```

- Build all packages in uniswap-watcher-ts:

```bash
yarn build
```

### Services

The default config files used by the watchers assume the following services are setup and running on localhost:
Expand Down
5 changes: 5 additions & 0 deletions packages/erc20-watcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
"homepage": "https://github.com/vulcanize/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.16",
"@cerc-io/ipld-eth-client": "^0.2.16",
"@cerc-io/solidity-mapper": "^0.2.16",
"@cerc-io/util": "^0.2.16",
"@cerc-io/cache": "^0.2.16",
"@types/lodash": "^4.14.168",
"@vulcanize/util": "^0.1.0",
"apollo-type-bigint": "^0.1.3",
Expand Down
5 changes: 5 additions & 0 deletions packages/uni-info-watcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"private": true,
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.16",
"@cerc-io/ipld-eth-client": "^0.2.16",
"@cerc-io/solidity-mapper": "^0.2.16",
"@cerc-io/util": "^0.2.16",
"@cerc-io/cache": "^0.2.16",
"@ipld/dag-cbor": "^6.0.12",
"@types/lodash": "^4.14.168",
"@vulcanize/erc20-watcher": "^0.1.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/uni-watcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
"homepage": "https://github.com/vulcanize/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.16",
"@cerc-io/ipld-eth-client": "^0.2.16",
"@cerc-io/solidity-mapper": "^0.2.16",
"@cerc-io/util": "^0.2.16",
"@cerc-io/cache": "^0.2.16",
"@types/lodash": "^4.14.168",
"@vulcanize/util": "^0.1.0",
"apollo-type-bigint": "^0.1.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"main": "dist/index.js",
"license": "AGPL-3.0",
"dependencies": {
"@cerc-io/ipld-eth-client": "^0.2.16",
"@cerc-io/util": "^0.2.16",
"csv-writer": "^1.6.0",
"debug": "^4.3.1",
"decimal.js": "^10.3.1",
Expand Down
Loading

0 comments on commit b47c371

Please sign in to comment.