Skip to content

Commit

Permalink
Hourly clock
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Apr 27, 2024
1 parent 49d341a commit 27f0cdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clock.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ethereum, log } from "@graphprotocol/graph-ts"
import { ClockTick } from "../generated/schema"
import { MINUTES_15, VAULT_SNAPSHOT_PERIODS } from "./utils/time"
import { HOUR, VAULT_SNAPSHOT_PERIODS } from "./utils/time"
import { getClockTick } from "./entity/clock"
import { getBeefyCLProtocol } from "./entity/protocol"
import { getToken } from "./entity/token"
Expand All @@ -10,7 +10,7 @@ import { getBeefyCLStrategy, getBeefyCLVaultSnapshot, isVaultRunning } from "./e
export function handleClockTick(block: ethereum.Block): void {
const timestamp = block.timestamp

let tickRes1h = getClockTick(timestamp, MINUTES_15)
let tickRes1h = getClockTick(timestamp, HOUR)
if (!tickRes1h.isNew) {
log.debug("handleClockTick: tick already exists for 1h period", [])
return
Expand Down

0 comments on commit 27f0cdc

Please sign in to comment.