mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-08 16:54:08 +00:00
Use block number for eth_call in rpc-eth-client (#435)
* Update subgraph readme to run fill before job-runner * Fix getContractEntitiesMap incase of template data sources * Use rpcSupportsBlockHashParam flag to use blockNumber for rpc client eth_call * Fix optional baseFeePerGas in rpc-eth-client * Fix graph-node tests after changes * Remove completed TODO
This commit is contained in:
@@ -14,7 +14,7 @@ columns:
|
||||
columnType: PrimaryGeneratedColumn
|
||||
- name: cid
|
||||
pgType: varchar
|
||||
tsType: string
|
||||
tsType: string | null
|
||||
columnType: Column
|
||||
columnOptions:
|
||||
- option: nullable
|
||||
|
||||
@@ -12,9 +12,6 @@ columns:
|
||||
pgType: integer
|
||||
tsType: number
|
||||
columnType: Column
|
||||
columnOptions:
|
||||
- option: nullable
|
||||
value: true
|
||||
imports:
|
||||
- toImport:
|
||||
- Entity
|
||||
|
||||
@@ -538,6 +538,8 @@ export class Entity {
|
||||
option: 'nullable',
|
||||
value: 'true'
|
||||
});
|
||||
|
||||
columnObject.tsType = `${tsType} | null`;
|
||||
}
|
||||
|
||||
entityObject.columns.push(columnObject);
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
# Use -1 for skipping check on block range.
|
||||
maxEventsBlockRange = 1000
|
||||
|
||||
# Flag to specify whether RPC endpoint supports block hash as block tag parameter
|
||||
rpcSupportsBlockHashParam = true
|
||||
|
||||
# GQL cache settings
|
||||
[server.gqlCache]
|
||||
enabled = true
|
||||
|
||||
@@ -116,7 +116,15 @@
|
||||
yarn && yarn build
|
||||
```
|
||||
|
||||
* In `packages/test-watcher`, run the job-runner:
|
||||
* In `packages/test-watcher`, run fill for the subgraph start block:
|
||||
|
||||
```bash
|
||||
yarn fill --start-block 10 --end-block 10
|
||||
```
|
||||
|
||||
* Subgraph start block is the lowest `startBlock` in example [subgraph.yaml](../graph-node/test/subgraph/example1/subgraph.yaml)
|
||||
|
||||
* Run the job-runner:
|
||||
|
||||
```bash
|
||||
yarn job-runner
|
||||
|
||||
Reference in New Issue
Block a user