Generate watcher for sushiswap v2 subgraph #2

Merged
nabarun merged 5 commits from deep-stack/sushiswap-watcher-ts:pm-generate-v2-watcher into main 2024-06-12 04:15:04 +00:00
8 changed files with 16 additions and 9 deletions
Showing only changes of commit 5712418fae - Show all commits

View File

@ -4,3 +4,5 @@ out/
.vscode .vscode
.idea .idea
gql-logs/

View File

@ -2,7 +2,7 @@
## Source ## Source
* Subgraph: sushiswap-subgraphs [v0.1.1-watcher-0.1.0](https://github.com/cerc-io/sushiswap-subgraphs/releases/tag/v0.1.1-watcher-0.1.0) * Subgraph: [sushiswap-subgraphs v0.1.1-watcher-0.1.0](https://github.com/cerc-io/sushiswap-subgraphs/releases/tag/v0.1.1-watcher-0.1.0)
## Setup ## Setup

View File

@ -70,10 +70,10 @@
] ]
# Boolean flag to specify if rpc-eth-client should be used for RPC endpoint instead of ipld-eth-client (ipld-eth-server GQL client) # Boolean flag to specify if rpc-eth-client should be used for RPC endpoint instead of ipld-eth-client (ipld-eth-server GQL client)
rpcClient = true rpcClient = false
# Boolean flag to specify if rpcProviderEndpoint is an FEVM RPC endpoint # Boolean flag to specify if rpcProviderEndpoint is an FEVM RPC endpoint
isFEVM = true isFEVM = false
# Boolean flag to filter event logs by contracts # Boolean flag to filter event logs by contracts
filterLogsByAddresses = true filterLogsByAddresses = true
@ -93,6 +93,9 @@
subgraphEventsOrder = true subgraphEventsOrder = true
blockDelayInMilliSecs = 2000 blockDelayInMilliSecs = 2000
# Number of blocks by which block processing lags behind head
blockProcessingOffset = 16
# Boolean to switch between modes of processing events when starting the server. # Boolean to switch between modes of processing events when starting the server.
# Setting to true will fetch filtered events and required blocks in a range of blocks and then process them. # Setting to true will fetch filtered events and required blocks in a range of blocks and then process them.
# Setting to false will fetch blocks consecutively with its events and then process them (Behaviour is followed in realtime processing near head). # Setting to false will fetch blocks consecutively with its events and then process them (Behaviour is followed in realtime processing near head).

View File

@ -29,7 +29,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/cerc-io/watcher-ts.git" "url": "https://github.com/cerc-io/watcher-ts.git"
}, },
"author": "", "author": "",
"license": "AGPL-3.0", "license": "AGPL-3.0",
@ -39,11 +39,11 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme", "homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": { "dependencies": {
"@apollo/client": "^3.3.19", "@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.94", "@cerc-io/cli": "^0.2.97",
"@cerc-io/ipld-eth-client": "^0.2.94", "@cerc-io/ipld-eth-client": "^0.2.97",
"@cerc-io/solidity-mapper": "^0.2.94", "@cerc-io/solidity-mapper": "^0.2.97",
"@cerc-io/util": "^0.2.94", "@cerc-io/util": "^0.2.97",
"@cerc-io/graph-node": "^0.2.94", "@cerc-io/graph-node": "^0.2.97",
"@ethersproject/providers": "^5.4.4", "@ethersproject/providers": "^5.4.4",
"debug": "^4.3.1", "debug": "^4.3.1",
"decimal.js": "^10.3.1", "decimal.js": "^10.3.1",

View File

@ -89,6 +89,8 @@ const executeAndRecordMetrics = async (
apiKey: expressContext.req.header('x-api-key'), apiKey: expressContext.req.header('x-api-key'),
origin: expressContext.req.headers.origin origin: expressContext.req.headers.origin
}); });
throw error;
} finally { } finally {
endTimer(); endTimer();
} }