diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 2878a3d..eb8964b 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,9 +1,9 @@ { - "recommendations": [ - "rvest.vs-code-prettier-eslint", - "dbaeumer.vscode-eslint", - "mquandalle.graphql", - "gruntfuggly.todo-tree", - "redhat.vscode-yaml" - ] -} \ No newline at end of file + "recommendations": [ + "rvest.vs-code-prettier-eslint", + "dbaeumer.vscode-eslint", + "mquandalle.graphql", + "gruntfuggly.todo-tree", + "redhat.vscode-yaml" + ] +} diff --git a/function/tsconfig.json b/function/tsconfig.json index 32ceb0a..692e46f 100644 --- a/function/tsconfig.json +++ b/function/tsconfig.json @@ -1,22 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "dist", - "target": "es2020", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "esModuleInterop": true - }, - "include": [ - "src/**/*.ts", - ], - "exclude": [ - "node_modules", - ] + "compilerOptions": { + "strict": true, + "outDir": "dist", + "target": "es2020", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules"] } diff --git a/index.ts b/index.ts index 2e25f90..1a6aa71 100644 --- a/index.ts +++ b/index.ts @@ -30,13 +30,10 @@ const enabledApisStorage = new gcp.projects.Service("storage", { service: "storage.googleapis.com", }); -const enabledApisArtifactRegistry = new gcp.projects.Service( - "artifact-registry", - { - project: gcp.config.project, - service: "artifactregistry.googleapis.com", - }, -); +const enabledApisArtifactRegistry = new gcp.projects.Service("artifact-registry", { + project: gcp.config.project, + service: "artifactregistry.googleapis.com", +}); const enabledApisCloudBuild = new gcp.projects.Service("cloud-build", { project: gcp.config.project, @@ -57,13 +54,17 @@ const enabledApisPubSub = new gcp.projects.Service("pubsub", { * Record storage: GCS bucket */ // Create a bucket to store the cached results -const storageBucket = new gcp.storage.Bucket(BUCKET_NAME_PREFIX, { - location: "US", // Get this from the provider instead? - uniformBucketLevelAccess: true, - versioning: { enabled: false }, -}, { - dependsOn: [enabledApisStorage], -}); +const storageBucket = new gcp.storage.Bucket( + BUCKET_NAME_PREFIX, + { + location: "US", // Get this from the provider instead? + uniformBucketLevelAccess: true, + versioning: { enabled: false }, + }, + { + dependsOn: [enabledApisStorage], + }, +); // Export the DNS name of the bucket export const storageBucketUrl = storageBucket.url; @@ -108,11 +109,15 @@ for (const subgraphName in subgraphNameToConfigs) { console.log(`Processing subgraph ${subgraphName}`); // Create a GCS bucket to store the assets for all record types in the subgraph - const functionBucket = new gcp.storage.Bucket(`${subgraphName.toLowerCase()}-assets`, { - location: "us-central1", - }, { - dependsOn: [enabledApisStorage], - }); + const functionBucket = new gcp.storage.Bucket( + `${subgraphName.toLowerCase()}-assets`, + { + location: "us-central1", + }, + { + dependsOn: [enabledApisStorage], + }, + ); // Iterate over each deployment id for (const deploymentId in deploymentIdToConfigs) { @@ -121,11 +126,15 @@ for (const subgraphName in subgraphNameToConfigs) { // Create a BigQuery dataset to store the records for all record types in the subgraph const bigQueryDatasetId = `${subgraphName}-${deploymentId}`.replace(/-/g, "_"); // - is unsupported - const bigQueryDataset = new gcp.bigquery.Dataset(bigQueryDatasetId, { - datasetId: bigQueryDatasetId, - }, { - dependsOn: [enabledApisBigQuery], - }); + const bigQueryDataset = new gcp.bigquery.Dataset( + bigQueryDatasetId, + { + datasetId: bigQueryDatasetId, + }, + { + dependsOn: [enabledApisBigQuery], + }, + ); module.exports[`${bigQueryDatasetId}-bigQueryDatasetId`] = bigQueryDataset.datasetId; // Iterate over each subgraph config @@ -155,9 +164,13 @@ for (const subgraphName in subgraphNameToConfigs) { /** * PubSub topic */ - const pubSubTopic = new gcp.pubsub.Topic(FUNCTION_NAME, {}, { - dependsOn: [enabledApisPubSub], - }); + const pubSubTopic = new gcp.pubsub.Topic( + FUNCTION_NAME, + {}, + { + dependsOn: [enabledApisPubSub], + }, + ); module.exports[`${FUNCTION_PREFIX}-pubSubTopicName`] = pubSubTopic.name; module.exports[`${FUNCTION_PREFIX}-pubSubTopicId`] = pubSubTopic.id; @@ -169,50 +182,65 @@ for (const subgraphName in subgraphNameToConfigs) { * which spawn functions. */ const expirationSeconds = 24 * 60 * 60; - const pubSubSubscription = new gcp.pubsub.Subscription(FUNCTION_NAME, { - topic: pubSubTopic.name, - retainAckedMessages: false, - expirationPolicy: { ttl: `${expirationSeconds}s` }, - messageRetentionDuration: `${expirationSeconds}s`, - }, { - dependsOn: [pubSubTopic], - }); + const pubSubSubscription = new gcp.pubsub.Subscription( + FUNCTION_NAME, + { + topic: pubSubTopic.name, + retainAckedMessages: false, + expirationPolicy: { ttl: `${expirationSeconds}s` }, + messageRetentionDuration: `${expirationSeconds}s`, + }, + { + dependsOn: [pubSubTopic], + }, + ); module.exports[`${FUNCTION_PREFIX}-pubSubSubscriptionName`] = pubSubSubscription.name; // Grab the JSON schema - const jsonSchemaString = readFileSync( - `${subgraphGeneratedFiles}/${subgraphConfig.object}.jsonschema`, - ).toString("utf-8"); + const jsonSchemaString = readFileSync(`${subgraphGeneratedFiles}/${subgraphConfig.object}.jsonschema`).toString( + "utf-8", + ); /** * Execution: Google Cloud Functions */ const functionTimeoutSeconds = 540; - const tokenHolderFunction = new gcp.cloudfunctions.Function(FUNCTION_NAME, { - sourceArchiveBucket: functionBucket.name, - sourceArchiveObject: functionBucketObject.name, - triggerHttp: true, - runtime: "nodejs18", - entryPoint: "run", - availableMemoryMb: 1024, - timeout: functionTimeoutSeconds, - environmentVariables: { - SUBGRAPH_URL: subgraphConfig.getUrl(), - SUBGRAPH_OBJECT: subgraphConfig.object, - SUBGRAPH_DATE_FIELD: subgraphConfig.dateField, - JSON_SCHEMA_STRING: jsonSchemaString, - STORAGE_PREFIX: subgraphConfig.getDirectory(), - BUCKET_NAME: storageBucketName, - PUBSUB_TOPIC: pubSubTopic.name, - FUNCTION_TIMEOUT_SECONDS: functionTimeoutSeconds, - PUBSUB_SUBSCRIPTION_ID: pubSubSubscription.id, - FINAL_DATE_OVERRIDE: pulumiConfig.get("finalDate"), - GRAPH_PROTOCOL_API_KEY: pulumiConfig.requireSecret("graphProtocolApiKey"), + const tokenHolderFunction = new gcp.cloudfunctions.Function( + FUNCTION_NAME, + { + sourceArchiveBucket: functionBucket.name, + sourceArchiveObject: functionBucketObject.name, + triggerHttp: true, + runtime: "nodejs18", + entryPoint: "run", + availableMemoryMb: 1024, + timeout: functionTimeoutSeconds, + environmentVariables: { + SUBGRAPH_URL: subgraphConfig.getUrl(), + SUBGRAPH_OBJECT: subgraphConfig.object, + SUBGRAPH_DATE_FIELD: subgraphConfig.dateField, + JSON_SCHEMA_STRING: jsonSchemaString, + STORAGE_PREFIX: subgraphConfig.getDirectory(), + BUCKET_NAME: storageBucketName, + PUBSUB_TOPIC: pubSubTopic.name, + FUNCTION_TIMEOUT_SECONDS: functionTimeoutSeconds, + PUBSUB_SUBSCRIPTION_ID: pubSubSubscription.id, + FINAL_DATE_OVERRIDE: pulumiConfig.get("finalDate"), + GRAPH_PROTOCOL_API_KEY: pulumiConfig.requireSecret("graphProtocolApiKey"), + }, + }, + { + dependsOn: [ + functionBucketObject, + storageBucket, + pubSubTopic, + pubSubSubscription, + enabledApisCloudFunctions, + enabledApisCloudBuild, + ], }, - }, { - dependsOn: [functionBucketObject, storageBucket, pubSubTopic, pubSubSubscription, enabledApisCloudFunctions, enabledApisCloudBuild], - }); + ); module.exports[`${FUNCTION_PREFIX}-functionUrl`] = tokenHolderFunction.httpsTriggerUrl; module.exports[`${FUNCTION_PREFIX}-functionName`] = tokenHolderFunction.name; @@ -222,19 +250,23 @@ for (const subgraphName in subgraphNameToConfigs) { /** * Scheduling: Cloud Scheduler */ - const schedulerJob = new gcp.cloudscheduler.Job(FUNCTION_NAME, { - schedule: "0 * * * *", // Start of every hour - timeZone: "UTC", - httpTarget: { - httpMethod: "GET", - uri: tokenHolderFunction.httpsTriggerUrl, - oidcToken: { - serviceAccountEmail: tokenHolderFunction.serviceAccountEmail, + const schedulerJob = new gcp.cloudscheduler.Job( + FUNCTION_NAME, + { + schedule: "0 * * * *", // Start of every hour + timeZone: "UTC", + httpTarget: { + httpMethod: "GET", + uri: tokenHolderFunction.httpsTriggerUrl, + oidcToken: { + serviceAccountEmail: tokenHolderFunction.serviceAccountEmail, + }, }, }, - }, { - dependsOn: [tokenHolderFunction, enabledApisCloudScheduler], - }); + { + dependsOn: [tokenHolderFunction, enabledApisCloudScheduler], + }, + ); // Allow Cloud Scheduler to invoke the Cloud Function new gcp.cloudfunctions.FunctionIamMember( @@ -259,13 +291,17 @@ for (const subgraphName in subgraphNameToConfigs) { * We do this, otherwise the Hive partitioning will complain of no files being present. */ const bigQueryDummyObjectName = `${subgraphConfig.getDirectory()}/dt=2021-01-01/dummy.jsonl`; - const bigQueryDummyObject = new gcp.storage.BucketObject(bigQueryDummyObjectName, { - bucket: storageBucketName, - content: "{}", // Empty file - name: bigQueryDummyObjectName, - }, { - dependsOn: [storageBucket], - }); + const bigQueryDummyObject = new gcp.storage.BucketObject( + bigQueryDummyObjectName, + { + bucket: storageBucketName, + content: "{}", // Empty file + name: bigQueryDummyObjectName, + }, + { + dependsOn: [storageBucket], + }, + ); module.exports[`${FUNCTION_PREFIX}-bigQueryDummyObjectName`] = bigQueryDummyObjectName; // storageBucketUrl is not known until deploy-time, so we use a pulumi-provided function to utilise it @@ -307,129 +343,141 @@ for (const subgraphName in subgraphNameToConfigs) { // Alert when functions crash const ALERT_POLICY_FUNCTION_ERROR = `${FUNCTION_NAME}-function-error`; const ALERT_POLICY_FUNCTION_ERROR_WINDOW_SECONDS = 15 * 60; - new gcp.monitoring.AlertPolicy(ALERT_POLICY_FUNCTION_ERROR, { - displayName: ALERT_POLICY_FUNCTION_ERROR, - conditions: [ - { - displayName: "Function Status Not OK", - conditionThreshold: { - filter: pulumi.interpolate`resource.type = "cloud_function" AND resource.labels.function_name = "${tokenHolderFunction.name}" AND metric.type = "cloudfunctions.googleapis.com/function/execution_count" AND metric.labels.status != "ok"`, - aggregations: [ - { - alignmentPeriod: `${ALERT_POLICY_FUNCTION_ERROR_WINDOW_SECONDS}s`, - crossSeriesReducer: "REDUCE_NONE", - perSeriesAligner: "ALIGN_SUM", + new gcp.monitoring.AlertPolicy( + ALERT_POLICY_FUNCTION_ERROR, + { + displayName: ALERT_POLICY_FUNCTION_ERROR, + conditions: [ + { + displayName: "Function Status Not OK", + conditionThreshold: { + filter: pulumi.interpolate`resource.type = "cloud_function" AND resource.labels.function_name = "${tokenHolderFunction.name}" AND metric.type = "cloudfunctions.googleapis.com/function/execution_count" AND metric.labels.status != "ok"`, + aggregations: [ + { + alignmentPeriod: `${ALERT_POLICY_FUNCTION_ERROR_WINDOW_SECONDS}s`, + crossSeriesReducer: "REDUCE_NONE", + perSeriesAligner: "ALIGN_SUM", + }, + ], + comparison: "COMPARISON_GT", + duration: "0s", + trigger: { + count: 1, }, - ], - comparison: "COMPARISON_GT", - duration: "0s", - trigger: { - count: 1, }, }, + ], + alertStrategy: { + autoClose: "604800s", }, - ], - alertStrategy: { - autoClose: "604800s", + combiner: "OR", + enabled: true, + notificationChannels: [notificationEmail.id], + }, + { + dependsOn: [tokenHolderFunction, notificationEmail], }, - combiner: "OR", - enabled: true, - notificationChannels: [notificationEmail.id], - }, { - dependsOn: [tokenHolderFunction, notificationEmail], - }); + ); // Alert when there are more executions than expected (1 every hour) const ALERT_POLICY_FUNCTION_EXECUTIONS = `${FUNCTION_NAME}-function-executions`; const ALERT_POLICY_FUNCTION_EXECUTIONS_WINDOW_SECONDS = 15 * 60; - new gcp.monitoring.AlertPolicy(ALERT_POLICY_FUNCTION_EXECUTIONS, { - displayName: ALERT_POLICY_FUNCTION_EXECUTIONS, - conditions: [ - { - displayName: `Function Executions > 1 / ${ALERT_POLICY_FUNCTION_EXECUTIONS_WINDOW_SECONDS / 60} minutes`, - conditionThreshold: { - filter: pulumi.interpolate`resource.type = "cloud_function" AND resource.labels.function_name = "${tokenHolderFunction.name}" AND metric.type = "cloudfunctions.googleapis.com/function/execution_count"`, - aggregations: [ - { - alignmentPeriod: `${ALERT_POLICY_FUNCTION_EXECUTIONS_WINDOW_SECONDS}s`, - crossSeriesReducer: "REDUCE_NONE", - perSeriesAligner: "ALIGN_SUM", + new gcp.monitoring.AlertPolicy( + ALERT_POLICY_FUNCTION_EXECUTIONS, + { + displayName: ALERT_POLICY_FUNCTION_EXECUTIONS, + conditions: [ + { + displayName: `Function Executions > 1 / ${ALERT_POLICY_FUNCTION_EXECUTIONS_WINDOW_SECONDS / 60} minutes`, + conditionThreshold: { + filter: pulumi.interpolate`resource.type = "cloud_function" AND resource.labels.function_name = "${tokenHolderFunction.name}" AND metric.type = "cloudfunctions.googleapis.com/function/execution_count"`, + aggregations: [ + { + alignmentPeriod: `${ALERT_POLICY_FUNCTION_EXECUTIONS_WINDOW_SECONDS}s`, + crossSeriesReducer: "REDUCE_NONE", + perSeriesAligner: "ALIGN_SUM", + }, + ], + comparison: "COMPARISON_GT", + duration: "0s", + trigger: { + count: 1, }, - ], - comparison: "COMPARISON_GT", - duration: "0s", - trigger: { - count: 1, + thresholdValue: 1, }, - thresholdValue: 1, }, + ], + alertStrategy: { + autoClose: "604800s", }, - ], - alertStrategy: { - autoClose: "604800s", + combiner: "OR", + enabled: true, + notificationChannels: [notificationEmail.id], + }, + { + dependsOn: [tokenHolderFunction, notificationEmail], }, - combiner: "OR", - enabled: true, - notificationChannels: [notificationEmail.id], - }, { - dependsOn: [tokenHolderFunction, notificationEmail], - }); + ); // Alert when the GCS bucket network activity is greater than expected const ALERT_POLICY_GCS_NETWORK = `${FUNCTION_NAME}-gcs-activity`; const ALERT_POLICY_GCS_NETWORK_WINDOW_SECONDS = 15 * 60; const NETWORK_THRESHOLD_BYTES = 100000000; - new gcp.monitoring.AlertPolicy(ALERT_POLICY_GCS_NETWORK, { - displayName: ALERT_POLICY_GCS_NETWORK, - conditions: [ - { - displayName: `GCS Bucket Received > 100 MB / ${ALERT_POLICY_GCS_NETWORK_WINDOW_SECONDS / 60} min`, - conditionThreshold: { - filter: pulumi.interpolate`resource.type = "gcs_bucket" AND resource.labels.bucket_name = "${storageBucketName}" AND metric.type = "storage.googleapis.com/network/received_bytes_count"`, - aggregations: [ - { - alignmentPeriod: `${ALERT_POLICY_GCS_NETWORK_WINDOW_SECONDS}s`, - crossSeriesReducer: "REDUCE_NONE", - perSeriesAligner: "ALIGN_SUM", + new gcp.monitoring.AlertPolicy( + ALERT_POLICY_GCS_NETWORK, + { + displayName: ALERT_POLICY_GCS_NETWORK, + conditions: [ + { + displayName: `GCS Bucket Received > 100 MB / ${ALERT_POLICY_GCS_NETWORK_WINDOW_SECONDS / 60} min`, + conditionThreshold: { + filter: pulumi.interpolate`resource.type = "gcs_bucket" AND resource.labels.bucket_name = "${storageBucketName}" AND metric.type = "storage.googleapis.com/network/received_bytes_count"`, + aggregations: [ + { + alignmentPeriod: `${ALERT_POLICY_GCS_NETWORK_WINDOW_SECONDS}s`, + crossSeriesReducer: "REDUCE_NONE", + perSeriesAligner: "ALIGN_SUM", + }, + ], + comparison: "COMPARISON_GT", + duration: "0s", + trigger: { + count: 1, }, - ], - comparison: "COMPARISON_GT", - duration: "0s", - trigger: { - count: 1, + thresholdValue: NETWORK_THRESHOLD_BYTES, }, - thresholdValue: NETWORK_THRESHOLD_BYTES, }, - }, - { - displayName: `GCS Bucket Sent > 100 MB / ${ALERT_POLICY_GCS_NETWORK_WINDOW_SECONDS / 60} min`, - conditionThreshold: { - filter: pulumi.interpolate`resource.type = "gcs_bucket" AND resource.labels.bucket_name = "${storageBucketName}" AND metric.type = "storage.googleapis.com/network/sent_bytes_count"`, - aggregations: [ - { - alignmentPeriod: `${ALERT_POLICY_GCS_NETWORK_WINDOW_SECONDS}s`, - crossSeriesReducer: "REDUCE_NONE", - perSeriesAligner: "ALIGN_SUM", + { + displayName: `GCS Bucket Sent > 100 MB / ${ALERT_POLICY_GCS_NETWORK_WINDOW_SECONDS / 60} min`, + conditionThreshold: { + filter: pulumi.interpolate`resource.type = "gcs_bucket" AND resource.labels.bucket_name = "${storageBucketName}" AND metric.type = "storage.googleapis.com/network/sent_bytes_count"`, + aggregations: [ + { + alignmentPeriod: `${ALERT_POLICY_GCS_NETWORK_WINDOW_SECONDS}s`, + crossSeriesReducer: "REDUCE_NONE", + perSeriesAligner: "ALIGN_SUM", + }, + ], + comparison: "COMPARISON_GT", + duration: "0s", + trigger: { + count: 1, }, - ], - comparison: "COMPARISON_GT", - duration: "0s", - trigger: { - count: 1, + thresholdValue: NETWORK_THRESHOLD_BYTES, }, - thresholdValue: NETWORK_THRESHOLD_BYTES, }, + ], + alertStrategy: { + autoClose: "604800s", }, - ], - alertStrategy: { - autoClose: "604800s", + combiner: "OR", + enabled: true, + notificationChannels: [notificationEmail.id], }, - combiner: "OR", - enabled: true, - notificationChannels: [notificationEmail.id], - }, { - dependsOn: [storageBucket, notificationEmail], - }); + { + dependsOn: [storageBucket, notificationEmail], + }, + ); /** * Create a dashboard for monitoring activity diff --git a/src/codegen.ts b/src/codegen.ts index 0fa847e..120c95c 100644 --- a/src/codegen.ts +++ b/src/codegen.ts @@ -1,13 +1,13 @@ import { execSync } from "child_process"; import path from "path"; +import { writeFile } from "../function/src/helpers/fs"; +import { getSubgraphConfig, getSubgraphConfigFiles } from "../function/src/helpers/subgraphConfig"; +import { SubgraphConfig } from "../function/src/types/subgraphConfig"; import { GENERATED_FILES_DIR } from "./constants"; import { getBigQuerySchema } from "./helpers/bigquerySchema"; -import { writeFile } from "../function/src/helpers/fs"; import { generateJSONSchema } from "./helpers/jsonSchema"; -import { getSubgraphConfig, getSubgraphConfigFiles } from "../function/src/helpers/subgraphConfig"; import { generateTypes } from "./helpers/subgraphSchema"; -import { SubgraphConfig } from "../function/src/types/subgraphConfig"; const writeSchema = async (configFilePath: string): Promise => { const config: SubgraphConfig = getSubgraphConfig(configFilePath); diff --git a/subgraph_definition_schema.json b/subgraph_definition_schema.json index 259f24c..bbed79a 100644 --- a/subgraph_definition_schema.json +++ b/subgraph_definition_schema.json @@ -1,23 +1,23 @@ { - "type": "object", - "properties": { - "subgraphName": { - "type": "string" - }, - "object": { - "type": "string" - }, - "dateField": { - "type": "string" - }, - "typeOverrides": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "deploymentId": { - "type": "string" - } + "type": "object", + "properties": { + "subgraphName": { + "type": "string" + }, + "object": { + "type": "string" + }, + "dateField": { + "type": "string" + }, + "typeOverrides": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "deploymentId": { + "type": "string" } -} \ No newline at end of file + } +} diff --git a/subgraphs/Cooler_Loans_Loan.json b/subgraphs/Cooler_Loans_Loan.json index fa29790..c8abf33 100644 --- a/subgraphs/Cooler_Loans_Loan.json +++ b/subgraphs/Cooler_Loans_Loan.json @@ -1,6 +1,6 @@ { - "subgraphName": "Cooler_Loans", - "object": "CoolerLoan", - "dateField": "createdTimestamp", - "deploymentId": "QmQoJMZT4bLLUNvf9Z15VNub6Wk1oq6VcMm34omrrVZevs" -} \ No newline at end of file + "subgraphName": "Cooler_Loans", + "object": "CoolerLoan", + "dateField": "createdTimestamp", + "deploymentId": "QmQoJMZT4bLLUNvf9Z15VNub6Wk1oq6VcMm34omrrVZevs" +} diff --git a/subgraphs/Cooler_Loans_Request.json b/subgraphs/Cooler_Loans_Request.json index deaf88d..9ceaac7 100644 --- a/subgraphs/Cooler_Loans_Request.json +++ b/subgraphs/Cooler_Loans_Request.json @@ -1,9 +1,6 @@ { - "subgraphName": "Cooler_Loans", - "object": "CoolerLoanRequest", - "dateField": "createdTimestamp", - "typeOverrides": { - "amount": "BIGNUMERIC" - }, - "deploymentId": "QmQoJMZT4bLLUNvf9Z15VNub6Wk1oq6VcMm34omrrVZevs" -} \ No newline at end of file + "subgraphName": "Cooler_Loans", + "object": "CoolerLoanRequest", + "dateField": "createdTimestamp", + "deploymentId": "QmQoJMZT4bLLUNvf9Z15VNub6Wk1oq6VcMm34omrrVZevs" +} diff --git a/subgraphs/Treasury_Ethereum_TokenRecord.json b/subgraphs/Treasury_Ethereum_TokenRecord.json index 70c505f..c464857 100644 --- a/subgraphs/Treasury_Ethereum_TokenRecord.json +++ b/subgraphs/Treasury_Ethereum_TokenRecord.json @@ -1,6 +1,6 @@ { - "subgraphName": "Treasury_Ethereum", - "object": "TokenRecord", - "dateField": "timestamp", - "deploymentId": "Qmam2fnfYzj6srEGC49XxsFyMwngs7xKwjGWZc7jnEU97h" -} \ No newline at end of file + "subgraphName": "Treasury_Ethereum", + "object": "TokenRecord", + "dateField": "timestamp", + "deploymentId": "Qmam2fnfYzj6srEGC49XxsFyMwngs7xKwjGWZc7jnEU97h" +} diff --git a/tsconfig.json b/tsconfig.json index 4c061a1..af4a1fa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,23 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "dist", - "target": "es2020", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "esModuleInterop": true - }, - "include": [ - "index.ts", - "src/codegen.ts", - ], - "exclude": [ - "node_modules", - ] + "compilerOptions": { + "strict": true, + "outDir": "dist", + "target": "es2020", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "include": ["index.ts", "src/codegen.ts"], + "exclude": ["node_modules"] }