diff --git a/packages/bayc-watcher/README.md b/packages/bayc-watcher/README.md index f62e7551..3a98e04d 100644 --- a/packages/bayc-watcher/README.md +++ b/packages/bayc-watcher/README.md @@ -1,4 +1,4 @@ -# output +# bayc-watcher ## Setup @@ -12,7 +12,7 @@ ```bash sudo su - postgres - createdb output + createdb bayc-watcher ``` * If the watcher is an `active` watcher: @@ -20,19 +20,19 @@ Create database for the job queue and enable the `pgcrypto` extension on them (https://github.com/timgit/pg-boss/blob/master/docs/usage.md#intro): ``` - createdb output-job-queue + createdb bayc-watcher-job-queue ``` ``` - postgres@tesla:~$ psql -U postgres -h localhost output-job-queue + postgres@tesla:~$ psql -U postgres -h localhost bayc-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. - output-job-queue=# CREATE EXTENSION pgcrypto; + bayc-watcher-job-queue=# CREATE EXTENSION pgcrypto; CREATE EXTENSION - output-job-queue=# exit + bayc-watcher-job-queue=# exit ``` * In the [config file](./environments/local.toml): diff --git a/packages/bayc-watcher/environments/local.toml b/packages/bayc-watcher/environments/local.toml index 925a1eeb..3d82521a 100644 --- a/packages/bayc-watcher/environments/local.toml +++ b/packages/bayc-watcher/environments/local.toml @@ -30,7 +30,7 @@ type = "postgres" host = "localhost" port = 5432 - database = "output" + database = "bayc-watcher" username = "postgres" password = "postgres" synchronize = true @@ -47,7 +47,7 @@ deleteOnStart = false [jobQueue] - dbConnectionString = "postgres://postgres:postgres@localhost/output-job-queue" + dbConnectionString = "postgres://postgres:postgres@localhost/bayc-watcher-job-queue" maxCompletionLagInSecs = 300 jobDelayInMilliSecs = 100 eventsInBatch = 50 diff --git a/packages/bayc-watcher/package.json b/packages/bayc-watcher/package.json index 87fa1227..3415c821 100644 --- a/packages/bayc-watcher/package.json +++ b/packages/bayc-watcher/package.json @@ -1,7 +1,7 @@ { - "name": "@cerc-io/output", + "name": "@cerc-io/bayc-watcher", "version": "0.1.0", - "description": "output", + "description": "bayc-watcher", "private": true, "main": "dist/index.js", "scripts": { diff --git a/packages/bayc-watcher/src/cli/checkpoint-cmds/create.ts b/packages/bayc-watcher/src/cli/checkpoint-cmds/create.ts index 59778814..0995e26d 100644 --- a/packages/bayc-watcher/src/cli/checkpoint-cmds/create.ts +++ b/packages/bayc-watcher/src/cli/checkpoint-cmds/create.ts @@ -36,7 +36,6 @@ export const handler = async (argv: any): Promise => { const db = new Database(config.database); await db.init(); - const jobQueueConfig = config.jobQueue; assert(jobQueueConfig, 'Missing job queue config'); diff --git a/packages/bayc-watcher/src/indexer.ts b/packages/bayc-watcher/src/indexer.ts index d389019e..9a49d0ac 100644 --- a/packages/bayc-watcher/src/indexer.ts +++ b/packages/bayc-watcher/src/indexer.ts @@ -56,7 +56,7 @@ import { Owner } from './entity/Owner'; const log = debug('vulcanize:indexer'); const JSONbigNative = JSONbig({ useNativeBigInt: true }); -const KIND_BOREDAPEYACHTCLUB = 'Empty'; +const KIND_BOREDAPEYACHTCLUB = 'BAYC'; export class Indexer implements IndexerInterface { _db: Database @@ -93,7 +93,6 @@ export class Indexer implements IndexerInterface { assert(BoredApeYachtClubStorageLayout); this._storageLayoutMap.set(KIND_BOREDAPEYACHTCLUB, BoredApeYachtClubStorageLayout); this._contractMap.set(KIND_BOREDAPEYACHTCLUB, new ethers.utils.Interface(BoredApeYachtClubABI)); - } get serverConfig (): ServerConfig { @@ -801,12 +800,11 @@ export class Indexer implements IndexerInterface { TokenOfOwnerByIndex, TokenByIndex, BaseURI, - Owner, + Owner ]; await this._baseIndexer.resetWatcherToBlock(blockNumber, entities); } - async _saveBlockAndFetchEvents ({ cid: blockCid, blockHash, diff --git a/packages/bayc-watcher/src/resolvers.ts b/packages/bayc-watcher/src/resolvers.ts index ff48d1d4..aaa867d3 100644 --- a/packages/bayc-watcher/src/resolvers.ts +++ b/packages/bayc-watcher/src/resolvers.ts @@ -13,7 +13,6 @@ import { ValueResult, BlockHeight, gqlTotalQueryCount, gqlQueryCount, jsonBigInt import { Indexer } from './indexer'; import { EventWatcher } from './events'; - const log = debug('vulcanize:resolver'); export const createResolvers = async (indexer: Indexer, eventWatcher: EventWatcher): Promise => { diff --git a/packages/bayc-watcher/src/types.ts b/packages/bayc-watcher/src/types.ts index 6da3055d..c4562172 100644 --- a/packages/bayc-watcher/src/types.ts +++ b/packages/bayc-watcher/src/types.ts @@ -1,4 +1,3 @@ // // Copyright 2021 Vulcanize, Inc. // -