mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-08 00:44:06 +00:00
Fix linter warnings and dependencies (#264)
* Fix minor linting errors * Fix CLI getters linting errors * Fix resolvers template in codegen * Fix dependencies
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
"@graphql-tools/load-files": "^6.5.2",
|
||||
"@poanet/solidity-flattener": "https://github.com/vulcanize/solidity-flattener.git",
|
||||
"@solidity-parser/parser": "^0.13.2",
|
||||
"ethers": "^5.4.4",
|
||||
"gql-generator": "https://github.com/vulcanize/gql-generator.git",
|
||||
"graphql": "^15.5.0",
|
||||
"graphql-compose": "^9.0.3",
|
||||
@@ -36,7 +37,6 @@
|
||||
"yargs": "^17.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openzeppelin/contracts": "^4.3.2",
|
||||
"@types/js-yaml": "^4.0.3",
|
||||
"@types/node": "^16.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.25.0",
|
||||
|
||||
@@ -33,10 +33,10 @@ export const handler = async (argv: any): Promise<void> => {
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher } = await getGraphDbAndWatcher(
|
||||
createCheckpointCmd.config!.server,
|
||||
createCheckpointCmd.clients!.ethClient,
|
||||
createCheckpointCmd.ethProvider!,
|
||||
createCheckpointCmd.database!.baseDatabase,
|
||||
createCheckpointCmd.config.server,
|
||||
createCheckpointCmd.clients.ethClient,
|
||||
createCheckpointCmd.ethProvider,
|
||||
createCheckpointCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -26,10 +26,10 @@ export const handler = async (argv: any): Promise<void> => {
|
||||
await verifyCheckpointCmd.init(argv, Database);
|
||||
|
||||
const { graphWatcher, graphDb } = await getGraphDbAndWatcher(
|
||||
verifyCheckpointCmd.config!.server,
|
||||
verifyCheckpointCmd.clients!.ethClient,
|
||||
verifyCheckpointCmd.ethProvider!,
|
||||
verifyCheckpointCmd.database!.baseDatabase,
|
||||
verifyCheckpointCmd.config.server,
|
||||
verifyCheckpointCmd.clients.ethClient,
|
||||
verifyCheckpointCmd.ethProvider,
|
||||
verifyCheckpointCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -37,10 +37,8 @@ export const SUBGRAPH_ENTITIES = new Set([
|
||||
{{~/each}}]);
|
||||
{{/if}}
|
||||
export const ENTITIES = [
|
||||
{{~#if (subgraphPath)}}...SUBGRAPH_ENTITIES, {{/if}}
|
||||
{{~#each queries as | query |}}{{query.entityName}}
|
||||
{{~#unless @last}}, {{/unless}}
|
||||
{{~/each}}];
|
||||
{{~#each queries as | query |}}{{query.entityName}}, {{/each}}
|
||||
{{~#if (subgraphPath)}}...SUBGRAPH_ENTITIES{{/if}}];
|
||||
{{#if (subgraphPath)}}
|
||||
// Map: Entity to suitable query type.
|
||||
export const ENTITY_QUERY_TYPE_MAP = new Map<new() => any, ENTITY_QUERY_TYPE>([]);
|
||||
|
||||
@@ -21,10 +21,10 @@ const main = async (): Promise<void> => {
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher } = await getGraphDbAndWatcher(
|
||||
exportStateCmd.config!.server,
|
||||
exportStateCmd.clients!.ethClient,
|
||||
exportStateCmd.ethProvider!,
|
||||
exportStateCmd.database!.baseDatabase,
|
||||
exportStateCmd.config.server,
|
||||
exportStateCmd.clients.ethClient,
|
||||
exportStateCmd.ethProvider,
|
||||
exportStateCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -22,10 +22,10 @@ export const main = async (): Promise<any> => {
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher } = await getGraphDbAndWatcher(
|
||||
fillCmd.config!.server,
|
||||
fillCmd.clients!.ethClient,
|
||||
fillCmd.ethProvider!,
|
||||
fillCmd.database!.baseDatabase,
|
||||
fillCmd.config.server,
|
||||
fillCmd.clients.ethClient,
|
||||
fillCmd.ethProvider,
|
||||
fillCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -22,10 +22,10 @@ export const main = async (): Promise<any> => {
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher, graphDb } = await getGraphDbAndWatcher(
|
||||
importStateCmd.config!.server,
|
||||
importStateCmd.clients!.ethClient,
|
||||
importStateCmd.ethProvider!,
|
||||
importStateCmd.database!.baseDatabase,
|
||||
importStateCmd.config.server,
|
||||
importStateCmd.clients.ethClient,
|
||||
importStateCmd.ethProvider,
|
||||
importStateCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -21,10 +21,10 @@ const main = async (): Promise<void> => {
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher } = await getGraphDbAndWatcher(
|
||||
indexBlockCmd.config!.server,
|
||||
indexBlockCmd.clients!.ethClient,
|
||||
indexBlockCmd.ethProvider!,
|
||||
indexBlockCmd.database!.baseDatabase,
|
||||
indexBlockCmd.config.server,
|
||||
indexBlockCmd.clients.ethClient,
|
||||
indexBlockCmd.ethProvider,
|
||||
indexBlockCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -21,10 +21,10 @@ const main = async (): Promise<void> => {
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher } = await getGraphDbAndWatcher(
|
||||
inspectCIDCmd.config!.server,
|
||||
inspectCIDCmd.clients!.ethClient,
|
||||
inspectCIDCmd.ethProvider!,
|
||||
inspectCIDCmd.database!.baseDatabase,
|
||||
inspectCIDCmd.config.server,
|
||||
inspectCIDCmd.clients.ethClient,
|
||||
inspectCIDCmd.ethProvider,
|
||||
inspectCIDCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -21,10 +21,10 @@ export const main = async (): Promise<any> => {
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher } = await getGraphDbAndWatcher(
|
||||
jobRunnerCmd.config!.server,
|
||||
jobRunnerCmd.clients!.ethClient,
|
||||
jobRunnerCmd.ethProvider!,
|
||||
jobRunnerCmd.database!.baseDatabase,
|
||||
jobRunnerCmd.config.server,
|
||||
jobRunnerCmd.clients.ethClient,
|
||||
jobRunnerCmd.ethProvider,
|
||||
jobRunnerCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.3.19",
|
||||
"@ethersproject/providers": "^5.4.4",
|
||||
"@ipld/dag-cbor": "^6.0.12",
|
||||
"@cerc-io/cli": "^0.2.15",
|
||||
"@cerc-io/ipld-eth-client": "^0.2.15",
|
||||
"@cerc-io/solidity-mapper": "^0.2.15",
|
||||
@@ -52,7 +51,6 @@
|
||||
"apollo-type-bigint": "^0.1.3",
|
||||
"debug": "^4.3.1",
|
||||
"ethers": "^5.4.4",
|
||||
"express": "^4.18.2",
|
||||
"graphql": "^15.5.0",
|
||||
"json-bigint": "^1.0.0",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
@@ -62,7 +60,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ethersproject/abi": "^5.3.0",
|
||||
"@types/express": "^4.17.14",
|
||||
"@types/yargs": "^17.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.25.0",
|
||||
"@typescript-eslint/parser": "^4.25.0",
|
||||
|
||||
@@ -25,11 +25,11 @@ export const handler = async (argv: any): Promise<void> => {
|
||||
await resetWatcherCmd.init(argv, Database);
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher, graphDb } = await getGraphDbAndWatcher(
|
||||
resetWatcherCmd.config!.server,
|
||||
resetWatcherCmd.clients!.ethClient,
|
||||
resetWatcherCmd.ethProvider!,
|
||||
resetWatcherCmd.database!.baseDatabase,
|
||||
const { graphWatcher } = await getGraphDbAndWatcher(
|
||||
resetWatcherCmd.config.server,
|
||||
resetWatcherCmd.clients.ethClient,
|
||||
resetWatcherCmd.ethProvider,
|
||||
resetWatcherCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -21,7 +21,6 @@ import {
|
||||
} from '@cerc-io/util';
|
||||
|
||||
import { Indexer } from './indexer';
|
||||
import { EventWatcher } from './events';
|
||||
{{#if (subgraphPath)}}
|
||||
|
||||
{{#each subgraphQueries as | query |}}
|
||||
|
||||
@@ -24,10 +24,10 @@ export const main = async (): Promise<any> => {
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher } = await getGraphDbAndWatcher(
|
||||
serverCmd.config!.server,
|
||||
serverCmd.clients!.ethClient,
|
||||
serverCmd.ethProvider!,
|
||||
serverCmd.database!.baseDatabase,
|
||||
serverCmd.config.server,
|
||||
serverCmd.clients.ethClient,
|
||||
serverCmd.ethProvider,
|
||||
serverCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
@@ -21,10 +21,10 @@ const main = async (): Promise<void> => {
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
const { graphWatcher } = await getGraphDbAndWatcher(
|
||||
watchContractCmd.config!.server,
|
||||
watchContractCmd.clients!.ethClient,
|
||||
watchContractCmd.ethProvider!,
|
||||
watchContractCmd.database!.baseDatabase,
|
||||
watchContractCmd.config.server,
|
||||
watchContractCmd.clients.ethClient,
|
||||
watchContractCmd.ethProvider,
|
||||
watchContractCmd.database.baseDatabase,
|
||||
ENTITY_QUERY_TYPE_MAP,
|
||||
ENTITY_TO_LATEST_ENTITY_MAP
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user