Nabarun Gogoi
9e53b1a498
* Dependency patch updates * Minor update @apollo/client 3.3.19 -> 3.7.10 * Minor update @nomiclabs/hardhat-ethers 2.0.2 -> 2.2.2 * Minor update @openzeppelin/contracts 4.3.2 -> 4.8.2 * Minor update @types/chai 4.2.19 -> 4.3.4 * Minor update decimal 10.3.1 -> 10.4.3 * Minor update @graphql-tools/utils 9.1.1 -> 9.2.1 * Minor update @graphql, graphql-ws, graphql-request * Minor update yargs * Minor update @types/node * Minor update graph-ts * Minor updates graphql-tools, multiaddr * Update dependencies with minor updates * Minor updates to eslint and related dependencies * Update solidity compiler version for erc721-watcher * Fix ESLint indent rule --------- Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com> |
||
---|---|---|
.. | ||
address-watcher | ||
cache | ||
cli | ||
codegen | ||
eden-watcher | ||
erc20-watcher | ||
erc721-watcher | ||
graph-node | ||
graph-test-watcher | ||
ipld-eth-client | ||
mobymask-v2-watcher | ||
mobymask-watcher | ||
peer | ||
solidity-mapper | ||
test | ||
tracing-client | ||
util | ||
README.md |
Watchers Directory
Here contains all the publicly available watchers for your experimenting purposes. For general information on setting up the stack and the CLI commands used to interact with watchers, see the docs directory.
Customizing Watchers
-
Indexing on an event:
-
Edit the custom hook function
handleEvent
(triggered on an event) in hooks.ts to perform corresponding indexing using theIndexer
object. -
While using the indexer storage methods for indexing, pass
diff
as true if default state is desired to be generated using the state variables being indexed.
-
-
Generating state:
-
Edit the custom hook function
createInitialState
(triggered if the watcher passes the start block, checkpoint:true
) in hooks.ts to save an initialState
using theIndexer
object. -
Edit the custom hook function
createStateDiff
(triggered on a block) in hooks.ts to save the state in adiff
State
using theIndexer
object. The default state (if exists) is updated. -
Edit the custom hook function
createStateCheckpoint
(triggered just before default and CLI checkpoint) in hooks.ts to save the state in acheckpoint
State
using theIndexer
object.
-