Skip to content

Commit

Permalink
fix eth update frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
soilking committed Oct 15, 2024
1 parent adb2755 commit 70954b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projects/subgraph-basin/manifests/ethereum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dataSources:
- handler: handleBlock
filter:
kind: polling
every: 300 # 5 minutes on ethereum
every: 25 # 5 minutes on ethereum
file: ../src/handlers/HourlySnapshotHandler.ts
templates:
- kind: ethereum/contract
Expand Down
3 changes: 2 additions & 1 deletion projects/subgraph-basin/src/entities/Well.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ export function takeWellHourlySnapshot(wellAddress: Address, hourID: i32, block:

let priorHourID = well.lastSnapshotHourID;
well.lastSnapshotHourID = hourID;
well.save();

let priorSnapshot = loadOrCreateWellHourlySnapshot(wellAddress, priorHourID, block);
let newSnapshot = loadOrCreateWellHourlySnapshot(wellAddress, hourID, block);
Expand Down Expand Up @@ -366,5 +365,7 @@ export function takeWellHourlySnapshot(wellAddress: Address, hourID: i32, block:
well.rollingWeeklyTransferVolumeUSD = well.rollingWeeklyTransferVolumeUSD.minus(oldest7d.deltaTransferVolumeUSD);
}
}
well.lastUpdateTimestamp = block.timestamp;
well.lastUpdateBlockNumber = block.number;
well.save();
}

0 comments on commit 70954b0

Please sign in to comment.