From 493c8993a5599014f86b81ee9a267da7bc33cdca Mon Sep 17 00:00:00 2001 From: Yevhen Haievyi Date: Wed, 18 Sep 2024 14:07:53 +0300 Subject: [PATCH] fix import --- scripts/run-grpcurl-firehose.js | 4 +++- scripts/run-grpcurl-substreams.js | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/run-grpcurl-firehose.js b/scripts/run-grpcurl-firehose.js index dc29a5c..129ddc4 100644 --- a/scripts/run-grpcurl-firehose.js +++ b/scripts/run-grpcurl-firehose.js @@ -1,8 +1,10 @@ const fs = require('fs'); +const path = require('path'); const { exec } = require('child_process'); const { affectedChains } = require('./known-issues-chains'); +const filePath = path.resolve(__dirname, '../data/chains/V2/chains.json'); const chains = JSON.parse( - fs.readFileSync('../data/chains/V2/chains.json', 'utf8'), + fs.readFileSync(filePath, 'utf8'), ); function runGrpcurl(chainId, serviceName) { diff --git a/scripts/run-grpcurl-substreams.js b/scripts/run-grpcurl-substreams.js index b156362..975da11 100644 --- a/scripts/run-grpcurl-substreams.js +++ b/scripts/run-grpcurl-substreams.js @@ -1,10 +1,11 @@ const fs = require('fs'); +const path = require('path'); const { exec } = require('child_process'); const { affectedChains } = require('./known-issues-chains'); +const filePath = path.resolve(__dirname, '../data/chains/V2/chains.json'); const chains = JSON.parse( - fs.readFileSync('../data/chains/V2/chains.json', 'utf8'), + fs.readFileSync(filePath, 'utf8'), ); - function runGrpcurl(chainId, serviceName) { return new Promise((resolve, reject) => { const command = `grpcurl ${chainId}.${serviceName}.pinax.network:443 sf.${serviceName}.rpc.v2.EndpointInfo/Info`;