Export metric for total ETH RPC count (#528)

* Export metric for total ETH RPC count by methods

* Fix endpoint switch on max retries of new block

* Upgrade package versions
This commit is contained in:
2024-07-12 16:59:23 +05:30
committed by GitHub
parent 2217cd3ffb
commit 42cb688921
21 changed files with 89 additions and 76 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/codegen",
"version": "0.2.102",
"version": "0.2.103",
"description": "Code generator",
"private": true,
"main": "index.js",
@@ -20,7 +20,7 @@
},
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@cerc-io/util": "^0.2.102",
"@cerc-io/util": "^0.2.103",
"@graphql-tools/load-files": "^6.5.2",
"@npmcli/package-json": "^5.0.0",
"@poanet/solidity-flattener": "https://github.com/vulcanize/solidity-flattener.git",
@@ -249,7 +249,7 @@ export class Indexer implements IndexerInterface {
};
}
const { block: { number } } = await this._ethClient.getBlockByHash(blockHash);
const { block: { number } } = await this.getBlockByHash(blockHash);
const blockNumber = ethers.BigNumber.from(number).toNumber();
log('{{query.name}}: db miss, fetching from upstream server');
@@ -679,6 +679,10 @@ export class Indexer implements IndexerInterface {
return this._baseIndexer.getBlocks(blockFilter);
}
async getBlockByHash (blockHash?: string): Promise<{ block: any }> {
return this._baseIndexer.getBlockByHash(blockHash);
}
async updateSyncStatusIndexedBlock (blockHash: string, blockNumber: number, force = false): Promise<SyncStatus> {
return this._baseIndexer.updateSyncStatusIndexedBlock(blockHash, blockNumber, force);
}
@@ -41,12 +41,12 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.102",
"@cerc-io/ipld-eth-client": "^0.2.102",
"@cerc-io/solidity-mapper": "^0.2.102",
"@cerc-io/util": "^0.2.102",
"@cerc-io/cli": "^0.2.103",
"@cerc-io/ipld-eth-client": "^0.2.103",
"@cerc-io/solidity-mapper": "^0.2.103",
"@cerc-io/util": "^0.2.103",
{{#if (subgraphPath)}}
"@cerc-io/graph-node": "^0.2.102",
"@cerc-io/graph-node": "^0.2.103",
{{/if}}
"@ethersproject/providers": "^5.4.4",
"debug": "^4.3.1",