What is the best way to programmatically check if a spork is ongoing without trying to execute a transaction?

Daniela
Daniela
  • Updated

There is no direct way to programmatically check if a spork is ongoing without trying to execute a transaction. However, you can keep track of the spork schedule by following the #flow-validators-announcements channel on the Flow Discord server as mentioned in the Spork Process Overview.

For more detailed and programmatically accessible information, check the sporks.json file in the Flow GitHub repository. This file contains information about past sporks, including their start and end heights.

Please note that this method would require you to write a script to fetch and parse the JSON data from the file. If the spork is ongoing, the current block height (which can be fetched from the Flow blockchain) would be between the start and end heights of the spork.

For more information, please refer to our Flow documentation or reach out to the Flow community in Discord for further assistance.