mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-08 08:54:05 +00:00
Watch contract for multiple data sources from subgraph config (#529)
* Watch contract for multiple data sources from subgraph config * Upgrade package versions
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "@cerc-io/graph-node",
|
||||
"version": "0.2.103",
|
||||
"version": "0.2.104",
|
||||
"main": "dist/index.js",
|
||||
"license": "AGPL-3.0",
|
||||
"devDependencies": {
|
||||
"@cerc-io/solidity-mapper": "^0.2.103",
|
||||
"@cerc-io/solidity-mapper": "^0.2.104",
|
||||
"@ethersproject/providers": "^5.4.4",
|
||||
"@graphprotocol/graph-ts": "^0.22.0",
|
||||
"@nomiclabs/hardhat-ethers": "^2.0.2",
|
||||
@@ -51,9 +51,9 @@
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.3.19",
|
||||
"@cerc-io/assemblyscript": "0.19.10-watcher-ts-0.1.2",
|
||||
"@cerc-io/cache": "^0.2.103",
|
||||
"@cerc-io/ipld-eth-client": "^0.2.103",
|
||||
"@cerc-io/util": "^0.2.103",
|
||||
"@cerc-io/cache": "^0.2.104",
|
||||
"@cerc-io/ipld-eth-client": "^0.2.104",
|
||||
"@cerc-io/util": "^0.2.104",
|
||||
"@types/json-diff": "^0.5.2",
|
||||
"@types/yargs": "^17.0.0",
|
||||
"bn.js": "^4.11.9",
|
||||
|
||||
@@ -176,11 +176,7 @@ export class GraphWatcher {
|
||||
|
||||
// Skip for templates as they are added dynamically.
|
||||
if (address) {
|
||||
const watchedContract = this._indexer.isContractAddressWatched(address);
|
||||
|
||||
if (!watchedContract) {
|
||||
await this._indexer.watchContract(address, name, true, startBlock);
|
||||
}
|
||||
await this._indexer.watchContract(address, name, true, startBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user