diff --git a/internal/block_getters/quicknode_block_getter.ts b/internal/block_getters/quicknode_block_getter.ts index 38e8381..e00fee6 100644 --- a/internal/block_getters/quicknode_block_getter.ts +++ b/internal/block_getters/quicknode_block_getter.ts @@ -1,5 +1,5 @@ import utils from "web3-utils"; -import { WebsocketProvider } from "web3-core"; +import { HttpProvider } from "web3-core"; import { IQuickNodeResponse } from "../interfaces/quicknode_response.js"; import { ITransaction } from "../interfaces/transaction.js"; import { IBlock } from "../interfaces/block.js"; @@ -48,7 +48,7 @@ export class QuickNodeBlockGetter extends BlockGetter implements IBlockGetter { eth = this.alternateEth; } - (eth.currentProvider as WebsocketProvider).send({ + (eth.currentProvider as HttpProvider).send({ method: "qn_getBlockWithReceipts", id: Date.now().toString() + blockNumber, params: [utils.numberToHex(blockNumber)], diff --git a/internal/block_getters/quicknode_block_getter_worker.ts b/internal/block_getters/quicknode_block_getter_worker.ts index f69a95b..a15dd1a 100644 --- a/internal/block_getters/quicknode_block_getter_worker.ts +++ b/internal/block_getters/quicknode_block_getter_worker.ts @@ -11,7 +11,7 @@ const blockGetter = new QuickNodeBlockGetter( //@ts-ignore new EthClass( //@ts-ignore - new EthClass.providers.WebsocketProvider( + new EthClass.providers.HttpProvider( workerData.endpoint, { reconnect: { @@ -29,7 +29,7 @@ const blockGetter = new QuickNodeBlockGetter( //@ts-ignore new EthClass( //@ts-ignore - new EthClass.providers.WebsocketProvider( + new EthClass.providers.HttpProvider( workerData.alternateEndpoint, { reconnect: { diff --git a/package-lock.json b/package-lock.json index 7b8171f..bfe695b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@maticnetwork/chain-indexer-framework", - "version": "1.3.1", + "version": "1.4.0-beta", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@maticnetwork/chain-indexer-framework", - "version": "1.3.1", + "version": "1.4.0-beta", "license": "MIT", "dependencies": { "axios": "^1.3.6", diff --git a/package.json b/package.json index 78100d4..1d12174 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@maticnetwork/chain-indexer-framework", - "version": "1.3.5", + "version": "1.4.0-beta", "description": "blockchain data indexer", "type": "module", "exports": { diff --git a/public/block_producers/quicknode_block_producer.ts b/public/block_producers/quicknode_block_producer.ts index c1ec0ff..c73c9f8 100644 --- a/public/block_producers/quicknode_block_producer.ts +++ b/public/block_producers/quicknode_block_producer.ts @@ -52,7 +52,7 @@ export class QuickNodeBlockProducer extends BlockProducer { //@ts-ignore const eth = new Eth( //@ts-ignore - new Eth.providers.WebsocketProvider( + new Eth.providers.HttpProvider( endpoints[0], { reconnect: {