mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-01-06 19:38:05 +00:00
Update docs and work around GQL client caching in ipld-eth-client (#138)
This commit is contained in:
parent
c919d784bf
commit
4b256016da
@ -90,6 +90,13 @@
|
||||
|
||||
* In the [config file](./environments/local.toml) update the `database` connection settings.
|
||||
|
||||
* In `graph-watcher` repo, follow the instructions in [Setup](../../README.md#setup) for installing and building packages.
|
||||
|
||||
```bash
|
||||
# After setup
|
||||
yarn && yarn build
|
||||
```
|
||||
|
||||
* Run the watcher:
|
||||
|
||||
```bash
|
||||
@ -380,3 +387,15 @@
|
||||
* Open IPFS WebUI http://127.0.0.1:5001/webui and search for IPLDBlocks using their CIDs.
|
||||
|
||||
* The state should have auto indexed data and also custom property `transferCount` according to code in [hooks](./src/hooks.ts) file `handleEvent` method.
|
||||
|
||||
## Reset / Clean up
|
||||
|
||||
* To close down services in stack-orchestrator, hit `ctrl + c` in the terminal where it was run.
|
||||
|
||||
* To stop and remove stack-orchestrator services running in background run:
|
||||
|
||||
```bash
|
||||
cd stack-orchestrator
|
||||
|
||||
docker-compose -f ./docker/latest/docker-compose-db-sharding.yml down -v --remove-orphans
|
||||
```
|
||||
|
@ -102,11 +102,15 @@ export class EthClient {
|
||||
}
|
||||
|
||||
async getBlockByHash (blockHash?: string): Promise<any> {
|
||||
const { block } = await this._graphqlClient.query(ethQueries.getBlockByHash, { blockHash });
|
||||
block.number = parseInt(block.number, 16);
|
||||
block.timestamp = parseInt(block.timestamp, 16);
|
||||
const result = await this._graphqlClient.query(ethQueries.getBlockByHash, { blockHash });
|
||||
|
||||
return { block };
|
||||
return {
|
||||
block: {
|
||||
...result.block,
|
||||
number: parseInt(result.block.number, 16),
|
||||
timestamp: parseInt(result.block.timestamp, 16)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
async getLogs (vars: Vars): Promise<any> {
|
||||
|
@ -79,9 +79,10 @@
|
||||
|
||||
* In the [config file](./environments/local.toml) update the `database` connection settings.
|
||||
|
||||
* In `graph-watcher` repo, install and build packages:
|
||||
* In `graph-watcher` repo, follow the instructions in [Setup](../../README.md#setup) for installing and building packages.
|
||||
|
||||
```bash
|
||||
# After setup
|
||||
yarn && yarn build
|
||||
```
|
||||
|
||||
@ -247,3 +248,25 @@
|
||||
```
|
||||
|
||||
The data is fetched from watcher database as it is already indexed.
|
||||
|
||||
## Reset / Clean up
|
||||
|
||||
* Reset and clear deployments in MobyMask repo:
|
||||
|
||||
```bash
|
||||
cd packages/hardhat
|
||||
|
||||
# Remove previous deployments in local network if any
|
||||
cd deployments
|
||||
git clean -xdf
|
||||
```
|
||||
|
||||
* To close down services in stack-orchestrator, hit `ctrl + c` in the terminal where it was run.
|
||||
|
||||
* To stop and remove stack-orchestrator services running in background run:
|
||||
|
||||
```bash
|
||||
cd stack-orchestrator
|
||||
|
||||
docker-compose -f ./docker/latest/docker-compose-db-sharding.yml down -v --remove-orphans
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user