github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/fvm/blueprints/scripts/systemChunkTransactionTemplate.cdc (about)

     1  import FlowEpoch from "FlowEpoch"
     2  import NodeVersionBeacon from "NodeVersionBeacon"
     3  import RandomBeaconHistory from "RandomBeaconHistory"
     4  
     5  transaction {
     6      prepare(serviceAccount: auth(BorrowValue) &Account) {
     7          let epochHeartbeat = serviceAccount.storage.borrow<&FlowEpoch.Heartbeat>(from: FlowEpoch.heartbeatStoragePath)
     8              ?? panic("Could not borrow heartbeat from storage path")
     9          epochHeartbeat.advanceBlock()
    10  
    11          let versionBeaconHeartbeat = serviceAccount.storage
    12              .borrow<&NodeVersionBeacon.Heartbeat>(from: NodeVersionBeacon.HeartbeatStoragePath)
    13              ?? panic("Couldn't borrow NodeVersionBeacon.Heartbeat Resource")
    14          versionBeaconHeartbeat.heartbeat()
    15  
    16          let randomBeaconHistoryHeartbeat = serviceAccount.storage
    17              .borrow<&RandomBeaconHistory.Heartbeat>(from: RandomBeaconHistory.HeartbeatStoragePath)
    18              ?? panic("Couldn't borrow RandomBeaconHistory.Heartbeat Resource")
    19          randomBeaconHistoryHeartbeat.heartbeat(randomSourceHistory: randomSourceHistory())
    20      }
    21  }