Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse cache package from watcher-ts #397

Merged
merged 2 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This project uses [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspac
- 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
Expand All @@ -23,6 +23,7 @@ This project uses [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspac
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 ../..
```
Expand All @@ -34,11 +35,12 @@ This project uses [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspac
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
yarn build

Expand Down
5 changes: 0 additions & 5 deletions packages/cache/.eslintignore

This file was deleted.

27 changes: 0 additions & 27 deletions packages/cache/.eslintrc.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/cache/index.ts

This file was deleted.

43 changes: 0 additions & 43 deletions packages/cache/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/cache/src/cache.test.ts

This file was deleted.

88 changes: 0 additions & 88 deletions packages/cache/src/cache.ts

This file was deleted.

75 changes: 0 additions & 75 deletions packages/cache/tsconfig.json

This file was deleted.

6 changes: 0 additions & 6 deletions packages/cache/types/common/main.d.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/cache/types/common/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/erc20-watcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@apollo/client": "^3.3.19",
"@ethersproject/providers": "5.3.0",
"@types/lodash": "^4.14.168",
"@vulcanize/cache": "^0.1.0",
"@vulcanize/util": "^0.1.0",
"apollo-type-bigint": "^0.1.3",
"debug": "^4.3.1",
Expand All @@ -63,6 +62,7 @@
"@ethersproject/abi": "^5.3.0",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@types/debug": "^4.1.7",
"@types/express": "^4.17.14",
"@types/json-bigint": "^1.0.0",
"@types/yargs": "^17.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/erc20-watcher/src/fill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { PubSub } from 'graphql-subscriptions';

import { DEFAULT_CONFIG_PATH } from '@cerc-io/util';
import { EthClient } from '@cerc-io/ipld-eth-client';
import { getCache } from '@vulcanize/cache';
import { getCache } from '@cerc-io/cache';
import { getConfig, fillBlocks, JobQueue, getCustomProvider, DEFAULT_PREFETCH_BATCH_SIZE } from '@vulcanize/util';

import { Database } from './database';
Expand Down
4 changes: 2 additions & 2 deletions packages/erc20-watcher/src/job-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
QUEUE_EVENT_PROCESSING,
DEFAULT_CONFIG_PATH
} from '@cerc-io/util';
import { getCache } from '@vulcanize/cache';
import { getCache } from '@cerc-io/cache';
import {
getConfig,
JobQueue,
Expand Down Expand Up @@ -77,7 +77,7 @@ export const main = async (): Promise<any> => {

assert(config.server, 'Missing server config');

const { upstream, database: dbConfig, jobQueue: jobQueueConfig, server: { mode } } = config;
const { upstream, database: dbConfig, jobQueue: jobQueueConfig } = config;

assert(dbConfig, 'Missing database config');

Expand Down
2 changes: 1 addition & 1 deletion packages/erc20-watcher/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { hideBin } from 'yargs/helpers';
import debug from 'debug';
import 'graphql-import-node';

import { getCache } from '@vulcanize/cache';
import { getCache } from '@cerc-io/cache';
import {
KIND_ACTIVE,
DEFAULT_CONFIG_PATH,
Expand Down
2 changes: 1 addition & 1 deletion packages/uni-info-watcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"@apollo/client": "^3.3.19",
"@ipld/dag-cbor": "^6.0.12",
"@types/lodash": "^4.14.168",
"@vulcanize/cache": "^0.1.0",
"@vulcanize/erc20-watcher": "^0.1.0",
"@vulcanize/uni-watcher": "^0.1.0",
"@vulcanize/util": "^0.1.0",
Expand Down Expand Up @@ -59,6 +58,7 @@
},
"devDependencies": {
"@types/chance": "^1.1.2",
"@types/debug": "^4.1.7",
"@types/express": "^4.17.14",
"@typescript-eslint/eslint-plugin": "^4.25.0",
"@typescript-eslint/parser": "^4.25.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-info-watcher/src/fill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { hideBin } from 'yargs/helpers';
import debug from 'debug';
import { PubSub } from 'graphql-subscriptions';

import { getCache } from '@vulcanize/cache';
import { getCache } from '@cerc-io/cache';
import { DEFAULT_CONFIG_PATH } from '@cerc-io/util';
import { getConfig, fillBlocks, JobQueue, getCustomProvider, DEFAULT_PREFETCH_BATCH_SIZE } from '@vulcanize/util';
import { Client as UniClient } from '@vulcanize/uni-watcher';
Expand Down Expand Up @@ -75,7 +75,7 @@ export const main = async (): Promise<any> => {

assert(config.server, 'Missing server config');

const { upstream, database: dbConfig, jobQueue: jobQueueConfig, server: { mode } } = config;
const { upstream, database: dbConfig, jobQueue: jobQueueConfig } = config;

assert(dbConfig, 'Missing database config');

Expand Down
2 changes: 1 addition & 1 deletion packages/uni-info-watcher/src/job-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import debug from 'debug';

import { Client as ERC20Client } from '@vulcanize/erc20-watcher';
import { Client as UniClient } from '@vulcanize/uni-watcher';
import { getCache } from '@vulcanize/cache';
import { getCache } from '@cerc-io/cache';
import {
getConfig,
JobQueue,
Expand Down
Loading