mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-07 16:34:06 +00:00
Batch diff creation for subgraph entities updated in mapping code (#172)
* Batch diff creation for subgraph entities updated in mapping code * Propagate changes to graph-test-watcher and codegen
This commit is contained in:
@@ -141,10 +141,10 @@ export const instantiate = async (
|
||||
[dbData.id]: JSON.parse(JSON.stringify(dbData, jsonBigIntStringReplacer))
|
||||
};
|
||||
|
||||
// Create an auto-diff.
|
||||
assert(indexer.createDiffStaged);
|
||||
// Update the in-memory subgraph state.
|
||||
assert(indexer.updateSubgraphState);
|
||||
assert(context.contractAddress);
|
||||
await indexer.createDiffStaged(context.contractAddress, context.block.blockHash, diffData);
|
||||
indexer.updateSubgraphState(context.contractAddress, diffData);
|
||||
},
|
||||
|
||||
'log.log': (level: number, msg: number) => {
|
||||
|
||||
Reference in New Issue
Block a user